diff options
author | pav <pav@FreeBSD.org> | 2004-10-18 06:47:46 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-10-18 06:47:46 +0800 |
commit | d2837eb052605670fbe8a9e6a8c6a580d9e1edb6 (patch) | |
tree | 269816a36cf3605696b138ca006cb001b524bdcb /astro | |
parent | b36f1f13a10c8b3b1ac42269f8301116fc55256e (diff) | |
download | freebsd-ports-gnome-d2837eb052605670fbe8a9e6a8c6a580d9e1edb6.tar.gz freebsd-ports-gnome-d2837eb052605670fbe8a9e6a8c6a580d9e1edb6.tar.zst freebsd-ports-gnome-d2837eb052605670fbe8a9e6a8c6a580d9e1edb6.zip |
SETI - Search for Extra-Terrestrial Intelligence
Use your unused CPU cycles to aid in computations analyzing radio
telescope information for possible signs of ET.
This version of SETI@home is based on BOINC (Berkeley Open
Infrastructure for Network Computing). Several other projects
besides SETI@home are using BOINC. BOINC lets you participate in
more than one project, and it lets you specify what fraction of
your computer time should go to each project.
This port requires net/boinc-client and together these supersede
the astro/setiathome port which is now known as SETI-Classic.
Be sure to join the "FreeBSD" team on the SETI website once you're
up and running.
WWW: http://setiweb.ssl.berkeley.edu/
PR: ports/72715
Submitted by: J.R. Oldroyd <fbsd@opal.com>
Diffstat (limited to 'astro')
-rw-r--r-- | astro/Makefile | 1 | ||||
-rw-r--r-- | astro/boinc-setiathome/Makefile | 69 | ||||
-rw-r--r-- | astro/boinc-setiathome/distinfo | 2 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/app_info.xml | 16 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-client::Makefile.in | 25 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-db::db_table.h | 119 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-db::schema_to_class.awk | 35 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-db::schema_to_class.in | 11 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-db::sqlblob.h | 28 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-db::xml_util.h | 11 | ||||
-rw-r--r-- | astro/boinc-setiathome/pkg-descr | 18 | ||||
-rw-r--r-- | astro/boinc-setiathome/pkg-install | 7 | ||||
-rw-r--r-- | astro/boinc-setiathome/pkg-plist | 7 |
13 files changed, 349 insertions, 0 deletions
diff --git a/astro/Makefile b/astro/Makefile index fd72c2fa0941..98af22f5f7a9 100644 --- a/astro/Makefile +++ b/astro/Makefile @@ -5,6 +5,7 @@ SUBDIR += SETIsupport SUBDIR += accrete + SUBDIR += boinc-setiathome SUBDIR += celestia SUBDIR += cfitsio SUBDIR += dgpsip diff --git a/astro/boinc-setiathome/Makefile b/astro/boinc-setiathome/Makefile new file mode 100644 index 000000000000..c57047859ba4 --- /dev/null +++ b/astro/boinc-setiathome/Makefile @@ -0,0 +1,69 @@ +# New ports collection makefile for: boinc-setiathome +# Date created: 01 October 2004 +# Whom: J.R. Oldroyd <fbsd@opal.com> +# +# $FreeBSD$ +# + +PORTNAME= boinc-setiathome +PORTVERSION= 4.03 +CATEGORIES= astro +MASTER_SITES= http://boinc.berkeley.edu/seti_source/nightly/ +DISTNAME= seti_boinc-client-cvs-2004-10-01 + +MAINTAINER= fbsd@opal.com +COMMENT= Setiathome for boinc + +BUILD_DEPENDS= ${LOCALBASE}/boinc/api/boinc_api.h:${PORTSDIR}/net/boinc-client +RUN_DEPENDS= boinc-client:${PORTSDIR}/net/boinc-client +LIB_DEPENDS= fftw.2:${PORTSDIR}/math/fftw + +GNU_CONFIGURE= yes +USE_REINPLACE= yes +CONFIGURE_ENV= LANG=C BOINCDIR=${LOCALBASE}/boinc CPPFLAGS=-I/usr/X11R6/include CFLAGS=-I/usr/X11R6/include LDFLAGS=-L/usr/local/lib +MAKE_ENV= LANG=C +USE_GMAKE= yes +PKGINSTALL= ${WRKDIR}/pkg-install + +WRKSRC= ${WRKDIR}/seti_boinc/client +CONFIGURE_WRKSRC=${WRKDIR}/seti_boinc/ + +FIND_SETI_BINARY=(cd ${WRKSRC}; make -V PROG) +SETI_SITE?= setiathome.berkeley.edu +PLIST_SUB= SETI_SITE=${SETI_SITE} BOINC_HOME=${BOINC_HOME} + +# these must match settings in ../../net/boinc-client/Makefile +BOINC_USER= boinc +BOINC_HOME= /var/db/boinc +BOINC_DATADIR= ${PREFIX}/boinc + +# ${TOUCH} ${WRKDIR}/seti_boinc/db/schema_master.cpp +pre-patch: + ${TOUCH} ${WRKDIR}/seti_boinc/client/dependencies + ${TOUCH} ${WRKDIR}/seti_boinc/db/dependencies + +post-build: + ${SED} -e "s:%%SETI_BINARY%%:`${FIND_SETI_BINARY}`:g" \ + -e "s:%%SETI_SITE%%:${SETI_SITE}:g" \ + -e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \ + < ${FILESDIR}/app_info.xml > ${WRKDIR}/app_info.xml + ${SED} -e "s:%%SETI_SITE%%:${SETI_SITE}:g" \ + -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \ + -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \ + < pkg-install > ${WRKDIR}/pkg-install + +do-install: + ${MKDIR} ${PREFIX}/boinc/projects/${SETI_SITE} + ${INSTALL_PROGRAM} ${WRKSRC}/`${FIND_SETI_BINARY}` ${PREFIX}/boinc/projects/${SETI_SITE} + ${INSTALL_DATA} ${WRKDIR}/app_info.xml ${PREFIX}/boinc/projects/${SETI_SITE} + ${MKDIR} ${BOINC_HOME}/projects/${SETI_SITE}/ + ${LN} -s ${PREFIX}/boinc/projects/${SETI_SITE}/`${FIND_SETI_BINARY}` ${BOINC_HOME}/projects/${SETI_SITE} + ${LN} -s ${PREFIX}/boinc/projects/${SETI_SITE}/app_info.xml ${BOINC_HOME}/projects/${SETI_SITE} + +post-install: + ${REINPLACE_CMD} \ + -e "s:%%SETI_BINARY%%:`${FIND_SETI_BINARY}`:g" \ + -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" ${TMPPLIST} + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/astro/boinc-setiathome/distinfo b/astro/boinc-setiathome/distinfo new file mode 100644 index 000000000000..d5b835d5b187 --- /dev/null +++ b/astro/boinc-setiathome/distinfo @@ -0,0 +1,2 @@ +MD5 (seti_boinc-client-cvs-2004-10-01.tar.gz) = 9e4f91cf0bb468da09350da54b98aa7b +SIZE (seti_boinc-client-cvs-2004-10-01.tar.gz) = 1202532 diff --git a/astro/boinc-setiathome/files/app_info.xml b/astro/boinc-setiathome/files/app_info.xml new file mode 100644 index 000000000000..d4a3d3c8d855 --- /dev/null +++ b/astro/boinc-setiathome/files/app_info.xml @@ -0,0 +1,16 @@ +<app_info> + <app> + <name>setiathome</name> + </app> + <file_info> + <name>%%SETI_BINARY%%</name> + </file_info> + <app_version> + <app_name>setiathome</app_name> + <version_num>403</version_num> + <file_ref> + <file_name>%%SETI_BINARY%%</file_name> + <main_program/> + </file_ref> + </app_version> +</app_info> diff --git a/astro/boinc-setiathome/files/patch-client::Makefile.in b/astro/boinc-setiathome/files/patch-client::Makefile.in new file mode 100644 index 000000000000..7fbf79fdbfb9 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-client::Makefile.in @@ -0,0 +1,25 @@ +--- Makefile.in.orig Mon Aug 30 17:31:09 2004 ++++ Makefile.in Thu Oct 4 00:10:02 2004 +@@ -98,11 +98,11 @@ + @RANLIB@ libooura.$(LIBEXT) + + $(PROG): main.$(OBJEXT) libooura.$(LIBEXT) $(OBJS) +- $(CXX) main.$(OBJEXT) $(OBJS) $(LIBS) $(CLIBS) -o $(PROG) $(BOINC_OBJS) ++ $(CXX) main.$(OBJEXT) $(OBJS) $(LIBS) $(LDFLAGS) $(CLIBS) -o $(PROG) $(BOINC_OBJS) + strip $(PROG) + + $(GUIPROG): $(GUIOBJS) libooura.$(LIBEXT) +- $(CXX) $(GUIOBJS) $(GUILIBS) $(CLIBS) -o $(GUIPROG).debug $(BOINC_OBJS) ++ $(CXX) $(GUIOBJS) $(GUILIBS) $(LDFLAGS) $(CLIBS) -o $(GUIPROG).debug $(BOINC_OBJS) + cp $(GUIPROG).debug $(GUIPROG) + strip $(GUIPROG) + +@@ -115,7 +115,7 @@ + $(CXX) $(CXXFLAGS) $(BOINC_INC) -I.. -I../db -DTEST_VERSION -c -o main_test.$(OBJEXT) main.cpp + + setiathome_test$(DOTEXEEXT): main_test.$(OBJEXT) $(OBJS) libooura.$(LIBEXT) +- $(CXX) main_test.$(OBJEXT) $(OBJS) $(LIBS) $(CLIBS) -o setiathome_test$(DOTEXEEXT) $(BOINC_OBJS) ++ $(CXX) main_test.$(OBJEXT) $(OBJS) $(LIBS) $(LDFLAGS) $(CLIBS) -o setiathome_test$(DOTEXEEXT) $(BOINC_OBJS) + + ../db/sqlrow_client.$(OBJEXT): ../db/sqlrow.cpp ../db/sqlrow.h + (cd ../db; $(MAKE) sqlrow_client.$(OBJEXT)) diff --git a/astro/boinc-setiathome/files/patch-db::db_table.h b/astro/boinc-setiathome/files/patch-db::db_table.h new file mode 100644 index 000000000000..a56ce6c7d534 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-db::db_table.h @@ -0,0 +1,119 @@ +--- ../db/db_table.h.orig Mon Apr 5 16:03:33 2004 ++++ ../db/db_table.h Sun Oct 3 15:41:31 2004 +@@ -53,6 +53,52 @@ + }; + + template <typename T> ++class db_table; ++ ++template <typename T> ++std::ostream &operator <<(std::ostream &o, const db_type<T> &a) { ++ o << a.print_xml(); ++ return o; ++} ++ ++template <typename T> ++std::ostream &operator <<(std::ostream &o, const db_table<T> &a) { ++ o << a.me->print_xml(); ++ return o; ++} ++ ++template <typename T> ++std::istream &operator >>(std::istream &i, db_table<T> &a) { ++ std::string s; ++ std::string s_tag("<"); ++ std::string e_tag("</"); ++ s_tag+=a._search_tag; ++ e_tag+=a._search_tag; ++ std::string buffer(""); ++ bool found=false, done=false; ++ while (!i.eof() && !done) { ++ i >> s; ++ if (xml_match_tag(s,s_tag.c_str())) { ++ found=true; ++ } ++ if (found) buffer+=(s+' '); ++ if (xml_match_tag(s,e_tag.c_str())) { ++ found=false; ++ done=true; ++ } ++ } ++ a.me->parse_xml(buffer); ++ std::string::size_type p=buffer.find(e_tag); ++ if (p != std::string::npos) { ++ p=buffer.find('>',p+1); ++ if (p != std::string::npos) { ++ i.seekg(p-buffer.size(),std::ios::cur); ++ } ++ } ++ return i; ++} ++ ++template <typename T> + class db_table { + public: + db_table(T &t, SQL_CURSOR c); +@@ -332,12 +378,6 @@ + + #endif + +-template <typename T> +-std::ostream &operator <<(std::ostream &o, const db_type<T> &a) { +- o << a.print_xml(); +- return o; +-} +- + template <typename T, typename ID_TYPE> + std::ostream &operator <<(std::ostream &o, const db_reference<T,ID_TYPE> &a) { + o << a.print_xml(); +@@ -345,12 +385,6 @@ + } + + template <typename T> +-std::ostream &operator <<(std::ostream &o, const db_table<T> &a) { +- o << a.me->print_xml(); +- return o; +-} +- +-template <typename T> + const char *db_type<T>::search_tag(const char *s) { + if (s) { + _search_tag=s; +@@ -368,37 +402,6 @@ + _search_tag=table_name; + } + return _search_tag; +-} +- +-template <typename T> +-std::istream &operator >>(std::istream &i, db_table<T> &a) { +- std::string s; +- std::string s_tag("<"); +- std::string e_tag("</"); +- s_tag+=a._search_tag; +- e_tag+=a._search_tag; +- std::string buffer(""); +- bool found=false, done=false; +- while (!i.eof() && !done) { +- i >> s; +- if (xml_match_tag(s,s_tag.c_str())) { +- found=true; +- } +- if (found) buffer+=(s+' '); +- if (xml_match_tag(s,e_tag.c_str())) { +- found=false; +- done=true; +- } +- } +- a.me->parse_xml(buffer); +- std::string::size_type p=buffer.find(e_tag); +- if (p != std::string::npos) { +- p=buffer.find('>',p+1); +- if (p != std::string::npos) { +- i.seekg(p-buffer.size(),std::ios::cur); +- } +- } +- return i; + } + + template <typename T> diff --git a/astro/boinc-setiathome/files/patch-db::schema_to_class.awk b/astro/boinc-setiathome/files/patch-db::schema_to_class.awk new file mode 100644 index 000000000000..d54587988295 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-db::schema_to_class.awk @@ -0,0 +1,35 @@ +--- ../db/schema_to_class.awk.orig Thu Sep 30 21:58:31 2004 ++++ ../db/schema_to_class.awk Sun Oct 3 21:45:08 2004 +@@ -344,15 +344,15 @@ + print "\tvoid parse_xml(const std::string &s,const char *tag=\""table"\");" >headerfile + print " private:\n};\n\n" >headerfile + if (is_typedef) { +- print "const char * const db_type<"table">::type_name=\""table"\";" >sourcefile +- print "const char * db_type<"table">::_search_tag=type_name;" >sourcefile +- print "const int db_type<"table">::_nfields="nfields-1";" >sourcefile +- printf("const char * const db_type<%s>::column_names[%d]={",table,nfields-1) >sourcefile ++ print "template <> const char * const db_type<"table">::type_name=\""table"\";" >sourcefile ++ print "template <> const char * db_type<"table">::_search_tag=type_name;" >sourcefile ++ print "template <> const int db_type<"table">::_nfields="nfields-1";" >sourcefile ++ printf("template <> const char * const db_type<%s>::column_names[%d]={",table,nfields-1) >sourcefile + } else { +- print "const char * const db_table<"table">::table_name=\""table"\";" >sourcefile +- print "const char * db_table<"table">::_search_tag=table_name;" >sourcefile +- print "const int db_table<"table">::_nfields="nfields-1";" >sourcefile +- printf("const char * const db_table<%s>::column_names[%d]={",table,nfields-1) >sourcefile ++ print "template <> const char * const db_table<"table">::table_name=\""table"\";" >sourcefile ++ print "template <> const char * db_table<"table">::_search_tag=table_name;" >sourcefile ++ print "template <> const int db_table<"table">::_nfields="nfields-1";" >sourcefile ++ printf("template <> const char * const db_table<%s>::column_names[%d]={",table,nfields-1) >sourcefile + } + for (i=1;i<nfields;i++) printf("\"%s\"%s",fields[i],comma[i]) >sourcefile + print "};\n" >sourcefile +@@ -618,7 +618,7 @@ + if (sis_deftype) print "\trv << xml_indent(-2);" > sourcefile + print "\trv << \"</"fields[i]">\\n\"; " >sourcefile + } else if (type[i]=="s") { +- print "\t{\n\t std::string enc_field=xml_encode_string<char>("fields[i]",std::min(strlen("fields[i]"),sizeof("fields[i]")));" > sourcefile ++ print "\t{\n\t std::string enc_field=xml_encode_string("fields[i]",std::min(strlen("fields[i]"),sizeof("fields[i]")));" > sourcefile + print "\t rv << xml_indent() << \"<"fields[i]">\";" > sourcefile + print "\t rv << enc_field << \"</"fields[i]">\\n\";" >sourcefile + print "\t}" >> sourcefile diff --git a/astro/boinc-setiathome/files/patch-db::schema_to_class.in b/astro/boinc-setiathome/files/patch-db::schema_to_class.in new file mode 100644 index 000000000000..7f7324b75fd5 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-db::schema_to_class.in @@ -0,0 +1,11 @@ +--- ../db/schema_to_class.in.orig Wed Sep 22 18:42:01 2004 ++++ ../db/schema_to_class.in Sun Oct 3 17:28:10 2004 +@@ -22,7 +22,7 @@ + @CAT@ $1 | @TR@ "[A-Z]" "[a-z]" | @SED@ 's/\`//g' >>$filename + + @AWK@ -f @SAH_TOP_DIR@/db/schema_to_class.awk $filename +-INDENT=@INDENT@ ++INDENT= + if test -n "$INDENT" + then + @INDENT@ @INDENT_FLAGS@ $filename.h diff --git a/astro/boinc-setiathome/files/patch-db::sqlblob.h b/astro/boinc-setiathome/files/patch-db::sqlblob.h new file mode 100644 index 000000000000..5df9c99f3602 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-db::sqlblob.h @@ -0,0 +1,28 @@ +--- ../db/sqlblob.h.orig Thu Jul 1 13:55:37 2004 ++++ ../db/sqlblob.h Sun Oct 3 17:01:17 2004 +@@ -73,6 +73,12 @@ + } + + ++template <typename T> ++inline std::string xml_encode_string(const sqlblob<T> &input, ++ xml_encoding encoding=_x_xml_entity) { ++ return xml_encode_string(static_cast<const T *>(input),input.size(),encoding); ++} ++ + + template <typename T=unsigned char> + class sqlblob { +@@ -123,12 +129,6 @@ + template <typename T> + std::string sqlblob<T>::print_raw() const { + return std::string(reinterpret_cast<const char *>(&(*begin())),size()); +-} +- +-template <typename T> +-inline std::string xml_encode_string(const sqlblob<T> &input, +- xml_encoding encoding=_x_xml_entity) { +- return xml_encode_string(static_cast<const T *>(input),input.size(),encoding); + } + + diff --git a/astro/boinc-setiathome/files/patch-db::xml_util.h b/astro/boinc-setiathome/files/patch-db::xml_util.h new file mode 100644 index 000000000000..c7f6a32f360a --- /dev/null +++ b/astro/boinc-setiathome/files/patch-db::xml_util.h @@ -0,0 +1,11 @@ +--- ../db/xml_util.h.orig Wed Jun 30 16:52:29 2004 ++++ ../db/xml_util.h Sun Oct 3 21:16:22 2004 +@@ -223,7 +223,7 @@ + template <typename T> + inline std::string xml_encode_string(const std::vector<T> &input, + xml_encoding encoding=_x_xml_entity) { +- return xml_encode_string<T>(&(*(input.begin())),input.size(),encoding); ++ return xml_encode_string(&(*(input.begin())),input.size(),encoding); + } + + #include <cctype> diff --git a/astro/boinc-setiathome/pkg-descr b/astro/boinc-setiathome/pkg-descr new file mode 100644 index 000000000000..c87190487526 --- /dev/null +++ b/astro/boinc-setiathome/pkg-descr @@ -0,0 +1,18 @@ +SETI - Search for Extra-Terrestrial Intelligence + +Use your unused CPU cycles to aid in computations analyzing radio +telescope information for possible signs of ET. + +This version of SETI@home is based on BOINC (Berkeley Open +Infrastructure for Network Computing). Several other projects +besides SETI@home are using BOINC. BOINC lets you participate in +more than one project, and it lets you specify what fraction of +your computer time should go to each project. + +This port requires net/boinc-client and together these supersede +the astro/setiathome port which is now known as SETI-Classic. + +Be sure to join the "FreeBSD" team on the SETI website once you're +up and running. + +WWW: http://setiweb.ssl.berkeley.edu/ diff --git a/astro/boinc-setiathome/pkg-install b/astro/boinc-setiathome/pkg-install new file mode 100644 index 000000000000..3ffb2d593006 --- /dev/null +++ b/astro/boinc-setiathome/pkg-install @@ -0,0 +1,7 @@ +#!/bin/sh + +case $2 in +POST-INSTALL) + chown %%BOINC_USER%% %%BOINC_HOME%%/projects/%%SETI_SITE%% + ;; +esac diff --git a/astro/boinc-setiathome/pkg-plist b/astro/boinc-setiathome/pkg-plist new file mode 100644 index 000000000000..e558b6f74baf --- /dev/null +++ b/astro/boinc-setiathome/pkg-plist @@ -0,0 +1,7 @@ +@comment @unexec %D/boinc/boinc_client -detach_project %%SETI_SITE%% +boinc/projects/%%SETI_SITE%%/app_info.xml +boinc/projects/%%SETI_SITE%%/%%SETI_BINARY%% +@dirrm boinc/projects/%%SETI_SITE%% +@cd %%BOINC_HOME%% +projects/%%SETI_SITE%%/app_info.xml +projects/%%SETI_SITE%%/%%SETI_BINARY%% |