# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sci-astronomy/setiathome-enhanced/setiathome-enhanced-5.17-20061112.ebuild,v 1.5.1 2006/11/12 06:23:00 teodoro Exp $ inherit eutils inherit flag-o-matic BASEVER=${PV/${PV:(-9)}/} MY_PN="setiathome_enhanced-client-cvs" MY_PV="2006-11-15" DESCRIPTION="Search for Extraterrestrial Intelligence SETI@home" HOMEPAGE="http://setiweb.ssl.berkeley.edu/" #SRC_URI="mirror://gentoo//boinc-5.5.6.tar.bz2 #SRC_URI="mirror://gentoo//boinc-5.6.4.tar.bz2 SRC_URI="mirror://gentoo//boinc-5.4.11.tar.bz2 http://setiathome.berkeley.edu/seti_source/nightly/${MY_PN}-${MY_PV}.tar.gz" IUSE=" sse sse2 sse3 3dnow mmx altivec ipp fast-math intrinsics X opengl ssl" SLOT="0" LICENSE="GPL-2" KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86" DEPEND=">=sys-libs/glibc-2.3.2 X? ( x11-base/xorg-x11 ) opengl? ( virtual/opengl virtual/glu || ( media-libs/glut virtual/glut) ) ssl? ( >=dev-libs/openssl-0.9.7 ) >=sci-libs/fftw-3 >=media-libs/jpeg-6b =sci-misc/boinc-5.4.11 !sci-astronomy/setiathome " S=${WORKDIR}/seti_boinc src_unpack() { if use ipp; then einfo einfo ============================================================================= einfo einfo Intel Integrated Performance Primitives IPP Support Notice einfo einfo You will need to obtain a copy of or already have purchased a copy of IPP at einfo http://www.intel.com/cd/software/products/asmo-na/eng/download/eval/219771.htm einfo einfo You may download an older non-commercial, personal use copy registration einfo required of Intels libraries if you want to make setiathome einfo multi-core-ready, vectorized, and more optimized. IPP is not restricted to einfo multicore processors in fact the website list support for Pentium III and einfo MacOS systems. einfo einfo Please make sure IPP is placed in one of the following directories for einfo for proper use. einfo einfo $ippdir = einfo /usr/local/ipp*/ia32* /usr/lib/ipp*/ia32* /usr/ipp*/ia32* einfo /usr/pkg/ipp*/ia32* /usr/local /usr einfo einfo Headers: -I$ippdir/include Libraries: -I$ippdir/tools/staticlib einfo einfo ============================================================================= fi unpack ${A} cd "${WORKDIR}/seti_boinc" epatch "${FILESDIR}"/sah-5.17-db-makefile-exceptions-fix.patch epatch "${FILESDIR}"/sah-5.17-graphics-fix.patch epatch "${FILESDIR}"/sah-5.17-x86_86-prescott-sse3-cflags-fix-and-fpmath-to-funsafe-math-opt-fix.patch epatch "${FILESDIR}"/sah-5.17-boinc-5.4.11-boinc_app_mouse_button-fix.patch epatch "${FILESDIR}"/sah-5.17-makefile-i686-target-fix.patch cd "${WORKDIR}" mv boinc-* "${WORKDIR}/boinc" cd "${WORKDIR}/boinc" epatch "${FILESDIR}"/boinc-5.5.6-funroll-propagation-fix.patch epatch "${FILESDIR}"/boinc-5.5.6-server-exceptions-fix.patch epatch "${FILESDIR}"/boinc-5.4.11-gui_rpc_server-casting-fix.patch #patches reserved for future use #epatch "${FILESDIR}"/boinc-5.6.4-clientgui-wxgtk-libs-fix.patch # point to a proper mouse device sed -e "s:/dev/mouse:/dev/input/mice:g" -i client/hostinfo_unix.C || die } src_compile() { local gfxflags="" #strip-flags #filter-flags -ffast-math #graphics support if use opengl; then #glib lacks -fPIC with stock CFLAGS/USE gfxflags="${gfxflags} --disable-dynamic-graphics --enable-graphics" fi #setup setiathome cd "${WORKDIR}/seti_boinc" # Just run the necessary tools directly einfo "Running necessary autotools..." aclocal -I m4 || die "aclocal failed." autoheader || die "autoheader failed." automake || die "automake failed." autoconf || die "autoconf failed." BOINCDIR=${WORKDIR}/boinc econf \ $(use_enable intrinsics) \ ${gfxflags} \ $(use_enable sse3) \ $(use_enable sse2) \ $(use_enable sse) \ $(use_enable mmx) \ $(use_enable 3dnow) \ $(use_enable fast-math) \ $(use_enable altivec) \ $(use_with ssl) \ $(use_with ipp) \ $(use_with X x) \ --mandir=/usr/share/man \ --docdir=/usr/share/doc/{PF} \ --infodir=/usr/share/info \ || die "failed to configure setiathome" emake || die "Error: failed to make setiathome" } src_install() { local INSTDIR="/var/lib/boinc/projects/setiathome.berkeley.edu" local BINNAME=setiathome-${BASEVER}.${CHOST} exeinto ${INSTDIR} doexe ${S}/client/${BINNAME} insinto ${INSTDIR} doins ${FILESDIR}/app_info.xml sed -i -e "s|NODOTVERSION|${BASEVER/./}|g" \ -e "s|BINNAME|${BINNAME}|g" \ ${D}${INSTDIR}/app_info.xml \ || die "sed of app_info.xml failed." sed -i -e 's|setiathome|setiathome_enhanced|g' \ -e 's|setiathome|setiathome_enhanced|g' \ ${D}${INSTDIR}/app_info.xml \ || die "sed of app_info.xml failed." } pkg_postinst() { chown -R boinc:boinc /var/lib/boinc cd /var/lib/boinc/projects/setiathome.berkeley.edu chown -R root:0 setiathome-${BASEVER}.${CHOST} app_info.xml einfo einfo ============================================================================= einfo einfo Enabling Boinc Graphics Feature einfo einfo Please run the following command to enable functionallity of einfo Show Graphics button in Boinc which is disabled by default einfo due to the security nature of Linux einfo einfo xhost +local: einfo einfo Enabling '+local:' is generally insecure in multiuser environments. einfo See 'man xhost' for more details einfo einfo ============================================================================= einfo einfo Preparing Client for Recognition of Anonymous Platform einfo einfo After attaching the client to Boinc, please perform einfo einfo /etc/init.d/restart einfo /etc/init.d/restart einfo einfo twice until the Boinc Messages tab reports einfo Seti@home xxx xxx xx xx:xx:xx xxxx Found app_info.xml anonymous platform einfo einfo ============================================================================= einfo einfo Bug warnings einfo einfo If you close the opengl 3D graphics visualization window if you einfo you want to bring it back up again, you need to stop the daemon, close einfo boincs desktop app, and restart the daemon. einfo einfo ============================================================================= }