1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

SETI - Search for Extra-Terrestrial Intelligence -- AstroPulse

The project listens for broad-band, short-time pulses that might represent
extraterrestial intelligence, or other phenomena such as rapidly rotating
pulsars or exploding primordial black holes.

The port automatically optimizes for the host CPU using the CPUTYPE
variable in /etc/make.conf

Currently it requires X to build, but at runtime X is only required for the
screen saver.  This requirement is an artifact of the current upstream design
of the port.

WWW: http://setiathome.berkeley.edu/

Feature safe:	yes
This commit is contained in:
Rene Ladan 2011-01-23 21:13:13 +00:00
parent ffcad02471
commit 3505219045
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268142
12 changed files with 520 additions and 0 deletions

View File

@ -6,6 +6,7 @@
SUBDIR += aa
SUBDIR += accrete
SUBDIR += astrometry
SUBDIR += boinc-astropulse
SUBDIR += boinc-einsteinathome
SUBDIR += boinc-milkyway
SUBDIR += boinc-setiathome-enhanced

View File

@ -0,0 +1,113 @@
# New ports collection makefile for: boinc-astropulse
# Date created: 8 July 2009
# Whom: Rene Ladan <rene@FreeBSD.org>
# $FreeBSD$
#
PORTNAME= boinc-astropulse
PORTVERSION= 5.06
CATEGORIES= astro
MASTER_SITES= ftp://rene-ladan.nl/pub/distfiles/
DISTNAME= astropulse-svn-562
MAINTAINER= rene@FreeBSD.org
COMMENT= Astropulse for BOINC
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
EXTRACT_DEPENDS=${NONEXISTENT}:${PORTSDIR}/astro/boinc-setiathome-enhanced:patch
BUILD_DEPENDS= ${LOCALBASE}/include/fftw3.h:${PORTSDIR}/math/fftw3 \
${LOCALBASE}/include/boinc/std_fixes.h:${PORTSDIR}/net/boinc-client \
${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
RUN_DEPENDS= boinc_client:${PORTSDIR}/net/boinc-client
LIB_DEPENDS= fftw3f:${PORTSDIR}/math/fftw3-float
USE_AUTOTOOLS= autoconf:env automake:env
USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_GNOME= pkgconfig
WRKSRC= ${WRKDIR}/${DISTNAME}/client
CFLAGS+= -O2 -I${LOCALBASE}/include/boinc -I${LOCALBASE}/include \
-L${LOCALBASE}/lib
.if defined(CPUTYPE)
CFLAGS+= -march=${CPUTYPE}
.endif
# these must match settings in ${PORTSDIR}/net/boinc-client/Makefile
BOINC_USER?= boinc
BOINC_GROUP?= nobody
BOINC_HOME?= /var/db/boinc
#.include <bsd.port.options.mk>
#OPTIONS= X11 "Build screensaver" on
.include <bsd.port.pre.mk>
# TODO fix upstream
.if defined(WITHOUT_X11)
BROKEN=Currently Astropulse requires X11 to build
.endif
.if !defined(WITHOUT_X11)
.if !exists(${LOCALBASE}/lib/libboinc_graphics2.a)
BROKEN=Reinstall net/boinc-client with X11 enabled for screensavers
.endif
LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg \
xcb.2:${PORTSDIR}/x11/libxcb
USE_GL= gl glu glut
USE_XORG= ice sm x11 xau xext xi xdamage xdmcp xfixes xmu xt xxf86vm
PLIST_SUB+= X11=""
.else
CONFIGURE_ARGS+= --disable-graphics
PLIST_SUB+= X11="@comment "
.endif
.if ${ARCH} == amd64 || ${ARCH} == i386
# comment out if world is built with clang and port with gcc
CFLAGS+= -mtune=native
.endif
CONFIGURE_ENV+= BOINCDIR="${NONEXISTENT}" \
BOINC_DIR="${NONEXISTENT}" \
SETI_BOINC_DIR="${PORTSDIR}/astro/boinc-setiathome-enhanced/work/setiathome-svn-412"
CONFIGURE_ARGS+= --disable-static-client \
--with-boinc-platform=${ARCH}-portbld-freebsd
SETI_SITE= setiathome.berkeley.edu
AP_BINARY= astropulse-${PORTVERSION:S/.0/./}.${ARCH}-portbld-freebsd
SUB_FILES= pkg-deinstall pkg-install pkg-message
SUB_LIST= AP_BINARY=${AP_BINARY} \
AP_VERSION=${PORTVERSION:S/.//} \
SETI_SITE=${SETI_SITE} \
BOINC_HOME=${BOINC_HOME} \
BOINC_USER=${BOINC_USER} \
BOINC_GROUP=${BOINC_GROUP}
PLIST_SUB+= AP_BINARY=${AP_BINARY} \
SETI_SITE=${SETI_SITE} \
BOINC_HOME=${BOINC_HOME}
pre-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}/${AP_BINARY} ${BOINC_HOME}/projects/${SETI_SITE}/
.if !defined(WITHOUT_X11)
${INSTALL_PROGRAM} -o ${BOINC_USER} -g ${BOINC_GROUP} \
${WRKSRC}/ap_graphics ${BOINC_HOME}/projects/${SETI_SITE}/
.endif
post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -0,0 +1,2 @@
SHA256 (astropulse-svn-562.tar.bz2) = 30abe5e64428b07106763903bcfc8149cdf5fde6dc84b3ddce7247d491441e5f
SIZE (astropulse-svn-562.tar.bz2) = 1377080

View File

@ -0,0 +1,11 @@
--- Makefile.am (revision 633)
+++ Makefile.am (working copy)
@@ -31,7 +31,7 @@
GUI_C_FLAGS = $(CLIENT_C_FLAGS) $(GRAPHICS_CFLAGS)
GUI_LD_FLAGS = $(CLIENT_LD_FLAGS)
GUI_LD_ADD = -L$(BOINCDIR)/api -L$(BOINCDIR)/lib $(BOINC_LIBS) $(GRAPHICS_LIBS_RAW) $(APP_LIBS)
- CLIENT_LD_FLAGS += $(LDSTATIC) -nodefaultlibs
+ CLIENT_LD_FLAGS += $(LDSTATIC)
CLIENT_LD_ADD += -L$(BOINCDIR)/api -L$(BOINCDIR)/lib $(BOINC_LIBS) $(AM_LIBS) $(APP_LIBS)
AP_GRX_SOURCES = ap_gfx_main.cpp
else

View File

@ -0,0 +1,41 @@
--- configure.ac.orig 2009-06-11 19:35:16.000000000 +0200
+++ configure.ac 2010-11-28 11:40:22.000000000 +0100
@@ -7,17 +7,9 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(astropulse, 5.06)
-svnrev="`svn info | grep Revision:`"
-
-if test -n "${svnrev}" ; then
- AC_REVISION("${svnrev}")
- AC_DEFINE_UNQUOTED(SVN_REV,"${svnrev}",
- [Define to be the subversion revision number])
-else
- AC_REVISION([$Revision: 163 $])
- AC_DEFINE(SVN_REV,"$Revision: 163 $",
+ AC_REVISION([$Revision: 562 $])
+ AC_DEFINE(SVN_REV,"$Revision: 562 $",
[Define to be the subversion revision number])
-fi
echo "--- Configuring Astropulse $AC_PACKAGE_VERSION ---"
@@ -262,9 +254,7 @@
dnl AC_CHECK_LIB([stdc++], [main])
SAH_GRX_LIBS
AC_LANG(C++)
-SAH_CHECK_BOINC
SAH_CHECK_SAH
-SAH_FIND_SETILIB
AC_CACHE_SAVE
if test "${ac_cv_cxx_compiler_gnu}" = "yes" ; then
@@ -378,7 +368,7 @@
AM_CONDITIONAL(ENABLE_GUI, [test "${enable_graphics}" = yes])
AM_CONDITIONAL(LINUX, [test -n "`echo ${target} | grep linux`"])
AM_CONDITIONAL(I386, [test -n "`echo ${target} | grep i.86`"])
-AM_CONDITIONAL(X86_64, [test -n "`echo ${target} | grep 'x86_64'`"])
+AM_CONDITIONAL(X86_64, [test -n "`echo ${target} | ${EGREP} 'x86_64|amd64'`"])
AM_CONDITIONAL(PPC, [test -n "`echo ${target} | grep 'powerpc'`" -o -n "`echo ${target} | grep 'ppc'`" ])

View File

@ -0,0 +1,22 @@
--- m4/sah_check_boinc.m4 (revision 633)
+++ m4/sah_check_boinc.m4 (working copy)
@@ -23,16 +23,16 @@
do
if test -d $boinc_dir
then
- if test -f $boinc_dir/Makefile.am
+ if test -f $boinc_dir/include/std_fixes.h -o -f $boinc_dir/lib/std_fixes.h
then
cd $boinc_dir
BOINCDIR=`pwd`
cd $thisdir
break
else
- if $FIND $boinc_dir -name "Makefile.am" >& /dev/null
+ if $FIND $boinc_dir -name "std_fixes.h" >& /dev/null
then
- BOINCDIR=`$FIND $boinc_dir -name "Makefile.am" -print | $HEAD -1 | sed 's/\/Makefile.am//'`
+ BOINCDIR=`$FIND $boinc_dir -name "std_fixes.h" -print | $HEAD -1 | sed 's/\/std_fixes.h//'`
cd $BOINCDIR
BOINCDIR=`pwd`
cd $thisdir

View File

@ -0,0 +1,231 @@
--- ../server/db/ap_schema.cpp.orig 2009-06-16 19:06:20.000000000 +0200
+++ ../server/db/ap_schema.cpp 2009-09-25 22:26:58.000000000 +0200
@@ -174,7 +174,7 @@
}
void coordinate_t::parse(const std::string &s) {
- SQL_ROW row(&s,3);
+ SQL_ROW row(s.c_str(),3);
parse(row);
}
@@ -313,7 +313,7 @@
}
void threshold_t::parse(const std::string &s) {
- SQL_ROW row(&s,2);
+ SQL_ROW row(s.c_str(),2);
parse(row);
}
@@ -460,10 +460,10 @@
void data_description_t::parse(const SQL_ROW &s) {
{
- start.parse(SQL_ROW(s[0],0));
+ start.parse(SQL_ROW(s[0]->c_str(),0));
}
{
- end.parse(SQL_ROW(s[1],0));
+ end.parse(SQL_ROW(s[1]->c_str(),0));
}
{
std::istringstream row(*(s[2]));
@@ -476,7 +476,7 @@
}
void data_description_t::parse(const std::string &s) {
- SQL_ROW row(&s,4);
+ SQL_ROW row(s.c_str(),4);
parse(row);
}
@@ -714,7 +714,7 @@
}
void tape::parse(const std::string &s) {
- SQL_ROW row(&s,8);
+ SQL_ROW row(s.c_str(),8);
parse(row);
}
@@ -1034,15 +1034,15 @@
std::string::size_type p,q;
int i;
thresholds.clear();
- SQL_ROW tmp(s[11]);
+ SQL_ROW tmp((*s[11]).c_str());
for (i=0;i<tmp.argc();i++) {
- thresholds.push_back(threshold_t(SQL_ROW(tmp[i])));
+ thresholds.push_back(threshold_t(SQL_ROW((*tmp[i]).c_str())));
}
}
}
void analysis_config::parse(const std::string &s) {
- SQL_ROW row(&s,12);
+ SQL_ROW row(s.c_str(),12);
parse(row);
}
@@ -1248,7 +1248,7 @@
}
void recorder_config::parse(const std::string &s) {
- SQL_ROW row(&s,6);
+ SQL_ROW row(s.c_str(),6);
parse(row);
}
@@ -1643,7 +1643,7 @@
std::string::size_type p,q;
int i;
az_corr_coeff.clear();
- SQL_ROW tmp(s[10]);
+ SQL_ROW tmp((*s[10]).c_str());
for (i=0;i<tmp.argc();i++) {
std::istringstream in(*(tmp[i]));
float tmp0;
@@ -1655,7 +1655,7 @@
std::string::size_type p,q;
int i;
zen_corr_coeff.clear();
- SQL_ROW tmp(s[11]);
+ SQL_ROW tmp((*s[11]).c_str());
for (i=0;i<tmp.argc();i++) {
std::istringstream in(*(tmp[i]));
float tmp0;
@@ -1678,7 +1678,7 @@
}
void receiver_config::parse(const std::string &s) {
- SQL_ROW row(&s,15);
+ SQL_ROW row(s.c_str(),15);
parse(row);
}
@@ -1828,7 +1828,7 @@
}
void splitter_config::parse(const std::string &s) {
- SQL_ROW row(&s,3);
+ SQL_ROW row(s.c_str(),3);
parse(row);
}
@@ -2044,21 +2044,21 @@
row >> active;
}
{
- receiver_cfg.parse(SQL_ROW(s[2],0));
+ receiver_cfg.parse(SQL_ROW(s[2]->c_str(),0));
}
{
- recorder_cfg.parse(SQL_ROW(s[3],0));
+ recorder_cfg.parse(SQL_ROW(s[3]->c_str(),0));
}
{
- splitter_cfg.parse(SQL_ROW(s[4],0));
+ splitter_cfg.parse(SQL_ROW(s[4]->c_str(),0));
}
{
- analysis_cfg.parse(SQL_ROW(s[5],0));
+ analysis_cfg.parse(SQL_ROW(s[5]->c_str(),0));
}
}
void settings::parse(const std::string &s) {
- SQL_ROW row(&s,6);
+ SQL_ROW row(s.c_str(),6);
parse(row);
}
@@ -2312,27 +2312,27 @@
name[127]=0;
}
{
- tape_info.parse(SQL_ROW(s[2],0));
+ tape_info.parse(SQL_ROW(s[2]->c_str(),0));
}
{
- receiver_cfg.parse(SQL_ROW(s[3],0));
+ receiver_cfg.parse(SQL_ROW(s[3]->c_str(),0));
}
{
- recorder_cfg.parse(SQL_ROW(s[4],0));
+ recorder_cfg.parse(SQL_ROW(s[4]->c_str(),0));
}
{
- splitter_cfg.parse(SQL_ROW(s[5],0));
+ splitter_cfg.parse(SQL_ROW(s[5]->c_str(),0));
}
{
- analysis_cfg.parse(SQL_ROW(s[6],0));
+ analysis_cfg.parse(SQL_ROW(s[6]->c_str(),0));
}
{
- data_desc.parse(SQL_ROW(s[7],0));
+ data_desc.parse(SQL_ROW(s[7]->c_str(),0));
}
}
void workunit_header::parse(const std::string &s) {
- SQL_ROW row(&s,8);
+ SQL_ROW row(s.c_str(),8);
parse(row);
}
@@ -2569,7 +2569,7 @@
row >> boinc_result;
}
{
- wuid.parse(SQL_ROW(s[2],0));
+ wuid.parse(SQL_ROW(s[2]->c_str(),0));
}
{
std::istringstream row(*(s[3]));
@@ -2602,7 +2602,7 @@
}
void result::parse(const std::string &s) {
- SQL_ROW row(&s,10);
+ SQL_ROW row(s.c_str(),10);
parse(row);
}
@@ -2959,7 +2959,7 @@
row >> id;
}
{
- resultid.parse(SQL_ROW(s[1],0));
+ resultid.parse(SQL_ROW(s[1]->c_str(),0));
}
{
std::istringstream row(*(s[2]));
@@ -3034,7 +3034,7 @@
}
void ap_signal::parse(const std::string &s) {
- SQL_ROW row(&s,20);
+ SQL_ROW row(s.c_str(),20);
parse(row);
}
@@ -3315,7 +3315,7 @@
row >> id;
}
{
- ap_signalid.parse(SQL_ROW(s[1],0));
+ ap_signalid.parse(SQL_ROW(s[1]->c_str(),0));
}
{
std::istringstream row(*(s[2]));
@@ -3368,7 +3368,7 @@
}
void rfi::parse(const std::string &s) {
- SQL_ROW row(&s,14);
+ SQL_ROW row(s.c_str(),14);
parse(row);
}

View File

@ -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 astropulse_v505 lines from $F
l=`grep -n "<name>astropulse_v505</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

View File

@ -0,0 +1,39 @@
#!/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
chown %%BOINC_USER%%:%%BOINC_GROUP%% $F
fi
echo Adding astropulse_v505 lines to $F
ed - $F <<EOF
1a
<app>
<name>astropulse_v505</name>
</app>
<file_info>
<name>%%AP_BINARY%%</name>
<executable/>
</file_info>
<app_version>
<app_name>astropulse_v505</app_name>
<version_num>%%AP_VERSION%%</version_num>
<file_ref>
<file_name>%%AP_BINARY%%</file_name>
<main_program/>
</file_ref>
</app_version>
.
w
q
EOF

View File

@ -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_HOME%%
boinc_cmd --project_attach %%SETI_SITE%% <account key>
*****************************************************************************

View File

@ -0,0 +1,14 @@
SETI - Search for Extra-Terrestrial Intelligence -- AstroPulse
The project listens for broad-band, short-time pulses that might represent
extraterrestial intelligence, or other phenomena such as rapidly rotating
pulsars or exploding primordial black holes.
The port automatically optimizes for the host CPU using the CPUTYPE
variable in /etc/make.conf
Currently it requires X to build, but at runtime X is only required for the
screen saver. This requirement is an artifact of the current upstream design
of the port.
WWW: http://setiathome.berkeley.edu/

View File

@ -0,0 +1,4 @@
@cwd %%BOINC_HOME%%/projects
%%SETI_SITE%%/%%AP_BINARY%%
%%X11%%%%SETI_SITE%%/ap_graphics
@dirrmtry %%SETI_SITE%%