# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # boinc-setiathome # boinc-setiathome/Makefile # boinc-setiathome/pkg-descr # boinc-setiathome/distinfo # boinc-setiathome/files # boinc-setiathome/files/app_info.xml # boinc-setiathome/files/patch-db::db_table.h # boinc-setiathome/files/patch-db::schema_to_class.awk # boinc-setiathome/files/patch-db::sqlblob.h # boinc-setiathome/files/patch-db::xml_util.h # boinc-setiathome/files/patch-db::schema_to_class.in # boinc-setiathome/files/patch-client::Makefile.in # boinc-setiathome/pkg-plist # boinc-setiathome/pkg-install # echo c - boinc-setiathome mkdir -p boinc-setiathome > /dev/null 2>&1 echo x - boinc-setiathome/Makefile sed 's/^X//' >boinc-setiathome/Makefile << 'END-of-boinc-setiathome/Makefile' X# New ports collection makefile for: boinc-setiathome X# Date created: 01 October 2004 X# Whom: J.R. Oldroyd X# X# $FreeBSD$ X# X XPORTNAME= boinc-setiathome XPORTVERSION= 4.03 XCATEGORIES= astro XMASTER_SITES= http://boinc.berkeley.edu/seti_source/nightly/ XDISTNAME= seti_boinc-client-cvs-2004-10-01 X XMAINTAINER= fbsd@opal.com XCOMMENT= Setiathome for boinc X XBUILD_DEPENDS+= ${LOCALBASE}/boinc/api/boinc_api.h:${PORTSDIR}/net/boinc-client XRUN_DEPENDS+= boinc-client:${PORTSDIR}/net/boinc-client XLIB_DEPENDS+= fftw.2:${PORTSDIR}/math/fftw X XGNU_CONFIGURE= yes XUSE_REINPLACE= yes XCONFIGURE_ENV= BOINCDIR=${LOCALBASE}/boinc CPPFLAGS=-I/usr/X11R6/include CFLAGS=-I/usr/X11R6/include LDFLAGS=-L/usr/local/lib XUSE_GMAKE= yes XPKGINSTALL= ${WRKDIR}/pkg-install X XWRKSRC= ${WRKDIR}/seti_boinc/client XCONFIGURE_WRKSRC=${WRKDIR}/seti_boinc/ X XFIND_SETI_BINARY=(cd ${WRKSRC}; make -V PROG) XSETI_SITE?= setiathome.berkeley.edu XPLIST_SUB+= SETI_SITE=${SETI_SITE} X X# these must match settings in ../../net/boinc-client/Makefile XBOINC_USER= boinc XBOINC_HOME= /var/db/boinc XBOINC_DATADIR= ${PREFIX}/boinc X X# ${TOUCH} ${WRKDIR}/seti_boinc/db/schema_master.cpp Xpre-patch: X ${TOUCH} ${WRKDIR}/seti_boinc/client/dependencies X ${TOUCH} ${WRKDIR}/seti_boinc/db/dependencies X Xpost-build: X ${SED} -e "s:%%SETI_BINARY%%:`${FIND_SETI_BINARY}`:g" \ X -e "s:%%SETI_SITE%%:${SETI_SITE}:g" \ X -e "s:%%BOINC_DATADIR%%:${BOINC_DATADIR}:g" \ X < ${FILESDIR}/app_info.xml > ${WRKDIR}/app_info.xml X ${SED} -e "s:%%SETI_SITE%%:${SETI_SITE}:g" \ X -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" \ X -e "s:%%BOINC_USER%%:${BOINC_USER}:g" \ X < pkg-install > ${WRKDIR}/pkg-install X Xdo-install: X ${MKDIR} ${PREFIX}/boinc/projects/${SETI_SITE} X ${INSTALL_PROGRAM} ${WRKSRC}/`${FIND_SETI_BINARY}` ${PREFIX}/boinc/projects/${SETI_SITE} X ${INSTALL_DATA} ${WRKDIR}/app_info.xml ${PREFIX}/boinc/projects/${SETI_SITE} X ${MKDIR} ${BOINC_HOME}/projects/${SETI_SITE}/ X ${LN} -s ${PREFIX}/boinc/projects/${SETI_SITE}/`${FIND_SETI_BINARY}` ${BOINC_HOME}/projects/${SETI_SITE} X ${LN} -s ${PREFIX}/boinc/projects/${SETI_SITE}/app_info.xml ${BOINC_HOME}/projects/${SETI_SITE} X Xpost-install: X ${REINPLACE_CMD} \ X -e "s:%%SETI_BINARY%%:`${FIND_SETI_BINARY}`:g" \ X -e "s:%%BOINC_HOME%%:${BOINC_HOME}:g" ${TMPPLIST} X @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL X X.include END-of-boinc-setiathome/Makefile echo x - boinc-setiathome/pkg-descr sed 's/^X//' >boinc-setiathome/pkg-descr << 'END-of-boinc-setiathome/pkg-descr' XSETI - Search for Extra-Terrestrial Intelligence X XUse your unused CPU cycles to aid in computations analyzing radio Xtelescope information for possible signs of ET. X XThis version of SETI@home is based on BOINC (Berkeley Open XInfrastructure for Network Computing). Several other projects Xbesides SETI@home are using BOINC. BOINC lets you participate in Xmore than one project, and it lets you specify what fraction of Xyour computer time should go to each project. X XThis port requires net/boinc-client and together these supersede Xthe astro/setiathome port which is now known as SETI-Classic. X XBe sure to join the "FreeBSD" team on the SETI website once you're Xup and running. X XWWW: http://setiweb.ssl.berkeley.edu/ END-of-boinc-setiathome/pkg-descr echo x - boinc-setiathome/distinfo sed 's/^X//' >boinc-setiathome/distinfo << 'END-of-boinc-setiathome/distinfo' XMD5 (seti_boinc-client-cvs-2004-10-01.tar.gz) = 9e4f91cf0bb468da09350da54b98aa7b XSIZE (seti_boinc-client-cvs-2004-10-01.tar.gz) = 1202532 END-of-boinc-setiathome/distinfo echo c - boinc-setiathome/files mkdir -p boinc-setiathome/files > /dev/null 2>&1 echo x - boinc-setiathome/files/app_info.xml sed 's/^X//' >boinc-setiathome/files/app_info.xml << 'END-of-boinc-setiathome/files/app_info.xml' X X X setiathome X X X %%SETI_BINARY%% X X X setiathome X 403 X X %%SETI_BINARY%% X X X X END-of-boinc-setiathome/files/app_info.xml echo x - boinc-setiathome/files/patch-db::db_table.h sed 's/^X//' >boinc-setiathome/files/patch-db::db_table.h << 'END-of-boinc-setiathome/files/patch-db::db_table.h' X--- ../db/db_table.h.orig Mon Apr 5 16:03:33 2004 X+++ ../db/db_table.h Sun Oct 3 15:41:31 2004 X@@ -53,6 +53,52 @@ X }; X X template X+class db_table; X+ X+template X+std::ostream &operator <<(std::ostream &o, const db_type &a) { X+ o << a.print_xml(); X+ return o; X+} X+ X+template X+std::ostream &operator <<(std::ostream &o, const db_table &a) { X+ o << a.me->print_xml(); X+ return o; X+} X+ X+template X+std::istream &operator >>(std::istream &i, db_table &a) { X+ std::string s; X+ std::string s_tag("<"); X+ std::string e_tag("> s; X+ if (xml_match_tag(s,s_tag.c_str())) { X+ found=true; X+ } X+ if (found) buffer+=(s+' '); X+ if (xml_match_tag(s,e_tag.c_str())) { X+ found=false; X+ done=true; X+ } X+ } X+ a.me->parse_xml(buffer); X+ std::string::size_type p=buffer.find(e_tag); X+ if (p != std::string::npos) { X+ p=buffer.find('>',p+1); X+ if (p != std::string::npos) { X+ i.seekg(p-buffer.size(),std::ios::cur); X+ } X+ } X+ return i; X+} X+ X+template X class db_table { X public: X db_table(T &t, SQL_CURSOR c); X@@ -332,12 +378,6 @@ X X #endif X X-template X-std::ostream &operator <<(std::ostream &o, const db_type &a) { X- o << a.print_xml(); X- return o; X-} X- X template X std::ostream &operator <<(std::ostream &o, const db_reference &a) { X o << a.print_xml(); X@@ -345,12 +385,6 @@ X } X X template X-std::ostream &operator <<(std::ostream &o, const db_table &a) { X- o << a.me->print_xml(); X- return o; X-} X- X-template X const char *db_type::search_tag(const char *s) { X if (s) { X _search_tag=s; X@@ -368,37 +402,6 @@ X _search_tag=table_name; X } X return _search_tag; X-} X- X-template X-std::istream &operator >>(std::istream &i, db_table &a) { X- std::string s; X- std::string s_tag("<"); X- std::string e_tag("> s; X- if (xml_match_tag(s,s_tag.c_str())) { X- found=true; X- } X- if (found) buffer+=(s+' '); X- if (xml_match_tag(s,e_tag.c_str())) { X- found=false; X- done=true; X- } X- } X- a.me->parse_xml(buffer); X- std::string::size_type p=buffer.find(e_tag); X- if (p != std::string::npos) { X- p=buffer.find('>',p+1); X- if (p != std::string::npos) { X- i.seekg(p-buffer.size(),std::ios::cur); X- } X- } X- return i; X } X X template END-of-boinc-setiathome/files/patch-db::db_table.h echo x - boinc-setiathome/files/patch-db::schema_to_class.awk sed 's/^X//' >boinc-setiathome/files/patch-db::schema_to_class.awk << 'END-of-boinc-setiathome/files/patch-db::schema_to_class.awk' X--- ../db/schema_to_class.awk.orig Thu Sep 30 21:58:31 2004 X+++ ../db/schema_to_class.awk Sun Oct 3 21:45:08 2004 X@@ -344,15 +344,15 @@ X print "\tvoid parse_xml(const std::string &s,const char *tag=\""table"\");" >headerfile X print " private:\n};\n\n" >headerfile X if (is_typedef) { X- print "const char * const db_type<"table">::type_name=\""table"\";" >sourcefile X- print "const char * db_type<"table">::_search_tag=type_name;" >sourcefile X- print "const int db_type<"table">::_nfields="nfields-1";" >sourcefile X- printf("const char * const db_type<%s>::column_names[%d]={",table,nfields-1) >sourcefile X+ print "template <> const char * const db_type<"table">::type_name=\""table"\";" >sourcefile X+ print "template <> const char * db_type<"table">::_search_tag=type_name;" >sourcefile X+ print "template <> const int db_type<"table">::_nfields="nfields-1";" >sourcefile X+ printf("template <> const char * const db_type<%s>::column_names[%d]={",table,nfields-1) >sourcefile X } else { X- print "const char * const db_table<"table">::table_name=\""table"\";" >sourcefile X- print "const char * db_table<"table">::_search_tag=table_name;" >sourcefile X- print "const int db_table<"table">::_nfields="nfields-1";" >sourcefile X- printf("const char * const db_table<%s>::column_names[%d]={",table,nfields-1) >sourcefile X+ print "template <> const char * const db_table<"table">::table_name=\""table"\";" >sourcefile X+ print "template <> const char * db_table<"table">::_search_tag=table_name;" >sourcefile X+ print "template <> const int db_table<"table">::_nfields="nfields-1";" >sourcefile X+ printf("template <> const char * const db_table<%s>::column_names[%d]={",table,nfields-1) >sourcefile X } X for (i=1;isourcefile X print "};\n" >sourcefile X@@ -618,7 +618,7 @@ X if (sis_deftype) print "\trv << xml_indent(-2);" > sourcefile X print "\trv << \"\\n\"; " >sourcefile X } else if (type[i]=="s") { X- print "\t{\n\t std::string enc_field=xml_encode_string("fields[i]",std::min(strlen("fields[i]"),sizeof("fields[i]")));" > sourcefile X+ print "\t{\n\t std::string enc_field=xml_encode_string("fields[i]",std::min(strlen("fields[i]"),sizeof("fields[i]")));" > sourcefile X print "\t rv << xml_indent() << \"<"fields[i]">\";" > sourcefile X print "\t rv << enc_field << \"\\n\";" >sourcefile X print "\t}" >> sourcefile END-of-boinc-setiathome/files/patch-db::schema_to_class.awk echo x - boinc-setiathome/files/patch-db::sqlblob.h sed 's/^X//' >boinc-setiathome/files/patch-db::sqlblob.h << 'END-of-boinc-setiathome/files/patch-db::sqlblob.h' X--- ../db/sqlblob.h.orig Thu Jul 1 13:55:37 2004 X+++ ../db/sqlblob.h Sun Oct 3 17:01:17 2004 X@@ -73,6 +73,12 @@ X } X X X+template X+inline std::string xml_encode_string(const sqlblob &input, X+ xml_encoding encoding=_x_xml_entity) { X+ return xml_encode_string(static_cast(input),input.size(),encoding); X+} X+ X X template X class sqlblob { X@@ -123,12 +129,6 @@ X template X std::string sqlblob::print_raw() const { X return std::string(reinterpret_cast(&(*begin())),size()); X-} X- X-template X-inline std::string xml_encode_string(const sqlblob &input, X- xml_encoding encoding=_x_xml_entity) { X- return xml_encode_string(static_cast(input),input.size(),encoding); X } X X END-of-boinc-setiathome/files/patch-db::sqlblob.h echo x - boinc-setiathome/files/patch-db::xml_util.h sed 's/^X//' >boinc-setiathome/files/patch-db::xml_util.h << 'END-of-boinc-setiathome/files/patch-db::xml_util.h' X--- ../db/xml_util.h.orig Wed Jun 30 16:52:29 2004 X+++ ../db/xml_util.h Sun Oct 3 21:16:22 2004 X@@ -223,7 +223,7 @@ X template X inline std::string xml_encode_string(const std::vector &input, X xml_encoding encoding=_x_xml_entity) { X- return xml_encode_string(&(*(input.begin())),input.size(),encoding); X+ return xml_encode_string(&(*(input.begin())),input.size(),encoding); X } X X #include END-of-boinc-setiathome/files/patch-db::xml_util.h echo x - boinc-setiathome/files/patch-db::schema_to_class.in sed 's/^X//' >boinc-setiathome/files/patch-db::schema_to_class.in << 'END-of-boinc-setiathome/files/patch-db::schema_to_class.in' X--- ../db/schema_to_class.in.orig Wed Sep 22 18:42:01 2004 X+++ ../db/schema_to_class.in Sun Oct 3 17:28:10 2004 X@@ -22,7 +22,7 @@ X @CAT@ $1 | @TR@ "[A-Z]" "[a-z]" | @SED@ 's/\`//g' >>$filename X X @AWK@ -f @SAH_TOP_DIR@/db/schema_to_class.awk $filename X-INDENT=@INDENT@ X+INDENT= X if test -n "$INDENT" X then X @INDENT@ @INDENT_FLAGS@ $filename.h END-of-boinc-setiathome/files/patch-db::schema_to_class.in echo x - boinc-setiathome/files/patch-client::Makefile.in sed 's/^X//' >boinc-setiathome/files/patch-client::Makefile.in << 'END-of-boinc-setiathome/files/patch-client::Makefile.in' X--- Makefile.in.orig Mon Aug 30 17:31:09 2004 X+++ Makefile.in Thu Oct 4 00:10:02 2004 X@@ -98,11 +98,11 @@ X @RANLIB@ libooura.$(LIBEXT) X X $(PROG): main.$(OBJEXT) libooura.$(LIBEXT) $(OBJS) X- $(CXX) main.$(OBJEXT) $(OBJS) $(LIBS) $(CLIBS) -o $(PROG) $(BOINC_OBJS) X+ $(CXX) main.$(OBJEXT) $(OBJS) $(LIBS) $(LDFLAGS) $(CLIBS) -o $(PROG) $(BOINC_OBJS) X strip $(PROG) X X $(GUIPROG): $(GUIOBJS) libooura.$(LIBEXT) X- $(CXX) $(GUIOBJS) $(GUILIBS) $(CLIBS) -o $(GUIPROG).debug $(BOINC_OBJS) X+ $(CXX) $(GUIOBJS) $(GUILIBS) $(LDFLAGS) $(CLIBS) -o $(GUIPROG).debug $(BOINC_OBJS) X cp $(GUIPROG).debug $(GUIPROG) X strip $(GUIPROG) X X@@ -115,7 +115,7 @@ X $(CXX) $(CXXFLAGS) $(BOINC_INC) -I.. -I../db -DTEST_VERSION -c -o main_test.$(OBJEXT) main.cpp X X setiathome_test$(DOTEXEEXT): main_test.$(OBJEXT) $(OBJS) libooura.$(LIBEXT) X- $(CXX) main_test.$(OBJEXT) $(OBJS) $(LIBS) $(CLIBS) -o setiathome_test$(DOTEXEEXT) $(BOINC_OBJS) X+ $(CXX) main_test.$(OBJEXT) $(OBJS) $(LIBS) $(LDFLAGS) $(CLIBS) -o setiathome_test$(DOTEXEEXT) $(BOINC_OBJS) X X ../db/sqlrow_client.$(OBJEXT): ../db/sqlrow.cpp ../db/sqlrow.h X (cd ../db; $(MAKE) sqlrow_client.$(OBJEXT)) END-of-boinc-setiathome/files/patch-client::Makefile.in echo x - boinc-setiathome/pkg-plist sed 's/^X//' >boinc-setiathome/pkg-plist << 'END-of-boinc-setiathome/pkg-plist' X@comment @unexec %D/boinc/boinc_client -detach_project %%SETI_SITE%% Xboinc/projects/%%SETI_SITE%%/app_info.xml Xboinc/projects/%%SETI_SITE%%/%%SETI_BINARY%% X@dirrm boinc/projects/%%SETI_SITE%% X@cd %%BOINC_HOME%% Xprojects/%%SETI_SITE%%/app_info.xml Xprojects/%%SETI_SITE%%/%%SETI_BINARY%% END-of-boinc-setiathome/pkg-plist echo x - boinc-setiathome/pkg-install sed 's/^X//' >boinc-setiathome/pkg-install << 'END-of-boinc-setiathome/pkg-install' X#!/bin/sh X Xcase $2 in XPOST-INSTALL) X chown %%BOINC_USER%% %%BOINC_HOME%%/projects/%%SETI_SITE%% X ;; Xesac END-of-boinc-setiathome/pkg-install exit