aboutsummaryrefslogtreecommitdiffstats
path: root/net/boinc-client
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-12-15 13:14:36 +0800
committeredwin <edwin@FreeBSD.org>2004-12-15 13:14:36 +0800
commit0ecbd83e821098dfde60c568e5f3558877b05552 (patch)
tree9de15a447a0bdd53bd748eb065b07ff2a8bf049b /net/boinc-client
parent88b3820eb42c5d0fcf47e2940d7a78f41e2fc198 (diff)
downloadfreebsd-ports-gnome-0ecbd83e821098dfde60c568e5f3558877b05552.tar.gz
freebsd-ports-gnome-0ecbd83e821098dfde60c568e5f3558877b05552.tar.zst
freebsd-ports-gnome-0ecbd83e821098dfde60c568e5f3558877b05552.zip
update port: net/boinc-client - fixes for FreeBSD 4.X and for 64-bit archs
Update of boinc-client port to address issues with reentrancy problems on FreeBSD 4.x (malloc() called recursively) and also to address differences in rc.d files on 4.X. Update also fixes compilation problems on 64-bit architectures. PR: ports/75062 Submitted by: J.R. Oldroyd <fbsd@opal.com>
Diffstat (limited to 'net/boinc-client')
-rw-r--r--net/boinc-client/Makefile26
-rw-r--r--net/boinc-client/files/boinc.sh-4.x61
-rw-r--r--net/boinc-client/files/extra-patch-api::boinc_api.C11
-rw-r--r--net/boinc-client/files/patch-client::gui_rpc_server.C17
-rw-r--r--net/boinc-client/files/patch-client::net_xfer.C17
5 files changed, 125 insertions, 7 deletions
diff --git a/net/boinc-client/Makefile b/net/boinc-client/Makefile
index 6641b0377db2..3d29eba67f37 100644
--- a/net/boinc-client/Makefile
+++ b/net/boinc-client/Makefile
@@ -7,6 +7,7 @@
PORTNAME= boinc-client
PORTVERSION= 4.13
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://boinc.berkeley.edu/source/nightly/
DISTNAME= boinc_public-cvs-2004-10-14
@@ -17,7 +18,7 @@ COMMENT= Berkeley Open Infrastructure for Network Computing client
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-server
-CONFIGURE_ENV= CPPFLAGS=-I/usr/X11R6/include CXXFLAGS=-I/usr/X11R6/include
+CONFIGURE_ENV= CPPFLAGS=-I${X11BASE}/include CXXFLAGS=-I${X11BASE}/include
WRKSRC= ${WRKDIR}/boinc_public
PKGINSTALL= ${WRKDIR}/pkg-install
@@ -25,7 +26,7 @@ PKGPLIST= ${WRKDIR}/pkg-plist
MAN1= boinc-client.1
-FIND_BOINC_BINARY=(cd ${WRKDIR}/boinc_public/client; make -V CLIENT_BIN_FILENAME))
+FIND_BOINC_BINARY=(cd ${WRKDIR}/boinc_public/client; make -V CLIENT_BIN_FILENAME)
BOINC_USER= boinc
BOINC_GROUP= nobody
@@ -34,8 +35,8 @@ BOINC_DATADIR= ${PREFIX}/boinc
.include <bsd.port.pre.mk>
-.if ${ARCH} != "i386"
-BROKEN= Does not compile on 64-bit architectures
+.if ${OSVERSION} < 500000
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-api::boinc_api.C
.endif
post-patch:
@@ -61,17 +62,28 @@ post-build:
-e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
< ${FILESDIR}/boinc-client.1 > ${WRKDIR}/boinc-client.1; \
${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \
+ -e "s:%%BOINC_DATADIR%%:${PREFIX}/boinc:g" \
+ -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
+ -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
+ -e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
+ < ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install
+.if ${OSVERSION} >= 500000
+ BBIN=`${FIND_BOINC_BINARY}`; \
+ ${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \
-e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \
-e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
-e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
-e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
< ${FILESDIR}/boinc.sh > ${WRKDIR}/boinc.sh
+.else
+ BBIN=`${FIND_BOINC_BINARY}`; \
${SED} -e "s:%%BOINC_BINARY%%:$$BBIN:g" \
- -e "s:%%BOINC_DATADIR%%:${PREFIX}/boinc:g" \
+ -e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \
-e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \
-e "s:%%BOINC_USER%%:${BOINC_USER}:g" \
-e "s:%%BOINC_GROUP%%:${BOINC_GROUP}:g" \
- < ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install
+ < ${FILESDIR}/boinc.sh-4.x > ${WRKDIR}/boinc.sh
+.endif
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/boinc-client ${PREFIX}/bin
@@ -90,7 +102,7 @@ do-install:
${MKDIR} ${PREFIX}/boinc/projects
${MKDIR} ${PREFIX}/etc/rc.d
${INSTALL_SCRIPT} ${WRKDIR}/boinc.sh ${PREFIX}/etc/rc.d
- ${CAT} pkg-message
+ ${CAT} ${PKGMESSAGE}
post-install:
${REINPLACE_CMD} \
diff --git a/net/boinc-client/files/boinc.sh-4.x b/net/boinc-client/files/boinc.sh-4.x
new file mode 100644
index 000000000000..82ada6fea9a3
--- /dev/null
+++ b/net/boinc-client/files/boinc.sh-4.x
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/net/boinc-client/files/Attic/boinc.sh-4.x,v 1.1 2004-12-15 05:14:36 edwin Exp $
+#
+# Start or stop BOINC
+#
+
+. /usr/local/etc/rc.subr
+
+name="boinc"
+rcvar=`set_rcvar`
+
+boinc_user=%%BOINC_USER%%
+boinc_home=%%BOINC_HOME%%
+program_file=%%BOINC_BINARY%%
+program_path=%%BOINC_DATADIR%%/client/${program_file}
+
+[ -z "$boinc_enable" ] && boinc_enable="NO"
+
+load_rc_config $name
+
+case "$1" in
+start)
+ if checkyesno boinc_enable
+ then
+ if [ ! -x ${program_path} ]
+ then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${program_path} is missing."
+ exit 72
+ fi
+ if ps axo ucomm | egrep ${program_file}; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${program_file} is already running."
+ exit 72
+ fi
+ echo -n "BOINC "
+ idprio 31 su - ${boinc_user} -c "${program_path} >/dev/null &"
+ fi
+ ;;
+
+stop)
+ program=`expr ${program_file} : '^\(................\).*$'`
+ killall ${program} 2> /dev/null
+ ;;
+
+restart)
+ $0 stop
+ $0 start
+ ;;
+
+status)
+ ps auxww | egrep ${program_file} | egrep -v "($0|egrep)"
+ ;;
+
+*)
+ echo "usage: ${name} {start|stop|restart|status}" >&2
+ exit 64
+ ;;
+esac
+
diff --git a/net/boinc-client/files/extra-patch-api::boinc_api.C b/net/boinc-client/files/extra-patch-api::boinc_api.C
new file mode 100644
index 000000000000..49f74d3977df
--- /dev/null
+++ b/net/boinc-client/files/extra-patch-api::boinc_api.C
@@ -0,0 +1,11 @@
+--- api/boinc_api.C.orig Sun Sep 5 19:28:46 2004
++++ api/boinc_api.C Thu Dec 9 10:22:30 2004
+@@ -116,7 +116,7 @@
+ options.handle_trickle_ups = true;
+ options.handle_trickle_downs = true;
+ options.handle_process_control = true;
+- options.send_status_msgs = true;
++ options.send_status_msgs = false;
+ options.direct_process_action = true;
+ return boinc_init_options(options);
+ }
diff --git a/net/boinc-client/files/patch-client::gui_rpc_server.C b/net/boinc-client/files/patch-client::gui_rpc_server.C
new file mode 100644
index 000000000000..ead91b71a12d
--- /dev/null
+++ b/net/boinc-client/files/patch-client::gui_rpc_server.C
@@ -0,0 +1,17 @@
+--- client/gui_rpc_server.C.orig Mon Sep 27 15:07:29 2004
++++ client/gui_rpc_server.C Thu Dec 2 20:59:58 2004
+@@ -47,12 +47,10 @@
+
+ #if defined(_WIN32)
+ typedef int socklen_t;
+-#elif defined ( __APPLE__)
++#elif defined(__APPLE__)
+ typedef int32_t socklen_t;
+-#elif !GETSOCKOPT_SOCKLEN_T
+-#ifndef socklen_t
++#elif !defined(GETSOCKOPT_SOCKLEN_T) && !defined(_SOCKLEN_T_DECLARED) && !defined(socklen_t)
+ typedef size_t socklen_t;
+-#endif
+ #endif
+
+ static void boinc_close_socket(int sock) {
diff --git a/net/boinc-client/files/patch-client::net_xfer.C b/net/boinc-client/files/patch-client::net_xfer.C
new file mode 100644
index 000000000000..8d34dc5b2561
--- /dev/null
+++ b/net/boinc-client/files/patch-client::net_xfer.C
@@ -0,0 +1,17 @@
+--- client/net_xfer.C.orig Mon Sep 27 15:07:30 2004
++++ client/net_xfer.C Thu Dec 2 21:00:11 2004
+@@ -78,12 +78,10 @@
+
+ #if defined(_WIN32)
+ typedef int socklen_t;
+-#elif defined ( __APPLE__)
++#elif defined(__APPLE__)
+ typedef int32_t socklen_t;
+-#elif !GETSOCKOPT_SOCKLEN_T
+-#ifndef socklen_t
++#elif !defined(GETSOCKOPT_SOCKLEN_T) && !defined(_SOCKLEN_T_DECLARED) && !defined(socklen_t)
+ typedef size_t socklen_t;
+-#endif
+ #endif
+
+ using std::vector;