1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-18 08:02:48 +00:00
freebsd-ports/cad/calculix/Makefile
Mark Linimon 75a2415563 Cross-builds under qemu may have pathname information encoded in CXX.
Fix some regexes to compensate.

Approved by:	portmgr (tier-2 blanket)
2017-12-20 15:30:55 +00:00

88 lines
2.1 KiB
Makefile

# Created by: Pedro Giffuni
# $FreeBSD$
PORTNAME= calculix
PORTVERSION= 2.13
CATEGORIES= cad
MASTER_SITES= http://www.dhondt.de/
DISTFILES= ${DIST_SOURCES}
DIST_SUBDIR= calculix
EXTRACT_ONLY= ${DIST_SOURCES}
MAINTAINER= pfg@FreeBSD.org
COMMENT= Three-Dimensional Structural Finite Element Program
LICENSE= GPLv2
RUN_DEPENDS= ccx:cad/calculix-ccx
BROKEN_FreeBSD_10= Does not build with clang on FreeBSD 10, causes segfaults when built with gcc
DIST_SOURCES= cgx_${PORTVERSION}.all${EXTRACT_SUFX}
DIST_HTM= cgx_${PORTVERSION}.htm${EXTRACT_SUFX}
DIST_PDF= cgx_${PORTVERSION}.pdf
DIST_EXAMPLES= cgx_${PORTVERSION}.exa${EXTRACT_SUFX}
WRKSRC= ${WRKDIR}/CalculiX
CGX_VER= cgx_${PORTVERSION}
USES= gmake tar:bzip2 compiler:c++11-lib
USE_XORG= ice sm x11 xext xi xmu xt
USE_GL= gl glu # uses its own glut
BROWSER?= firefox
PSVIEWER?= gv
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MEXAMPLES}
DISTFILES+= ${DIST_EXAMPLES}
EXTRACT_ONLY+= ${DIST_EXAMPLES}
.endif
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= ${DIST_HTM} ${DIST_PDF}
EXTRACT_ONLY+= ${DIST_HTM}
DOCSDIR= ${PREFIX}/share/doc/CalculiX
.endif
.if ${ARCH} == "sparc64"
CFLAGS+= -fPIC
FFLAGS+= -fPIC
.else
CFLAGS+= -fpic
FFLAGS+= -fpic
.endif
pre-build:
@${REINPLACE_CMD} -e 's!c++!${CXX}!g;' \
${WRKSRC}/libSNL/src/makefile
@${REINPLACE_CMD} -e 's+%%DOCSDIR%%+${DOCSDIR}+g; \
s+"firefox"+"${BROWSER}"+ ; \
s+"gv"+"${PSVIEWER}"+ ;' \
${WRKSRC}/${CGX_VER}/src/cgx.h
do-build:
@(cd ${WRKSRC}/libSNL/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
@(cd ${WRKSRC}/${CGX_VER}/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${CGX_VER}/src/cgx \
${STAGEDIR}${PREFIX}/bin/cgx
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}/cgx
@(cd ${WRKSRC}/${CGX_VER}/doc/cgx && ${COPYTREE_SHARE} . \
${STAGEDIR}${DOCSDIR}/cgx)
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/cgx_${PORTVERSION}.pdf \
${STAGEDIR}${DOCSDIR}
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@(cd ${WRKSRC}/${CGX_VER}/examples && ${COPYTREE_SHARE} . \
${STAGEDIR}${EXAMPLESDIR})
.endif
.include <bsd.port.mk>