diff options
author | Larry Rosenman <ler@FreeBSD.org> | 2018-01-14 23:38:11 +0000 |
---|---|---|
committer | Larry Rosenman <ler@FreeBSD.org> | 2018-01-14 23:38:11 +0000 |
commit | 3be55871f7b1ed611cc8dad737b33ec23bc9fa92 (patch) | |
tree | 06f1fb2778a44fcfb03e7c10c44f340559bb76ba /astro/boinc-setiathome | |
parent | 20d10694c14f0735b9d591fabed7a2bd475bcf3c (diff) | |
download | ports-3be55871f7b1ed611cc8dad737b33ec23bc9fa92.tar.gz ports-3be55871f7b1ed611cc8dad737b33ec23bc9fa92.zip |
Notes
Diffstat (limited to 'astro/boinc-setiathome')
-rw-r--r-- | astro/boinc-setiathome/Makefile | 107 | ||||
-rw-r--r-- | astro/boinc-setiathome/distinfo | 3 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-client_vector_hires__timer.cpp | 11 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-client_vector_sighandler.h | 10 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-sah__config.h | 11 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/pkg-deinstall.in | 26 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/pkg-install.in | 39 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/pkg-message.in | 16 | ||||
-rw-r--r-- | astro/boinc-setiathome/pkg-descr | 9 | ||||
-rw-r--r-- | astro/boinc-setiathome/pkg-plist | 9 |
10 files changed, 241 insertions, 0 deletions
diff --git a/astro/boinc-setiathome/Makefile b/astro/boinc-setiathome/Makefile new file mode 100644 index 000000000000..df06c05fb3b2 --- /dev/null +++ b/astro/boinc-setiathome/Makefile @@ -0,0 +1,107 @@ +# Created by: rene +# $FreeBSD$ + +PORTNAME= boinc-setiathome-v8 +PORTVERSION= 8.00 +PORTREVISION= 1 +CATEGORIES= astro +MASTER_SITES= LOCAL/ler/setiathome +DISTNAME= setiathome-svn-3727 # no releases available, snapshot + +MAINTAINER= ler@FreeBSD.org +COMMENT= Setiathome Enhanced for BOINC + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= ${LOCALBASE}/include/fftw3.h:math/fftw3 +RUN_DEPENDS= boinc_client:net/boinc-client +LIB_DEPENDS= libfftw3f.so:math/fftw3-float + +GNU_CONFIGURE= yes +USES= autoreconf compiler gmake libtool pkgconfig tar:xz + +CFLAGS+= -O2 -I${LOCALBASE}/include/boinc -I${LOCALBASE}/include \ + -L${LOCALBASE}/lib +LDFLAGS+= -lexecinfo +.if defined(CPUTYPE) +CFLAGS+= -march=${CPUTYPE} +.endif + +# these must match settings in ${PORTSDIR}/net/boinc-client/Makefile +BOINC_CLIENT_USER?= boinc +BOINC_CLIENT_GROUP?= boinc +BOINC_CLIENT_HOME?= /var/db/boinc + +OPTIONS_DEFINE= X11 + +X11_DESC= Build screensaver (requires net/boinc-client with X11) + +OPTIONS_SUB= yes + +X11_BUILD_DEPENDS= ${LOCALBASE}/lib/libboinc_graphics2.a:net/boinc-client +X11_USES= jpeg +X11_USE= GL=gl,glu,glut \ + XORG=ice,sm,x11,xau,xcb,xext,xi,xdamage,xdmcp,xfixes,xmu,xt,xxf86vm +X11_CONFIGURE_ENABLE= graphics + +X11_BUILD_DEPENDS_OFF= ${LOCALBASE}/include/boinc/std_fixes.h:net/boinc-client + +CFLAGS_i386= -mtune=native +CFLAGS_amd64= -mtune=native + +.if !empty(MACHINE_CPU:Maltivec) +CONFIGURE_ARGS+= --enable-altivec +.endif + +.include <bsd.port.pre.mk> + +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} == 60 +CFLAGS+= -Wno-reserved-user-defined-literal -Wno-unused-command-line-argument +.endif + +CONFIGURE_ENV+= BOINCDIR="${NONEXISTENT}" + +CONFIGURE_ARGS+= --disable-static-client --disable-server \ + --disable-tests \ + --with-boinc-platform=${ARCH}-portbld-freebsd + +SETI_SITE= setiathome.berkeley.edu +SETI_BINARY= setiathome-${PORTVERSION:S/.0/./}.${ARCH}-portbld-freebsd + +SUB_FILES= pkg-deinstall pkg-install pkg-message +SUB_LIST= SETI_BINARY=${SETI_BINARY} \ + SETI_SITE=${SETI_SITE} \ + SETI_VERSION=${PORTVERSION:S/.//} \ + BOINC_CLIENT_HOME=${BOINC_CLIENT_HOME} \ + BOINC_CLIENT_USER=${BOINC_CLIENT_USER} \ + BOINC_CLIENT_GROUP=${BOINC_CLIENT_GROUP} +PLIST_SUB+= PREFIX=${PREFIX} \ + SETI_BINARY=${SETI_BINARY} \ + SETI_SITE=${SETI_SITE} \ + BOINC_CLIENT_HOME=${BOINC_CLIENT_HOME} \ + BOINC_CLIENT_USER=${BOINC_CLIENT_USER} \ + BOINC_CLIENT_GROUP=${BOINC_CLIENT_GROUP} + +BROKEN_powerpc64= does not compile: analyzeFuncs_altivec.cpp: CoreServices/CoreServices.h: No such file or directory + +# str_replace.h is included in newer versions of net/boinc-client, +# but it is not needed on FreeBSD +post-patch: + ${REINPLACE_CMD} -E -e "s|#include \"str_replace.h\"||" \ + ${WRKSRC}/client/main.cpp \ + ${WRKSRC}/client/sah_gfx.cpp \ + ${WRKSRC}/client/seti.cpp \ + ${WRKSRC}/client/timecvt.cpp \ + ${WRKSRC}/db/xml_util.cpp + +do-install: + ${INSTALL} -d ${STAGEDIR}${BOINC_CLIENT_HOME}/projects + ${INSTALL} -d ${STAGEDIR}${BOINC_CLIENT_HOME}/projects/${SETI_SITE} + ${INSTALL_PROGRAM} ${WRKSRC}/client/${SETI_BINARY} \ + ${STAGEDIR}${BOINC_CLIENT_HOME}/projects/${SETI_SITE}/ +do-install-X11-on: + ${INSTALL_PROGRAM} ${WRKSRC}/client/seti_graphics \ + ${STAGEDIR}${BOINC_CLIENT_HOME}/projects/${SETI_SITE}/ + +.include <bsd.port.post.mk> diff --git a/astro/boinc-setiathome/distinfo b/astro/boinc-setiathome/distinfo new file mode 100644 index 000000000000..6cb15d1c991c --- /dev/null +++ b/astro/boinc-setiathome/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1515972172 +SHA256 (setiathome-svn-3727.tar.xz) = 81a49b8ca14286aa3822dcf47bf3fb82f679c0363e06c5e42b77f84056b671b0 +SIZE (setiathome-svn-3727.tar.xz) = 7234424 diff --git a/astro/boinc-setiathome/files/patch-client_vector_hires__timer.cpp b/astro/boinc-setiathome/files/patch-client_vector_hires__timer.cpp new file mode 100644 index 000000000000..649f0d9b2841 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-client_vector_hires__timer.cpp @@ -0,0 +1,11 @@ +--- client/vector/hires_timer.cpp.orig 2018-01-14 23:02:12 UTC ++++ client/vector/hires_timer.cpp +@@ -267,7 +267,7 @@ hires_timer::hires_timer() : rollover(0),last_ticks(0) + #endif + if (period==0) { + install_sighandler(); +- if (setjmp(jb)) { ++ if (sigsetjmp(jb,0)) { + fprintf(stderr,"using fallback timer\n"); + use_fallback=1; + } else { diff --git a/astro/boinc-setiathome/files/patch-client_vector_sighandler.h b/astro/boinc-setiathome/files/patch-client_vector_sighandler.h new file mode 100644 index 000000000000..eab1affbb579 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-client_vector_sighandler.h @@ -0,0 +1,10 @@ +--- client/vector/sighandler.h.orig 2018-01-14 23:02:12 UTC ++++ client/vector/sighandler.h +@@ -44,6 +44,7 @@ + #define SIGHANDLER_H + + ++#include <stddef.h> + #include <signal.h> + #include <setjmp.h> + diff --git a/astro/boinc-setiathome/files/patch-sah__config.h b/astro/boinc-setiathome/files/patch-sah__config.h new file mode 100644 index 000000000000..1cdb029c4141 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-sah__config.h @@ -0,0 +1,11 @@ +--- sah_config.h.orig 2018-01-14 23:23:42 UTC ++++ sah_config.h +@@ -774,7 +774,7 @@ + #endif + + #if !defined(CUSTOM_STRING) && defined(COMPILER_STRING) +-#define CUSTOM_STRING PACKAGE_STRING" "SVN_REV" "COMPILER_STRING ++#define CUSTOM_STRING PACKAGE_STRING" " SVN_REV" " COMPILER_STRING + #endif + + #include "std_fixes.h" diff --git a/astro/boinc-setiathome/files/pkg-deinstall.in b/astro/boinc-setiathome/files/pkg-deinstall.in new file mode 100644 index 000000000000..c2b6d27a0ca7 --- /dev/null +++ b/astro/boinc-setiathome/files/pkg-deinstall.in @@ -0,0 +1,26 @@ +#!/bin/sh + +# $FreeBSD$ + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +F=%%BOINC_CLIENT_HOME%%/projects/%%SETI_SITE%%/app_info.xml +echo Removing setiathome_v7 lines from $F + +l=`grep -n "<name>setiathome_v8</name>" $F | cut -f 1 -d :` +if [ $? -ne 0 ]; then + echo $F is corrupt + exit 1 +fi +l1=$(($l-1)) +l2=$(($l+13)) +sed -i.bak "${l1},${l2}d" $F # sed wants the braces +rm $F.bak + +l=`wc -l $F | cut -f 1 -d / | sed 's/ //g'` +if [ $l -eq 2 ]; then + echo Removing empty $F + rm $F +fi diff --git a/astro/boinc-setiathome/files/pkg-install.in b/astro/boinc-setiathome/files/pkg-install.in new file mode 100644 index 000000000000..b2b6d8566951 --- /dev/null +++ b/astro/boinc-setiathome/files/pkg-install.in @@ -0,0 +1,39 @@ +#!/bin/sh + +# $FreeBSD$ + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +F=%%BOINC_CLIENT_HOME%%/projects/%%SETI_SITE%%/app_info.xml + +if [ ! -f $F ]; then + echo Creating new $F + echo "<app_info>" > $F + echo "</app_info>" >> $F + chown %%BOINC_CLIENT_USER%%:%%BOINC_CLIENT_GROUP%% $F +fi + +echo Adding setiathome_v8 lines to $F +ed - $F <<EOF +1a +<app> +<name>setiathome_v8</name> +</app> +<file_info> +<name>%%SETI_BINARY%%</name> +<executable/> +</file_info> +<app_version> +<app_name>setiathome_v8</app_name> +<version_num>%%SETI_VERSION%%</version_num> +<file_ref> +<file_name>%%SETI_BINARY%%</file_name> +<main_program/> +</file_ref> +</app_version> +. +w +q +EOF diff --git a/astro/boinc-setiathome/files/pkg-message.in b/astro/boinc-setiathome/files/pkg-message.in new file mode 100644 index 000000000000..ef9093d931f6 --- /dev/null +++ b/astro/boinc-setiathome/files/pkg-message.in @@ -0,0 +1,16 @@ +***************************************************************************** +ATTACHING PROJECT + +Just run boinc_gui (if installed), choose Attach, and follow instructions. +Project URL is %%SETI_SITE%% + +MANUAL INSTALLATION + *) If this is your first time in any BOINC project, create a new account at + http://%%SETI_SITE%%/create_account_form.php + + *) Or get your account key at http://%%SETI_SITE%%/get_passwd.php + + *) Attach to the project: + cd %%BOINC_CLIENT_HOME%% + boinccmd --project_attach %%SETI_SITE%% <account key> +***************************************************************************** diff --git a/astro/boinc-setiathome/pkg-descr b/astro/boinc-setiathome/pkg-descr new file mode 100644 index 000000000000..f80ebcb83b31 --- /dev/null +++ b/astro/boinc-setiathome/pkg-descr @@ -0,0 +1,9 @@ +SETI - Search for Extra-Terrestrial Intelligence -- Version 7 + +Use your unused CPU cycles to aid in computations analyzing radio +telescope information for possible signs of extra-terrestrial intelligence. + +The port automatically optimizes for the host CPU using the CPUTYPE +variable in /etc/make.conf + +WWW: http://setiathome.berkeley.edu/ diff --git a/astro/boinc-setiathome/pkg-plist b/astro/boinc-setiathome/pkg-plist new file mode 100644 index 000000000000..7d92c1fa29a9 --- /dev/null +++ b/astro/boinc-setiathome/pkg-plist @@ -0,0 +1,9 @@ +@owner %%BOINC_CLIENT_USER%% +@group %%BOINC_CLIENT_GROUP%% +@dir %%BOINC_CLIENT_HOME%% +@dir %%BOINC_CLIENT_HOME%%/projects/ +@dir %%BOINC_CLIENT_HOME%%/projects/%%SETI_SITE%% +%%BOINC_CLIENT_HOME%%/projects/%%SETI_SITE%%/%%SETI_BINARY%% +%%X11%%%%BOINC_CLIENT_HOME%%/projects/%%SETI_SITE%%/seti_graphics +@owner root +@group wheel |