freebsd-ports/cad/calculix/Makefile
Gerald Pfeifer ea8c8ec7da Bump PORTREVISION for ports depending on the canonical version of GCC
as defined in Mk/bsd.default-versions.mk which has moved from GCC 8.3
to GCC 9.1 under most circumstances now after revision 507371.

This includes ports
 - with USE_GCC=yes or USE_GCC=any,
 - with USES=fortran,
 - using Mk/bsd.octave.mk which in turn features USES=fortran, and
 - with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
   c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, everything INDEX-11 shows with a dependency on lang/gcc9 now.

PR:		238330
2019-07-26 20:46:53 +00:00

95 lines
2.4 KiB
Makefile

# Created by: Pedro Giffuni
# $FreeBSD$
PORTNAME= calculix
PORTVERSION= 2.15
PORTREVISION= 1
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
BROKEN_aarch64= fails to link: shapeFunctions.c:(function attach_new): relocation R_AARCH64_CALL26 out of range
RUN_DEPENDS= ccx:cad/calculix-ccx
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
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}
CXXFLAGS+= -std=c++98
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}
# Some garbage crept in
@${RM} ${WRKSRC}/${CGX_VER}/examples/OpenFOAM/couette/constant/polyMesh/*~
@${RM} ${WRKSRC}/${CGX_VER}/examples/OpenFOAM/couette/constant/*~
@${RM} ${WRKSRC}/${CGX_VER}/examples/OpenFOAM/couette/system/*~
@${RM} ${WRKSRC}/${CGX_VER}/examples/ifwhiledemo/*.*~
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@(cd ${WRKSRC}/${CGX_VER}/examples && ${COPYTREE_SHARE} . \
${STAGEDIR}${EXAMPLESDIR})
.endif
.include <bsd.port.mk>