diff options
-rw-r--r-- | devel/distcc/Makefile | 113 | ||||
-rw-r--r-- | devel/distcc/distinfo | 6 | ||||
-rw-r--r-- | devel/distcc/files/distccd.sh.in | 40 | ||||
-rw-r--r-- | devel/distcc/files/patch-src-dparent.c.diff | 20 | ||||
-rw-r--r-- | devel/distcc/pkg-descr | 23 | ||||
-rw-r--r-- | devel/distcc/pkg-install | 36 | ||||
-rw-r--r-- | devel/distcc/pkg-message | 27 | ||||
-rw-r--r-- | devel/distcc/pkg-plist | 14 |
8 files changed, 279 insertions, 0 deletions
diff --git a/devel/distcc/Makefile b/devel/distcc/Makefile new file mode 100644 index 000000000..8423d6607 --- /dev/null +++ b/devel/distcc/Makefile @@ -0,0 +1,113 @@ +# New ports collection makefile for: distcc +# Date created: 25 June 2002 +# Whom: Frerich Raabe <frerich.raabe@gmx.de> +# +# $FreeBSD$ +# $MCom$ + +PORTNAME= distcc +PORTVERSION= 2.18.3 +PORTREVISION= 6 +CATEGORIES= devel ipv6 +MASTER_SITES= http://distcc.samba.org/ftp/distcc/ +PATCH_SITES= http://0pointer.de/public/ + +MAINTAINER= ahze@FreeBSD.org +COMMENT= Distribute compilation of C(++) code acrosss machines on a network + +LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt + +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= AVAHI "Enable Avahi Zeroconf/mDNS/Bonjour support" Off \ + 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 \ + COMPILER_LINKS "Create symlinks to distcc" On + +.include <bsd.port.pre.mk> + +.if defined(WITH_AVAHI) +PATCHFILES+= distcc-avahi.patch +LIB_DEPENDS+= avahi-glib.1:${PORTSDIR}/net/avahi +PATCH_DIST_STRIP= -p1 +USE_AUTOTOOLS+= autoconf:259 +CFLAGS+= -DHAVE_AVAHI +.endif + +.if defined(WITH_COMPILER_LINKS) +CCLINKDIR?= libexec/distcc +PLIST_DIRS= ${CCLINKDIR} +GNU_COMPILERS= 295 32 33 34 40 41 42 43 +DISTCC_COMPILERS= cc c++ gcc g++ ${GNU_COMPILERS:S|^|gcc|} ${GNU_COMPILERS:S|^|g++|} +.if ${ARCH} == "i386" +DISTCC_COMPILERS+= icc icpc +.endif +.if defined(EXTRA_COMPILERS) +DISTCC_COMPILERS+= ${EXTRA_COMPILERS} +.endif +PLIST_FILES+= ${DISTCC_COMPILERS:S|^|${CCLINKDIR}/|} +.endif + +.if defined(WITH_GNOME) +USE_GNOME= libgnomeui +CONFIGURE_ARGS+= --with-gnome +PKGNAMESUFFIX= -gnome +PLIST_SUB+= WITH_GNOME="" +.elif defined(WITH_GTK) +USE_GNOME= gtk20 +CONFIGURE_ARGS+= --with-gtk +PKGNAMESUFFIX= -gtk +PLIST_SUB+= WITH_GNOME="" +.else +PLIST_SUB+= WITH_GNOME="@comment " +.endif + +.if ( ${OSVERSION} >= 500000 ) && defined(WITH_IPV6) +CONFIGURE_ARGS+= --enable-rfc2553 +.endif + +MAN1= distcc.1 distccd.1 +DOC_FILES= AUTHORS INSTALL NEWS README \ + doc/protocol-1.txt doc/status-1.txt \ + doc/protocol-2.txt doc/reporting-bugs.txt + +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/distcc ${PREFIX}/bin + @${INSTALL_PROGRAM} ${WRKSRC}/distccmon-text ${PREFIX}/bin +.if defined(WITH_GNOME) || defined(WITH_GTK) + @${INSTALL_PROGRAM} ${WRKSRC}/distccmon-gnome ${PREFIX}/bin +.endif + @${INSTALL_PROGRAM} ${WRKSRC}/distccd ${PREFIX}/sbin + +post-install: + @${TOUCH} ${DISTCCD_PIDFILE} +.if defined(WITH_COMPILER_LINKS) + @${MKDIR} ${PREFIX}/${CCLINKDIR} +.for link in ${DISTCC_COMPILERS} + ${LN} -sf ${PREFIX}/bin/distcc ${PREFIX}/${CCLINKDIR}/${link} +.endfor +.endif +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for FILE in ${DOC_FILES} + @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} +.endfor +.endif +.for f in ${MAN1} + @${INSTALL_MAN} ${WRKSRC}/man/${f} ${MANPREFIX}/man/man1 +.endfor + @${CAT} ${PKGMESSAGE} +.if !defined(PACKAGE_BUILDING) + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.endif + +.include <bsd.port.post.mk> diff --git a/devel/distcc/distinfo b/devel/distcc/distinfo new file mode 100644 index 000000000..1d8af34f3 --- /dev/null +++ b/devel/distcc/distinfo @@ -0,0 +1,6 @@ +MD5 (distcc-2.18.3.tar.bz2) = 0d6b80a1efc3a3d816c4f4175f63eaa2 +SHA256 (distcc-2.18.3.tar.bz2) = 6500f1bc2a30b1f044ebed79c6ce15457d1712263e65f0db7d6046af262ba434 +SIZE (distcc-2.18.3.tar.bz2) = 341601 +MD5 (distcc-avahi.patch) = 621dc7dc1e3b9b6770110117df45611a +SHA256 (distcc-avahi.patch) = e6651e3de7fee6d953b6ee56732eafa7d4666cb4070db5a925ba071626067c9a +SIZE (distcc-avahi.patch) = 54086 diff --git a/devel/distcc/files/distccd.sh.in b/devel/distcc/files/distccd.sh.in new file mode 100644 index 000000000..3e56ec4da --- /dev/null +++ b/devel/distcc/files/distccd.sh.in @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# $MCom$ + +# PROVIDE: distccd +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable distccd: +# +# distccd_enable="YES" +# + +distccd_enable=${distccd_enable-"NO"} +distccd_flags=${distccd_flags-"-a 127.0.0.0/8 --user distcc --daemon -P %%DISTCCD_PIDFILE%%"} + +. %%RC_SUBR%% + +name=distccd +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/${name} +# 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 000000000..c7eee8e77 --- /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-descr b/devel/distcc/pkg-descr new file mode 100644 index 000000000..f38b8f570 --- /dev/null +++ b/devel/distcc/pkg-descr @@ -0,0 +1,23 @@ +distcc is a program to distribute compilation of C code across +several machines on a network. distcc should always generate the +same results as a local compile, is simple to install and use, and +is often significantly faster than a local compile. + +Unlike other distributed build systems, distcc does not require all +machines to share a filesystem, have synchronized clocks, or to +have the same libraries or header files installed. Machines can be +running different operating systems, as long as they have compatible +binary formats or cross-compilers. + +distcc sends the complete preprocessed source code across the network +for each job, so all it requires of the volunteer machines is that +they be running the distccd daemon, and that they have an appropriate +compiler installed. + +This version also comes with a text-based as well as a GNOME-based monitor +to inspect the load on the cluster, and how it is distributed among the +various distcc nodes. + +WWW: http://distcc.samba.org/ + +- Frerich Raabe frerich.raabe@gmx.de diff --git a/devel/distcc/pkg-install b/devel/distcc/pkg-install new file mode 100644 index 000000000..ac8a2625a --- /dev/null +++ b/devel/distcc/pkg-install @@ -0,0 +1,36 @@ +#!/bin/sh + +case $2 in +POST-INSTALL) + USER=distcc + GROUP=${USER} + UID=561 + GID=${UID} + PW=/usr/sbin/pw + CHOWN=/usr/sbin/chown + if ${PW} group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if ${PW} groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if ${PW} user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d "/nonexistent" -s /sbin/nologin -c "Distcc user" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + exit 0 + ;; +esac diff --git a/devel/distcc/pkg-message b/devel/distcc/pkg-message new file mode 100644 index 000000000..08bc97ee5 --- /dev/null +++ b/devel/distcc/pkg-message @@ -0,0 +1,27 @@ +WARNING: distcc[d] performs NO AUTHENTICATION at all and should +ONLY be used in trusted networks! + +NEW in 2.18 +Distccd now requires the --allow (-a) argument when running +in daemon mode. This option restricts distcc to a specific +network, by default this port uses 127.0.0.0/8, you should +change this by specifying your own distccd_flags in +/etc/rc.conf, see the script in etc/rc.d/distccd.sh for a +template. + +Additionally it is recommended that you add entries to +/etc/syslog.conf to record all distccd log messages to a file +such as /var/log/distccd.log. + +Example syslog.conf entry: + +!distccd +*.* /var/log/distccd.log + +The daemon runs on port 3632 by default. You can change that +value by calling distccd with the -p parameter, e.g. +`distccd -p 4711'. Do not edit the rc.d script to achieve this +instead override the value of distccd_flags in /etc/rc.conf. + +Note that remote daemons currently won't work if they cannot +resolve the reverse DNS of the master machine diff --git a/devel/distcc/pkg-plist b/devel/distcc/pkg-plist new file mode 100644 index 000000000..f625c9bd6 --- /dev/null +++ b/devel/distcc/pkg-plist @@ -0,0 +1,14 @@ +@comment $FreeBSD: ports/devel/distcc/pkg-plist,v 1.15 2005/11/06 00:07:20 mnag Exp $ +bin/distcc +bin/distccmon-text +%%WITH_GNOME%%bin/distccmon-gnome +sbin/distccd +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/protocol-1.txt +%%PORTDOCS%%%%DOCSDIR%%/protocol-2.txt +%%PORTDOCS%%%%DOCSDIR%%/status-1.txt +%%PORTDOCS%%%%DOCSDIR%%/reporting-bugs.txt +%%PORTDOCS%%@dirrm %%DOCSDIR%% |