diff options
author | Rene Ladan <rene@FreeBSD.org> | 2011-01-23 21:10:09 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2011-01-23 21:10:09 +0000 |
commit | 7709750459ad8bb5d45d27c7e22b249b8406670b (patch) | |
tree | 04e5dafce28eccfd9726bf699cc6efea2a3f5420 | |
parent | - Mark BROKEN: unfetchable (diff) |
- switch to dynamically generated app_info.xml, so that this port can
peacefully coexist with the upcoming astro/boinc-astropulse
- pass ${NONEXISTENT} to BOINCDIR in the CONFIGURE_ENV, this speeds up
the configuration phase [1]
- pass --disable-altivec to configure instead of patching client/Makefile.am
and m4/optimizations.m4
- drop support for 6.X and MD5 checksum
- cleanup Makefile and files/pkg-message.in
- bump PORTREVISION
Submitted by: Edward Sanford Sutton III [mirror176 cox.net] [1]
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=268140
-rw-r--r-- | astro/boinc-setiathome-enhanced/Makefile | 37 | ||||
-rw-r--r-- | astro/boinc-setiathome-enhanced/distinfo | 1 | ||||
-rw-r--r-- | astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am | 21 | ||||
-rw-r--r-- | astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 | 26 | ||||
-rw-r--r-- | astro/boinc-setiathome-enhanced/files/pkg-deinstall.in | 26 | ||||
-rw-r--r-- | astro/boinc-setiathome-enhanced/files/pkg-install.in (renamed from astro/boinc-setiathome-enhanced/files/app_info.xml.in) | 25 | ||||
-rw-r--r-- | astro/boinc-setiathome-enhanced/files/pkg-message.in | 2 | ||||
-rw-r--r-- | astro/boinc-setiathome-enhanced/pkg-plist | 1 |
8 files changed, 72 insertions, 67 deletions
diff --git a/astro/boinc-setiathome-enhanced/Makefile b/astro/boinc-setiathome-enhanced/Makefile index 2bdf42bbbf20..17aae705bf5b 100644 --- a/astro/boinc-setiathome-enhanced/Makefile +++ b/astro/boinc-setiathome-enhanced/Makefile @@ -6,7 +6,7 @@ PORTNAME= boinc-setiathome-enhanced PORTVERSION= 6.08 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= astro MASTER_SITES= ftp://rene-ladan.nl/pub/distfiles/ DISTNAME= setiathome-svn-412 @@ -29,7 +29,8 @@ GNU_CONFIGURE= yes USE_GMAKE= yes USE_GNOME= pkgconfig -CFLAGS+= -O2 -I${LOCALBASE}/include/boinc -I${LOCALBASE}/include -L${LOCALBASE}/lib +CFLAGS+= -O2 -I${LOCALBASE}/include/boinc -I${LOCALBASE}/include \ + -L${LOCALBASE}/lib .if defined(CPUTYPE) CFLAGS+= -march=${CPUTYPE} .endif @@ -57,41 +58,47 @@ CONFIGURE_ARGS+= --disable-graphics PLIST_SUB+= X11="@comment " .endif -.if ${OSVERSION} >= 700042 && (${ARCH} == i386 || ${ARCH} == amd64) -CFLAGS+= -mtune=native # comment out if world is built with clang and port with gcc +.if ${ARCH} == i386 || ${ARCH} == amd64 +# comment out if world is built with clang and port with gcc +CFLAGS+= -mtune=native .endif -CXXFLAGS+= ${CFLAGS} +CONFIGURE_ENV+= BOINCDIR="${NONEXISTENT}" -CONFIGURE_ENV+= BOINCDIR="${LOCALBASE}" - -CONFIGURE_ARGS+= --disable-static-client --with-boinc-platform=${ARCH}-portbld-freebsd --disable-server +CONFIGURE_ARGS+= --disable-static-client --disable-server \ + --disable-altivec \ + --with-boinc-platform=${ARCH}-portbld-freebsd SETI_SITE= setiathome.berkeley.edu SETI_BINARY= setiathome-${PORTVERSION:S/.0/./}.${ARCH}-portbld-freebsd -SUB_FILES= app_info.xml pkg-message +SUB_FILES= pkg-deinstall pkg-install pkg-message SUB_LIST= SETI_BINARY=${SETI_BINARY} \ SETI_SITE=${SETI_SITE} \ - SETI_VERSION=${PORTVERSION:S/.//} + SETI_VERSION=${PORTVERSION:S/.//} \ + BOINC_HOME=${BOINC_HOME} PLIST_SUB+= SETI_BINARY=${SETI_BINARY} \ SETI_SITE=${SETI_SITE} \ BOINC_HOME=${BOINC_HOME} \ PREFIX=${PREFIX} pre-configure: - (cd ${WRKSRC}; ./_autosetup ; ${REINPLACE_CMD} -E -e "s|/bin/sh|${LOCALBASE}/bin/bash|" ./configure) + (cd ${WRKSRC} ; ./_autosetup ; ${REINPLACE_CMD} -E -e \ + "s|/bin/sh|${LOCALBASE}/bin/bash|" ./configure) do-install: ${INSTALL} -d -o ${BOINC_USER} -g ${BOINC_GROUP} ${BOINC_HOME}/projects - ${INSTALL} -d -o ${BOINC_USER} -g ${BOINC_GROUP} ${BOINC_HOME}/projects/${SETI_SITE} - ${INSTALL_PROGRAM} -o ${BOINC_USER} -g ${BOINC_GROUP} ${WRKSRC}/client/${SETI_BINARY} ${BOINC_HOME}/projects/${SETI_SITE}/ + ${INSTALL} -d -o ${BOINC_USER} -g ${BOINC_GROUP} \ + ${BOINC_HOME}/projects/${SETI_SITE} + ${INSTALL_PROGRAM} -o ${BOINC_USER} -g ${BOINC_GROUP} \ + ${WRKSRC}/client/${SETI_BINARY} ${BOINC_HOME}/projects/${SETI_SITE}/ .if !defined(WITHOUT_X11) - ${INSTALL_PROGRAM} -o ${BOINC_USER} -g ${BOINC_GROUP} ${WRKSRC}/client/seti_graphics ${BOINC_HOME}/projects/${SETI_SITE}/ + ${INSTALL_PROGRAM} -o ${BOINC_USER} -g ${BOINC_GROUP} \ + ${WRKSRC}/client/seti_graphics ${BOINC_HOME}/projects/${SETI_SITE}/ .endif - ${INSTALL_DATA} -o ${BOINC_USER} -g ${BOINC_GROUP} ${WRKDIR}/app_info.xml ${BOINC_HOME}/projects/${SETI_SITE}/ post-install: + @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/astro/boinc-setiathome-enhanced/distinfo b/astro/boinc-setiathome-enhanced/distinfo index 956a6bc55680..7d9543877514 100644 --- a/astro/boinc-setiathome-enhanced/distinfo +++ b/astro/boinc-setiathome-enhanced/distinfo @@ -1,3 +1,2 @@ -MD5 (setiathome-svn-412.tar.bz2) = 2fc5afd466257c68b048129ea8c24955 SHA256 (setiathome-svn-412.tar.bz2) = f2e1b5d896c6a2e96e9323c85f2ef74b56b23fae1bbd5afc2133f84bd58319cb SIZE (setiathome-svn-412.tar.bz2) = 2411273 diff --git a/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am b/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am index 1766d8707a39..e52e30043e5b 100644 --- a/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am +++ b/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am @@ -14,24 +14,3 @@ seti_boinc_SOURCES = \ main.cpp \ -@@ -158,15 +153,16 @@ - - if PPC - # allow use of altivec instructions on PPC -+# unfortunately our system gcc is too old, so disable altivec - seti_boinc-analyzeFuncs_altivec.o: vector/analyzeFuncs_altivec.cpp - if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -- $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) -DUSE_ALTIVEC \ -- -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -faltivec \ -+ $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) \ -+ -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ - -c -o $@ $<; then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi - seti_boinc-analyzeFuncs_vector.o: vector/analyzeFuncs_vector.cpp - if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -- $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) -DUSE_ALTIVEC \ -+ $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) \ - -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ - -c -o $@ $<; then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi - diff --git a/astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 b/astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 deleted file mode 100644 index ba5e1ad13057..000000000000 --- a/astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 +++ /dev/null @@ -1,26 +0,0 @@ ---- m4/optimizations.m4.orig 2008-09-10 01:46:12.000000000 +0200 -+++ m4/optimizations.m4 2010-10-22 23:30:38.000000000 +0200 -@@ -98,15 +98,15 @@ - - if test x_$enable_altivec = x_yes ; then - AC_DEFINE_UNQUOTED([USE_ALTIVEC],[1], -- [Define to 1 if you want to use ALTIVEC optimizations]) -+ [Define to 1 if you want to use ALTIVEC optimizations, disabled in this port]) - # put compiler specific flags here -- if test x_$ac_cv_c_compiler_gnu = x_yes ; then -- SAH_CHECK_CFLAG([-faltivec],[CFLAGS="-faltivec ${CFLAGS}"]) -- SAH_CHECK_CFLAG([-maltivec],[CFLAGS="-maltivec ${CFLAGS}"]) -- SAH_CHECK_CFLAG([-mtune=G5],[CFLAGS="-mtune=G5 ${CFLAGS}"]) -- SAH_CHECK_CFLAG([-mcpu=powerpc],[CFLAGS="-mcpu=powerpc ${CFLAGS}"]) -- SAH_CHECK_LDFLAG([-framework Accelerate],[LDFLAGS="${LDFLAGS} -framework Accelerate"]) -- fi -+# if test x_$ac_cv_c_compiler_gnu = x_yes ; then -+# SAH_CHECK_CFLAG([-faltivec],[CFLAGS="-faltivec ${CFLAGS}"]) -+# SAH_CHECK_CFLAG([-maltivec],[CFLAGS="-maltivec ${CFLAGS}"]) -+# SAH_CHECK_CFLAG([-mtune=G5],[CFLAGS="-mtune=G5 ${CFLAGS}"]) -+# SAH_CHECK_CFLAG([-mcpu=powerpc],[CFLAGS="-mcpu=powerpc ${CFLAGS}"]) -+# SAH_CHECK_LDFLAG([-framework Accelerate],[LDFLAGS="${LDFLAGS} -framework Accelerate"]) -+# fi - fi - - fi diff --git a/astro/boinc-setiathome-enhanced/files/pkg-deinstall.in b/astro/boinc-setiathome-enhanced/files/pkg-deinstall.in new file mode 100644 index 000000000000..3540fc7711b3 --- /dev/null +++ b/astro/boinc-setiathome-enhanced/files/pkg-deinstall.in @@ -0,0 +1,26 @@ +#!/bin/sh + +# $FreeBSD$ + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +F=%%BOINC_HOME%%/projects/%%SETI_SITE%%/app_info.xml +echo Removing setiathome_enhanced lines from $F + +l=`grep -n "<name>setiathome_enhanced</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-enhanced/files/app_info.xml.in b/astro/boinc-setiathome-enhanced/files/pkg-install.in index dba3218893e9..c96bfdb2aace 100644 --- a/astro/boinc-setiathome-enhanced/files/app_info.xml.in +++ b/astro/boinc-setiathome-enhanced/files/pkg-install.in @@ -1,4 +1,22 @@ -<app_info> +#!/bin/sh + +# $FreeBSD$ + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +F=%%BOINC_HOME%%/projects/%%SETI_SITE%%/app_info.xml + +if [ ! -f $F ]; then + echo Creating new $F + echo "<app_info>" > $F + echo "</app_info>" >> $F +fi + +echo Adding setiathome_enhanced lines to $F +ed - $F <<EOF +1a <app> <name>setiathome_enhanced</name> </app> @@ -14,4 +32,7 @@ <main_program/> </file_ref> </app_version> -</app_info> +. +w +q +EOF diff --git a/astro/boinc-setiathome-enhanced/files/pkg-message.in b/astro/boinc-setiathome-enhanced/files/pkg-message.in index a9dd221e9967..bd1753e985c5 100644 --- a/astro/boinc-setiathome-enhanced/files/pkg-message.in +++ b/astro/boinc-setiathome-enhanced/files/pkg-message.in @@ -11,6 +11,6 @@ MANUAL INSTALLATION *) Or get your account key at http://%%SETI_SITE%%/get_passwd.php *) Attach to the project: - cd /var/db/boinc + cd %%BOINC_HOME%% boinc_cmd --project_attach %%SETI_SITE%% <account key> ***************************************************************************** diff --git a/astro/boinc-setiathome-enhanced/pkg-plist b/astro/boinc-setiathome-enhanced/pkg-plist index 27137093ae5d..28bdcdbc2542 100644 --- a/astro/boinc-setiathome-enhanced/pkg-plist +++ b/astro/boinc-setiathome-enhanced/pkg-plist @@ -1,5 +1,4 @@ @cwd %%BOINC_HOME%%/projects -%%SETI_SITE%%/app_info.xml %%SETI_SITE%%/%%SETI_BINARY%% %%X11%%%%SETI_SITE%%/seti_graphics @dirrmtry %%SETI_SITE%% |