freebsd-ports/astro/boinc-setiathome-enhanced/Makefile
Rene Ladan abf15194c4 Improve Makefile logic: instead of breaking the port when
libboinc_graphics2.a is not found and the X11 option is selected, include
it as a build dependency (which had a hardcoded trigger before).

Feature safe:	yes
2011-01-31 22:10:40 +00:00

102 lines
3 KiB
Makefile

# New ports collection makefile for: boinc-setiathome-enhanced
# Date created: 26 March 2006
# Whom: Rene Ladan <r.c.ladan@student.tue.nl>
# $FreeBSD$
#
PORTNAME= boinc-setiathome-enhanced
PORTVERSION= 6.08
PORTREVISION= 4
CATEGORIES= astro
MASTER_SITES= ftp://rene-ladan.nl/pub/distfiles/
DISTNAME= setiathome-svn-412
MAINTAINER= rene@FreeBSD.org
COMMENT= Setiathome Enhanced for BOINC
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${LOCALBASE}/include/fftw3.h:${PORTSDIR}/math/fftw3 \
${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
RUN_DEPENDS= boinc_client:${PORTSDIR}/net/boinc-client
LIB_DEPENDS= fftw3f:${PORTSDIR}/math/fftw3-float
USE_BZIP2= yes
USE_AUTOTOOLS= autoconf:env automake:env
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_GNOME= pkgconfig
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
OPTIONS= X11 "Build screensaver (requires net/boinc-client with X11)" off
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_X11)
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
BUILD_DEPENDS+= ${LOCALBASE}/lib/libboinc_graphics2.a:${PORTSDIR}/net/boinc-client
PLIST_SUB+= X11=""
.else
BUILD_DEPENDS+= ${LOCALBASE}/include/boinc/std_fixes.h:${PORTSDIR}/net/boinc-client
CONFIGURE_ARGS+= --disable-graphics
PLIST_SUB+= X11="@comment "
.endif
.if ${ARCH} == i386 || ${ARCH} == amd64
# comment out if world is built with clang and port with gcc
CFLAGS+= -mtune=native
.endif
CONFIGURE_ENV+= BOINCDIR="${NONEXISTENT}"
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= pkg-deinstall pkg-install pkg-message
SUB_LIST= SETI_BINARY=${SETI_BINARY} \
SETI_SITE=${SETI_SITE} \
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)
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}/
.if !defined(WITHOUT_X11)
${INSTALL_PROGRAM} -o ${BOINC_USER} -g ${BOINC_GROUP} \
${WRKSRC}/client/seti_graphics ${BOINC_HOME}/projects/${SETI_SITE}/
.endif
post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>