aboutsummaryrefslogtreecommitdiffstats
path: root/science/qcl/Makefile
blob: 2e55b55212c7930ca21c35b918855481387b9ecd (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
# Created by: Brad Huntting <huntting@glarp.com>
# $FreeBSD$

PORTNAME=   qcl
PORTVERSION=    0.6.4
CATEGORIES= science math
MASTER_SITES=   http://tph.tuwien.ac.at/~oemer/tgz/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Quantum computer simulator

LICENSE=    GPLv2+

USES=       bison gmake readline tar:tgz

PLIST_FILES=    bin/qcl
PORTDATA=   *

OPTIONS_DEFINE=     PLOTUTILS

PLOTUTILS_DESC=     Plotting support via plotutils
PLOTUTILS_LIB_DEPENDS=  libplotter.so:${PORTSDIR}/graphics/plotutils
PLOTUTILS_CXXFLAGS= -I${LOCALBASE}/include -DQCL_PLOT
PLOTUTILS_LDFLAGS=  -L${LOCALBASE}/lib -lplotter

post-patch:
    @${REINPLACE_CMD} -e \
        's|/usr/local|${PREFIX}| ; \
         s|lib/qcl|share/qcl| ; \
         s|-O2 -g|| ; \
         s|^PLOPT|#PLOPT| ; \
         s|^PLLIB|#PLLIB| ; \
         /^CXXFLAGS/s| =| +=| ; \
         /^LDFLAGS/s| =| +=|' ${WRKSRC}/Makefile
    @${REINPLACE_CMD} -e \
        's|-g -O2|| ; \
         /^CXXFLAGS/s| =| +=| ; \
         /^LDFLAGS/s| =| +=|' ${WRKSRC}/qc/Makefile

do-install:
    (cd ${WRKSRC} && ${INSTALL_PROGRAM} qcl ${STAGEDIR}${PREFIX}/bin)
    @${MKDIR} ${STAGEDIR}${DATADIR}
    (cd ${WRKSRC}/lib && ${INSTALL_DATA} *.qcl ${STAGEDIR}${DATADIR})

.include <bsd.port.mk>