1 |
I'm trying to make an ebuild for zile, a tiny emacs clone. |
2 |
|
3 |
When done manually, this works: |
4 |
|
5 |
./configure --prefix=/usr --infodir=/usr/share/info \ |
6 |
--mandir=/usr/share/man || die |
7 |
make |
8 |
|
9 |
When done in an ebuild, I get: |
10 |
|
11 |
gcc -c -I. -I.. -I. -I./../lib -march=i686 -O3 -pipe window.c |
12 |
make[1]: *** No rule to make target `term_ncurses/libterm_ncurses.a', needed |
13 |
by `zile'. Stop. |
14 |
make[1]: *** Waiting for unfinished jobs.... |
15 |
rm -f libterm_ncurses.a |
16 |
ar rc libterm_ncurses.a term_ncurses.o ncurses_key.o ncurses_minibuf.o |
17 |
ncurses_misc.o ncurses_redisplay.o |
18 |
ranlib libterm_ncurses.a |
19 |
make[2]: Leaving directory |
20 |
`/var/tmp/portage/zile-1.7/work/zile-1.7-a6/src/term_ncurses' |
21 |
make[1]: Leaving directory `/var/tmp/portage/zile-1.7/work/zile-1.7-a6/src' |
22 |
make: *** [all] Error 2 |
23 |
|
24 |
Whereas when it works by hand, I get: |
25 |
|
26 |
gcc -o zile basic.o bind.o buffer.o file.o fontlock.o fontlock_c.o |
27 |
fontlock_cpp.o fontlock_csharp.o fontlock_java.o funcs.o glue.o help.o keys.o |
28 |
killring.o line.o macro.o main.o minibuf.o rc.o redisplay.o registers.o |
29 |
search.o undo.o variables.o window.o term_ncurses/libterm_ncurses.a |
30 |
../lib/libzile.a -lncurses |
31 |
funcs.o: In function `F_shell_command_on_region': |
32 |
funcs.o(.text+0xeed): the use of `tmpnam' is dangerous, better use `mkstemp' |
33 |
echo '.\" Automatically generated file: NO DOT EDIT!' >zile.1 |
34 |
sed "s+@ETCDIR@+/usr/share/zile+" <./zile.1.in >>zile.1 |
35 |
make[1]: Leaving directory `/home/stephen/src/zile-1.7-a6/src' |
36 |
|
37 |
The entire ebuild is below. Thanks for any hints. |
38 |
|
39 |
#******************************************************************************* |
40 |
# Copyright 1999-2002 Gentoo Technologies, Inc. |
41 |
# Distributed under the terms of the GNU General Public License v2 |
42 |
# $Header: $ |
43 |
|
44 |
# NOTE: The comments in this file are for instruction and documentation. |
45 |
# They're not meant to appear with your final, production ebuild. Please |
46 |
# remember to remove them before submitting or committing your ebuild. That |
47 |
# doesn't mean you can't add your own comments though. |
48 |
|
49 |
# The 'Header' on the third line should just be left alone. When your ebuild |
50 |
# will be commited to cvs, the details on that line will be automatically |
51 |
# generated to contain the correct data. |
52 |
|
53 |
# Short one-line description of this package. |
54 |
DESCRIPTION="Zile is a tiny emacs clone; it's a customizable, self-documenting |
55 |
real-time open-source display editor." |
56 |
|
57 |
# Homepage, not used by Portage directly but handy for developer reference |
58 |
HOMEPAGE="http://zile.sourceforge.net/" |
59 |
|
60 |
# Point to any required sources; these will be automatically downloaded by |
61 |
# Portage. |
62 |
SRC_URI="mirror://sourceforge/zile/zile-1.7-a6.tar.gz" |
63 |
|
64 |
# License of the package. This must match the name of file(s) in |
65 |
# /usr/portage/licenses/. For complex license combination see the developer |
66 |
# docs on gentoo.org for details. |
67 |
LICENSE="BSD" |
68 |
|
69 |
# The SLOT variable is used to tell Portage if it's OK to keep multiple |
70 |
# versions of the same package installed at the same time. For example, |
71 |
# if we have a libfoo-1.2.2 and libfoo-1.3.2 (which is not compatible |
72 |
# with 1.2.2), it would be optimal to instruct Portage to not remove |
73 |
# libfoo-1.2.2 if we decide to upgrade to libfoo-1.3.2. To do this, |
74 |
# we specify SLOT="1.2" in libfoo-1.2.2 and SLOT="1.3" in libfoo-1.3.2. |
75 |
# emerge clean understands SLOTs, and will keep the most recent version |
76 |
# of each SLOT and remove everything else. |
77 |
# Note that normal applications should use SLOT="0" if possible, since |
78 |
# there should only be exactly one version installed at a time. |
79 |
# DO NOT USE SLOT=""! This tells Portage to disable SLOTs for this package. |
80 |
SLOT="0" |
81 |
|
82 |
# Using KEYWORDS, we can record masking information *inside* an ebuild |
83 |
# instead of relying on an external package.mask file. Right now, you |
84 |
# should set the KEYWORDS variable for every ebuild so that it contains |
85 |
# the names of all the architectures with which the ebuild works. We have |
86 |
# 4 official architecture names right now: "x86", "ppc", "sparc" and |
87 |
# "sparc64". So, if you've confirmed that your ebuild works on x86 and ppc, |
88 |
# you'd specify: KEYWORDS="x86 ppc" |
89 |
# For packages that are platform-independant (like Java, PHP or Perl |
90 |
# applications) specify all keywords. |
91 |
# DO NOT USE KEYWORDS="*". This is deprecated and only for backward |
92 |
# compatibility reasons. |
93 |
KEYWORDS="x86" |
94 |
|
95 |
# Build-time dependencies, such as |
96 |
# ssl? ( >=openssl-0.9.6b ) |
97 |
# >=perl-5.6.1-r1 |
98 |
# It is advisable to use the >= syntax show above, to reflect what you |
99 |
# had installed on your system when you tested the package. Then |
100 |
# other users hopefully won't be caught without the right version of |
101 |
# a dependency. |
102 |
DEPEND="sys-libs/ncurses" |
103 |
|
104 |
# Run-time dependencies, same as DEPEND if RDEPEND isn't defined: |
105 |
#RDEPEND="" |
106 |
|
107 |
# Source directory; the dir where the sources can be found (automatically |
108 |
# unpacked) inside ${WORKDIR}. S will get a default setting of |
109 |
${WORKDIR}/${P} |
110 |
# if you omit this line. |
111 |
|
112 |
S="${WORKDIR}/${P}" |
113 |
|
114 |
src_compile() { |
115 |
# Most open-source packages use GNU autoconf for configuration. |
116 |
# You should use something similar to the following lines to |
117 |
# configure your package before compilation. The "|| die" portion |
118 |
# at the end will stop the build process if the command fails. |
119 |
# You should use this at the end of critical commands in the build |
120 |
# process. (Hint: Most commands are critical, that is, the build |
121 |
# process should abort if they aren't successful.) |
122 |
cd $S"-a6" |
123 |
./configure --prefix=/usr --infodir=/usr/share/info \ |
124 |
--mandir=/usr/share/man || die "./configure failed" |
125 |
# --host=${CHOST} \ |
126 |
|
127 |
# Note the use of --infodir and --mandir, above. This is to make |
128 |
# this package FHS 2.2-compliant. For more information, see |
129 |
# http://www.pathname.com/fhs/ |
130 |
|
131 |
# emake (previously known as pmake) is a script that calls the |
132 |
# standard GNU make with parallel building options for speedier |
133 |
# builds (especially on SMP systems). Try emake first. It might |
134 |
# not work for some packages, in which case you'll have to resort |
135 |
# to normal "make". |
136 |
emake || die |
137 |
#make || die |
138 |
} |
139 |
|
140 |
src_install () { |
141 |
# You must *personally verify* that this trick doesn't install |
142 |
# anything outside of DESTDIR; do this by reading and |
143 |
# understanding the install part of the Makefiles. |
144 |
make DESTDIR=${D} install || die |
145 |
# For Makefiles that don't make proper use of DESTDIR, setting |
146 |
# prefix is often an alternative. However if you do this, then |
147 |
# you also need to specify mandir and infodir, since they were |
148 |
# passed to ./configure as absolute paths (overriding the prefix |
149 |
# setting). |
150 |
#make \ |
151 |
# prefix=${D}/usr \ |
152 |
# mandir=${D}/usr/share/man \ |
153 |
# infodir=${D}/usr/share/info \ |
154 |
# install || die |
155 |
# Again, verify the Makefiles! We don't want anything falling |
156 |
# outside of ${D}. |
157 |
} |
158 |
|
159 |
___________ |
160 |
Stephen |