From: Anthony Parsons Date: Sun, 8 Dec 2019 11:34:03 +0000 Subject: [PATCH] distcc: make pump optional Signed-off-by: Anthony Parsons --- distcc-3.3.3.ebuild => distcc-3.3.3-r1.ebuild | 32 ++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/sys-devel/distcc/distcc-3.3.3.ebuild b/sys-devel/distcc/distcc-3.3.3-r1.ebuild index a9e338051..ade9fdf06 100644 --- a/sys-devel/distcc/distcc-3.3.3.ebuild +++ b/sys-devel/distcc/distcc-3.3.3-r1.ebuild @@ -15,11 +15,11 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86" -IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf" +IUSE="gnome gssapi gtk hardened ipv6 pump selinux xinetd zeroconf" RESTRICT="test" -CDEPEND="${PYTHON_DEPS} +CDEPEND=" dev-libs/popt gnome? ( >=gnome-base/libgnome-2 @@ -29,6 +29,7 @@ CDEPEND="${PYTHON_DEPS} ) gssapi? ( net-libs/libgssglue ) gtk? ( x11-libs/gtk+:2 ) + pump? ( ${PYTHON_DEPS} ) zeroconf? ( >=net-dns/avahi-0.6[dbus] ) " DEPEND="${CDEPEND} @@ -42,7 +43,7 @@ RDEPEND="${CDEPEND} selinux? ( sec-policy/selinux-distcc ) xinetd? ( sys-apps/xinetd )" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" +REQUIRED_USE="pump? ( ${PYTHON_REQUIRED_USE} )" pkg_setup() { enewuser distcc 240 -1 -1 daemon @@ -60,10 +61,16 @@ src_prepare() { # Bugs #120001, #167844 and probably more. See patch for description. use hardened && eapply "${FILESDIR}/distcc-hardened.patch" - sed -i \ - -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ - -e "s:@PYTHON@:${EPYTHON}:" \ - pump.in || die "sed failed" + if use pump; then + sed -i \ + -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ + -e "s:@PYTHON@:${EPYTHON}:" \ + pump.in || die "sed failed" + else + sed -i \ + -e '/^install:/,/^$/ s/install-include-server\s//' \ + Makefile.in || die "sed failed" + fi sed \ -e "s:@EPREFIX@:${EPREFIX:-/}:" \ @@ -80,6 +87,7 @@ src_configure() { --disable-Werror --libdir=/usr/lib $(use_enable ipv6 rfc2553) + $(use_enable pump pump-mode) $(use_with gtk) $(use_with gnome) $(use_with gssapi auth) @@ -165,9 +173,13 @@ pkg_postinst() { elog elog "Tips on using distcc with Gentoo can be found at" elog "https://wiki.gentoo.org/wiki/Distcc" - elog - elog "distcc-pump is known to cause breakage with multiple packages." - elog "Do NOT enable it globally." + + if use pump; then + elog + elog "distcc-pump is known to cause breakage with multiple packages." + elog "Do NOT enable it globally." + fi + elog elog "To use the distccmon programs with Gentoo you should use this command:" elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" -- 2.24.1