freebsd-ports/science/qcl/Makefile
Thierry Thomas 221f9d5c71 science/qcl: upgrade to 0.6.7
Changelogs at <http://tph.tuwien.ac.at/~oemer/qcl.html>.

Also adding a test target.
2023-04-20 17:30:55 +02:00

47 lines
1.2 KiB
Makefile

PORTNAME= qcl
PORTVERSION= 0.6.7
CATEGORIES= science math
MASTER_SITES= http://tph.tuwien.ac.at/~oemer/tgz/
MAINTAINER= ports@FreeBSD.org
COMMENT= Quantum computer simulator
WWW= http://tph.tuwien.ac.at/~oemer/qcl.html
LICENSE= GPLv2+
USES= bison gmake readline tar:tgz
PLIST_FILES= bin/qcl
PORTDATA= *
OPTIONS_DEFINE= PLOTUTILS
OPTIONS_DEFAULT= PLOTUTILS
PLOTUTILS_DESC= Plotting support via plotutils
PLOTUTILS_LIB_DEPENDS= libplotter.so:graphics/plotutils
PLOTUTILS_CXXFLAGS= -I${LOCALBASE}/include -DQCL_PLOT
PLOTUTILS_LDFLAGS= -L${LOCALBASE}/lib -lplotter
pre-configure:
@${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})
do-test: install
qcl --color ${DATADIR}/test.qcl
.include <bsd.port.mk>