2013-09-20 17:58:41 +02:00
|
|
|
# Created by: Pedro Giffuni
|
2003-05-05 15:06:37 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= CalculiX
|
2014-03-04 01:18:31 +01:00
|
|
|
PORTVERSION= 2.7
|
2014-06-05 09:22:46 +02:00
|
|
|
PORTREVISION= 3
|
2003-05-05 15:06:37 +02:00
|
|
|
CATEGORIES= cad
|
|
|
|
MASTER_SITES= http://www.dhondt.de/
|
2005-03-19 11:28:48 +01:00
|
|
|
DISTFILES= ${DIST_SOURCES}
|
2003-06-30 21:37:39 +02:00
|
|
|
.ifdef WITH_EXAMPLES
|
2005-03-19 11:28:48 +01:00
|
|
|
DISTFILES+= ${DIST_EXAMPLES}
|
2003-05-05 15:06:37 +02:00
|
|
|
.endif
|
2003-08-08 18:06:50 +02:00
|
|
|
DIST_SUBDIR= calculix
|
2005-03-19 11:28:48 +01:00
|
|
|
EXTRACT_ONLY= ${DIST_SOURCES}
|
|
|
|
.ifdef WITH_EXAMPLES
|
|
|
|
EXTRACT_ONLY+= ${DIST_EXAMPLES}
|
|
|
|
.endif
|
2003-05-05 15:06:37 +02:00
|
|
|
|
2003-06-30 21:37:39 +02:00
|
|
|
MAINTAINER= maho@FreeBSD.org
|
2014-06-09 13:21:52 +02:00
|
|
|
COMMENT= Three-Dimensional Structural Finite Element Program
|
2003-05-05 15:06:37 +02:00
|
|
|
|
2013-03-05 03:20:24 +01:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2013-12-11 15:53:20 +01:00
|
|
|
LIB_DEPENDS= libarpack.so:${PORTSDIR}/math/arpack \
|
|
|
|
libspooles.so:${PORTSDIR}/math/spooles \
|
|
|
|
libtaucs.so:${PORTSDIR}/math/taucs
|
2003-05-05 15:06:37 +02:00
|
|
|
|
2005-03-19 11:28:48 +01:00
|
|
|
DIST_SOURCES= ccx_${PORTVERSION}.src${EXTRACT_SUFX} \
|
|
|
|
cgx_${PORTVERSION}.all${EXTRACT_SUFX}
|
|
|
|
DIST_HTM= ccx_${PORTVERSION}.htm${EXTRACT_SUFX} \
|
|
|
|
cgx_${PORTVERSION}.htm${EXTRACT_SUFX}
|
2011-05-11 07:02:58 +02:00
|
|
|
DIST_PS= ccx_${PORTVERSION}.ps${EXTRACT_SUFX}
|
|
|
|
DIST_PDF= cgx_${PORTVERSION}.pdf
|
2005-03-19 11:28:48 +01:00
|
|
|
DIST_EXAMPLES= ccx_${PORTVERSION}.test${EXTRACT_SUFX} \
|
|
|
|
cgx_${PORTVERSION}.exa${EXTRACT_SUFX}
|
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
2014-03-04 01:18:31 +01:00
|
|
|
CCX_VER= ccx_${PORTVERSION}
|
|
|
|
CGX_VER= cgx_${PORTVERSION}
|
|
|
|
|
2014-06-25 00:11:41 +02:00
|
|
|
USES= fortran gmake tar:bzip2
|
2014-02-16 18:15:31 +01:00
|
|
|
USE_GCC= yes
|
2012-08-05 00:52:02 +02:00
|
|
|
USE_XORG= xmu
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
|
|
|
USE_GL= glut
|
2005-02-06 04:09:06 +01:00
|
|
|
|
2013-03-05 03:20:24 +01:00
|
|
|
BROWSER?= firefox
|
2003-08-08 18:06:50 +02:00
|
|
|
PSVIEWER?= gv
|
2003-05-05 15:06:37 +02:00
|
|
|
|
2014-03-04 01:18:31 +01:00
|
|
|
OPTIONS_DEFINE= METIS METIS_EDF
|
|
|
|
OPTIONS_DEFAULT=METIS
|
2013-08-16 03:45:13 +02:00
|
|
|
|
2013-08-27 06:22:46 +02:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2014-03-04 01:18:31 +01:00
|
|
|
.if $(PORT_OPTIONS:MDOCS)
|
|
|
|
DISTFILES+= ${DIST_HTM} ${DIST_PS} ${DIST_PDF}
|
|
|
|
EXTRACT_ONLY+= ${DIST_HTM} ccx_${PORTVERSION}.ps${EXTRACT_SUFX}
|
|
|
|
.endif
|
2013-08-27 06:22:46 +02:00
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MMETIS}
|
2013-12-11 15:53:20 +01:00
|
|
|
LIB_DEPENDS+= libmetis.so:${PORTSDIR}/math/metis4
|
2013-08-27 06:22:46 +02:00
|
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MMETIS_EDF}
|
2013-12-11 15:53:20 +01:00
|
|
|
LIB_DEPENDS+= libmetis.so:${PORTSDIR}/math/metis-edf
|
2013-08-27 06:22:46 +02:00
|
|
|
.endif
|
2005-11-20 00:36:03 +01:00
|
|
|
|
2011-11-22 12:14:10 +01:00
|
|
|
.if exists(${LOCALBASE}/lib/libatlas.so) && !defined(WITH_BLAS)
|
2007-02-27 03:54:26 +01:00
|
|
|
WITH_ATLAS= yes
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_ATLAS)
|
2014-03-04 01:18:31 +01:00
|
|
|
LIB_DEPENDS+= libatlas.so:${PORTSDIR}/math/atlas
|
|
|
|
BLAS_LIBS= -lf77blas
|
|
|
|
LAPACK_LIBS= -lalapack -lcblas
|
2007-02-27 03:54:26 +01:00
|
|
|
.else
|
2014-03-04 01:18:31 +01:00
|
|
|
LIB_DEPENDS+= libblas.so:${PORTSDIR}/math/blas
|
|
|
|
LIB_DEPENDS+= liblapack.so:${PORTSDIR}/math/lapack
|
|
|
|
BLAS_LIBS= -lblas
|
|
|
|
LAPACK_LIBS= -llapack
|
2007-02-27 03:54:26 +01:00
|
|
|
.endif
|
|
|
|
|
2007-01-09 08:39:39 +01:00
|
|
|
.if ${ARCH} == "sparc64"
|
2006-03-15 09:12:00 +01:00
|
|
|
CFLAGS+= -fPIC
|
2007-01-09 08:39:39 +01:00
|
|
|
FFLAGS+= -fPIC
|
|
|
|
.else
|
|
|
|
CFLAGS+= -fpic
|
|
|
|
FFLAGS+= -fpic
|
2006-03-15 09:12:00 +01:00
|
|
|
.endif
|
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
.if !defined(WITH_EXAMPLES)
|
2004-05-06 21:49:54 +02:00
|
|
|
PLIST_SUB= WITH_EXAMPLES="@comment "
|
2003-05-05 15:06:37 +02:00
|
|
|
.else
|
2004-05-06 21:49:54 +02:00
|
|
|
PLIST_SUB= WITH_EXAMPLES=""
|
2003-05-05 15:06:37 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.ifndef (WITH_EXAMPLES)
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO} "You can define WITH_EXAMPLES=yes to install example files"
|
|
|
|
.endif
|
|
|
|
|
2003-06-30 21:37:39 +02:00
|
|
|
pre-build:
|
|
|
|
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; s+%%CC%%+${CC}+g ; \
|
|
|
|
s+%%BLAS_LIBS%%+${BLAS_LIBS}+ ; \
|
2007-02-27 03:54:26 +01:00
|
|
|
s+%%LAPACK_LIBS%%+${LAPACK_LIBS}+ ; \
|
2003-08-08 18:06:50 +02:00
|
|
|
s+%%LOCALBASE%%+${LOCALBASE}+g;' \
|
2013-08-16 03:45:13 +02:00
|
|
|
${WRKSRC}/${CCX_VER}/src/Makefile
|
2010-06-06 01:09:26 +02:00
|
|
|
@${REINPLACE_CMD} -e 's/c++/${CXX}/g;' \
|
|
|
|
${WRKSRC}/libSNL/src/makefile
|
2003-08-08 18:06:50 +02:00
|
|
|
@${REINPLACE_CMD} -e 's+%%DOCSDIR%%+${DOCSDIR}+g; \
|
2013-03-18 02:19:49 +01:00
|
|
|
s+"firefox"+"${BROWSER}"+ ; \
|
|
|
|
s+"gv"+"${PSVIEWER}"+ ;' \
|
2013-08-16 03:45:13 +02:00
|
|
|
${WRKSRC}/${CGX_VER}/src/cgx.h
|
2003-06-30 21:37:39 +02:00
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
do-build:
|
2014-06-25 00:11:41 +02:00
|
|
|
@(cd ${WRKSRC}/${CCX_VER}/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
|
|
|
|
@(cd ${WRKSRC}/libSNL/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
|
|
|
|
@(cd ${WRKSRC}/${CGX_VER}/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} )
|
2003-06-30 21:37:39 +02:00
|
|
|
|
2003-05-05 15:06:37 +02:00
|
|
|
do-install:
|
2013-08-16 03:45:13 +02:00
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/${CCX_VER}/src/${CCX_VER} \
|
2014-03-04 01:18:31 +01:00
|
|
|
${STAGEDIR}${PREFIX}/bin/ccx
|
2013-08-16 03:45:13 +02:00
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/${CGX_VER}/src/cgx \
|
2014-03-04 01:18:31 +01:00
|
|
|
${STAGEDIR}${PREFIX}/bin/cgx
|
2014-01-03 16:53:42 +01:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2014-03-04 01:18:31 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}/ccx
|
|
|
|
@(cd ${WRKSRC}/${CCX_VER}/doc/ccx && ${COPYTREE_SHARE} . \
|
|
|
|
${STAGEDIR}${DOCSDIR}/ccx)
|
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}/cgx
|
|
|
|
@(cd ${WRKSRC}/${CGX_VER}/doc/cgx && ${COPYTREE_SHARE} . \
|
|
|
|
${STAGEDIR}${DOCSDIR}/cgx)
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${CCX_VER}/doc/${CCX_VER}.ps ${STAGEDIR}${DOCSDIR}
|
|
|
|
@${GZIP_CMD} ${STAGEDIR}${DOCSDIR}/${CCX_VER}.ps
|
2011-05-11 07:02:58 +02:00
|
|
|
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/cgx_${PORTVERSION}.pdf \
|
2014-03-04 01:18:31 +01:00
|
|
|
${STAGEDIR}${DOCSDIR}
|
2003-06-30 21:37:39 +02:00
|
|
|
.endif
|
2014-01-03 21:56:59 +01:00
|
|
|
.ifdef WITH_EXAMPLES
|
2014-03-04 01:18:31 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
@(cd ${WRKSRC}/${CGX_VER}/examples && ${COPYTREE_SHARE} . \
|
|
|
|
${STAGEDIR}${EXAMPLESDIR})
|
|
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/test
|
|
|
|
@(cd ${WRKSRC}/${CCX_VER}/test && ${COPYTREE_SHARE} . \
|
|
|
|
${STAGEDIR}${EXAMPLESDIR}/test)
|
2003-05-05 15:06:37 +02:00
|
|
|
.endif
|
|
|
|
|
2014-02-16 18:15:31 +01:00
|
|
|
.include <bsd.port.mk>
|