diff options
-rw-r--r-- | devel/distcc/Makefile | 21 | ||||
-rw-r--r-- | devel/distcc/files/distccd.sh.in (renamed from devel/distcc/files/distccd.sh.sample) | 14 | ||||
-rw-r--r-- | devel/distcc/files/patch-src-dparent.c.diff | 20 | ||||
-rw-r--r-- | devel/distcc/pkg-plist | 1 |
4 files changed, 42 insertions, 14 deletions
diff --git a/devel/distcc/Makefile b/devel/distcc/Makefile index 26061e386bf..379c7f606f9 100644 --- a/devel/distcc/Makefile +++ b/devel/distcc/Makefile @@ -7,7 +7,7 @@ PORTNAME= distcc PORTVERSION= 2.18.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel ipv6 MASTER_SITES= http://distcc.samba.org/ftp/distcc/ @@ -16,17 +16,19 @@ COMMENT= Distribute compilation of C(++) code acrosss machines on a network LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt -USE_RC_SUBR= yes USE_BZIP2= yes USE_GMAKE= yes GNU_CONFIGURE= yes +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} WANT_GNOME= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" DISTCCD_PIDFILE=/var/run/distccd.pid +USE_RC_SUBR= distccd.sh +SUB_LIST= DISTCCD_PIDFILE=${DISTCCD_PIDFILE} -OPTIONS= GNOME "Build GUI monitor based on GNOME" Off \ - GTK "Build GUI monitor based on GTK" Off \ - IPV6 "Enable IPV6 (not available on 4.X)" Off +OPTIONS= GNOME "Build GUI monitor based on GNOME" Off \ + GTK "Build GUI monitor based on GTK" Off \ + IPV6 "Enable IPV6 (not available on 4.X)" Off .include <bsd.port.pre.mk> @@ -54,9 +56,6 @@ DOC_FILES= AUTHORS INSTALL NEWS README \ doc/protocol-2.txt doc/reporting-bugs.txt pre-install: - @${SED} -e 's|%%PREFIX%%|${PREFIX}|; s|%%RC_SUBR%%|${RC_SUBR}|; \ - s|%%DISTCCD_PIDFILE%%|${DISTCCD_PIDFILE}|' \ - ${FILESDIR}/distccd.sh.sample >${WRKDIR}/distccd.sh @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" \ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL @@ -67,8 +66,6 @@ do-install: @${INSTALL_PROGRAM} ${WRKSRC}/distccmon-gnome ${PREFIX}/bin .endif @${INSTALL_PROGRAM} ${WRKSRC}/distccd ${PREFIX}/sbin - @${INSTALL_SCRIPT} -m 751 ${WRKDIR}/distccd.sh \ - ${PREFIX}/etc/rc.d/distccd.sh post-install: install-doc install-man @${TOUCH} ${DISTCCD_PIDFILE} @@ -84,8 +81,8 @@ install-doc: .endif install-man: -.for file in ${MAN1} - @${INSTALL_MAN} ${WRKSRC}/man/${file} ${MANPREFIX}/man/man1 +.for f in ${MAN1} + @${INSTALL_MAN} ${WRKSRC}/man/${f} ${MANPREFIX}/man/man1 .endfor .include <bsd.port.post.mk> diff --git a/devel/distcc/files/distccd.sh.sample b/devel/distcc/files/distccd.sh.in index d8237f5e712..7fb081cbb30 100644 --- a/devel/distcc/files/distccd.sh.sample +++ b/devel/distcc/files/distccd.sh.in @@ -22,7 +22,19 @@ name=distccd rcvar=`set_rcvar` command=%%PREFIX%%/sbin/${name} -pidfile=%%DISTCCD_PIDFILE%% +# extract pid file from distccd_flags (if any) +pidfile="`echo ${distccd_flags} |sed -nE -e 's/^.*-P ([^ ]+).*$/\1/p'`" +# set default value +pidfile=${pidfile:-%%DISTCCD_PIDFILE%%} + +distccd_precmd() +{ + # distccd drops root privileges and then attempts to create the pid file + touch ${pidfile} + chown distcc:distcc ${pidfile} +} + +start_precmd="distccd_precmd" load_rc_config ${name} run_rc_command "$1" diff --git a/devel/distcc/files/patch-src-dparent.c.diff b/devel/distcc/files/patch-src-dparent.c.diff new file mode 100644 index 00000000000..c7eee8e775c --- /dev/null +++ b/devel/distcc/files/patch-src-dparent.c.diff @@ -0,0 +1,20 @@ +--- src/dparent.c.orig Sun Oct 24 08:05:48 2004 ++++ src/dparent.c Fri Nov 4 17:35:09 2005 +@@ -285,6 +285,9 @@ + **/ + void dcc_remove_pid(void) + { ++ /* distcc user, we are running as, cannot delete files in /var/run ++ */ ++#if 0 + if (!arg_pid_file) + return; + +@@ -292,6 +295,7 @@ + rs_log_warning("failed to remove pid file %s: %s", + arg_pid_file, strerror(errno)); + } ++#endif + } + + diff --git a/devel/distcc/pkg-plist b/devel/distcc/pkg-plist index c8561953dff..00c296116cc 100644 --- a/devel/distcc/pkg-plist +++ b/devel/distcc/pkg-plist @@ -3,7 +3,6 @@ bin/distcc bin/distccmon-text %%WITH_GNOME%%bin/distccmon-gnome sbin/distccd -etc/rc.d/distccd.sh %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/INSTALL %%PORTDOCS%%%%DOCSDIR%%/NEWS |