summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2008-01-01 18:53:56 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2008-01-01 18:53:56 +0000
commit6c0283725719f6056f2c62bd8386525e462a1b50 (patch)
treefe2ae70d044acaa4f0d097e99152c6d926a4b4a0 /sys-devel
parentRemove old ebuilds. (diff)
downloadbetelgeuse-6c0283725719f6056f2c62bd8386525e462a1b50.tar.gz
betelgeuse-6c0283725719f6056f2c62bd8386525e462a1b50.tar.bz2
betelgeuse-6c0283725719f6056f2c62bd8386525e462a1b50.zip
Adding a distcc ebuild with avahi/zeroconf support.
svn path=/; revision=150
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/distcc/ChangeLog841
-rw-r--r--sys-devel/distcc/Manifest12
-rw-r--r--sys-devel/distcc/distcc-2.18.3-r11.ebuild162
-rw-r--r--sys-devel/distcc/files/2.18/conf40
-rw-r--r--sys-devel/distcc/files/2.18/distcc-config.patch35
-rw-r--r--sys-devel/distcc/files/2.18/init30
-rw-r--r--sys-devel/distcc/files/distcc-as-needed.patch17
-rw-r--r--sys-devel/distcc/files/distcc-avahi.patch1424
-rw-r--r--sys-devel/distcc/files/distcc-config165
-rw-r--r--sys-devel/distcc/files/distcc-gentoo-multilib-r1.patch146
-rw-r--r--sys-devel/distcc/files/distcc-gentoo-multilib.patch126
-rw-r--r--sys-devel/distcc/metadata.xml9
12 files changed, 3007 insertions, 0 deletions
diff --git a/sys-devel/distcc/ChangeLog b/sys-devel/distcc/ChangeLog
new file mode 100644
index 0000000..a37c0ab
--- /dev/null
+++ b/sys-devel/distcc/ChangeLog
@@ -0,0 +1,841 @@
+# ChangeLog for sys-devel/distcc
+# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.166 2007/12/25 14:22:22 phreak Exp $
+
+ 01 Jan 2008; Petteri Räty <betelgeuse@gentoo.org> +files/2.18/conf,
+ +files/2.18/distcc-config.patch, +files/2.18/init,
+ +files/distcc-as-needed.patch, +files/distcc-avahi.patch,
+ +files/distcc-config, +files/distcc-gentoo-multilib.patch,
+ +files/distcc-gentoo-multilib-r1.patch, +metadata.xml,
+ +distcc-2.18.3-r11.ebuild:
+ Add a distcc ebuild with avahi support.
+
+ 25 Dec 2007; Christian Heim <phreak@gentoo.org> metadata.xml:
+ Removing lisa from metadata.xml as per #23541.
+
+ 28 Apr 2007; Sven Wegener <swegener@gentoo.org> distcc-2.18.3-r10.ebuild:
+ Fix *initd, *confd and *envd calls (#173884, #174266)
+
+ 26 Apr 2007; Donnie Berkholz <dberkholz@gentoo.org>; metadata.xml:
+ Update for cluster herd split to hp-cluster and ha-cluster.
+
+ 26 Mar 2007; Alec Warner <antarus@gentoo.org> distcc-2.18.3-r10.ebuild:
+ Remove dependency on portage: ref bug 162516
+
+ 04 Mar 2007; Lisa Seelye <lisa@gentoo.org> -distcc-2.16-r2.ebuild,
+ -distcc-2.16-r3.ebuild, -distcc-2.18.3-r6.ebuild,
+ -distcc-2.18.3-r7.ebuild, -distcc-2.18.3-r8.ebuild:
+ Now trying to remove old files!
+
+ 04 Mar 2007; Lisa Seelye <lisa@gentoo.org> -files/2.17/conf,
+ -files/2.17/init:
+ Prune old versions and old PATCHLEVEL dirs in files that shouldnt be there.
+
+ 05 Jan 2007; Diego Pettenò <flameeyes@gentoo.org> distcc-2.16-r2.ebuild,
+ distcc-2.16-r3.ebuild, distcc-2.18.3-r6.ebuild, distcc-2.18.3-r7.ebuild,
+ distcc-2.18.3-r8.ebuild, distcc-2.18.3-r10.ebuild:
+ Remove gnuconfig_update usage, leave it to econf.
+
+ 17 Nov 2006; Diego Pettenò <flameeyes@gentoo.org>
+ distcc-2.18.3-r10.ebuild:
+ Add ~sparc-fbsd keyword.
+
+ 14 Aug 2006; Christian Heim <phreak@gentoo.org> distcc-2.16-r2.ebuild,
+ distcc-2.16-r3.ebuild, distcc-2.18.3-r6.ebuild, distcc-2.18.3-r7.ebuild,
+ distcc-2.18.3-r8.ebuild, distcc-2.18.3-r10.ebuild:
+ Switch default ordering of gcc-config and eselect-compiler to work around
+ portage bug.
+
+ 06 Jun 2006; Jeremy Huddleston <eradicator@gentoo.org>
+ distcc-2.16-r2.ebuild, distcc-2.16-r3.ebuild, distcc-2.18.3-r6.ebuild,
+ distcc-2.18.3-r7.ebuild, distcc-2.18.3-r8.ebuild,
+ distcc-2.18.3-r10.ebuild:
+ Updated DEPEND to accept eselect-compiler.
+
+ 02 May 2006; Diego Pettenò <flameeyes@gentoo.org>
+ distcc-2.18.3-r10.ebuild:
+ Fix up dependencies and checks for non-GNU userlands (where shadow is not
+ used) and mark ~x86-fbsd.
+
+ 27 Apr 2006; Alec Warner <antarus@gentoo.org> files/digest-distcc-2.16-r2,
+ files/digest-distcc-2.16-r3, files/digest-distcc-2.18.3-r6,
+ files/digest-distcc-2.18.3-r7, files/digest-distcc-2.18.3-r8, Manifest:
+ Fixing SHA256 digest, pass four
+
+*distcc-2.18.3-r10 (17 Apr 2006)
+
+ 17 Apr 2006; Lisa Seelye <lisa@gentoo.org> +distcc-2.18.3-r10.ebuild:
+ Base the new thing on -r7 and not pmasked -r8 with IUSE crosscompile. thanks
+ agaffney.
+
+*distcc-2.18.3-r9 (15 Apr 2006)
+
+ 15 Apr 2006; Lisa Seelye <lisa@gentoo.org> +files/distcc-as-needed.patch,
+ +distcc-2.18.3-r9.ebuild:
+ --as-needed for bug 128605
+
+ 19 Feb 2006; Joshua Kinard <kumba@gentoo.org> distcc-2.18.3-r7.ebuild:
+ Marked stable on mips.
+
+ 05 Sep 2005; Lisa Seelye <lisa@gentoo.org> distcc-2.16-r3.ebuild,
+ distcc-2.18.3-r8.ebuild:
+ Change PN to PF for bug #99386.
+
+ 30 Jul 2005; MATSUU Takuto <matsuu@gentoo.org> distcc-2.18.3-r7.ebuild:
+ Stable on sh.
+
+ 20 Jul 2005; Markus Rothe <corsair@gentoo.org> distcc-2.18.3-r7.ebuild:
+ Stable on ppc64
+
+ 17 Jul 2005; Tobias Scherbaum <dertobi123@gentoo.org>
+ distcc-2.18.3-r7.ebuild:
+ ppc stable
+
+ 02 Jul 2005; Bryan Østergaard <kloeri@gentoo.org>
+ distcc-2.18.3-r7.ebuild:
+ Stable on alpha.
+
+ 28 Jun 2005; Aron Griffis <agriffis@gentoo.org> distcc-2.16-r3.ebuild,
+ distcc-2.18.3-r7.ebuild, distcc-2.18.3-r8.ebuild:
+ Minor ebuild cleanups. Fix use invocation. keepdir does mkdir, so there's no
+ need to use dodir first
+
+ 19 Jun 2005; Jason Wever <weeve@gentoo.org> distcc-2.18.3-r7.ebuild:
+ Stable on SPARC.
+
+ 18 Jun 2005; Daniel Goller <morfic@gentoo.org>
+ files/2.18/distcc-config.patch:
+ added one more script to array
+
+*distcc-2.18.3-r8 (18 Jun 2005)
+
+ 18 Jun 2005; Daniel Goller <morfic@gentoo.org>
+ +files/2.18/distcc-config.patch, +distcc-2.18.3-r8.ebuild:
+ Added crosscompile USE flag to allow proper cross compilation in multi arch
+ environments, thanks to Andrew de Quincey on bug #87859
+
+ 18 Jun 2005; Markus Rothe <corsair@gentoo.org> distcc-2.18.3-r7.ebuild:
+ added ~ppc64
+
+*distcc-2.18.3-r7 (15 Jun 2005)
+*distcc-2.16-r3 (15 Jun 2005)
+
+ 15 Jun 2005; Lisa Seelye <lisa@gentoo.org> +distcc-2.16-r3.ebuild,
+ +distcc-2.18.3-r7.ebuild:
+ Did a little jiggeypokery with the Gnome/GTK+ monitor: mv distccmon-gnome ->
+ distccmon-gui and a symlink for backwards compatability. It seems a bit
+ silly to have the gtk+ monitor called distccmon-gnome (when it isn't).
+
+*distcc-2.18.3-r6 (18 May 2005)
+
+ 18 May 2005; Lisa Seelye <lisa@gentoo.org> distcc-2.16-r2.ebuild,
+ -distcc-2.18.3-r2.ebuild, -distcc-2.18.3-r4.ebuild,
+ -distcc-2.18.3-r5.ebuild, +distcc-2.18.3-r6.ebuild:
+ Edit ebuilds to comply with bug #92745, inherit gcc -> toolchain-funcs. Also
+ do a little cleanup.
+
+ 09 May 2005; Aron Griffis <agriffis@gentoo.org> distcc-2.18.3-r2.ebuild:
+ stable on ia64
+
+ 19 Mar 2005; Lisa Seelye <lisa@gentoo.org> :
+ Finally put a test around newuser to test for bootstrap condition (where
+ shadow is not present) and cleaned out some legacy stuff.
+
+*distcc-2.18.3-r4 (05 Feb 2005)
+
+ 05 Feb 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ files/distcc-gentoo-multilib-r1.patch, -distcc-2.18.3-r3.ebuild,
+ +distcc-2.18.3-r4.ebuild:
+ Fix segfault when freeing argv in the multilib patch. Closes bug #80518.
+
+*distcc-2.18.3-r3 (30 Jan 2005)
+
+ 30 Jan 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ +files/distcc-gentoo-multilib-r1.patch, +distcc-2.18.3-r3.ebuild:
+ Let command line arguments override those set by ${ABI}. See bug #78652.
+
+*distcc-2.18.3-r2 (18 Jan 2005)
+
+ 18 Jan 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ -distcc-2.18.3-r1.ebuild, +distcc-2.18.3-r2.ebuild:
+ Revbumping to force people to get the updated patch.
+
+ 15 Jan 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ distcc-2.18.3-r1.ebuild:
+ Stable amd64 for 2005.0.
+
+ 14 Jan 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ files/distcc-gentoo-multilib.patch:
+ Updating patch to properly initialze newflagsCount. Thanks to Sven Wegener
+ <swegener@gentoo.org>.
+
+ 12 Jan 2005; Lisa Seelye <lisa@gentoo.org> -distcc-2.17-r1.ebuild,
+ -distcc-2.18.3.ebuild:
+ Removed 2.18.3-r1 from p.mask and 2.17-r1 from the repository: no point in
+ it, especially since users with ~arch will get 2.18.3 anyways.
+
+ 31 Dec 2004; Lisa Seelye <lisa@gentoo.org> :
+ Added distcc-2.18.3-r1.ebuild with the ABI patch in bug #75420. this release
+ is package.masked.
+
+ 28 Dec 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ +files/distcc-gentoo-multilib.patch, distcc-2.18.3.ebuild:
+ Added patch to honor CFLAGS_${ABI}. It's commented out in the ebuild pending
+ lisa's approval since she's the maintainer. See bug #75420.
+
+ 14 Dec 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.18.3.ebuild:
+ fix dependency on pkgconfig for only gtk/gnome. bug #68168
+
+*distcc-2.18.3 (14 Dec 2004)
+
+ 14 Dec 2004; Lisa Seelye <lisa@gentoo.org> -distcc-2.18.2.ebuild,
+ +distcc-2.18.3.ebuild, -distcc-2.18.ebuild:
+ version bump, too
+
+ 14 Dec 2004; Lisa Seelye <lisa@gentoo.org> -distcc-2.18.2.ebuild,
+ -distcc-2.18.ebuild:
+ 2.18 and 2.18.2 are outdated by 2.18.3
+
+ 24 Nov 2004; Hardave Riar <hardave@gentoo.org> distcc-2.16-r2.ebuild,
+ distcc-2.18.2.ebuild:
+ Re-enable gnome/gtk support on mips.
+
+*distcc-2.18.2 (15 Nov 2004)
+
+ 15 Nov 2004; Lisa Seelye <lisa@gentoo.org> +distcc-2.18.2.ebuild:
+ version bump
+
+*distcc-2.18 (12 Oct 2004)
+
+ 12 Oct 2004; Lisa Seelye <lisa@gentoo.org> +files/2.18/conf,
+ +files/2.18/init, +distcc-2.18.ebuild:
+ New version. Hoorraay; --allow flag is now mandatory.
+
+ 05 Oct 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.16-r2.ebuild:
+ bump 2.16-r2 on mips
+
+ 05 Oct 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.16-r2.ebuild:
+ bump to arch on a few arches for 2.16-r2
+
+ 05 Oct 2004; Lisa Seelye <lisa@gentoo.org> -distcc-2.14-r1.ebuild:
+ Removing 2.14 due to security concerns bug #66424
+
+*distcc-2.16-r2 (17 Sep 2004)
+
+ 17 Sep 2004; Lisa Seelye <lisa@gentoo.org> +distcc-2.16-r2.ebuild:
+ bump to -r2 for bug #64317... and pending glsa
+
+ 16 Sep 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.16-r1.ebuild:
+ forgot to bump patchlevel var
+
+*distcc-2.14-r1 (16 Sep 2004)
+
+ 16 Sep 2004; Lisa Seelye <lisa@gentoo.org> -files/2.11.1p/conf,
+ -files/2.11.1p/init, +distcc-2.14-r1.ebuild, +distcc-2.16-r1.ebuild,
+ distcc-2.17-r1.ebuild:
+ And force the users to update with a -r1 on 2.14 and 2.16...
+
+ 16 Sep 2004; Lisa Seelye <lisa@gentoo.org> -files/2.11.1p/conf,
+ -files/2.11.1p/init, distcc-2.14.ebuild, distcc-2.16.ebuild:
+ Put old versions on the new "patchlevel" - updating conf and init files.
+
+ 16 Sep 2004; Lisa Seelye <lisa@gentoo.org> -distcc-2.12.1-r1.ebuild,
+ -distcc-2.13-r1.ebuild, distcc-2.17-r1.ebuild, -distcc-2.17.ebuild:
+ Doing a bit of tidying and then some fun stuff after
+
+ 13 Sep 2004; Jason Wever <weeve@gentoo.org> distcc-2.16.ebuild:
+ Stable on sparc.
+
+ 09 Sep 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.16.ebuild:
+ bump 2.16 to x86
+
+ 06 Sep 2004; Ciaran McCreesh <ciaranm@gentoo.org> distcc-2.12.1-r1.ebuild,
+ distcc-2.13-r1.ebuild, distcc-2.14.ebuild, distcc-2.16.ebuild,
+ distcc-2.17-r1.ebuild, distcc-2.17.ebuild:
+ Switch to use epause and ebeep, bug #62950
+
+ 27 Aug 2004; <pyrania@gentoo.org> +files/distcc-config,
+ -files/2.11.1p/distcc-config, -files/2.17/distcc-config,
+ distcc-2.12.1-r1.ebuild, distcc-2.13-r1.ebuild, distcc-2.14.ebuild,
+ distcc-2.16.ebuild, distcc-2.17-r1.ebuild, distcc-2.17.ebuild:
+ Fixing bug #57421, thanks to Stefan Sperling. Cleaning up older distcc-config
+ version.
+
+ 22 Aug 2004; Tom Gall <tgall@gentoo.org> distcc-2.16.ebuild:
+ added ~ppc64, bug #59224
+
+*distcc-2.17-r1 (22 Aug 2004)
+
+ 22 Aug 2004; Lisa Seelye <lisa@gentoo.org>
+ +files/2.17/2.17-ipv6-fix.diff.gz, +files/2.17/conf,
+ +files/2.17/distcc-config, +files/2.17/init, +distcc-2.17-r1.ebuild:
+ Adding a patch for 2.17 to enable ipv6, updating the init and conf scripts.
+ also set the distcc-config script to try and use userid 240.
+
+ 20 Aug 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.17.ebuild:
+ <@SpanKY> make the first line 'ipv6 does not work with distcc-2.17' ?
+
+*distcc-2.17 (20 Aug 2004)
+
+ 20 Aug 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.14.ebuild,
+ distcc-2.16.ebuild, +distcc-2.17.ebuild:
+ version bump and fix RDEPEND.badindev errors
+
+ 26 Jul 2004; Mike Frysinger <vapier@gentoo.org> distcc-2.16.ebuild:
+ gnuconfig loving for us non-mainstream users.
+
+*distcc-2.16 (08 Jul 2004)
+
+ 08 Jul 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.14.ebuild,
+ -distcc-2.15.ebuild, +distcc-2.16.ebuild:
+ First: Bumped the testing version to 2.16 (released today) and removed the
+ 2.15 since it's silly to let people test that when there's no real need
+ Second: Changed KEYWORDS on 2.14 to -* s390 since s390 had moved to stable and
+ nothing else had moved (everything is stable on 2.13-r1), so let's have people
+ on ~arch test 2.16 Third: s390 maintainers, or whoever bumped 2.14 please heed
+ http://groups.google.com/groups?hl=no&lr=&ie=UTF-8&c2coff=1&safe=off&selm=2fpl
+ q-1cD-43%40gated-at.bofh.it
+
+*distcc-2.15 (06 Jul 2004)
+
+ 06 Jul 2004; Lisa Seelye <lisa@gentoo.org> +distcc-2.15.ebuild:
+ version bump
+
+ 15 May 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.13-r1.ebuild,
+ distcc-2.14.ebuild:
+ Add >=gnome-base/gconf-2 as a depend for gnome to resolve bug #50594
+
+ 15 May 2004; Lisa Seelye <lisa@gentoo.org> :
+ cleanup of old files
+
+ 12 May 2004; Michael McCabe <randy@gentoo.org> distcc-2.14.ebuild:
+ Added s390 keywords
+
+*distcc-2.14 (02 May 2004)
+
+ 02 May 2004; Lisa Seelye <lisa@gentoo.org> +distcc-2.14.ebuild:
+ bump to 2.14
+
+ 11 Apr 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.12.1.ebuild,
+ distcc-2.13-r1.ebuild, distcc-2.13.ebuild:
+ bump to stable. yell at me if your arch breaks
+
+ 11 Apr 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.12.1.ebuild,
+ distcc-2.13.ebuild:
+ General cleanup of old ebuilds & digests.
+
+ 21 Mar 2004; Lisa Seelye <lisa@gentoo.org> files/2.11.1p/init:
+ Change the init script to do TMPDIR=TMPDIR basically so that the user can
+ inherit a new TMPDIR location. Closes bug #44915
+
+*distcc-2.13-r1 (06 Mar 2004)
+*distcc-2.12.1-r1 (06 Mar 2004)
+
+ 06 Mar 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.12.1-r1.ebuild,
+ distcc-2.13-r1.ebuild:
+ chown /var/run/distccd for distcc:daemon after install since in some cases its
+ being reset to root:root
+
+*distcc-2.13 (02 Mar 2004)
+
+ 02 Mar 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.13.ebuild,
+ files/2.11.1p/conf, files/2.11.1p/init:
+ Version bump and to remove DISTCC_DIR remnants from the daemon config files
+ (see bug #42947). the config files are non critical, since an unuse envvar
+ never hurt anyone i will not bump 2.12.1.
+
+ 22 Feb 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.11.1.ebuild,
+ distcc-2.11.2-r1.ebuild, distcc-2.11.2.ebuild, distcc-2.8-r2.ebuild,
+ distcc-2.9.ebuild:
+ Removing old stuff since everyone is now stable on 2.12.1. (cool huh)
+
+ 22 Feb 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.12.1.ebuild:
+ Move 2.12.1 to stable on ppc. Directory cleanup in this dir to follow
+ shortly....
+
+ 22 Feb 2004; Aron Griffis <agriffis@gentoo.org> distcc-2.12.1.ebuild:
+ stable on alpha
+
+ 21 Feb 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.11.1.ebuild,
+ distcc-2.11.2-r1.ebuild, distcc-2.11.2.ebuild, distcc-2.12.1.ebuild,
+ distcc-2.5-r1.ebuild, distcc-2.8-r2.ebuild, distcc-2.9.ebuild:
+ remove arm keyword from old ebuilds. i will clean (rdepend.bad and prune)
+ these up shortly...
+
+ 21 Feb 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.12.1.ebuild:
+ Bump 2.12.1 to stable across several arches - still need to hear from alpha
+ and ppc. Also add amd64 and ia64 to keyword
+
+ 11 Jan 2004; Markus Nigbur <pyrania@gentoo.org> distcc-2.11.2-r1.ebuild,
+ distcc-2.11.2.ebuild, distcc-2.12.1.ebuild:
+ Changed the distcc-config related ewarn message.
+
+ 11 Jan 2004; Markus Nigbur <pyrania@gentoo.org> files/2.11.1p/distcc-config:
+ Removing verbose msg from writeenv.
+
+ 10 Jan 2004; Markus Nigbur <pyrania@gentoo.org> files/2.11.1p/distcc-config:
+ Restarting the daemon is no good.
+
+*distcc-2.12.1 (09 Jan 2004)
+
+ 09 Jan 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.12.1.ebuild:
+ This is a version bump with some pretty big fixes (setuid/gid ordering, gentoo
+ bug #37592) and more.
+
+ 05 Jan 2004; Robin H. Johnson <robbat2@gentoo.org> files/2.10/distcc-config,
+ files/2.11/distcc-config, files/2.8/distcc-config, files/2.9/distcc-config:
+ fix tail -1 stuff in distcc-config files
+
+*distcc-2.12 (24 Dec 2003)
+
+ 24 Dec 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.12.ebuild,
+ files/setuid-2.12-order-fix.gz:
+ Version bump, which includes IPv6 support (shoulda been in last one, but oh
+ well), and a setuid patch that was posted to the distcc ml by Wayne Davison
+ <wayned@samba.org> (this patch fixes the order in which setuid happens in
+ the daemon startup)
+
+ 11 Dec 2003; Markus Nigbur <pyrania@gentoo.org> files/2.11.1p/distcc-config:
+ Fixed distcc-config. See bug #27432 for details.
+
+ 06 Dec 2003; Lisa Seelye <lisa@gentoo.org> files/2.11/distcc-config,
+ files/2.11.1p/distcc-config:
+ fix distcc-config to default to uid 240, to close bug 35096
+
+ 06 Dec 2003; Lisa Seelye <lisa@gentoo.org> files/2.11.1p/distcc-config:
+ fix distcc-config to default to uid 240, to close bug 35096 (will fix the
+ lower versions in a second)
+
+*distcc-2.11.2-r1 (21 Nov 2003)
+
+ 21 Nov 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11.2-r1.ebuild,
+ files/2.11.1p/distcc-config:
+ New distcc-config from bug 27432; fixes comment 18
+
+ 03 Nov 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11.1.ebuild:
+ Bump to arch on mips for 2.11.1
+
+ 01 Nov 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11-r1.ebuild,
+ distcc-2.11-r2.ebuild:
+ Cleaning up a little. These two ebuilds (2.11-r1,r2) are obsolete
+
+ 24 Oct 2003; Chris PeBenito <pebenito@gentoo.org> distcc-2.10-r3.ebuild,
+ distcc-2.11-r1.ebuild, distcc-2.11-r2.ebuild, distcc-2.11.1-r1.ebuild,
+ distcc-2.11.1.ebuild, distcc-2.11.2.ebuild, distcc-2.5-r1.ebuild,
+ distcc-2.8-r2.ebuild, distcc-2.9.ebuild:
+ Add in selinux to IUSE, since I forgot to do it when I added the selinux RDEP.
+
+*distcc-2.11.2 (23 Oct 2003)
+
+ 23 Oct 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11.1.ebuild,
+ distcc-2.11.2.ebuild:
+ Version bump, using the new distcc-config
+
+ 23 Oct 2003; Jason Wever <weeve@gentoo.org> distcc-2.10-r3.ebuild:
+ Marked stable on sparc.
+
+*distcc-2.11.1-r1 (18 Oct 2003)
+
+ 18 Oct 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11.1-r1.ebuild,
+ files/2.11.1p/conf, files/2.11.1p/distcc-config, files/2.11.1p/init:
+ Distcc-2.11.1-r1 is to test distcc-config rewritten in python as per bug
+ 27432. Thanks to Pyrania for the rewrite.
+
+*distcc-2.11.1 (08 Oct 2003)
+
+ 08 Oct 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11.1.ebuild:
+ version bump. gtk non using gnome users should be happy!
+
+*distcc-2.11-r2 (24 Sep 2003)
+
+ 24 Sep 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11-r2.ebuild:
+ gtk again
+
+*distcc-2.11-r1 (24 Sep 2003)
+
+ 24 Sep 2003; Lisa Seelye <lisa@gentoo.org distcc-2.11-r1.ebuild:
+ -m Fix bug 29511. Seems as if the depends were silently changed.
+
+*distcc-2.11 (23 Sep 2003)
+
+ 23 Oct 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11.1.ebuild:
+ Move 2.11.1 to stable on a few arches, going to move the rest ASAP.
+
+ 23 Sep 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.11.ebuild,
+ files/2.11/conf, files/2.11/distcc-config, files/2.11/init:
+ Version bump, and it now requires Portage-2.0.49-r6 or greater.
+
+*distcc-2.10-r3 (15 Sep 2003)
+
+ 15 Sep 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.10-r3.ebuild,
+ files/2.10/conf, files/2.10/distcc-config, files/2.10/init:
+ Moved DISTCC_DIR to /etc/make.conf and resolved bug 26697.
+
+*distcc-2.10-r2 (15 Aug 2003)
+
+ 15 Aug 2003; Seemant Kulleen <seemant@gentoo.org> distcc-2.10-r2.ebuild:
+ fixed the distcc_log env installation on installation. Lisa gave me the fix to
+ commit while she has technical issues. So please don't think I'm maintaining
+ it, coz I'm not :)
+
+*distcc-2.10-r1 (13 Aug 2003)
+
+ 13 Aug 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.10-r1.ebuild:
+ Fix the ebuild. should be doing distcc-config --install, too
+
+ 12 Aug 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.9.ebuild:
+ Mark distcc 2.9 stable on x86.
+
+*distcc-2.10 (12 Aug 2003)
+
+ 12 Aug 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.10.ebuild, files/2.10/conf,
+ files/2.10/distcc-config, files/2.10/init:
+ add distcc 2.10 and related files
+
+ 10 Aug 2003; Chris PeBenito <pebenito@gentoo.org> distcc-2.5-r1.ebuild,
+ distcc-2.8-r2.ebuild, distcc-2.9.ebuild:
+ Add selinux policy to RDEP
+
+ 08 Aug 2003; Lisa M. Seelye <lisa@gentoo.org> files/2.8/conf,
+ files/2.8/init, files/2.9/conf, files/2.9/init:
+ Incorporated bug 26204 into the conf and init scripts (DISTCC_TMPDIR), and
+ added a CVS Header
+
+ 08 Aug 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.5-r1.ebuild,
+ distcc-2.8-r2.ebuild, distcc-2.9.ebuild:
+ updated guide document URI
+
+*distcc-2.8-r1 (08 Aug 2003)
+
+ 08 Aug 2003; Lisa Seelye <lisa@gentoo.org> distcc-2.5.ebuild, distcc-2.7.1.ebuild,
+ distcc-2.7.ebuild, distcc-2.8-r1.ebuild, distcc-2.8.ebuild,
+ files/2.7.1/001_fix_tmpdir.patch.gz, files/2.7.1/conf,
+ files/2.7.1/distcc-config, files/2.7.1/init:
+ Cleaning the repository. non x86 will go from 2.5-r1 to 2.8-r2 or 2.9. There
+ is no need to keep the old ones around.
+
+ 04 Aug 2003; Aron Griffis <agriffis@gentoo.org> distcc-2.8-r2.ebuild:
+ Mark stable on alpha. Fix formatting and some errors in ChangeLog
+
+ 02 Aug 2003: Lisa Marie Seelye <lisa@gentoo.org> ChangeLog :
+ Added a metadata.xml file. Initially under the `cluster' herd. Also
+ normalized this file (distcc-2.8) to have most recent dates at the top of
+ the file
+
+*distcc-2.9 (21 Jul 2003)
+
+ 24 Aug 2003; Guy Martin <gmsoft@gentoo.org> distcc-2.9.ebuild :
+ Added hppa to KEYWORDS.
+
+ 21 Jul 2003: Lisa Marie Seelye <lisa@gentoo.org> :
+ New version released and committed (Still with the patch to fix tmpdir)
+ Updated distcc-config to reflect bug #24972 I'll make this change in
+ all versions in the repository.
+
+*distcc-2.8 (09 Jul 2003)
+
+ 06 Aug 2003; Lisa Marie Seelye <lisa@gentoo.org> distcc-2.8-r2.ebuild:
+ Marked 2.8-r2 stable on sparc thanks todd
+
+ 05 Aug 2003; Guy Martin <gmsoft@gentoo.org> distcc-2.8-r2.ebuild :
+ Marked stable on hppa.
+
+ 27 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ Bumped distcc-2.8-r2 to x86
+
+ 13 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ (files/2.8/conf) Added a --port to DISTCC_OPTS (/etc/conf.d/distccd) to
+ change the running port.
+ (distcc-2.8-r2.ebuild) Added a note to the backup distcc website
+
+ 12 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ Oops. :) `gtk' is preferred over `gtk2'. Thanks Spider for the
+ heads up!
+
+ 10 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ New version released and committed (Still with the patch to fix tmpdir)
+
+*distcc-2.7.1 (01 Jul 2003)
+
+ 21 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ Updated distcc-config to reflect bug #24972
+
+ 17 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ Changed gnome stuff to gtk. How on earth did this get missed??
+
+ 14 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ Updated the "How-to" website URI in the .ebuild
+
+ 10 Jul 2003; Lisa Marie Seelye <lisa@gentoo.org> :
+ Moved to x86 (from ~x86)
+
+ 04 Jul 2003; Joshua Kinard <kumba@gentoo.org> :
+ Fixed b0rked digests
+
+ 01 Jul 2003; Karl Trygve Kalleberg <karltk@gentoo.org> :
+ distcc-2.7.ebuild, files/2.7.1/distcc-config, files/2.7.1/conf,
+ files/2.7.1/init, files/2.7.1/001_fix_tmpdir.patch.gz:
+ New upstream version. Ebuild submitted by Lisa Marie <lisa@thedoh.com>.
+ This version is self-contained, so previous versions may be nuked at
+ whim.
+
+*distcc-2.7 (16 Jun 2003)
+
+ 17 Jun 2003; Mike Frysinger <vapier@gentoo.org> distcc-2.7.ebuild:
+ Filter out large file flags on gcc-2.x machines.
+
+ 16 Jun 2003; Zach Welch <zwelch@gentoo.org> distcc-2.7.ebuild:
+ bump version; add support provided by Lisa Marie in bug 22914
+
+ 04 Jun 2003; Zach Welch <zwelch@gentoo.org> distcc-2.5-r1.ebuild:
+ mark 2.5-r1 stable on all arches; update web page address to use new wiki
+ restore truncated change log, oopsie.
+
+*distcc-2.5-r1 (30 May 2003)
+
+ 30 May 2003; Zach Welch <zwelch@gentoo.org> distcc-2.5-r1.ebuild,
+ files/2.3/distcc-config:
+ update to fix problems with DISTCC_HOSTS when upgrading from earlier versions
+
+*distcc-2.5 (27 May 2003)
+
+ 27 May 2003; Zach Welch <zwelch@gentoo.org distcc-2.5.ebuild,
+ files/1.2/init:
+ new version; fixes to init script as proposed by agriffis@gentoo.org
+
+*distcc-2.4.2 (23 May 2003)
+
+ 23 May 2003; Hanno Boeck <hanno@gentoo.org> distcc-2.4.2.ebuild:
+ New version.
+
+*distcc-2.4 (21 May 2003)
+
+ 21 May 2003; Zach Welch <zwelch@gentoo.org distcc-2.3.ebuild,
+ files/2.3/distcc-config, distcc-2.4.ebuild:
+ Update to latest versions; updates to distcc-config to use new
+ DISTCC_HOSTS configuration. May require some cleaning of previous
+ settings, notably DISTCC_HOSTS in /etc/env.d/02distcc
+
+*distcc-2.0.1 (31 Mar 2003)
+
+ 28 Apr 2003; Zach Welch <zwelch@gentoo.org> distcc-0.12.ebuild,
+ distcc-0.12.ebuild, distcc-0.15.ebuild, distcc-0.15.ebuild,
+ distcc-1.0.ebuild, distcc-1.0.ebuild, distcc-1.1-r11.ebuild,
+ distcc-1.1-r11.ebuild, distcc-1.1-r8.ebuild, distcc-1.1-r8.ebuild,
+ distcc-1.1.ebuild, distcc-1.1.ebuild, distcc-1.2.1.ebuild,
+ distcc-1.2.1.ebuild, distcc-1.2.3.ebuild, distcc-1.2.3.ebuild,
+ distcc-1.2.ebuild, distcc-1.2.ebuild, files/distccd, files/distccd.1,
+ files/distccd.2, files/distccd.4, files/wrapper-1.1.patch,
+ files/1.2/distcc-config, files/1.2/wrapper.patch, files/1.2.1/distcc-config,
+ files/1.2.1/wrapper.patch, files/1.2.3/distcc-config:
+ Bump distcc-2.0.1 revision and add new --set-j option for setting MAKEOPTS.
+ Remove old versions that are no longer needed or desired.
+
+ 17 Apr 2003; Zach Welch <zwelch@gentoo.org> files/1.2.3/distcc-config:
+ fix distcc-config to add DCCC_QUIET
+
+ 31 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-2.0.1.ebuild,
+ files/1.2.3/distcc-config:
+ bump version to close bug 18566; masquerade patch now mainlined
+ info file removed upstream; add --help to distcc-config
+
+*distcc-1.2.3-r3 (17 Mar 2003)
+
+ 17 Apr 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3-r3.ebuild:
+ bump to stable for all arches
+
+ 19 Mar 2003; Aron Griffis <agriffis@gentoo.org> distcc-1.2.3-r3.ebuild:
+ Mark stable on alpha
+
+ 17 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3-r1.ebuild,
+ files/1.2.3/distcc-config:
+ set ROOTPATH, refactor env-update code, rename env file
+
+*distcc-1.2.3-r2 (17 Mar 2003)
+
+ 17 Mar 2003; Zach Welch <zwelch@gentoo.org> files/1.2.3/distcc-config:
+ usability additions, see online docs for info
+
+ 17 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3-r1.ebuild,
+ distcc-1.2.3-r1.ebuild, distcc-1.2.3-r2.ebuild, files/1.2.3/distcc-config:
+ fix einfo issue in new config function
+
+*distcc-1.2.3-r1 (17 Mar 2003)
+
+ 17 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3-r1.ebuild,
+ files/1.2.3/distcc-config, files/1.2.3/info.patch:
+ Add distcc environment file and options to distcc-config to manage it
+ Fix ebuild to address defects reported in but 17716
+
+*distcc-1.2.3 (03 Mar 2003)
+
+ 11 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3.ebuild,
+ files/1.2.1/distcc-config:
+ add shadow as DEPEND (for now), fix distcc-config if shadow tools not
+ installed (for later)
+
+ 07 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3.ebuild:
+ mark distcc-1.2.3 as stable on x86 and ppc
+
+ 03 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3.ebuild,
+ files/1.2.3/wrapper.patch:
+ Bump to latest bug release version
+
+*distcc-1.2.1 (26 Feb 2003)
+
+ 26 Feb 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.1.ebuild,
+ files/1.2.1/distcc-config, files/1.2.1/wrapper.patch:
+ New version, with fixes for installs under strange ROOTs
+ Moved user creation, directory fixups into distcc-config script
+ Fix typo in conf script; fixes bug 16432
+
+*distcc-1.2 (21 Feb 2003)
+
+ 21 Feb 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.ebuild :
+ Add new version, cleanup patch from 1.1-r11
+ Add initial distcc-config script
+
+*distcc-1.1-r11 (17 Feb 2003)
+
+ 21 Feb 2003; Zach Welch <zwelch@gentoo.org> distcc-1.1-r11.ebuild :
+ Remove extra cp of $S
+
+ 19 Feb 2003; Zach Welch <zwelch@gentoo.org> distcc-1.1-r11.ebuild :
+ Added arm to keywords.
+
+ 19 Feb 2003; Guy Martin <gmsoft@gentoo.org> distcc-1.1-r11.ebuild :
+ Added ~hppa to keywords.
+
+ 18 Feb 2003; Zach Welch <zwelch@gentoo.org> :
+ Updated to fix minor bugs in -r11
+
+*distcc-1.1-r10 (17 Feb 2003)
+
+ 17 Feb 2003; Zach Welch <zwelch@gentoo.org> :
+ Add /var/run/distccd for pid and distcc user... (bugs 15048 and 15769)
+ Updated to fix minor bugs in original -r10
+
+*distcc-1.1-r9 (17 Feb 2003)
+
+ 17 Feb 2003; Zach Welch <zwelch@gentoo.org> :
+ Fix location of pid file... (bug 15769)
+ Fix einfo Portage version reference
+ (THIS VERSION IS BROKEN - ztw)
+
+*distcc-1.1-r8 (10 Feb 2003)
+
+ 17 Feb 2003; Zach Welch <zwelch@gentoo.org> :
+ Fix einfo Portage version reference
+
+ 15 Feb 2003; Zach Welch <zwelch@gentoo.org> :
+ Extended einfo and added link to configuration page
+
+ 10 Feb 2003; Zach Welch <zwelch@gentoo.org> :
+ Includes wrapper-1.1.patch from bug 13897; now installs symlinks
+ in /usr/lib/distcc/bin to gcc, g++, and others. Users should no
+ longer set CC or CXX to distcc; instead, for non-portage builds,
+ set PATH="/usr/lib/distcc/bin:$PATH". See the follow for more info:
+ http://gentoo.superlucidity.net/www/distcc.html
+
+*distcc-1.1 (26 Jan 2003)
+
+ 26 Jan 2003; Brad Cowan <bcowan@gentoo.org> distcc-1.1.ebuild,
+ files/digest-distcc-1.1:
+
+ Bumped version.
+
+*distcc-1.0 (15 Jan 2003)
+
+ 15 Jan 2003; Brad Cowan <bcowan@gentoo.org> distcc-1.0.ebuild,
+ files/digest-distcc-1.0:
+
+ Bumped version. Added new init script thanks to Eric Andreson (Ndiin).
+
+ 16 Dec 2002; Aron Griffis <agriffis@gentoo.org> distcc-0.15.ebuild:
+ Added ~alpha to KEYWORDS
+
+*distcc-0.15 (12 Dec 2002)
+
+ 12 Dec 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.15.ebuild,
+ files/digest-distcc-0.15:
+
+ Bumped version.
+
+*distcc-0.14-r1 (11 Dec 2002)
+
+ 11 Dec 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.14-r1.ebuild,
+ files/digest-distcc-0.14-r1:
+
+ Removed bad info file.
+
+*distcc-0.14 (16 Nov 2002)
+
+ 16 Nov 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.14.ebuild,
+ files/digest-distcc-0.14 :
+
+ Version bump.
+
+*distcc-0.13 (12 Nov 2002)
+
+ 12 Nov 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.13.ebuild,
+ files/digest-distcc-0.13 :
+
+ Version bump, with many major bugfixes.
+
+*distcc-0.12 (07 Oct 2002)
+
+ 12 Nov 2002; Mark Guertin <gerk@gentoo.org> distcc-0.12.ebuild :
+ Added ppc to keywords again.
+
+ 13 Oct 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.12.ebuild,
+ files/distccd :
+
+ Added distccd init script.
+
+ 22 Sep 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.12.ebuild :
+
+ Version bump.
+
+*distcc-0.11 (25 Sep 2002)
+
+ 22 Sep 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.11.ebuild :
+
+ Version bump.
+
+*distcc-0.10.1 (17 Sep 2002)
+
+ 17 Sep 2002; Brad Cowan <bcowan@gentoo.org> distcc-0.10.1.ebuild :
+
+ Version bump, updated docs.
+
+*distcc-0.8 (20 Aug 2002)
+
+ 20 Aug 2002; Maik Schreiber <blizzy@gentoo.org> : New release.
+
+*distcc-0.7 (06 Aug 2002)
+
+ 06 Aug 2002; Maik Schreiber <blizzy@gentoo.org> : New release.
+
+*distcc-0.6 (12 Jul 2002)
+
+ 25 Jul 2002; Mark Guertin <gerk@gentoo.org> : Added ppc to
+ keywords
+
+ 12 Jul 2002; Maik Schreiber <blizzy@gentoo.org> : New release.
+
+*distcc-0.5 (05 Jul 2002)
+
+ 05 Jul 2002; Daniel Robbins <drobbins@gentoo.org> : new release
+ that includes missing KEYWORDS, SLOT, LICENSE and new man pages,
+ closes bug #4506.
+
+*distcc-0.4 (21 Jun 2002)
+
+ 07 Jun 2002; Ryan Phillips <rphillips@gentoo.org> : Added popt
+ dep. Fixes # 4466. Thanks to Michael Grigoriev
+
+ 21 Jun 2002; Ryan Phillips <rphillips@gentoo.org> : New release
+
+*distcc-0.3 (21 Jun 2002)
+
+ 21 Jun 2002; Ryan Phillips <rphillips@gentoo.org> ChangeLog
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest
new file mode 100644
index 0000000..0bdcf74
--- /dev/null
+++ b/sys-devel/distcc/Manifest
@@ -0,0 +1,12 @@
+AUX 2.18/conf 1267 RMD160 a12045786088255c9bc8f4ad826928c00efac567 SHA1 828f62bee16cfb4b2667cdbda5a18e9516bcf969 SHA256 51365685f2f02c6f2846e4b35ed1ae3628999ed5035af3ad0c7b2d68acfe7c3d
+AUX 2.18/distcc-config.patch 1200 RMD160 46adf137db41c3278463125caeb132b9626ead54 SHA1 080ba28e0cc2eab5cdcb9c860dd255460926cadd SHA256 0abca6ee532de72ef19f1b210a09bd661ea7110cf36654c8c8ac016ee6573e55
+AUX 2.18/init 733 RMD160 935e52d2ddfc6363f26a916666bbbc28b6fdb79b SHA1 737e969b122c70df6d54c7a98bfdc872af278ff6 SHA256 1477ab79b8be398b6acb7d44e0f0a66bb75d1918365b350b824e16b8b02af22b
+AUX distcc-as-needed.patch 558 RMD160 faebf24490e3dd2a5247cfb6914dc88fb7b98e35 SHA1 5e5547032b6492f9f8b0511fd621a005dbd455a2 SHA256 9e87d3b0487ffc52ccf6362866e967dff9c2a85681175096ece11413f8c91e54
+AUX distcc-avahi.patch 41523 RMD160 215bbf31ba2a7a42ee1e9bcea4d04a1df91d75b1 SHA1 b9a52359933e0254ae7063e1e462975e0fd464c1 SHA256 8d36eaf551b9d46b97d68f2ba6d6d5baff77273fb6c0ec53be797402129912d4
+AUX distcc-config 4874 RMD160 07bd612fc11c785691bd56e4e7bb7994a2e4dbb8 SHA1 85b5f38d6024e4f454bfa07d96c13b4749ce3e2a SHA256 c6a7bb74eb235fd7896ca101c033a2e9faf80afeb7232bff3afe22f8a6268a5c
+AUX distcc-gentoo-multilib-r1.patch 4245 RMD160 175cb4c2ce0e8ecb2262165b3fd9a0d89ddc7beb SHA1 f617965969e7b4afd1b6467a56fe0f7f748c7717 SHA256 78839f7392769ab41509e84f07c36d07315d0220f7aacbb174ed1aba80b9c28d
+AUX distcc-gentoo-multilib.patch 3784 RMD160 f48a3f2f8c82379c30c9da0e49aa66ba34681882 SHA1 5a3ba956caaab2d5c6ef44ee3ded10a33ac870dc SHA256 d3af7a7592d0a11a35d294022b36feca2fb625e4799513bf56a79e0656278403
+DIST distcc-2.18.3.tar.bz2 341601 RMD160 c7ac6f3e161dccf39b841b57a3328b4208d28c2d SHA1 88e4c15826bdbc5a3de0f7c1bcb429e558c6976d SHA256 6500f1bc2a30b1f044ebed79c6ce15457d1712263e65f0db7d6046af262ba434
+EBUILD distcc-2.18.3-r11.ebuild 5108 RMD160 7d41e18446c7b03c866e1a04df4aa144951e0cd5 SHA1 85c7695d1c5b4965783ab93493b1c8d2a8bac2c0 SHA256 7398c7f468ee68f4ec79469074f10be6c75ca667467392b972b0bdac390cdb5d
+MISC ChangeLog 30529 RMD160 29b804f71c4b981287e48ac6493e9c270ff4aa30 SHA1 50d893924a21356f2db64e3cbf77cfa0f59b7513 SHA256 332282eed3bb5bc228220f568b565e87688d4087640f741e6c3993d9e7005369
+MISC metadata.xml 311 RMD160 1a480ace832e20a2640e7546965d54974058df1c SHA1 29a13cdea1b2f7e4f2edaf1182658647616f34ab SHA256 15a24b4d03798665cf9af1619e2aefb8db4ed4e3b057467620afdf48af395f09
diff --git a/sys-devel/distcc/distcc-2.18.3-r11.ebuild b/sys-devel/distcc/distcc-2.18.3-r11.ebuild
new file mode 100644
index 0000000..e258ef2
--- /dev/null
+++ b/sys-devel/distcc/distcc-2.18.3-r11.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.18.3-r10.ebuild,v 1.8 2007/04/28 17:56:39 swegener Exp $
+
+# If you change this in any way please email lisa@gentoo.org and make an
+# entry in the ChangeLog (this means you spanky :P). (2004-04-11) Lisa Seelye
+
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+PATCHLEVEL="2.18"
+
+DESCRIPTION="a program to distribute compilation of C code across several machines on a network"
+HOMEPAGE="http://distcc.samba.org/"
+SRC_URI="http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE="gnome gtk selinux ipv6"
+
+COMMON_DEP="dev-libs/popt"
+DEPEND="|| ( >=sys-devel/gcc-config-1.3.1 app-admin/eselect-compiler )
+ userland_GNU? ( sys-apps/shadow )
+ gnome? ( dev-util/pkgconfig )
+ gtk? ( dev-util/pkgconfig )
+ ${COMMON_DEP}"
+RDEPEND="
+ gnome? (
+ >=x11-libs/gtk+-2.0.0
+ >=gnome-base/libgnome-2.0.0
+ >=gnome-base/libgnomeui-2.0.0.0
+ >=gnome-base/libglade-2.0.0
+ x11-libs/pango
+ >=gnome-base/gconf-2.0.0
+ )
+ gtk? (
+ >=x11-libs/gtk+-2.0.0
+ x11-libs/pango
+ )
+ selinux? ( sec-policy/selinux-distcc )
+ ${COMMON_DEP}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # -Wl,--as-needed to close bug #128605
+ epatch "${FILESDIR}/distcc-as-needed.patch"
+
+ # See bug #75420 for more multilib stuff
+ epatch "${FILESDIR}/distcc-gentoo-multilib-r1.patch"
+ einfo "Please report to bug #75420 success or failure of this patch."
+
+ epatch "${FILESDIR}/${PN}-avahi.patch"
+ rm -v popt/*.c || die
+ eautoreconf
+}
+
+src_compile() {
+ local myconf="--without-included-popt "
+
+ #not taking any chances here, guessing which takes precedence in the
+ #configure script, so we'll just make the distinction here:
+ #gnome takes precedence over gtk if both are specified (gnome pulls
+ #in gtk anyways...)
+ use gtk && ! use gnome && myconf="${myconf} --with-gtk"
+ use gtk && use gnome && myconf="${myconf} --with-gnome"
+
+ #More legacy stuff?
+ [ `gcc-major-version` -eq 2 ] && filter-lfs-flags
+
+ if use ipv6; then
+ ewarn "To use IPV6 you must have IPV6 compiled into your kernel"
+ ewarn "either via a module or compiled code"
+ ewarn "You can recompile without ipv6 with: USE='-ipv6' emerge distcc"
+ myconf=" ${myconf} --enable-rfc2553 "
+ epause 5
+ fi
+ econf ${myconf} || die "econf ${myconf} failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D%/}" install
+
+ insinto /usr/share/doc/${PN}
+ doins "${S}/survey.txt"
+
+ exeinto /usr/bin
+ doexe "${FILESDIR}/distcc-config"
+
+ newconfd "${FILESDIR}/${PATCHLEVEL}/conf" distccd
+
+ newinitd "${FILESDIR}/${PATCHLEVEL}/init" distccd
+
+ # create and keep the symlink dir
+ dodir /usr/lib/distcc/bin
+ keepdir /usr/lib/distcc/bin
+
+ # create the distccd pid directory
+ dodir /var/run/distccd
+ keepdir /var/run/distccd
+
+ if use gnome || use gtk; then
+ einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui"
+ einfo "This is to have a little sensability in naming schemes between distccmon programs"
+ mv ${D}/usr/bin/distccmon-gnome ${D}/usr/bin/distccmon-gui
+ dosym /usr/bin/distccmon-gui /usr/bin/distccmon-gnome
+ fi
+
+}
+
+pkg_preinst() {
+ # non-/ installs don't require us to do anything here
+ [ "${ROOT}" != "/" ] && return 0
+
+ # stop daemon since script is being updated
+ [ -n "$(pidof distccd)" -a -x /etc/init.d/distccd ] && \
+ /etc/init.d/distccd stop
+}
+
+pkg_postinst() {
+ #are we doing bootstrap with has no useradd?
+ if [[ ${CHOST} != *-*-gnu && ${CHOST} != *-linux* ]] || [ -x /usr/sbin/useradd ]; then
+ enewuser distcc 240
+ else
+ ewarn "You do not have useradd (bootstrap) from shadow so I didn't"
+ ewarn "install the distcc user. Note that attempting to start the daemon"
+ ewarn "will fail. Please install shadow and re-emerge distcc."
+ ebeep 2
+ fi
+
+ # By now everyone should be using the right envfile
+
+ if [ "${ROOT}" = "/" ]; then
+ einfo "Installing links to native compilers..."
+ /usr/bin/distcc-config --install
+ else
+ # distcc-config can *almost* handle ROOT installs itself
+ # but for now, but user must finsh things off
+ ewarn "*** Installation is not complete ***"
+ ewarn "You must run the following as root:"
+ ewarn " /usr/bin/distcc-config --install"
+ ewarn "after booting or chrooting into ${ROOT}"
+ fi
+ einfo "Setting permissions on ${ROOT}var/run/distccd"
+ chown -R distcc:daemon ${ROOT}var/run/distccd
+ echo ""
+
+ einfo "Tips on using distcc with Gentoo can be found at"
+ einfo "http://www.gentoo.org/doc/en/distcc.xml"
+ echo ""
+ einfo "To use the distccmon programs with Gentoo you should use this command:"
+ einfo " DISTCC_DIR=/var/tmp/portage/.distcc distccmon-text N"
+ use gnome || use gtk && einfo "Or: DISTCC_DIR=/var/tmp/portage/.distcc distccmon-gnome"
+
+ ewarn "***SECURITY NOTICE***"
+ ewarn "If you are upgrading distcc please make sure to run etc-update to"
+ ewarn "update your /etc/conf.d/distccd and /etc/init.d/distccd files with"
+ ewarn "added security precautions (the --listen and --allow directives)"
+ ebeep 5
+}
diff --git a/sys-devel/distcc/files/2.18/conf b/sys-devel/distcc/files/2.18/conf
new file mode 100644
index 0000000..3f6c3f0
--- /dev/null
+++ b/sys-devel/distcc/files/2.18/conf
@@ -0,0 +1,40 @@
+# /etc/conf.d/distccd: config file for /etc/init.d/distccd
+
+DISTCCD_OPTS=""
+
+# this is the distccd executable
+DISTCCD_EXEC="/usr/bin/distccd"
+
+# this is where distccd will store its pid file
+DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
+
+# set this option to run distccd with extra parameters
+# Default port is 3632. For most people the default is okay.
+DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
+
+# Logging
+# You can change some logging options here:
+# --log-file FILE
+# --log-level LEVEL [critical,error,warning, notice, info, debug]
+#
+# Leaving --log-file blank will log to syslog
+# example: --log-file /dev/null --log-level warning
+# example: --log-level critical
+
+DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
+
+# SECURITY NOTICE:
+# It is HIGHLY recomended that you use the --listen option
+# for increased security. You can specify an IP to permit connections
+# from or a CIDR mask
+# --listen accepts only a single IP
+# --allow is now mandatory as of distcc-2.18.
+# example: --allow 192.168.0.0/24
+# example: --allow 192.168.0.5 --allow 192.168.0.150
+# example: --listen 192.168.0.2
+DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24"
+#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2"
+
+# set this for niceness
+# Default is 15
+DISTCCD_NICE="15"
diff --git a/sys-devel/distcc/files/2.18/distcc-config.patch b/sys-devel/distcc/files/2.18/distcc-config.patch
new file mode 100644
index 0000000..d06a784
--- /dev/null
+++ b/sys-devel/distcc/files/2.18/distcc-config.patch
@@ -0,0 +1,35 @@
+--- /usr/bin/distcc-config 2005-04-02 16:08:44.000000000 +0100
++++ distcc-config-adq 2005-04-07 14:06:23.000000000 +0100
+@@ -65,7 +65,22 @@
+ def permissions(path,user,group):
+ for file in os.listdir(path):
+ #print 'Configuring',path+file+'...'
+- os.chown(path+file,user,group)
++ os.chmod(path+file,0755)
++
++def installoverrides(chost):
++ for file in ['gcc', 'cc', 'c++', 'g++']:
++ path = '/usr/lib/distcc/bin/'
++ if os.path.exists('/usr/bin/'+chost+'-'+file):
++ if os.path.exists(path+file):
++ os.unlink(path+file)
++ override_cmd = open(path+file, 'w')
++ override_cmd.write('#!/bin/sh\n')
++ override_cmd.write('exec '+chost+'-'+file+' \"$@\"\n');
++ os.chown(path+file,user,group)
++ override_cmd = open(path+'cc', 'w')
++ override_cmd.write('#!/bin/sh\n')
++ override_cmd.write('exec '+chost+'-gcc'+' \"$@\"\n');
++ os.chown(path+'cc',user,group)
+
+ def installlinks(chost=''):
+ for file in ['gcc', 'cc', 'c++', 'g++']:
+@@ -139,7 +154,7 @@
+ makeconf = open('/etc/make.conf', 'r').read()
+ chost = re.compile('CHOST="(.*)"').search(makeconf).group(1)
+ print 'Creating symlinks...'
+- installlinks()
++ installoverrides(chost)
+ installlinks(chost)
+
+ print 'Checking permissions...'
diff --git a/sys-devel/distcc/files/2.18/init b/sys-devel/distcc/files/2.18/init
new file mode 100644
index 0000000..1abe4a9
--- /dev/null
+++ b/sys-devel/distcc/files/2.18/init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.18/init,v 1.1 2004/10/12 17:21:43 lisa Exp $
+
+depend() {
+ need net
+ use ypbind
+}
+
+start() {
+ [ -e "${DISTCCD_PIDFILE}" ] && rm -f ${DISTCCD_PIDFILE} &>/dev/null
+
+ ebegin "Starting distccd"
+ chown distcc `dirname ${DISTCCD_PIDFILE}` &>/dev/null
+ TMPDIR="${TMPDIR}" \
+ PATH="$(gcc-config --get-bin-path):${PATH}" \
+ /sbin/start-stop-daemon --start --quiet --startas ${DISTCCD_EXEC} \
+ --pidfile ${DISTCCD_PIDFILE} -- \
+ --pid-file ${DISTCCD_PIDFILE} -N ${DISTCCD_NICE} --user distcc \
+ ${DISTCCD_OPTS}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping distccd"
+ start-stop-daemon --stop --quiet --pidfile "${DISTCCD_PIDFILE}"
+ rm -f "${DISTCCD_PIDFILE}"
+ eend $?
+}
+
diff --git a/sys-devel/distcc/files/distcc-as-needed.patch b/sys-devel/distcc/files/distcc-as-needed.patch
new file mode 100644
index 0000000..6678e4d
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-as-needed.patch
@@ -0,0 +1,17 @@
+Index: distcc-2.18.3/Makefile.in
+===================================================================
+--- distcc-2.18.3.orig/Makefile.in
++++ distcc-2.18.3/Makefile.in
+@@ -377,9 +377,9 @@ src/renderer.o: src/renderer.c
+ $(srcdir)/src/renderer.c
+
+ distccmon-gnome@EXEEXT@: $(mon_obj) $(gnome_obj)
+- $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBS) \
+- $(GNOME_CFLAGS) $(GNOME_LIBS) \
+- $(mon_obj) $(gnome_obj)
++ $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
++ $(mon_obj) $(gnome_obj) \
++ $(LIBS) $(GNOME_CFLAGS) $(GNOME_LIBS)
+
+
+ ## Dist targets
diff --git a/sys-devel/distcc/files/distcc-avahi.patch b/sys-devel/distcc/files/distcc-avahi.patch
new file mode 100644
index 0000000..575072d
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-avahi.patch
@@ -0,0 +1,1424 @@
+diff -Nur distcc-2.18.3.old/configure.ac distcc-2.18.3/configure.ac
+--- distcc-2.18.3.old/configure.ac 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/configure.ac 2008-01-01 19:30:48.000000000 +0200
+@@ -386,6 +386,18 @@
+ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [define if you have struct sockaddr_storage]),,
+ [#include <sys/socket.h>])
+
++dnl check for avahi
++PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6.5],
++[AC_DEFINE(HAVE_AVAHI, 1, [defined if Avahi is available])
++CFLAGS="$CFLAGS $AVAHI_CFLAGS"
++LIBS="$LIBS $AVAHI_LIBS"
++ZEROCONF_DISTCC_OBJS="src/zeroconf.o src/gcc-id.o"
++ZEROCONF_DISTCCD_OBJS="src/zeroconf-reg.o src/gcc-id.o"],
++[ZEROCONF_DISTCC_OBJS=""
++ZEROCONF_DISTCCD_OBJS=""])
++AC_SUBST(ZEROCONF_DISTCC_OBJS)
++AC_SUBST(ZEROCONF_DISTCCD_OBJS)
++
+ dnl ##### Output
+ AC_SUBST(docdir)
+ AC_SUBST(CFLAGS)
+diff -Nur distcc-2.18.3.old/Makefile.in distcc-2.18.3/Makefile.in
+--- distcc-2.18.3.old/Makefile.in 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/Makefile.in 2008-01-01 19:30:48.000000000 +0200
+@@ -180,6 +180,7 @@
+ src/ssh.o src/state.o src/strip.o \
+ src/timefile.o src/traceenv.o \
+ src/where.o \
++ @ZEROCONF_DISTCC_OBJS@ \
+ $(common_obj)
+
+ distccd_obj = src/access.o \
+@@ -187,6 +188,7 @@
+ src/ncpus.o \
+ src/prefork.o \
+ src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o src/state.o \
++ @ZEROCONF_DISTCCD_OBJS@ \
+ $(common_obj) @BUILD_POPT@
+
+ # Objects that need to be linked in to build monitors
+diff -Nur distcc-2.18.3.old/src/config.h.in distcc-2.18.3/src/config.h.in
+--- distcc-2.18.3.old/src/config.h.in 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/config.h.in 2008-01-01 19:30:48.000000000 +0200
+@@ -15,6 +15,9 @@
+ /* Define to 1 if you have the `asprintf' function. */
+ #undef HAVE_ASPRINTF
+
++/* defined if Avahi is available */
++#undef HAVE_AVAHI
++
+ /* define if vsnprintf is C99 compliant */
+ #undef HAVE_C99_VSNPRINTF
+
+diff -Nur distcc-2.18.3.old/src/distcc.c distcc-2.18.3/src/distcc.c
+--- distcc-2.18.3.old/src/distcc.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/distcc.c 2008-01-01 19:31:46.000000000 +0200
+@@ -83,6 +83,9 @@
+ " COMPILER defaults to \"cc\"\n"
+ " --help explain usage and exit\n"
+ " --version show version and exit\n"
++" --show-hosts show host list and exit\n"
++" -j calculate the concurrency level from\n"
++" the host list.\n"
+ "\n"
+ "Environment variables:\n"
+ " See the manual page for a complete list.\n"
+@@ -135,6 +138,47 @@
+ signal(SIGHUP, &dcc_client_signalled);
+ }
+
++static void dcc_free_hostlist(struct dcc_hostdef *list) {
++ while (list) {
++ struct dcc_hostdef *l = list;
++ list = list->next;
++ dcc_free_hostdef(l);
++ }
++}
++
++static void dcc_show_hosts(void) {
++ struct dcc_hostdef *list, *l;
++ int nhosts;
++
++ if (dcc_get_hostlist(&list, &nhosts) != 0) {
++ rs_log_crit("Failed to get host list");
++ return;
++ }
++
++ for (l = list; l; l = l->next)
++ printf("%s\n", l->hostdef_string);
++
++ dcc_free_hostlist(list);
++}
++
++static void dcc_concurrency_level(void) {
++ struct dcc_hostdef *list, *l;
++ int nhosts;
++ int nslots = 0;
++
++ if (dcc_get_hostlist(&list, &nhosts) != 0) {
++ rs_log_crit("Failed to get host list");
++ return;
++ }
++
++ for (l = list; l; l = l->next)
++ nslots += l->n_slots;
++
++ dcc_free_hostlist(list);
++
++ printf("%i\n", nslots);
++}
++
+ #define MAXNEWFLAGS 32
+ #define MAXFLAGLEN 127
+
+@@ -282,6 +326,18 @@
+ ret = 0;
+ goto out;
+ }
++
++ if (!strcmp(argv[1], "--show-hosts")) {
++ dcc_show_hosts();
++ ret = 0;
++ goto out;
++ }
++
++ if (!strcmp(argv[1], "-j")) {
++ dcc_concurrency_level();
++ ret = 0;
++ goto out;
++ }
+
+ if(!(newargv = getNewArgvFromEnv(argv))) {
+ ret = EXIT_OUT_OF_MEMORY;
+
+diff -Nur distcc-2.18.3.old/src/distcc.h distcc-2.18.3/src/distcc.h
+--- distcc-2.18.3.old/src/distcc.h 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/distcc.h 2008-01-01 19:30:48.000000000 +0200
+@@ -112,7 +112,7 @@
+ int *ret_nhosts);
+ int dcc_parse_hosts(const char *where, const char *source_name,
+ struct dcc_hostdef **ret_list,
+- int *ret_nhosts);
++ int *ret_nhosts, struct dcc_hostdef **ret_prev);
+
+ /* ncpu.c */
+ int dcc_ncpus(int *);
+@@ -226,6 +226,7 @@
+ int dcc_make_tmpnam(const char *, const char *suffix, char **);
+
+ int dcc_mkdir(const char *path) WARN_UNUSED;
++int dcc_get_subdir(const char *name, char **path_ret) WARN_UNUSED;
+ int dcc_get_lock_dir(char **path_ret) WARN_UNUSED;
+ int dcc_get_state_dir(char **path_ret) WARN_UNUSED;
+ int dcc_get_top_dir(char **path_ret) WARN_UNUSED;
+diff -Nur distcc-2.18.3.old/src/dopt.c distcc-2.18.3/src/dopt.c
+--- distcc-2.18.3.old/src/dopt.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/dopt.c 2008-01-01 19:30:48.000000000 +0200
+@@ -93,6 +93,10 @@
+ opt_log_level
+ };
+
++#ifdef HAVE_AVAHI
++/* Flag for enabling/disabling Zeroconf using Avahi */
++int opt_zeroconf = 0;
++#endif
+
+ const struct poptOption options[] = {
+ { "allow", 'a', POPT_ARG_STRING, 0, 'a', 0, 0 },
+@@ -115,6 +119,9 @@
+ { "verbose", 0, POPT_ARG_NONE, 0, 'v', 0, 0 },
+ { "version", 0, POPT_ARG_NONE, 0, 'V', 0, 0 },
+ { "wizard", 'W', POPT_ARG_NONE, 0, 'W', 0, 0 },
++#ifdef HAVE_AVAHI
++ { "zeroconf", 0, POPT_ARG_NONE, &opt_zeroconf, 0, 0, 0 },
++#endif
+ { 0, 0, 0, 0, 0, 0, 0 }
+ };
+
+@@ -137,6 +144,9 @@
+ " -p, --port PORT TCP port to listen on\n"
+ " --listen ADDRESS IP address to listen on\n"
+ " -a, --allow IP[/BITS] client address access control\n"
++#ifdef HAVE_AVAHI
++" --zeroconf register via mDNS/DNS-SD\n"
++#endif
+ " Debug and trace:\n"
+ " --log-level=LEVEL set detail level for log file\n"
+ " levels: critical, error, warning, notice, info, debug\n"
+diff -Nur distcc-2.18.3.old/src/dopt.h distcc-2.18.3/src/dopt.h
+--- distcc-2.18.3.old/src/dopt.h 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/dopt.h 2008-01-01 19:30:48.000000000 +0200
+@@ -38,3 +38,7 @@
+ extern int opt_lifetime;
+ extern char *opt_listen_addr;
+ extern int opt_niceness;
++
++#ifdef HAVE_AVAHI
++extern int opt_zeroconf;
++#endif
+diff -Nur distcc-2.18.3.old/src/dparent.c distcc-2.18.3/src/dparent.c
+--- distcc-2.18.3.old/src/dparent.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/dparent.c 2008-01-01 19:30:48.000000000 +0200
+@@ -70,6 +70,7 @@
+ #include "types.h"
+ #include "daemon.h"
+ #include "netutil.h"
++#include "zeroconf.h"
+
+ static void dcc_nofork_parent(int listen_fd) NORETURN;
+ static void dcc_detach(void);
+@@ -94,6 +95,9 @@
+ int listen_fd;
+ int n_cpus;
+ int ret;
++#ifdef HAVE_AVAHI
++ void *avahi = NULL;
++#endif
+
+ if ((ret = dcc_socket_listen(arg_port, &listen_fd, opt_listen_addr)) != 0)
+ return ret;
+@@ -131,6 +135,14 @@
+ /* Don't catch signals until we've detached or created a process group. */
+ dcc_daemon_catch_signals();
+
++#ifdef HAVE_AVAHI
++ /* Zeroconf registration */
++ if (opt_zeroconf) {
++ if (!(avahi = dcc_zeroconf_register((uint16_t) arg_port, n_cpus)))
++ return EXIT_CONNECT_FAILED;
++ }
++#endif
++
+ /* This is called in the master daemon, whether that is detached or
+ * not. */
+ dcc_master_pid = getpid();
+@@ -138,10 +150,21 @@
+ if (opt_no_fork) {
+ dcc_log_daemon_started("non-forking daemon");
+ dcc_nofork_parent(listen_fd);
++ ret = 0;
+ } else {
+ dcc_log_daemon_started("preforking daemon");
+- return dcc_preforking_parent(listen_fd);
++ ret = dcc_preforking_parent(listen_fd);
+ }
++
++#ifdef HAVE_AVAHI
++ /* Remove zeroconf registration */
++ if (opt_zeroconf) {
++ if (dcc_zeroconf_unregister(avahi) != 0)
++ return EXIT_CONNECT_FAILED;
++ }
++#endif
++
++ return ret;
+ }
+
+
+diff -Nur distcc-2.18.3.old/src/gcc-id.c distcc-2.18.3/src/gcc-id.c
+--- distcc-2.18.3.old/src/gcc-id.c 1970-01-01 02:00:00.000000000 +0200
++++ distcc-2.18.3/src/gcc-id.c 2008-01-01 19:30:48.000000000 +0200
+@@ -0,0 +1,84 @@
++#include "config.h"
++
++#include <ctype.h>
++#include <string.h>
++#include <stdio.h>
++#include <errno.h>
++
++#include "distcc.h"
++#include "hosts.h"
++#include "zeroconf.h"
++#include "trace.h"
++
++static char *strip_bad_chars(char *s) {
++ char *k;
++
++ for (k = s; *k; k++) {
++
++ if (*k >= 'a' && *k <= 'z')
++ continue;
++
++ if (*k >= '0' && *k <= '9')
++ continue;
++
++ if (*k >= 'A' && *k <= 'Z')
++ *k = tolower(*k);
++ else
++ *k = '-';
++ }
++
++ return s;
++}
++
++static char* read_string_from_popen(const char *cmdline, char *s, size_t nbytes) {
++ FILE *p = NULL;
++ char *ret = NULL;
++
++ errno = 0;
++ if (!(p = popen(cmdline, "r"))) {
++ rs_log_crit("Failed to read string from C compiler: %s\n", errno ? strerror(errno) : "failure");
++ goto fail;
++ }
++
++ if (!fgets(s, (int) nbytes, p)) {
++ rs_log_crit("Failed to read string from C compiler.\n");
++ goto fail;
++ }
++
++ s[nbytes-1] = 0;
++ s[strcspn(s, " \t\n\r")] = 0;
++
++ ret = s;
++
++fail:
++
++ if (p)
++ pclose(p);
++
++ return ret;
++}
++
++char* dcc_get_gcc_version(char *s, size_t nbytes) {
++ return read_string_from_popen("cc -dumpversion", s, nbytes);
++}
++
++char* dcc_get_gcc_machine(char *s, size_t nbytes) {
++ return read_string_from_popen("cc -dumpmachine", s, nbytes);
++}
++
++char* dcc_make_dnssd_subtype(char *stype, size_t nbytes, const char *v, const char *m) {
++ char version[64], machine[64];
++
++ strncpy(version, v, sizeof(version)-1);
++ version[sizeof(version)-1] = 0;
++ strncpy(machine, m, sizeof(machine)-1);
++ machine[sizeof(machine)-1] = 0;
++
++ strip_bad_chars(version);
++ strip_bad_chars(machine);
++
++ snprintf(stype, nbytes, "_%s--%s._sub." DCC_DNS_SERVICE_TYPE, machine, version);
++ stype[nbytes-1] = 0;
++
++ return stype;
++}
+diff -Nur distcc-2.18.3.old/src/help.c distcc-2.18.3/src/help.c
+--- distcc-2.18.3.old/src/help.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/help.c 2008-01-01 19:30:48.000000000 +0200
+@@ -62,6 +62,9 @@
+ "distcc comes with ABSOLUTELY NO WARRANTY. distcc is free software, and\n"
+ "you may use, modify and redistribute it under the terms of the GNU \n"
+ "General Public License version 2 or later.\n"
++#ifdef HAVE_AVAHI
++"\nBuilt with Zeroconf support.\n"
++#endif
+ "\n"
+ ,
+ prog, PACKAGE_VERSION, GNU_HOST, DISTCC_DEFAULT_PORT,
+diff -Nur distcc-2.18.3.old/src/hostfile.c distcc-2.18.3/src/hostfile.c
+--- distcc-2.18.3.old/src/hostfile.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/hostfile.c 2008-01-01 19:30:48.000000000 +0200
+@@ -59,7 +59,7 @@
+ if ((ret = dcc_load_file_string(fname, &body)) != 0)
+ return ret;
+
+- ret = dcc_parse_hosts(body, fname, ret_list, ret_nhosts);
++ ret = dcc_parse_hosts(body, fname, ret_list, ret_nhosts, NULL);
+
+ free(body);
+
+diff -Nur distcc-2.18.3.old/src/hosts.c distcc-2.18.3/src/hosts.c
+--- distcc-2.18.3.old/src/hosts.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/hosts.c 2008-01-01 19:30:48.000000000 +0200
+@@ -96,6 +96,10 @@
+ #include "hosts.h"
+ #include "exitcode.h"
+ #include "snprintf.h"
++#ifdef HAVE_AVAHI
++#include "zeroconf.h"
++#define ZEROCONF_MAGIC "+zeroconf"
++#endif
+
+ const int dcc_default_port = DISTCC_DEFAULT_PORT;
+
+@@ -134,9 +138,12 @@
+ char *path, *top;
+ int ret;
+
++ *ret_list = NULL;
++ *ret_nhosts = 0;
++
+ if ((env = getenv("DISTCC_HOSTS")) != NULL) {
+ rs_trace("read hosts from environment");
+- return dcc_parse_hosts(env, "$DISTCC_HOSTS", ret_list, ret_nhosts);
++ return dcc_parse_hosts(env, "$DISTCC_HOSTS", ret_list, ret_nhosts, NULL);
+ }
+
+ /* $DISTCC_DIR or ~/.distcc */
+@@ -163,7 +170,7 @@
+ rs_trace("not reading %s: %s", path, strerror(errno));
+ free(path);
+ }
+-
++
+ /* FIXME: Clearer message? */
+ rs_log_warning("no hostlist is set; can't distribute work");
+
+@@ -346,17 +353,19 @@
+ **/
+ int dcc_parse_hosts(const char *where, const char *source_name,
+ struct dcc_hostdef **ret_list,
+- int *ret_nhosts)
++ int *ret_nhosts, struct dcc_hostdef **ret_prev)
+ {
+ int ret;
+- struct dcc_hostdef *prev, *curr;
++ struct dcc_hostdef *curr, *_prev;
++
++ if (!ret_prev) {
++ ret_prev = &_prev;
++ _prev = NULL;
++ }
+
+ /* TODO: Check for '/' in places where it might cause trouble with
+ * a lock file name. */
+
+- prev = NULL;
+- *ret_list = NULL;
+- *ret_nhosts = 0;
+ /* A simple, hardcoded scanner. Some of the GNU routines might be
+ * useful here, but they won't work on less capable systems.
+ *
+@@ -390,6 +399,15 @@
+ token_start = where;
+ token_len = strcspn(where, " #\t\n\f\r");
+
++#ifdef HAVE_AVAHI
++ if (token_len == sizeof(ZEROCONF_MAGIC)-1 &&
++ !strncmp(token_start, ZEROCONF_MAGIC, (unsigned) token_len)) {
++ if ((ret = dcc_zeroconf_add_hosts(ret_list, ret_nhosts, 4, ret_prev) != 0))
++ return ret;
++ goto skip;
++ }
++#endif
++
+ /* Allocate new list item */
+ curr = calloc(1, sizeof(struct dcc_hostdef));
+ if (!curr) {
+@@ -404,8 +422,8 @@
+ }
+
+ /* Link into list */
+- if (prev) {
+- prev->next = curr;
++ if (*ret_prev) {
++ (*ret_prev)->next = curr;
+ } else {
+ *ret_list = curr; /* first */
+ }
+@@ -434,10 +452,15 @@
+ return ret;
+ }
+
++ (*ret_nhosts)++;
++ *ret_prev = curr;
++
++#ifdef HAVE_AVAHI
++ skip:
++#endif
++
+ /* continue to next token if any */
+ where = token_start + token_len;
+- prev = curr;
+- (*ret_nhosts)++;
+ }
+
+ if (*ret_nhosts) {
+diff -Nur distcc-2.18.3.old/src/io.c distcc-2.18.3/src/io.c
+--- distcc-2.18.3.old/src/io.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/io.c 2008-01-01 19:30:48.000000000 +0200
+@@ -160,7 +160,7 @@
+ return ret;
+ else
+ continue;
+- } else if (r == -1 && errno == EAGAIN) {
++ } else if (r == -1 && errno == EINTR) {
+ continue;
+ } else if (r == -1) {
+ rs_log_error("failed to read: %s", strerror(errno));
+@@ -202,9 +202,6 @@
+ } else if (r == -1) {
+ rs_log_error("failed to write: %s", strerror(errno));
+ return EXIT_IO_ERROR;
+- } else if (r == 0) {
+- rs_log_error("unexpected eof on fd%d", fd);
+- return EXIT_TRUNCATED;
+ } else {
+ buf = &((char *) buf)[r];
+ len -= r;
+diff -Nur distcc-2.18.3.old/src/tempfile.c distcc-2.18.3/src/tempfile.c
+--- distcc-2.18.3.old/src/tempfile.c 2008-01-01 19:30:33.000000000 +0200
++++ distcc-2.18.3/src/tempfile.c 2008-01-01 19:30:48.000000000 +0200
+@@ -161,7 +161,7 @@
+ * Return a subdirectory of the DISTCC_DIR of the given name, making
+ * sure that the directory exists.
+ **/
+-static int dcc_get_subdir(const char *name,
++int dcc_get_subdir(const char *name,
+ char **dir_ret)
+ {
+ int ret;
+diff -Nur distcc-2.18.3.old/src/zeroconf.c distcc-2.18.3/src/zeroconf.c
+--- distcc-2.18.3.old/src/zeroconf.c 1970-01-01 02:00:00.000000000 +0200
++++ distcc-2.18.3/src/zeroconf.c 2008-01-01 19:30:48.000000000 +0200
+@@ -0,0 +1,616 @@
++#include "config.h"
++
++#include <assert.h>
++#include <stdio.h>
++#include <sys/select.h>
++#include <signal.h>
++#include <sys/file.h>
++#include <sys/time.h>
++#include <time.h>
++#include <sys/stat.h>
++#include <string.h>
++#include <errno.h>
++#include <unistd.h>
++#include <stdlib.h>
++#include <limits.h>
++
++#include <avahi-common/domain.h>
++#include <avahi-common/error.h>
++#include <avahi-common/malloc.h>
++#include <avahi-common/address.h>
++#include <avahi-common/simple-watch.h>
++#include <avahi-client/lookup.h>
++
++#include "distcc.h"
++#include "hosts.h"
++#include "zeroconf.h"
++#include "trace.h"
++#include "exitcode.h"
++
++/* How long shall the background daemon be idle before i terminates itself? */
++#define MAX_IDLE_TIME 20
++
++/* Maxium size of host file to load */
++#define MAX_FILE_SIZE (1024*100)
++
++/* General daemon data */
++struct daemon_data {
++ struct host *hosts;
++ int fd;
++ int n_slots;
++
++ AvahiClient *client;
++ AvahiServiceBrowser *browser;
++ AvahiSimplePoll *simple_poll;
++};
++
++/* Zeroconf service wrapper */
++struct host {
++ struct daemon_data *daemon_data;
++ struct host *next;
++
++ AvahiIfIndex interface;
++ AvahiProtocol protocol;
++ char *service;
++ char *domain;
++
++ AvahiAddress address;
++ uint16_t port;
++ int n_cpus;
++
++ AvahiServiceResolver *resolver;
++};
++
++/* A generic, system independant lock routine, similar to sys_lock,
++ * but more powerful:
++ * rw: if non-zero: r/w lock instead of r/o lock
++ * enable: lock or unlock
++ * block: block when locking */
++static int generic_lock(int fd, int rw, int enable, int block) {
++#if defined(F_SETLK)
++ struct flock lockparam;
++
++ lockparam.l_type = enable ? (rw ? F_WRLCK : F_RDLCK) : F_UNLCK;
++ lockparam.l_whence = SEEK_SET;
++ lockparam.l_start = 0;
++ lockparam.l_len = 0; /* whole file */
++
++ return fcntl(fd, block ? F_SETLKW : F_SETLK, &lockparam);
++#elif defined(HAVE_FLOCK)
++ return flock(fd, (enable ? (rw ? LOCK_EX : LOCK_SH) : LOCK_UN) | (block ? LOCK_NB : 0));
++#elif defined(HAVE_LOCKF)
++ return lockf(fd, (enable ? (block ? F_LOCK : F_TLOCK) : F_ULOCK));
++#else
++# error "No supported lock method. Please port this code."
++#endif
++}
++
++/* Return the number of seconds, when the specified file was last
++ * read. If the atime of that file is < clip_time, use clip_time
++ * instead */
++static time_t fd_last_used(int fd, time_t clip_time) {
++ struct stat st;
++ time_t now, ft;
++ assert(fd >= 0);
++
++ if (fstat(fd, &st) < 0) {
++ rs_log_crit("fstat() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ if ((now = time(NULL)) == (time_t) -1) {
++ rs_log_crit("time() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ ft = clip_time ? (st.st_atime < clip_time ? clip_time : st.st_atime) : st.st_atime;
++ assert(ft <= now);
++
++ return now - ft;
++}
++
++/* Write host data to host file */
++static int write_hosts(struct daemon_data *d) {
++ struct host *h;
++ int r = 0;
++ assert(d);
++
++ rs_log_info("writing zeroconf data.\n");
++
++ if (generic_lock(d->fd, 1, 1, 1) < 0) {
++ rs_log_crit("lock failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ if (lseek(d->fd, 0, SEEK_SET) < 0) {
++ rs_log_crit("lseek() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ if (ftruncate(d->fd, 0) < 0) {
++ rs_log_crit("ftruncate() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ for (h = d->hosts; h; h = h->next) {
++ char t[256], a[AVAHI_ADDRESS_STR_MAX];
++
++ if (h->resolver)
++ /* Not yet fully resolved */
++ continue;
++
++ snprintf(t, sizeof(t), "%s:%u/%i\n", avahi_address_snprint(a, sizeof(a), &h->address), h->port, d->n_slots * h->n_cpus);
++
++ if (dcc_writex(d->fd, t, strlen(t)) != 0) {
++ rs_log_crit("write() failed: %s\n", strerror(errno));
++ goto finish;
++ }
++ }
++
++ r = 0;
++
++finish:
++
++ generic_lock(d->fd, 1, 0, 1);
++ return r;
++
++};
++
++/* Free host data */
++static void free_host(struct host *h) {
++ assert(h);
++
++ if (h->resolver)
++ avahi_service_resolver_free(h->resolver);
++
++ free(h->service);
++ free(h->domain);
++ free(h);
++}
++
++/* Remove a service from the host list */
++static void remove_service(struct daemon_data *d, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *domain) {
++ struct host *h, *p = NULL;
++ assert(d);
++
++ for (h = d->hosts; h; h = h->next) {
++ if (h->interface == interface &&
++ h->protocol == protocol &&
++ !strcmp(h->service, name) &&
++ avahi_domain_equal(h->domain, domain)) {
++
++ if (p)
++ p->next = h->next;
++ else
++ d->hosts = h->next;
++
++ free_host(h);
++
++ break;
++ } else
++ p = h;
++ }
++}
++
++/* Called when a resolve call completes */
++static void resolve_reply(
++ AvahiServiceResolver *UNUSED(r),
++ AvahiIfIndex UNUSED(interface),
++ AvahiProtocol UNUSED(protocol),
++ AvahiResolverEvent event,
++ const char *name,
++ const char *UNUSED(type),
++ const char *UNUSED(domain),
++ const char *UNUSED(host_name),
++ const AvahiAddress *a,
++ uint16_t port,
++ AvahiStringList *txt,
++ AvahiLookupResultFlags UNUSED(flags),
++ void *userdata) {
++
++ struct host *h = userdata;
++
++ switch (event) {
++
++ case AVAHI_RESOLVER_FOUND: {
++ AvahiStringList *i;
++
++ /* Look for the number of CPUs in TXT RRs */
++ for (i = txt; i; i = i->next) {
++ char *key, *value;
++
++ if (avahi_string_list_get_pair(i, &key, &value, NULL) < 0)
++ continue;
++
++ if (!strcmp(key, "cpus"))
++ if ((h->n_cpus = atoi(value)) <= 0)
++ h->n_cpus = 1;
++
++ avahi_free(key);
++ avahi_free(value);
++ }
++
++ h->address = *a;
++ h->port = port;
++
++ avahi_service_resolver_free(h->resolver);
++ h->resolver = NULL;
++
++ /* Write modified hosts file */
++ write_hosts(h->daemon_data);
++
++ break;
++ }
++
++ case AVAHI_RESOLVER_FAILURE:
++
++ rs_log_warning("Failed to resolve service '%s': %s\n", name,
++ avahi_strerror(avahi_client_errno(h->daemon_data->client)));
++
++ free_host(h);
++ break;
++ }
++
++}
++
++/* Called whenever a new service is found or removed */
++static void browse_reply(
++ AvahiServiceBrowser *UNUSED(b),
++ AvahiIfIndex interface,
++ AvahiProtocol protocol,
++ AvahiBrowserEvent event,
++ const char *name,
++ const char *type,
++ const char *domain,
++ AvahiLookupResultFlags UNUSED(flags),
++ void *userdata) {
++
++ struct daemon_data *d = userdata;
++ assert(d);
++
++ switch (event) {
++ case AVAHI_BROWSER_NEW: {
++ struct host *h;
++
++ h = malloc(sizeof(struct host));
++ assert(h);
++
++ rs_log_info("new service: %s\n", name);
++
++ if (!(h->resolver = avahi_service_resolver_new(d->client,
++ interface,
++ protocol,
++ name,
++ type,
++ domain,
++ AVAHI_PROTO_UNSPEC,
++ 0,
++ resolve_reply,
++ h))) {
++ rs_log_warning("Failed to create service resolver for '%s': %s\n", name,
++ avahi_strerror(avahi_client_errno(d->client)));
++
++ free(h);
++
++ } else {
++
++ /* Fill in missing data */
++ h->service = strdup(name);
++ assert(h->service);
++ h->domain = strdup(domain);
++ assert(h->domain);
++ h->daemon_data = d;
++ h->interface = interface;
++ h->protocol = protocol;
++ h->next = d->hosts;
++ h->n_cpus = 1;
++ d->hosts = h;
++ }
++
++ break;
++ }
++
++ case AVAHI_BROWSER_REMOVE:
++
++ rs_log_info("Removed service: %s\n", name);
++
++ remove_service(d, interface, protocol, name, domain);
++ write_hosts(d);
++ break;
++
++ case AVAHI_BROWSER_FAILURE:
++ rs_log_crit("Service Browser failure '%s': %s\n", name,
++ avahi_strerror(avahi_client_errno(d->client)));
++
++ avahi_simple_poll_quit(d->simple_poll);
++ break;
++
++ case AVAHI_BROWSER_CACHE_EXHAUSTED:
++ case AVAHI_BROWSER_ALL_FOR_NOW:
++ ;
++
++ }
++}
++
++static void client_callback(AvahiClient *client, AvahiClientState state, void *userdata) {
++ struct daemon_data *d = userdata;
++
++ switch (state) {
++
++ case AVAHI_CLIENT_FAILURE:
++ rs_log_crit("Client failure: %s\n", avahi_strerror(avahi_client_errno(client)));
++ avahi_simple_poll_quit(d->simple_poll);
++ break;
++
++ case AVAHI_CLIENT_S_COLLISION:
++ case AVAHI_CLIENT_S_REGISTERING:
++ case AVAHI_CLIENT_S_RUNNING:
++ case AVAHI_CLIENT_CONNECTING:
++ ;
++ }
++}
++
++/* The main function of the background daemon */
++static int daemon_proc(const char *host_file, const char *lock_file, int n_slots) {
++ int ret = 1;
++ int lock_fd = -1;
++ struct daemon_data d;
++ time_t clip_time;
++ int error;
++ char machine[64], version[64], stype[128];
++
++ rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
++
++ /* Prepare daemon data structure */
++ d.fd = -1;
++ d.hosts = NULL;
++ d.n_slots = n_slots;
++ d.simple_poll = NULL;
++ d.browser = NULL;
++ d.client = NULL;
++ clip_time = time(NULL);
++
++ rs_log_info("Zeroconf daemon running.\n");
++
++ /* Open daemon lock file and lock it */
++ if ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", lock_file, strerror(errno));
++ goto finish;
++ }
++
++ if (generic_lock(lock_fd, 1, 1, 0) < 0) {
++ /* lock failed, there's probably already another daemon running */
++ goto finish;
++ }
++
++ /* Open host file */
++ if ((d.fd = open(host_file, O_RDWR|O_CREAT, 0666)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", host_file, strerror(errno));
++ goto finish;
++ }
++
++ /* Clear host file */
++ write_hosts(&d);
++
++ if (!(d.simple_poll = avahi_simple_poll_new())) {
++ rs_log_crit("Failed to create simple poll object.\n");
++ goto finish;
++ }
++
++ if (!(d.client = avahi_client_new(
++ avahi_simple_poll_get(d.simple_poll),
++ 0,
++ client_callback,
++ &d,
++ &error))) {
++ rs_log_crit("Failed to create Avahi client object: %s\n", avahi_strerror(error));
++ goto finish;
++ }
++
++ if (dcc_get_gcc_version(version, sizeof(version)) &&
++ dcc_get_gcc_machine(machine, sizeof(machine))) {
++
++ dcc_make_dnssd_subtype(stype, sizeof(stype), version, machine);
++ } else {
++ rs_log_warning("Warning, failed to get CC version and machine type.\n");
++
++ strncpy(stype, DCC_DNS_SERVICE_TYPE, sizeof(stype));
++ stype[sizeof(stype)-1] = 0;
++ }
++
++ rs_log_info("Browsing for '%s'.\n", stype);
++
++ if (!(d.browser = avahi_service_browser_new(
++ d.client,
++ AVAHI_IF_UNSPEC,
++ AVAHI_PROTO_UNSPEC,
++ stype,
++ NULL,
++ 0,
++ browse_reply,
++ &d))) {
++ rs_log_crit("Failed to create service browser object: %s\n", avahi_strerror(avahi_client_errno(d.client)));
++ goto finish;
++ }
++
++ /* Check whether the host file has been used recently */
++ while (fd_last_used(d.fd, clip_time) <= MAX_IDLE_TIME) {
++
++ /* Iterate the main loop for 5s */
++ if (avahi_simple_poll_iterate(d.simple_poll, 5000) != 0) {
++ rs_log_crit("Event loop exited abnormaly.\n");
++ goto finish;
++ }
++ }
++
++ /* Wer are idle */
++ rs_log_info("Zeroconf daemon unused.\n");
++
++ ret = 0;
++
++finish:
++
++ /* Cleanup */
++ if (lock_fd >= 0) {
++ generic_lock(lock_fd, 1, 0, 0);
++ close(lock_fd);
++ }
++
++ if (d.fd >= 0)
++ close(d.fd);
++
++ while (d.hosts) {
++ struct host *h = d.hosts;
++ d.hosts = d.hosts->next;
++ free_host(h);
++ }
++
++ if (d.client)
++ avahi_client_free(d.client);
++
++ if (d.simple_poll)
++ avahi_simple_poll_free(d.simple_poll);
++
++ rs_log_info("zeroconf daemon ended.\n");
++
++ return ret;
++}
++
++/* Return path to the zeroconf directory in ~/.distcc */
++static int get_zeroconf_dir(char **dir_ret) {
++ static char *cached;
++ int ret;
++
++ if (cached) {
++ *dir_ret = cached;
++ return 0;
++ } else {
++ ret = dcc_get_subdir("zeroconf", dir_ret);
++ if (ret == 0)
++ cached = *dir_ret;
++ return ret;
++ }
++}
++
++/* Get the host list from zeroconf */
++int dcc_zeroconf_add_hosts(struct dcc_hostdef **ret_list, int *ret_nhosts, int n_slots, struct dcc_hostdef **ret_prev) {
++ char host_file[PATH_MAX], lock_file[PATH_MAX], *s = NULL;
++ int lock_fd = -1, host_fd = -1;
++ int fork_daemon = 0;
++ int r = -1;
++ char *dir;
++ struct stat st;
++
++ if (get_zeroconf_dir(&dir) != 0) {
++ rs_log_crit("failed to get zeroconf dir.\n");
++ goto finish;
++ }
++
++ snprintf(lock_file, sizeof(lock_file), "%s/lock", dir);
++ snprintf(host_file, sizeof(host_file), "%s/hosts", dir);
++
++ /* Open lock file */
++ if ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", lock_file, strerror(errno));
++ goto finish;
++ }
++
++ /* Try to lock the lock file */
++ if (generic_lock(lock_fd, 1, 1, 0) >= 0) {
++ /* The lock succeeded => there's no daemon running yet! */
++ fork_daemon = 1;
++ generic_lock(lock_fd, 1, 0, 0);
++ }
++
++ close(lock_fd);
++
++ /* Shall we fork a new daemon? */
++ if (fork_daemon) {
++ pid_t pid;
++
++ rs_log_info("Spawning zeroconf daemon.\n");
++
++ if ((pid = fork()) == -1) {
++ rs_log_crit("fork() failed: %s\n", strerror(errno));
++ goto finish;
++ } else if (pid == 0) {
++ int fd;
++ /* Child */
++
++ /* Close file descriptors and replace them by /dev/null */
++ close(0);
++ close(1);
++ close(2);
++ fd = open("/dev/null", O_RDWR);
++ assert(fd == 0);
++ fd = dup(0);
++ assert(fd == 1);
++ fd = dup(0);
++ assert(fd == 2);
++
++#ifdef HAVE_SETSID
++ setsid();
++#endif
++
++ chdir("/");
++ rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
++ _exit(daemon_proc(host_file, lock_file, n_slots));
++ }
++
++ /* Parent */
++
++ /* Wait some time for initial host gathering */
++ usleep(1000000); /* 1000 ms */
++ }
++
++ /* Open host list read-only */
++ if ((host_fd = open(host_file, O_RDONLY)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", host_file, strerror(errno));
++ goto finish;
++ }
++
++ /* A read lock */
++ if (generic_lock(host_fd, 0, 1, 1) < 0) {
++ rs_log_crit("lock failed: %s\n", strerror(errno));
++ goto finish;
++ }
++
++ /* Get file size */
++ if (fstat(host_fd, &st) < 0) {
++ rs_log_crit("stat() failed: %s\n", strerror(errno));
++ goto finish;
++ }
++
++ if (st.st_size >= MAX_FILE_SIZE) {
++ rs_log_crit("file too large.\n");
++ goto finish;
++ }
++
++ /* read file data */
++ s = malloc((size_t) st.st_size+1);
++ assert(s);
++
++ if (dcc_readx(host_fd, s, (size_t) st.st_size) != 0) {
++ rs_log_crit("failed to read from file.\n");
++ goto finish;
++ }
++ s[st.st_size] = 0;
++
++ /* Parse host data */
++ if (dcc_parse_hosts(s, host_file, ret_list, ret_nhosts, ret_prev) != 0) {
++ rs_log_crit("failed to parse host file.\n");
++ goto finish;
++ }
++
++ r = 0;
++
++finish:
++ if (host_fd >= 0) {
++ generic_lock(host_fd, 0, 0, 1);
++ close(host_fd);
++ }
++
++ free(s);
++
++ return r;
++}
+diff -Nur distcc-2.18.3.old/src/zeroconf.h distcc-2.18.3/src/zeroconf.h
+--- distcc-2.18.3.old/src/zeroconf.h 1970-01-01 02:00:00.000000000 +0200
++++ distcc-2.18.3/src/zeroconf.h 2008-01-01 19:30:48.000000000 +0200
+@@ -0,0 +1,18 @@
++#ifndef foozeroconfhfoo
++#define foozeroconfhfoo
++
++#include <inttypes.h>
++
++int dcc_zeroconf_add_hosts(struct dcc_hostdef **re_list, int *ret_nhosts, int slots, struct dcc_hostdef **ret_prev);
++
++void *dcc_zeroconf_register(uint16_t port, int n_cpus);
++int dcc_zeroconf_unregister(void*);
++
++char* dcc_get_gcc_version(char *s, size_t nbytes);
++char* dcc_get_gcc_machine(char *s, size_t nbytes);
++
++char* dcc_make_dnssd_subtype(char *stype, size_t nbytes, const char *v, const char *m);
++
++#define DCC_DNS_SERVICE_TYPE "_distcc._tcp"
++
++#endif
+diff -Nur distcc-2.18.3.old/src/zeroconf-reg.c distcc-2.18.3/src/zeroconf-reg.c
+--- distcc-2.18.3.old/src/zeroconf-reg.c 1970-01-01 02:00:00.000000000 +0200
++++ distcc-2.18.3/src/zeroconf-reg.c 2008-01-01 19:30:48.000000000 +0200
+@@ -0,0 +1,265 @@
++#include "config.h"
++
++#include <assert.h>
++#include <stdio.h>
++#include <sys/select.h>
++#include <signal.h>
++#include <sys/file.h>
++#include <sys/time.h>
++#include <time.h>
++#include <sys/stat.h>
++#include <sys/poll.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <errno.h>
++
++#include <avahi-common/thread-watch.h>
++#include <avahi-common/error.h>
++#include <avahi-common/alternative.h>
++#include <avahi-common/malloc.h>
++#include <avahi-client/publish.h>
++
++#include "distcc.h"
++#include "zeroconf.h"
++#include "trace.h"
++#include "exitcode.h"
++
++struct context {
++ char *name;
++ AvahiThreadedPoll *threaded_poll;
++ AvahiClient *client;
++ AvahiEntryGroup *group;
++ uint16_t port;
++ int n_cpus;
++};
++
++static void publish_reply(AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata);
++
++static void register_stuff(struct context *ctx) {
++
++ if (!ctx->group) {
++
++ if (!(ctx->group = avahi_entry_group_new(ctx->client, publish_reply, ctx))) {
++ rs_log_crit("Failed to create entry group: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++
++ }
++
++ if (avahi_entry_group_is_empty(ctx->group)) {
++ char cpus[32], machine[64] = "cc_machine=", version[64] = "cc_version=", *m, *v;
++
++ snprintf(cpus, sizeof(cpus), "cpus=%i", ctx->n_cpus);
++ v = dcc_get_gcc_version(version+11, sizeof(version)-11);
++ m = dcc_get_gcc_machine(machine+11, sizeof(machine)-11);
++
++ /* Register our service */
++
++ if (avahi_entry_group_add_service(
++ ctx->group,
++ AVAHI_IF_UNSPEC,
++ AVAHI_PROTO_UNSPEC,
++ 0,
++ ctx->name,
++ DCC_DNS_SERVICE_TYPE,
++ NULL,
++ NULL,
++ ctx->port,
++ "txtvers=1",
++ cpus,
++ "distcc="PACKAGE_VERSION,
++ "gnuhost="GNU_HOST,
++ v ? version : NULL,
++ m ? machine : NULL,
++ NULL) < 0) {
++ rs_log_crit("Failed to add service: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++
++ if (v && m) {
++ char stype[128];
++
++ dcc_make_dnssd_subtype(stype, sizeof(stype), v, m);
++
++ if (avahi_entry_group_add_service_subtype(
++ ctx->group,
++ AVAHI_IF_UNSPEC,
++ AVAHI_PROTO_UNSPEC,
++ 0,
++ ctx->name,
++ DCC_DNS_SERVICE_TYPE,
++ NULL,
++ stype) < 0) {
++ rs_log_crit("Failed to add service: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++ } else
++ rs_log_warning("Failed to determine CC version, not registering DNS-SD service subtype!");
++
++ if (avahi_entry_group_commit(ctx->group) < 0) {
++ rs_log_crit("Failed to commit entry group: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++
++ }
++
++ return;
++
++fail:
++ avahi_threaded_poll_quit(ctx->threaded_poll);
++}
++
++/* Called when publishing of service data completes */
++static void publish_reply(AvahiEntryGroup *UNUSED(g), AvahiEntryGroupState state, void *userdata) {
++ struct context *ctx = userdata;
++
++ switch (state) {
++
++ case AVAHI_ENTRY_GROUP_COLLISION: {
++ char *n;
++
++ /* Pick a new name for our service */
++
++ n = avahi_alternative_service_name(ctx->name);
++ assert(n);
++
++ avahi_free(ctx->name);
++ ctx->name = n;
++
++ register_stuff(ctx);
++ break;
++ }
++
++ case AVAHI_ENTRY_GROUP_FAILURE:
++ rs_log_crit("Failed to register service: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ avahi_threaded_poll_quit(ctx->threaded_poll);
++ break;
++
++ case AVAHI_ENTRY_GROUP_UNCOMMITED:
++ case AVAHI_ENTRY_GROUP_REGISTERING:
++ case AVAHI_ENTRY_GROUP_ESTABLISHED:
++ ;
++ }
++}
++
++static void client_callback(AvahiClient *client, AvahiClientState state, void *userdata) {
++ struct context *ctx = userdata;
++
++ ctx->client = client;
++
++ switch (state) {
++
++ case AVAHI_CLIENT_S_RUNNING:
++
++ register_stuff(ctx);
++ break;
++
++ case AVAHI_CLIENT_S_COLLISION:
++ case AVAHI_CLIENT_S_REGISTERING:
++
++ if (ctx->group)
++ avahi_entry_group_reset(ctx->group);
++
++ break;
++
++ case AVAHI_CLIENT_FAILURE:
++
++ if (avahi_client_errno(client) == AVAHI_ERR_DISCONNECTED) {
++ int error;
++
++ avahi_client_free(ctx->client);
++ ctx->client = NULL;
++ ctx->group = NULL;
++
++ /* Reconnect to the server */
++
++ if (!(ctx->client = avahi_client_new(
++ avahi_threaded_poll_get(ctx->threaded_poll),
++ AVAHI_CLIENT_NO_FAIL,
++ client_callback,
++ ctx,
++ &error))) {
++
++ rs_log_crit("Failed to contact server: %s\n", avahi_strerror(error));
++ avahi_threaded_poll_quit(ctx->threaded_poll);
++ }
++
++ } else {
++ rs_log_crit("Client failure: %s\n", avahi_strerror(avahi_client_errno(client)));
++ avahi_threaded_poll_quit(ctx->threaded_poll);
++ }
++
++ break;
++
++ case AVAHI_CLIENT_CONNECTING:
++ ;
++ }
++}
++
++/* register a distcc service in DNS-SD/mDNS with the given port and number of CPUs */
++void* dcc_zeroconf_register(uint16_t port, int n_cpus) {
++ struct context *ctx = NULL;
++ char service[256] = "distcc@";
++ int error;
++
++ ctx = malloc(sizeof(struct context));
++ assert(ctx);
++ ctx->client = NULL;
++ ctx->group = NULL;
++ ctx->threaded_poll = NULL;
++ ctx->port = port;
++ ctx->n_cpus = n_cpus;
++
++ /* Prepare service name */
++ gethostname(service+7, sizeof(service)-8);
++ service[sizeof(service)-1] = 0;
++
++ ctx->name = strdup(service);
++ assert(ctx->name);
++
++ if (!(ctx->threaded_poll = avahi_threaded_poll_new())) {
++ rs_log_crit("Failed to create event loop object.\n");
++ goto fail;
++ }
++
++ if (!(ctx->client = avahi_client_new(avahi_threaded_poll_get(ctx->threaded_poll), AVAHI_CLIENT_NO_FAIL, client_callback, ctx, &error))) {
++ rs_log_crit("Failed to create client object: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++
++ /* Create the mDNS event handler */
++ if (avahi_threaded_poll_start(ctx->threaded_poll) < 0) {
++ rs_log_crit("Failed to create thread.\n");
++ goto fail;
++ }
++
++ return ctx;
++
++fail:
++
++ if (ctx)
++ dcc_zeroconf_unregister(ctx);
++
++ return NULL;
++}
++
++/* Unregister this server from DNS-SD/mDNS */
++int dcc_zeroconf_unregister(void *u) {
++ struct context *ctx = u;
++
++ if (ctx->threaded_poll)
++ avahi_threaded_poll_stop(ctx->threaded_poll);
++
++ if (ctx->client)
++ avahi_client_free(ctx->client);
++
++ if (ctx->threaded_poll)
++ avahi_threaded_poll_free(ctx->threaded_poll);
++
++ avahi_free(ctx->name);
++
++ free(ctx);
++
++ return 0;
++}
diff --git a/sys-devel/distcc/files/distcc-config b/sys-devel/distcc/files/distcc-config
new file mode 100644
index 0000000..b0a8975
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-config
@@ -0,0 +1,165 @@
+#!/usr/bin/env python
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/distcc-config,v 1.1 2004/08/27 11:05:10 pyrania Exp $
+
+import os, re, signal, sys, commands, pwd
+from string import rstrip
+
+options=[
+ '--get-hosts',
+ '--set-hosts',
+ '--get-verbose',
+ '--set-verbose',
+ '--get-log',
+ '--set-log',
+ '--install',
+ '--help',
+ '--get-env',
+ '--set-env'
+]
+
+tmpcmdline=sys.argv[1:]
+cmdline=[]
+envfile = '/etc/env.d/02distcc'
+
+def exithandler(foo,bar):
+ os.kill(0,signal.SIGKILL)
+ sys.exit(1)
+
+signal.signal(signal.SIGINT,exithandler)
+
+def isroot(ret=0):
+ if os.getuid() != 0:
+ if ret == 0:
+ print '!!!',sys.argv[:1][0],tmpcmdline[0],'must be run as root'
+ sys.exit(1)
+ else:
+ retval = 0
+ else:
+ retval = 1
+ return retval
+
+def writeenv(var,value):
+ isroot()
+ distcc_env = []
+ distcc_env = open(envfile, 'r').readlines()
+ distcc_env_new = open(envfile, 'w')
+ for i in range(len(distcc_env)):
+ if re.compile(var+'="(.*)"').match(distcc_env[i]):
+ distcc_env[i] = var+'="'+value+'"\n'
+ distcc_env_new.write(distcc_env[i])
+ #print 'Set',var,'to:',value
+ os.popen('/usr/sbin/env-update')
+ print 'If you want to use these new settings in an existing shell,'
+ print 'you need to "source /etc/profile" to get the changes.'
+
+def readenv(var):
+ distcc_env = open(envfile, 'r').read()
+ match = re.compile(var+'="(.*)"').search(distcc_env)
+ if match:
+ print var+'='+match.group(1)
+ else:
+ print var,'not set.'
+
+def permissions(path,user,group):
+ for file in os.listdir(path):
+ #print 'Configuring',path+file+'...'
+ os.chown(path+file,user,group)
+
+def installlinks(chost=''):
+ for file in ['gcc', 'cc', 'c++', 'g++']:
+ path = '/usr/lib/distcc/bin/'
+ if not chost == '':
+ file = chost+'-'+file
+ if os.path.exists('/usr/bin/'+file):
+ #print 'Creating',path+file,'symlink...'
+ if not os.path.exists(path+file):
+ os.symlink('/usr/bin/distcc',path+file)
+ #else:
+ # print 'Already exists. Skipping...'
+
+def createdistccdir(dir):
+ if not os.path.exists(dir):
+ os.mkdir(dir)
+ os.chmod(dir, 1777)
+
+for x in tmpcmdline:
+ if not x:
+ continue
+ if x[0:2]=="--":
+ if not x in options:
+ print "!!! Error:",x,"is an invalid option."
+ sys.exit(1)
+ else:
+ cmdline = x
+
+if '--get-hosts' in tmpcmdline:
+ HOSTS_ENV = os.environ.get('DISTCC_HOSTS')
+ HOSTS_HOME = os.environ.get('HOME')+'/hosts'
+ if HOSTS_ENV:
+ print HOSTS_ENV
+ elif os.path.isfile(HOSTS_HOME) and os.path.getsize(HOSTS_HOME) != 0:
+ print HOSTS_HOME
+ elif os.path.exists('/etc/distcc/hosts'):
+ print rstrip(open('/etc/distcc/hosts', 'r').read())
+ else:
+ print 'No configuration file found. Setup your hosts with --set-hosts.'
+elif '--set-hosts' in tmpcmdline:
+ if isroot(1):
+ PATH = '/etc/distcc'
+ else:
+ PATH = os.environ.get('HOME')
+ createdistccdir(PATH)
+ open(PATH+'/hosts', 'w').write(cmdline + '\n')
+elif '--get-verbose' in tmpcmdline:
+ readenv('DISTCC_VERBOSE')
+elif '--set-verbose' in tmpcmdline:
+ writeenv('DISTCC_VERBOSE',tmpcmdline[1])
+elif '--get-log' in tmpcmdline:
+ readenv('DISTCC_LOG')
+elif '--set-log' in tmpcmdline:
+ writeenv('DISTCC_LOG',tmpcmdline[1])
+elif '--install' in tmpcmdline:
+ isroot()
+ print 'Creating',envfile+'...'
+ distcc_env = open(envfile, 'w')
+ distcc_env.write('# This file is managed by distcc-config; use it to change these settings.\n')
+ distcc_env.write('DISTCC_LOG=""\n')
+ distcc_env.write('DCCC_PATH="/usr/lib/distcc/bin"\n')
+ distcc_env.write('DISTCC_VERBOSE="0"\n')
+
+ if os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/useradd -u 240 -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) == 9:
+ os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/usermod -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0])
+
+ foobar = pwd.getpwnam('distcc')
+ user = foobar[2]
+ group = foobar[3]
+
+ makeconf = open('/etc/make.conf', 'r').read()
+ chost = re.compile('CHOST="(.*)"').search(makeconf).group(1)
+ print 'Creating symlinks...'
+ installlinks()
+ installlinks(chost)
+
+ print 'Checking permissions...'
+ permissions('/usr/lib/distcc/bin/',user,group)
+ permissions('/var/run/distccd/',user,group)
+elif '--get-env' in tmpcmdline:
+ if len(tmpcmdline) == 1:
+ print rstrip(open(envfile, 'r').read())
+ elif len(tmpcmdline) == 2:
+ readenv(tmpcmdline[1])
+ else:
+ print '!!! Error: Specify only one variable.'
+elif '--set-env' in tmpcmdline:
+ if len(tmpcmdline) > 2 and len(tmpcmdline) <= 3:
+ isroot()
+ writeenv(tmpcmdline[1],tmpcmdline[2])
+ else:
+ print '!!! Error: Awaiting two parameters.'
+else:
+ print 'Usage: /usr/bin/distcc-config --set-hosts DISTCC_HOSTS | --get-hosts'
+ print ' /usr/bin/distcc-config --set-verbose { 0 | 1 } | --get-verbose'
+ print ' /usr/bin/distcc-config --set-log FILE | --get-log'
+ print ' /usr/bin/distcc-config --set-env VARIABLE VALUE | --get-env [VARIABLE]'
diff --git a/sys-devel/distcc/files/distcc-gentoo-multilib-r1.patch b/sys-devel/distcc/files/distcc-gentoo-multilib-r1.patch
new file mode 100644
index 0000000..8a7b37e
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-gentoo-multilib-r1.patch
@@ -0,0 +1,146 @@
+diff -Naurp distcc-2.18.3.orig/src/distcc.c distcc-2.18.3/src/distcc.c
+--- distcc-2.18.3.orig/src/distcc.c 2004-10-01 17:47:07.000000000 -0700
++++ distcc-2.18.3/src/distcc.c 2005-01-30 22:15:43.883870942 -0800
+@@ -135,7 +135,106 @@ static void dcc_client_catch_signals(voi
+ signal(SIGHUP, &dcc_client_signalled);
+ }
+
++#define MAXNEWFLAGS 32
++#define MAXFLAGLEN 127
+
++static char **getNewArgv(char **argv, const char *newflagsStr) {
++ char **newargv;
++ char newflags[MAXNEWFLAGS][MAXFLAGLEN + 1];
++ unsigned newflagsCount = 0;
++ unsigned argc;
++ unsigned i;
++ char **p;
++
++ unsigned s, f; /* start/finish of each flag. f points to
++ * the char AFTER the end (ie the space/\0
++ */
++
++ /* Tokenize the flag list */
++ for(s=0; s < strlen(newflagsStr); s=f+1) {
++ /* Put s at the start of the next flag */
++ while(newflagsStr[s] == ' ' ||
++ newflagsStr[s] == '\t')
++ s++;
++ if(s == strlen(newflagsStr))
++ break;
++
++ f = s + 1;
++ while(newflagsStr[f] != ' ' &&
++ newflagsStr[f] != '\t' &&
++ newflagsStr[f] != '\0')
++ f++;
++
++ /* Detect overrun */
++ if(MAXFLAGLEN < f - s || MAXNEWFLAGS == newflagsCount)
++ return NULL;
++
++ strncpy(newflags[newflagsCount], newflagsStr + s, f - s);
++ newflags[newflagsCount][f - s]='\0';
++ newflagsCount++;
++ }
++
++ /* Calculate original argc and see if it contains -m{abi,32,64} */
++ for(argc=0, p=argv; *p; p++, argc++) {
++ if(newflagsCount && (strncmp(*p, "-m32", 4) == 0 ||
++ strncmp(*p, "-m64", 4) == 0 ||
++ strncmp(*p, "-mabi", 5) == 0)) {
++ /* Our command line sets the ABI, warn the user about this and ignore
++ newArgs by setting newflagsCount to 0.
++ */
++ newflagsCount = 0;
++ fprintf(stderr, "%s: %s detected on the command line overrides implicit %s added by the wrapper.\n", argv[0], *p, newflagsStr);
++ }
++ }
++
++ /* Allocate our array */
++ newargv = (char **)malloc(sizeof(char *) * (argc + newflagsCount + 1));
++
++ /* Make room for the original, new ones, and the NULL terminator */
++ if(!newargv)
++ return NULL;
++
++ /* Build argv */
++ newargv[0] = argv[0];
++
++ /* The newFlags come first since we want the environment to override them. */
++ for(i=1; i - 1 < newflagsCount; i++) {
++ newargv[i] = newflags[i - 1];
++ }
++
++ /* We just use the existing argv[i] as the start. */
++ for(; i - newflagsCount < argc; i++) {
++ newargv[i] = argv[i - newflagsCount];
++ }
++
++ /* And now cap it off... */
++ newargv[i] = NULL;
++
++ return newargv;
++}
++
++static char **getNewArgvFromEnv(char **argv) {
++ char **newargv = argv;
++
++ if(getenv("ABI")) {
++ char *envar = (char *)malloc(sizeof(char) * (strlen("CFLAGS_") + strlen(getenv("ABI")) + 1 ));
++
++ if(!envar)
++ return NULL;
++
++ /* We use CFLAGS_${ABI} for gcc, g++, g77, etc as they are
++ * the same no matter which compiler we are using.
++ */
++ sprintf(envar, "CFLAGS_%s", getenv("ABI"));
++
++ if(getenv(envar))
++ newargv = getNewArgv(argv, getenv(envar));
++
++ free(envar);
++ }
++
++ return newargv;
++}
+
+ /**
+ * distcc client entry point.
+@@ -150,6 +249,7 @@ int main(int argc, char **argv)
+ int status, sg_level, tweaked_path = 0;
+ char **compiler_args;
+ char *compiler_name;
++ char **newargv;
+ int ret;
+
+ dcc_client_catch_signals();
+@@ -183,7 +283,12 @@ int main(int argc, char **argv)
+ goto out;
+ }
+
+- dcc_find_compiler(argv, &compiler_args);
++ if(!(newargv = getNewArgvFromEnv(argv))) {
++ ret = EXIT_OUT_OF_MEMORY;
++ goto out;
++ }
++ dcc_find_compiler(newargv, &compiler_args);
++ if (newargv != argv) free(newargv);
+ /* compiler_args is now respectively either "cc -c hello.c" or
+ * "gcc -c hello.c" */
+
+@@ -200,7 +305,12 @@ int main(int argc, char **argv)
+ &tweaked_path)) != 0)
+ goto out;
+
+- dcc_copy_argv(argv, &compiler_args, 0);
++ if(!(newargv = getNewArgvFromEnv(argv))) {
++ ret = EXIT_OUT_OF_MEMORY;
++ goto out;
++ }
++ dcc_copy_argv(newargv, &compiler_args, 0);
++ if (newargv != argv) free(newargv);
+ compiler_args[0] = compiler_name;
+ }
+
diff --git a/sys-devel/distcc/files/distcc-gentoo-multilib.patch b/sys-devel/distcc/files/distcc-gentoo-multilib.patch
new file mode 100644
index 0000000..02e0486
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-gentoo-multilib.patch
@@ -0,0 +1,126 @@
+diff -Naur distcc-2.18.3-vanilla/src/distcc.c distcc-2.18.3/src/distcc.c
+--- distcc-2.18.3-vanilla/src/distcc.c 2004-10-01 17:47:07.000000000 -0700
++++ distcc-2.18.3/src/distcc.c 2004-12-28 01:04:51.017574246 -0800
+@@ -135,7 +135,86 @@
+ signal(SIGHUP, &dcc_client_signalled);
+ }
+
++#define MAXNEWFLAGS 32
++#define MAXFLAGLEN 127
+
++static char **getNewArgv(char **argv) {
++ char **newargv;
++ char newflags[MAXNEWFLAGS][MAXFLAGLEN + 1];
++ unsigned newflagsCount = 0;
++ unsigned argc;
++ unsigned i;
++ char **p;
++
++ if(getenv("ABI")) {
++ char *envar = (char *)malloc(sizeof(char) *
++ (strlen("CFLAGS_") + strlen(getenv("ABI")) + 1 ));
++ if(!envar)
++ return NULL;
++
++ /* We use CFLAGS_${ABI} for gcc, g++, g77, etc as they are
++ * the same no matter which compiler we are using.
++ */
++ sprintf(envar, "CFLAGS_%s", getenv("ABI"));
++
++ if(getenv(envar)) {
++ const char *newflagsStr = getenv(envar);
++ unsigned s, f; /* start/finish of each flag. f points to
++ * the char AFTER the end (ie the space/\0
++ */
++
++ /* Tokenize the flag list */
++ for(s=0; s < strlen(newflagsStr); s=f+1) {
++ /* Put s at the start of the next flag */
++ while(newflagsStr[s] == ' ' ||
++ newflagsStr[s] == '\t')
++ s++;
++ if(s == strlen(newflagsStr))
++ break;
++
++ f = s + 1;
++ while(newflagsStr[f] != ' ' &&
++ newflagsStr[f] != '\t' &&
++ newflagsStr[f] != '\0')
++ f++;
++
++ /* Detect overrun */
++ if(MAXFLAGLEN < f - s || MAXNEWFLAGS == newflagsCount)
++ return NULL;
++
++ strncpy(newflags[newflagsCount], newflagsStr + s, f - s);
++ newflagsCount++;
++ }
++ }
++
++ free(envar);
++ }
++
++ /* Calculate argc */
++ for(argc=0, p=argv; *p; p++, argc++);
++
++ /* Allocate our array */
++ newargv = (char **)malloc(sizeof(char *) * (argc + newflagsCount + 1));
++
++ /* Make room for the original, new ones, and the NULL terminator */
++ if(!newargv)
++ return NULL;
++
++ /* We just use the existing argv[i] as the start. */
++ for(i=0; i < argc; i++) {
++ newargv[i] = argv[i];
++ }
++
++ /* Now we want to append our newflags list. */
++ for(; i < argc + newflagsCount; i++) {
++ newargv[i] = newflags[i - argc];
++ }
++
++ /* And now cap it off... */
++ newargv[i] = NULL;
++
++ return newargv;
++}
+
+ /**
+ * distcc client entry point.
+@@ -150,6 +229,7 @@
+ int status, sg_level, tweaked_path = 0;
+ char **compiler_args;
+ char *compiler_name;
++ char **newargv;
+ int ret;
+
+ dcc_client_catch_signals();
+@@ -183,7 +263,12 @@
+ goto out;
+ }
+
+- dcc_find_compiler(argv, &compiler_args);
++ if(!(newargv = getNewArgv(argv))) {
++ ret = EXIT_OUT_OF_MEMORY;
++ goto out;
++ }
++ dcc_find_compiler(newargv, &compiler_args);
++ free(newargv);
+ /* compiler_args is now respectively either "cc -c hello.c" or
+ * "gcc -c hello.c" */
+
+@@ -200,7 +285,12 @@
+ &tweaked_path)) != 0)
+ goto out;
+
+- dcc_copy_argv(argv, &compiler_args, 0);
++ if(!(newargv = getNewArgv(argv))) {
++ ret = EXIT_OUT_OF_MEMORY;
++ goto out;
++ }
++ dcc_copy_argv(newargv, &compiler_args, 0);
++ free(newargv);
+ compiler_args[0] = compiler_name;
+ }
+
diff --git a/sys-devel/distcc/metadata.xml b/sys-devel/distcc/metadata.xml
new file mode 100644
index 0000000..76cbe4b
--- /dev/null
+++ b/sys-devel/distcc/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>hp-cluster</herd>
+ <longdescription lang="en">
+ Distcc is a program to distribute compilation of C code across several
+ machines on a network.
+ </longdescription>
+</pkgmetadata>