aboutsummaryrefslogtreecommitdiffstats
path: root/astro/boinc-astropulse/Makefile
blob: 90582446716d9a2200894d7142f4c57d8eed92f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Created by: rene
# $FreeBSD$

PORTNAME=   boinc-astropulse
PORTVERSION=    6.01
PORTREVISION=   10
CATEGORIES= astro
MASTER_SITES=   LOCAL/rene
DISTNAME=   astropulse-svn-1702 # modified archive, see leftout in top directory

MAINTAINER= ports@FreeBSD.org
COMMENT=    Astropulse for BOINC

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/COPYING

BUILD_DEPENDS=  ${LOCALBASE}/include/fftw3.h:${PORTSDIR}/math/fftw3 \
        ${NONEXISTENT}:${PORTSDIR}/astro/boinc-setiathome-v7:patch
RUN_DEPENDS=    boinc_client:${PORTSDIR}/net/boinc-client
LIB_DEPENDS=    libfftw3f.so:${PORTSDIR}/math/fftw3-float

GNU_CONFIGURE=  yes
USES=       autoreconf gmake libtool pkgconfig tar:xz
WRKSRC=     ${WRKDIR}/${DISTNAME}/client

CPPFLAGS+=  -I${LOCALBASE}/include/boinc -I${LOCALBASE}/include
LIBS+=      -L${LOCALBASE}/lib

# these must match settings in ${PORTSDIR}/net/boinc-client/Makefile
BOINC_CLIENT_USER?= boinc
BOINC_CLIENT_GROUP?=    nobody
BOINC_CLIENT_HOME?= /var/db/boinc

OPTIONS_DEFINE= X11
X11_DESC=   Build screensaver (requires net/boinc-client with X11)

OPTIONS_SUB=    yes

X11_BUILD_DEPENDS=  ${LOCALBASE}/lib/libboinc_graphics2.a:${PORTSDIR}/net/boinc-client
X11_LIB_DEPENDS=    libjpeg.so:${PORTSDIR}/graphics/jpeg
X11_USE=        GL=gl,glu,glut \
            XORG=ice,sm,x11,xau,xcb,xext,xi,xdamage,xdmcp,xfixes,xmu,xt,xxf86vm
X11_CONFIGURE_ENABLE=   graphics

.include <bsd.port.options.mk>

.if ! ${PORT_OPTIONS:MX11}
BUILD_DEPENDS+= ${LOCALBASE}/include/boinc/std_fixes.h:${PORTSDIR}/net/boinc-client
.endif

SETI_WORK!= cd ${.CURDIR}/../boinc-setiathome-v7 && ${MAKE} -V WRKSRC
CONFIGURE_ENV+= BOINCDIR="${NONEXISTENT}" \
        BOINC_DIR="${NONEXISTENT}" \
        SETI_BOINC_DIR="${SETI_WORK}"
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_CLIENT_HOME=${BOINC_CLIENT_HOME} \
        BOINC_CLIENT_USER=${BOINC_CLIENT_USER} \
        BOINC_CLIENT_GROUP=${BOINC_CLIENT_GROUP}
PLIST_SUB+= AP_BINARY=${AP_BINARY} \
        SETI_SITE=${SETI_SITE} \
        BOINC_CLIENT_HOME=${BOINC_CLIENT_HOME} \
        BOINC_CLIENT_USER=${BOINC_CLIENT_USER} \
        BOINC_CLIENT_GROUP=${BOINC_CLIENT_GROUP}

do-install:
    ${INSTALL} -d ${STAGEDIR}${BOINC_CLIENT_HOME}/projects
    ${INSTALL} -d ${STAGEDIR}${BOINC_CLIENT_HOME}/projects/${SETI_SITE}
    ${INSTALL_PROGRAM} ${WRKSRC}/${AP_BINARY} \
        ${STAGEDIR}${BOINC_CLIENT_HOME}/projects/${SETI_SITE}/
.if ${PORT_OPTIONS:MX11}
    ${INSTALL_PROGRAM} ${WRKSRC}/ap_graphics \
        ${STAGEDIR}${BOINC_CLIENT_HOME}/projects/${SETI_SITE}/
.endif

.include <bsd.port.mk>