Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13398 - in main/branches/prefix: . bin cnf pym pym/portage
Date: Sun, 26 Apr 2009 11:15:10
Message-Id: E1Ly2KA-0001L4-Kt@stork.gentoo.org
1 Author: grobian
2 Date: 2009-04-26 11:15:05 +0000 (Sun, 26 Apr 2009)
3 New Revision: 13398
4
5 Modified:
6 main/branches/prefix/Makefile.am
7 main/branches/prefix/bin/Makefile.in
8 main/branches/prefix/cnf/Makefile.in
9 main/branches/prefix/cnf/dispatch-conf.conf
10 main/branches/prefix/cnf/make.conf
11 main/branches/prefix/cnf/make.globals
12 main/branches/prefix/cnf/sets.conf
13 main/branches/prefix/configure.in
14 main/branches/prefix/pym/Makefile.in
15 main/branches/prefix/pym/portage/const_autotool.py
16 main/branches/prefix/subst-install.in
17 main/branches/prefix/tarball.sh
18 Log:
19 Revamped the entire buildsystem to become somewhat cleaner, at least more readable and faster. Still can't run make check after make, as we still only expand in the install phase. It needs excessive investments with incompatabilities with trunk to get this right.
20
21 Modified: main/branches/prefix/Makefile.am
22 ===================================================================
23 --- main/branches/prefix/Makefile.am 2009-04-25 11:06:17 UTC (rev 13397)
24 +++ main/branches/prefix/Makefile.am 2009-04-26 11:15:05 UTC (rev 13398)
25 @@ -1,3 +1,5 @@
26 +SHELL=@PORTAGE_BASH@
27 +
28 SUBDIRS = src man bin pym cnf
29
30 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
31 @@ -2,38 +4,3 @@
32
33 -BUILT_SOURCES = subst-install.vars
34 -
35 -subst-install: subst-install.vars
36 -
37 -#
38 -# shells vary interpreting backslash within single quote: echo '\\'
39 -# bourne shell: \
40 -# bash: \\
41 -#
42 -subst-install.vars: subst-install.vars.in
43 - @rm -f $@ \
44 - ; case `echo '\\'` in \
45 - \\) bss='\\\\\\\\';; \
46 - \\\\) bss='\\\\';; \
47 - *) echo "unknown shell escape behaviour"; exit 1 ;; \
48 - esac \
49 - ; { echo; sed -e "s,"'\\'"\",\",g" \
50 - -e "s,\\\\,$${bss},g" \
51 - -e "s,#,\\\\\\#,g" \
52 - -e "s,\","'\\'"\",g" \
53 - < subst-install.vars.in \
54 - ; echo "$@:" \
55 - ; echo " @echo 'creating \$$@'" \
56 - ; echo " @{ \\" \
57 - ; eval `grep '^all_configurevars=' $@.in` \
58 - ; for v in `echo $${all_configurevars}` all_configurevars \
59 - ; do echo " echo $${v}='\"\$$($${v})\"' ; \\" \
60 - ; done \
61 - ; echo " } > \$$@" \
62 - ; } \
63 - | ${MAKE} -f - $@
64 -
65 -distclean-local:
66 - rm -f subst-install.vars
67 -
68 -MAINTAINERCLEANFILES = subst-install.vars.in.in \
69 +MAINTAINERCLEANFILES = \
70 Makefile.in config.guess config.sub configure ltmain.sh aclocal.m4
71
72 Modified: main/branches/prefix/bin/Makefile.in
73 ===================================================================
74 --- main/branches/prefix/bin/Makefile.in 2009-04-25 11:06:17 UTC (rev 13397)
75 +++ main/branches/prefix/bin/Makefile.in 2009-04-26 11:15:05 UTC (rev 13398)
76 @@ -3,20 +3,18 @@
77 sysconfdir = @sysconfdir@
78 libdir = @libdir@
79
80 -srcdir=@srcdir@
81 -top_builddir=@top_builddir@
82 +srcdir = @srcdir@
83 +top_builddir = @top_builddir@
84
85 -portageuser = "@portageuser@"
86 -portagegroup = "@portagegroup@"
87 +portageuser = @portageuser@
88 +portagegroup = @portagegroup@
89
90 PORTAGE_BIN = @PORTAGE_BASE@/bin
91 -EBUILD_HELPER_BIN = $(PORTAGE_BIN)/ebuild-helpers
92 LN_S = @LN_S@
93 INSTALL = @INSTALL@
94 -INSTALL_script = @INSTALL_PROGRAM@ -o "$(portageuser)" -g "$(portagegroup)" -m 755
95 -INSTALL_scriptsubst = $(SHELL) ${top_builddir}/subst-install --installcmd='${INSTALL_script}'
96 +INSTALL_subst = $(top_builddir)/subst-install
97
98 -user_binprogs = \
99 +usr_binprogs = \
100 ebuild \
101 egencache \
102 emerge \
103 @@ -24,7 +22,7 @@
104 repoman \
105 xpak
106
107 -user_sbinprogs = \
108 +usr_sbinprogs = \
109 archive-conf \
110 dispatch-conf \
111 emaint \
112 @@ -35,41 +33,39 @@
113 quickpkg \
114 regenworld
115
116 -ebuild_helperprogs = \
117 - ( cd ${srcdir}/ebuild-helpers && find . -name 'Makefile*' -prune \
118 - -o -name '.svn' -prune -o -type f -print )
119 +list_sourcedir_dirs = \
120 + ( cd "$(srcdir)" && find . -name '.svn' -prune -o -type d -print )
121
122 -list_sourcedir = \
123 - ( cd ${srcdir} && find . -name 'Makefile*' -prune \
124 - -o -name '.svn' -prune -o -name 'ebuild-helpers' -prune \
125 - -o -type f -print )
126 -
127 all:
128
129 install:
130 $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(PORTAGE_BIN)
131 - $(list_sourcedir) | while read f \
132 - ; do echo "$(INSTALL_scriptsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_BIN)/$${f}" \
133 - ; $(INSTALL_scriptsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_BIN)/$${f} \
134 - ; done
135 - $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(EBUILD_HELPER_BIN)
136 - $(ebuild_helperprogs) | while read f \
137 - ; do echo "$(INSTALL_scriptsubst) ${srcdir}/ebuild-helpers/$${f} $(DESTDIR)$(EBUILD_HELPER_BIN)/$${f}" \
138 - ; $(INSTALL_scriptsubst) ${srcdir}/ebuild-helpers/$${f} $(DESTDIR)$(EBUILD_HELPER_BIN)/$${f} \
139 - ; done
140 + $(list_sourcedir_dirs) | while read f ; do \
141 + files=( ) ; \
142 + for t in "$(srcdir)/$${f}"/* ; do \
143 + [[ -d $${t} ]] && continue ; \
144 + [[ $${t} == Makefile* ]] && continue ; \
145 + files=( "$${files[@]}" "$${t}" ) ; \
146 + done ; \
147 + $(INSTALL) -d -m 755 \
148 + -o "$(portageuser)" -g "$(portagegroup)" \
149 + "$(DESTDIR)$(PORTAGE_BIN)/$${f}" && \
150 + $(INSTALL_subst) -m 755 \
151 + -o "$(portageuser)" -g "$(portagegroup)" \
152 + -t "$(DESTDIR)$(PORTAGE_BIN)/$${f}" \
153 + "$${files[@]}" ; \
154 + done
155 $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(prefix)/bin
156 cd $(DESTDIR)$(prefix)/bin \
157 - ; for p in $(user_binprogs) \
158 + ; for p in $(usr_binprogs) \
159 ; do test -f $(DESTDIR)$(PORTAGE_BIN)/$${p} \
160 || { echo "$(DESTDIR)$(PORTAGE_BIN)/$${p} does not exist" ; exit 1 ; } \
161 - ; echo "rm -f $(DESTDIR)$(prefix)/bin/$${p}" \
162 ; rm -f $(DESTDIR)$(prefix)/bin/$${p} \
163 - ; echo "$(LN_S) ../lib/portage/bin/$${p} $${p}" \
164 ; $(LN_S) ../lib/portage/bin/$${p} $${p} || exit 1 \
165 ; done
166 $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(prefix)/sbin
167 cd $(DESTDIR)$(prefix)/sbin \
168 - ; for p in $(user_sbinprogs) \
169 + ; for p in $(usr_sbinprogs) \
170 ; do test -f $(DESTDIR)$(PORTAGE_BIN)/$${p} \
171 || { echo "$(DESTDIR)$(PORTAGE_BIN)/$${p} does not exist" ; exit 1 ; } \
172 ; echo "rm -f $(DESTDIR)$(prefix)/sbin/$${p}" \
173 @@ -78,33 +74,4 @@
174 ; $(LN_S) ../lib/portage/bin/$${p} $${p} || exit 1 \
175 ; done
176
177 -uninstall:
178 - $(list_sourcedir) | while read f \
179 - ; do echo "rm -f $(DESTDIR)$(PORTAGE_BIN)/$${f}" \
180 - ; rm -f $(DESTDIR)$(PORTAGE_BIN)/$${f} \
181 - ; done
182 - $(ebuild_helperprogs) | while read f \
183 - ; do echo "rm -f $(DESTDIR)$(EBUILD_HELPER_BIN)/$${f}" \
184 - ; rm -f $(DESTDIR)$(EBUILD_HELPER_BIN)/$${f} \
185 - ; done
186 - for p in $(user_binprogs) \
187 - ; do echo "rm -f $(DESTDIR)$(prefix)/bin/$${p}" \
188 - ; rm -f $(DESTDIR)$(prefix)/bin/$${p} \
189 - ; done
190 - for p in $(user_sbinprogs) \
191 - ; do echo "rm -f $(DESTDIR)$(prefix)/sbin/$${p}" \
192 - ; rm -f $(DESTDIR)$(prefix)/sbin/$${p} \
193 - ; done
194 -
195 -distdir:
196 - $(list_sourcedir) | while read f \
197 - ; do echo "$(INSTALL_script) ${srcdir}/$${f} $(distdir)/$${f}" \
198 - ; $(INSTALL_script) ${srcdir}/$${f} $(distdir)/$${f} \
199 - ; done
200 -
201 -all dvi check installcheck:
202 -clean distclean maintainer-clean:
203 -
204 -.PHONY: all install distdir uninstall
205 -.PHONY: dvi check installcheck
206 -.PHONY: clean distclean maintainer-clean
207 +.PHONY: all install
208
209 Modified: main/branches/prefix/cnf/Makefile.in
210 ===================================================================
211 --- main/branches/prefix/cnf/Makefile.in 2009-04-25 11:06:17 UTC (rev 13397)
212 +++ main/branches/prefix/cnf/Makefile.in 2009-04-26 11:15:05 UTC (rev 13398)
213 @@ -1,48 +1,36 @@
214 prefix = @prefix@
215 sysconfdir = @sysconfdir@
216 datadir = @datadir@
217 -DEFAULT_PATH = @DEFAULT_PATH@
218
219 -srcdir=@srcdir@
220 -top_builddir=@top_builddir@
221 +srcdir = @srcdir@
222 +top_builddir = @top_builddir@
223 +PORTAGE_CONF = $(datadir)/portage/config
224
225 -portageuser = "@portageuser@"
226 -portagegroup = "@portagegroup@"
227 +portageuser = @portageuser@
228 +portagegroup = @portagegroup@
229
230 INSTALL = @INSTALL@
231 -INSTALL_cnf = @INSTALL_PROGRAM@ -o "$(portageuser)" -g "$(portagegroup)" -m 644
232 -INSTALL_cnfsubst = $(SHELL) ${top_builddir}/subst-install --installcmd='${INSTALL_cnf}'
233 +INSTALL_subst = ${top_builddir}/subst-install
234 +LN_S = @LN_S@
235
236 -list_sourcedir = \
237 - ( cd ${srcdir} \
238 - && find . -name 'CVS' -prune \
239 - -o -name 'Makefile*' -prune \
240 - -o -name 'make.*' -type f -print \
241 - -o -name 'dispatch-conf.conf' -type f -print \
242 - -o -name 'etc-update.conf' -type f -print \
243 - )
244 -
245 all:
246
247 install:
248 - $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(datadir)/portage/config
249 - $(INSTALL_cnfsubst) $(srcdir)/make.globals $(DESTDIR)$(datadir)/portage/config/make.globals
250 - $(INSTALL_cnfsubst) $(srcdir)/make.conf $(DESTDIR)$(datadir)/portage/config/make.conf.example
251 - $(INSTALL_cnfsubst) $(srcdir)/sets.conf $(DESTDIR)$(datadir)/portage/config/sets.conf
252 + $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(PORTAGE_CONF)
253 + $(INSTALL_subst) \
254 + -o "$(portageuser)" -g "$(portagegroup)" \
255 + -t "$(DESTDIR)$(PORTAGE_CONF)" \
256 + "$(srcdir)"/make.globals \
257 + "$(srcdir)"/sets.conf
258 + $(INSTALL_subst) \
259 + -o "$(portageuser)" -g "$(portagegroup)" \
260 + "$(srcdir)"/make.conf "$(DESTDIR)$(PORTAGE_CONF)"/make.conf.example
261 $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(sysconfdir)
262 - $(INSTALL_cnfsubst) $(srcdir)/dispatch-conf.conf $(DESTDIR)$(sysconfdir)/dispatch-conf.conf
263 - $(INSTALL_cnfsubst) $(srcdir)/etc-update.conf $(DESTDIR)$(sysconfdir)/etc-update.conf
264 - ( cd $(DESTDIR)$(sysconfdir) && ln -s $(DESTDIR)$(datadir)/portage/config/make.globals )
265 -
266 -distdir:
267 - $(list_sourcedir) | while read f \
268 - ; do echo $(INSTALL_cnf) ${srcdir}/$${f} $(distdir)/$${f} \
269 - ; $(INSTALL_cnf) ${srcdir}/$${f} $(distdir)/$${f} \
270 - ; done
271 + $(INSTALL_subst) \
272 + -o "$(portageuser)" -g "$(portagegroup)" \
273 + -t "$(DESTDIR)$(sysconfdir)" \
274 + "$(srcdir)"/dispatch-conf.conf \
275 + "$(srcdir)"/etc-update.conf
276 + ( cd $(DESTDIR)$(sysconfdir) && $(LN_S) $(DESTDIR)$(PORTAGE_CONF)/make.globals )
277
278 -all dvi check installcheck:
279 -uninstall clean distclean maintainer-clean:
280 -
281 -.PHONY: all install distdir uninstall
282 -.PHONY: dvi check installcheck
283 -.PHONY: clean distclean maintainer-clean
284 +.PHONY: all install
285
286 Modified: main/branches/prefix/cnf/dispatch-conf.conf
287 ===================================================================
288 --- main/branches/prefix/cnf/dispatch-conf.conf 2009-04-25 11:06:17 UTC (rev 13397)
289 +++ main/branches/prefix/cnf/dispatch-conf.conf 2009-04-26 11:15:05 UTC (rev 13398)
290 @@ -3,7 +3,7 @@
291 #
292
293 # Directory to archive replaced configs
294 -archive-dir=@DOMAIN_PREFIX@/etc/config-archive
295 +archive-dir="@PORTAGE_EPREFIX@"/etc/config-archive
296
297 # Use rcs for storing files in the archive directory?
298 # (yes or no)
299
300 Modified: main/branches/prefix/cnf/make.conf
301 ===================================================================
302 --- main/branches/prefix/cnf/make.conf 2009-04-25 11:06:17 UTC (rev 13397)
303 +++ main/branches/prefix/cnf/make.conf 2009-04-26 11:15:05 UTC (rev 13398)
304 @@ -74,7 +74,7 @@
305 # PORTAGE_TMPDIR is the location portage will use for compilations and
306 # temporary storage of data. This can get VERY large depending upon
307 # the application being installed.
308 -#PORTAGE_TMPDIR=@DOMAIN_PREFIX@/var/tmp
309 +#PORTAGE_TMPDIR=@PORTAGE_EPREFIX@/var/tmp
310 #
311 # PORTDIR is the location of the portage tree. This is the repository
312 # for all profile information as well as all ebuilds. If you change
313 @@ -85,7 +85,7 @@
314 # will protect the default locations of DISTDIR and PKGDIR, but users are
315 # warned that any other locations inside PORTDIR are not necessarily safe
316 # for data storage.
317 -#PORTDIR=@DOMAIN_PREFIX@/usr/portage
318 +#PORTDIR=@PORTAGE_EPREFIX@/usr/portage
319 #
320 # DISTDIR is where all of the source code tarballs will be placed for
321 # emerges. After packages are built, it is safe to remove any and
322 @@ -95,14 +95,14 @@
323 # eclean from the gentoolkit package. Note that locations under
324 # /usr/portage are not necessarily safe for data storage. See the
325 # PORTDIR documentation for more information.
326 -#DISTDIR=@DOMAIN_PREFIX@/usr/portage/distfiles
327 +#DISTDIR=@PORTAGE_EPREFIX@/usr/portage/distfiles
328 #
329 # PKGDIR is the location of binary packages that you can have created
330 # with '--buildpkg' or '-b' while emerging a package. This can get
331 # up to several hundred megs, or even a few gigs. Note that
332 # locations under /usr/portage are not necessarily safe for data
333 # storage. See the PORTDIR documentation for more information.
334 -#PKGDIR=@DOMAIN_PREFIX@/usr/portage/packages
335 +#PKGDIR=@PORTAGE_EPREFIX@/usr/portage/packages
336 #
337 # PORT_LOGDIR is the location where portage will store all the logs it
338 # creates from each individual merge. They are stored as
339 @@ -115,7 +115,7 @@
340 # PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
341 # concern that they will be deleted by rsync updates. Default is not
342 # defined.
343 -#PORTDIR_OVERLAY=@DOMAIN_PREFIX@/usr/local/portage
344 +#PORTDIR_OVERLAY=@PORTAGE_EPREFIX@/usr/local/portage
345
346 # Fetching files
347 # ==============
348 @@ -130,20 +130,20 @@
349 # at \${DISTDIR}/\${FILE}.
350 #
351 # Default fetch command (5 tries, passive ftp for firewall compatibility)
352 -#FETCHCOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
353 -#RESUMECOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
354 +#FETCHCOMMAND="@PORTAGE_EPREFIX@/usr/bin/wget -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
355 +#RESUMECOMMAND="@PORTAGE_EPREFIX@/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
356 #
357 # Using wget, ratelimiting downloads
358 -#FETCHCOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -t 5 -T 60 --passive-ftp --limit-rate=200k -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
359 -#RESUMECOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -c -t 5 -T 60 --passive-ftp --limit-rate=200k -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
360 +#FETCHCOMMAND="@PORTAGE_EPREFIX@/usr/bin/wget -t 5 -T 60 --passive-ftp --limit-rate=200k -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
361 +#RESUMECOMMAND="@PORTAGE_EPREFIX@/usr/bin/wget -c -t 5 -T 60 --passive-ftp --limit-rate=200k -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
362 #
363 # curl groks urls
364 -#FETCHCOMMAND="@DOMAIN_PREFIX@/usr/bin/curl -f --connect-timeout 15 -# -o \${DISTDIR}/\${FILE} \${URI}"
365 -#RESUMECOMMAND="@DOMAIN_PREFIX@/usr/bin/curl -f --connect-timeout 15 -# -C - -o \${DISTDIR}/\${FILE} \${URI}"
366 +#FETCHCOMMAND="@PORTAGE_EPREFIX@/usr/bin/curl -f --connect-timeout 15 -# -o \${DISTDIR}/\${FILE} \${URI}"
367 +#RESUMECOMMAND="@PORTAGE_EPREFIX@/usr/bin/curl -f --connect-timeout 15 -# -C - -o \${DISTDIR}/\${FILE} \${URI}"
368 #
369 # Lukemftp (BSD ftp):
370 -#FETCHCOMMAND="@DOMAIN_PREFIX@/usr/bin/lukemftp -s -a -o \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
371 -#RESUMECOMMAND="@DOMAIN_PREFIX@/usr/bin/lukemftp -s -a -R -o \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
372 +#FETCHCOMMAND="@PORTAGE_EPREFIX@/usr/bin/lukemftp -s -a -o \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
373 +#RESUMECOMMAND="@PORTAGE_EPREFIX@/usr/bin/lukemftp -s -a -R -o \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
374 #
375 # Portage uses GENTOO_MIRRORS to specify mirrors to use for source retrieval.
376 # The list is a space separated list which is read left to right. If you use
377
378 Modified: main/branches/prefix/cnf/make.globals
379 ===================================================================
380 --- main/branches/prefix/cnf/make.globals 2009-04-25 11:06:17 UTC (rev 13397)
381 +++ main/branches/prefix/cnf/make.globals 2009-04-26 11:15:05 UTC (rev 13398)
382 @@ -25,17 +25,17 @@
383 GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
384
385 # Repository Paths
386 -PORTDIR=@DOMAIN_PREFIX@/usr/portage
387 -DISTDIR=@DOMAIN_PREFIX@/usr/portage/distfiles
388 -PKGDIR=@DOMAIN_PREFIX@/usr/portage/packages
389 -RPMDIR=@DOMAIN_PREFIX@/usr/portage/rpm
390 +PORTDIR="@PORTAGE_EPREFIX@/usr/portage"
391 +DISTDIR="@PORTAGE_EPREFIX@/usr/portage/distfiles"
392 +PKGDIR="@PORTAGE_EPREFIX@/usr/portage/packages"
393 +RPMDIR="@PORTAGE_EPREFIX@/usr/portage/rpm"
394
395 # Temporary build directory
396 -PORTAGE_TMPDIR=@DOMAIN_PREFIX@/var/tmp
397 +PORTAGE_TMPDIR="@PORTAGE_EPREFIX@/var/tmp"
398
399 # Fetching command (5 tries, passive ftp for firewall compatibility)
400 -FETCHCOMMAND="wget -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
401 -RESUMECOMMAND="wget -c -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
402 +FETCHCOMMAND="@PORTAGE_WGET@ -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
403 +RESUMECOMMAND="@PORTAGE_WGET@ -c -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
404
405 # Default user options
406 FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox
407
408 Modified: main/branches/prefix/cnf/sets.conf
409 ===================================================================
410 --- main/branches/prefix/cnf/sets.conf 2009-04-25 11:06:17 UTC (rev 13397)
411 +++ main/branches/prefix/cnf/sets.conf 2009-04-26 11:15:05 UTC (rev 13398)
412 @@ -38,7 +38,7 @@
413 [usersets]
414 class = portage.sets.files.StaticFileSet
415 multiset = true
416 -directory = @DOMAIN_PREFIX@/etc/portage/sets
417 +directory = @PORTAGE_EPREFIX@/etc/portage/sets
418
419 # Set to rebuild all packages that need a preserved lib that only remains due
420 # to FEATURES=preserve-libs
421
422 Modified: main/branches/prefix/configure.in
423 ===================================================================
424 --- main/branches/prefix/configure.in 2009-04-25 11:06:17 UTC (rev 13397)
425 +++ main/branches/prefix/configure.in 2009-04-26 11:15:05 UTC (rev 13398)
426 @@ -17,10 +17,10 @@
427 AM_INIT_AUTOMAKE
428
429 dnl Checks for programs.
430 -dnl store clfags prior, otherwise it's not propagated.
431 +dnl store cflags prior, otherwise it's not propagated.
432 if test "x$CFLAGS" != "x"
433 then
434 -CFLAGS=$CFLAGS
435 + CFLAGS=$CFLAGS
436 fi
437
438 AC_PREFIX_DEFAULT([/usr])
439 @@ -46,7 +46,6 @@
440 GENTOO_PATH_GNUPROG(PORTAGE_GREP, [grep])
441
442 dnl Checks for header files.
443 -AC_HEADER_STDC
444 AC_CHECK_HEADERS([string.h strings.h errno.h unistd.h stdio.h stdlib.h])
445 AC_CHECK_HEADERS([sys/stat.h sys/types.h dirent.h sys/time.h alloca.h])
446 AC_CHECK_HEADERS([fcntl.h])
447 @@ -193,37 +192,25 @@
448 AC_ARG_WITH(offset-prefix,
449 AC_HELP_STRING([--with-offset-prefix],
450 [specify the installation prefix for all packages, defaults to an empty string]),
451 - [DOMAIN_PREFIX=$withval],
452 - [DOMAIN_PREFIX=''])
453 + [PORTAGE_EPREFIX=$withval],
454 + [PORTAGE_EPREFIX=''])
455
456 -if test "x$DOMAIN_PREFIX" = "x"
457 +if test "x$PORTAGE_EPREFIX" != "x"
458 then
459 - PORTAGE_EPREFIX='""'
460 -else
461 - PORTAGE_EPREFIX='path.normpath("'"$DOMAIN_PREFIX"'")'
462 + PORTAGE_EPREFIX=`${PORTAGE_PYTHON} -c "import os; print os.path.normpath('$PORTAGE_EPREFIX')"`
463 fi
464
465 -DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
466 +DEFAULT_PATH="${PORTAGE_EPREFIX}/usr/bin:${PORTAGE_EPREFIX}/usr/sbin:${PORTAGE_EPREFIX}/bin:${PORTAGE_EPREFIX}/sbin:${PORTAGE_EPREFIX}/bin"
467 AC_ARG_WITH(default-path,
468 AC_HELP_STRING([--with-default-path], [specify additional PATHs available to the portage build environment ]),
469 [DEFAULT_PATH="${DEFAULT_PATH}":$withval],
470 [DEFAULT_PATH="${DEFAULT_PATH}"])
471
472 -AC_CONFIG_FILES([ Makefile ])
473 -AC_CONFIG_FILES([ subst-install ])
474 -AC_CONFIG_FILES([ subst-install.vars.in ])
475 -AC_CONFIG_FILES([ src/Makefile ])
476 -AC_CONFIG_FILES([ man/Makefile ])
477 -AC_CONFIG_FILES([ bin/Makefile ])
478 -AC_CONFIG_FILES([ pym/Makefile ])
479 -AC_CONFIG_FILES([ cnf/Makefile ])
480 -
481 AC_SUBST(portageuser)
482 AC_SUBST(portagegroup)
483 AC_SUBST(rootuser)
484 AC_SUBST(rootuid)
485 AC_SUBST(rootgid)
486 -AC_SUBST(DOMAIN_PREFIX)
487 AC_SUBST(PORTAGE_EPREFIX)
488 AC_SUBST(DEFAULT_PATH)
489 AC_SUBST(PORTAGE_BASE,['${exec_prefix}/lib/portage'])
490 @@ -239,20 +226,14 @@
491 AC_SUBST(PORTAGE_XARGS)
492 AC_SUBST(PORTAGE_GREP)
493
494 -AC_MSG_CHECKING([for a list of variables known by configure])
495 -pt_configvars=`sed -n -e "/^ac_subst_vars='/,/'$/p" ${srcdir}/configure | sed -e "s/^ac_subst_vars='//" -e "s/'$//"`
496 -{
497 - pt_all_configurevars=
498 - for pt_configvar in ${pt_configvars}
499 - do
500 - echo "${pt_configvar}=@${pt_configvar}@"
501 - pt_all_configurevars="${pt_all_configurevars} ${pt_configvar}"
502 - done
503 +AC_CONFIG_FILES([subst-install], [chmod +x subst-install])
504 +AC_CONFIG_FILES([
505 + Makefile
506 + src/Makefile
507 + man/Makefile
508 + bin/Makefile
509 + pym/Makefile
510 + cnf/Makefile
511 +])
512
513 - echo "all_configurevars='${pt_all_configurevars}'"
514 -
515 -} > subst-install.vars.in.in
516 -$as_unset pt_configvar pt_configvars pt_all_configurevars
517 -AC_MSG_RESULT([ok])
518 -
519 AC_OUTPUT
520
521 Modified: main/branches/prefix/pym/Makefile.in
522 ===================================================================
523 --- main/branches/prefix/pym/Makefile.in 2009-04-25 11:06:17 UTC (rev 13397)
524 +++ main/branches/prefix/pym/Makefile.in 2009-04-26 11:15:05 UTC (rev 13398)
525 @@ -7,64 +7,28 @@
526 srcdir=@srcdir@
527 top_builddir=@top_builddir@
528
529 -portageuser = "@portageuser@"
530 -portagegroup = "@portagegroup@"
531 +portageuser = @portageuser@
532 +portagegroup = @portagegroup@
533
534 PORTAGE_PYM = @PORTAGE_BASE@/pym
535 INSTALL = @INSTALL@
536 -INSTALL_PY = @INSTALL_DATA@ -o "$(portageuser)" -g "$(portagegroup)"
537 -INSTALL_PYsubst = $(SHELL) ${top_builddir}/subst-install --installcmd='${INSTALL_PY}'
538 +INSTALL_subst = ${top_builddir}/subst-install
539
540 list_sourcedir_dirs = \
541 - ( cd ${srcdir} && find . \
542 - -name 'CVS' -prune \
543 - -o -name '.svn' -prune \
544 - -o -type d -print )
545 + ( cd "$(srcdir)" && find . -name '.svn' -prune -o -type d -print )
546
547 -list_sourcedir = \
548 - ( cd ${srcdir} && find . \
549 - -name 'CVS' -prune \
550 - -o -name '.\#*' -prune \
551 - -o -name '.svn' -prune \
552 - -o -type f -name '*.py' \
553 - -print )
554 -
555 all:
556
557 install:
558 $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(PORTAGE_PYM)
559 - $(list_sourcedir_dirs) | while read f \
560 - ; do echo $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(PORTAGE_PYM)/$${f} \
561 - ; $(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)" $(DESTDIR)$(PORTAGE_PYM)/$${f} \
562 + $(list_sourcedir_dirs) | while read f ; do \
563 + $(INSTALL) -d -m 755 \
564 + -o "$(portageuser)" -g "$(portagegroup)" \
565 + "$(DESTDIR)$(PORTAGE_PYM)/$${f}" && \
566 + $(INSTALL_subst) \
567 + -o "$(portageuser)" -g "$(portagegroup)" \
568 + -t "$(DESTDIR)$(PORTAGE_PYM)/$${f}" \
569 + "$(srcdir)/$${f}"/*.py \
570 ; done
571 - $(list_sourcedir) | while read f \
572 - ; do echo $(INSTALL_PYsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_PYM)/$${f} \
573 - ; $(INSTALL_PYsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_PYM)/$${f} \
574 - ; done
575
576 -distdir:
577 - $(list_sourcedir_dirs) | while read f \
578 - ; do echo $(INSTALL) -d $(distdir)/$${f} \
579 - ; $(INSTALL) -d $(distdir)/$${f} \
580 - ; done
581 - $(list_sourcedir) | while read f \
582 - ; do echo $(INSTALL) ${srcdir}/$${f} $(distdir)/$${f} \
583 - ; $(INSTALL) ${srcdir}/$${f} $(distdir)/$${f} \
584 - ; done
585 -
586 -uninstall:
587 - $(list_sourcedir) | while read f \
588 - ; do echo rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f} \
589 - ; rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f} \
590 - ; echo rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}c \
591 - ; rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}c \
592 - ; echo rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}o \
593 - ; rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}o \
594 - ; done
595 -
596 -all dvi check installcheck:
597 -clean distclean maintainer-clean:
598 -
599 -.PHONY: all install distdir
600 -.PHONY: dvi check installcheck
601 -.PHONY: clean distclean maintainer-clean
602 +.PHONY: all install
603
604 Modified: main/branches/prefix/pym/portage/const_autotool.py
605 ===================================================================
606 --- main/branches/prefix/pym/portage/const_autotool.py 2009-04-25 11:06:17 UTC (rev 13397)
607 +++ main/branches/prefix/pym/portage/const_autotool.py 2009-04-26 11:15:05 UTC (rev 13398)
608 @@ -10,10 +10,10 @@
609
610 from os import path
611
612 -EPREFIX = @PORTAGE_EPREFIX@
613 -SYSCONFDIR = path.normpath("@sysconfdir@")
614 -DATADIR = path.normpath("@datadir@")
615 -PORTAGE_BASE = path.normpath("@PORTAGE_BASE@")
616 +EPREFIX = "@PORTAGE_EPREFIX@"
617 +SYSCONFDIR = "@sysconfdir@"
618 +DATADIR = "@datadir@"
619 +PORTAGE_BASE = "@PORTAGE_BASE@"
620
621 portagegroup = "@portagegroup@"
622 portageuser = "@portageuser@"
623
624 Modified: main/branches/prefix/subst-install.in
625 ===================================================================
626 --- main/branches/prefix/subst-install.in 2009-04-25 11:06:17 UTC (rev 13397)
627 +++ main/branches/prefix/subst-install.in 2009-04-26 11:15:05 UTC (rev 13398)
628 @@ -1,72 +1,71 @@
629 -#!@BASH@
630 +#!@PORTAGE_BASH@
631
632 -SED="@PORTAGE_SED@"
633 -RM="@RM@"
634 -BASENAME="@BASENAME@"
635 -DIRNAME="@DIRNAME@"
636 +# for expansion below we need some things to be defined
637 +prefix="@prefix@"
638 +exec_prefix="@exec_prefix@"
639
640 -case "${SED}" in ""|@*@) SED=sed ;; esac
641 -case "${RM}" in ""|@*@) RM=rm ;; esac
642 -case "${BASENAME}" in ""|@*@) BASENAME=basename ;; esac
643 -case "${DIRNAME}" in ""|@*@) DIRNAME=dirname ;; esac
644 +# there are many ways to do this all dynamic, but we only care for raw
645 +# speed here, so let configure fill in this list and be done with it
646 +at='@'
647 +sedexp=(
648 + -e "s,${at}DEFAULT_PATH${at},@DEFAULT_PATH@,g"
649 + -e "s,${at}EGREP${at},@EGREP@,g"
650 + -e "s,${at}PORTAGE_BASE${at},@PORTAGE_BASE@,g"
651 + -e "s,${at}PORTAGE_BASENAME${at},@PORTAGE_BASENAME@,g"
652 + -e "s,${at}PORTAGE_BASH${at},@PORTAGE_BASH@,g"
653 + -e "s,${at}PORTAGE_DIRNAME${at},@PORTAGE_DIRNAME@,g"
654 + -e "s,${at}PORTAGE_EPREFIX${at},@PORTAGE_EPREFIX@,g"
655 + -e "s,${at}PORTAGE_FIND${at},@PORTAGE_FIND@,g"
656 + -e "s,${at}PORTAGE_GREP${at},@PORTAGE_GREP@,g"
657 + -e "s,${at}PORTAGE_MV${at},@PORTAGE_MV@,g"
658 + -e "s,${at}PORTAGE_PYTHON${at},@PORTAGE_PYTHON@,g"
659 + -e "s,${at}PORTAGE_RM${at},@PORTAGE_RM@,g"
660 + -e "s,${at}PORTAGE_SED${at},@PORTAGE_SED@,g"
661 + -e "s,${at}PORTAGE_WGET${at},@PORTAGE_WGET@,g"
662 + -e "s,${at}PORTAGE_XARGS${at},@PORTAGE_XARGS@,g"
663 + -e "s,${at}datadir${at},@datadir@,g"
664 + -e "s,${at}portagegroup${at},@portagegroup@,g"
665 + -e "s,${at}portageuser${at},@portageuser@,g"
666 + -e "s,${at}rootgid${at},@rootgid@,g"
667 + -e "s,${at}rootuid${at},@rootuid@,g"
668 + -e "s,${at}rootuser${at},@rootuser@,g"
669 + -e "s,${at}sysconfdir${at},@sysconfdir@,g"
670 +)
671
672 -mydir="`${DIRNAME} $0`"
673 -myname="`${BASENAME} $0`"
674 -mydir="`cd ${mydir};pwd`"
675 -me="${mydir}/${myname}"
676 +sources=( )
677 +target=
678 +args=( "$@" )
679
680 -. ${mydir}/subst-install.vars
681 -
682 -substinstall_tmpdir="${TMPDIR-/tmp}/${myname}.$$"
683 -trap "${RM} -rf \${substinstall_tmpdir}" "0"
684 -mkdir -p "${substinstall_tmpdir}" \
685 -|| { echo "cannot create directory ${substinstall_tmpdir}" >&2 ; exit 1 ; }
686 -
687 -substinstall_tmpsed="${substinstall_tmpdir}/sedscript"
688 -
689 -{ for v in ${all_configurevars}
690 - do
691 - eval "echo \"s,@${v}@,\${${v}},g;\""
692 - done
693 -} | "${SED}" 's/^s,@/s@@/; s/@,/@@/; s/,g;$/@;/; s/[\\&,]/\\&/g;
694 - s/^s@@/s,@/; s/@@/@,/; s/@;$/,g;/' > "${substinstall_tmpsed}"
695 -
696 -substinstall_installcmd=
697 -substinstall_sources=
698 -substinstall_target=
699 -
700 -while [ "$1" ]
701 -do
702 - substinstall_arg="$1"
703 - shift
704 - case "${substinstall_arg}" in
705 - --installcmd=*)
706 - substinstall_installcmd=`echo "${substinstall_arg}" | "${SED}" -e 's,^--installcmd=,,'`
707 +while [[ ${#@} != 0 ]] ; do
708 + case "$1" in
709 + -t)
710 + [[ -n ${target} ]] && sources=( "${sources[@]}" "${target##*/}" )
711 + shift
712 + target=":${1}"
713 ;;
714 - *)
715 - substinstall_sources="${substinstall_sources} ${substinstall_target}"
716 - substinstall_target="${substinstall_arg}"
717 + -*)
718 + shift
719 ;;
720 + *)
721 + if [[ -z ${target} ]] ; then
722 + target="${1}"
723 + elif [[ ${target} != ":"* ]] ; then
724 + sources=( "${sources[@]}" "${target##*/}" )
725 + target="${1}"
726 + else
727 + sources=( "${sources[@]}" "${1##*/}" )
728 + fi
729 + ;;
730 esac
731 + shift
732 done
733
734 -[ -n "${substinstall_installcmd}" ] || { echo "missing --installcmd=" ; exit 1 ; }
735 -
736 -substinstall_tmpsources=
737 -
738 -for substinstall_s in ${substinstall_sources}
739 -do
740 - [ -r "${substinstall_s}" ] || { echo "cannot read ${substinstall_s}" >&2 ; exit 1 ; }
741 - tmpsource="${substinstall_tmpdir}/`basename ${substinstall_s}`.subst"
742 - "${SED}" -f "${substinstall_tmpsed}" < "${substinstall_s}" > "${tmpsource}" \
743 - || { echo "cannot sed from ${substinstall_s} to ${tmpsource}" >&2 ; exit 1 ; }
744 - substinstall_tmpsources="${substinstall_tmpsources} ${tmpsource}"
745 -done
746 -
747 -eval "${substinstall_installcmd} ${substinstall_tmpsources} ${substinstall_target}"
748 -
749 -substinstall_installrv=$?
750 -
751 -"${RM}" -rf "${substinstall_tmpdir}"
752 -
753 -exit ${substinstall_installrv}
754 +target=${target#:}
755 +INSTALL="@INSTALL@"
756 +echo @INSTALL_DATA@ "${args[@]}"
757 +if [[ ! -d ${target} ]] ; then
758 + # either install will die, or it was just a single file copy
759 + @INSTALL_DATA@ "${args[@]}" && sed -i "${sedexp[@]}" "${target}"
760 +else
761 + @INSTALL_DATA@ "${args[@]}" && sed -i "${sedexp[@]}" "${sources[@]/#/${target}/}"
762 +fi
763
764 Modified: main/branches/prefix/tarball.sh
765 ===================================================================
766 --- main/branches/prefix/tarball.sh 2009-04-25 11:06:17 UTC (rev 13397)
767 +++ main/branches/prefix/tarball.sh 2009-04-26 11:15:05 UTC (rev 13398)
768 @@ -30,7 +30,6 @@
769 sed -i -e '/^VERSION=/s/^.*$/VERSION="'${V}-prefix'"/' ${DEST}/pym/portage/__init__.py
770 sed -i -e "s/##VERSION##/${V}-prefix/g" ${DEST}/man/emerge.1
771 sed -i -e "s/@version@/${V}/" ${DEST}/configure.in
772 -touch ${DEST}/subst-install.vars.in.in
773
774 cd ${DEST}
775 find -name '*~' | xargs --no-run-if-empty rm -f
776 @@ -40,7 +39,7 @@
777 rm -f ${PKG}-${V}/bin/emerge.py ${PKG}-${V}/bin/{pmake,sandbox} ${PKG}-${V}/{bin,pym}/'.#'* ${PKG}-${V}/{bin,pym}/*.{orig,diff} ${PKG}-${V}/{bin,pym}/*.py[oc]
778 cd $TMP/${PKG}-${V}
779 chmod a+x autogen.sh && ./autogen.sh || { echo "autogen failed!"; exit -1; };
780 -rm -f autogen.sh make-man-tarball.sh tabcheck.py tarball.sh ChangeLog.000 COPYING
781 +rm -f autogen.sh tabcheck.py tarball.sh commit svnlogmsg.awk
782 cd $TMP
783 tar -jcf ${TMP}/${PKG}-${V}.tar.bz2 ${PKG}-${V}
784 rm -R ${TMP}/${PKG}-${V}