2012-11-03 23:25:19 +01:00
# Created by: Pedro Giffuni <giffunip@asme.org>
2003-07-23 16:21:51 +02:00
# $FreeBSD$
PORTNAME = gmsh
2015-04-20 22:45:00 +02:00
PORTVERSION = 2.9.3
2003-07-23 16:21:51 +02:00
CATEGORIES = cad
2010-01-13 13:47:20 +01:00
MASTER_SITES = http://www.geuz.org/gmsh/src/ \
http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/
2003-07-23 16:21:51 +02:00
DISTNAME = ${ PORTNAME } -${ PORTVERSION } -source
2010-01-13 13:47:20 +01:00
DISTFILES = ${ DISTNAME } ${ EXTRACT_SUFX }
DIST_SUBDIR = gmsh
EXTRACT_ONLY = ${ DISTNAME } ${ EXTRACT_SUFX }
2003-07-23 16:21:51 +02:00
2011-06-14 09:38:51 +02:00
MAINTAINER = stephen@FreeBSD.org
2014-06-09 13:21:52 +02:00
COMMENT = Automatic 3D finite element mesh generator
2003-07-23 16:21:51 +02:00
2013-12-11 15:53:20 +01:00
LIB_DEPENDS = libfltk.so:${ PORTSDIR } /x11-toolkits/fltk \
2014-12-25 20:04:25 +01:00
libpng.so:${ PORTSDIR } /graphics/png \
2013-12-11 15:53:20 +01:00
liblapack.so:${ PORTSDIR } /math/lapack
2015-03-13 22:52:58 +01:00
RUN_DEPENDS = getdp:${ PORTSDIR } /science/getdp
2003-07-23 16:21:51 +02:00
2016-01-18 02:21:38 +01:00
BROKEN_powerpc64 = Does not build on powerpc64
2011-07-25 21:04:03 +02:00
WRKSRC = ${ WRKDIR } /${ PORTNAME } -${ PORTVERSION } -source
2008-12-31 13:47:22 +01:00
SLAVEDIRS = cad/gmsh-occ
2015-06-22 20:33:20 +02:00
USES = cmake fortran gmake jpeg tar:tgz
2010-01-13 13:47:20 +01:00
USE_GL = yes
ALL_TARGET = all
2013-09-15 23:41:35 +02:00
MAKE_JOBS_UNSAFE = yes
2013-03-22 21:06:14 +01:00
CMAKE_ARGS += -DCMAKE_SKIP_RPATH:BOOL= YES
2003-07-23 16:21:51 +02:00
2016-01-18 02:21:38 +01:00
OPTIONS_DEFINE = STATIC_LIB SHARED_LIB TETGEN METIS TAUCS MED CGNS GMM OCC
OPTIONS_DEFAULT = DOCS STATIC_LIB SHARED_LIB TETGEN METIS MED CGNS GMM
STATIC_LIB_DESC = Build static library
SHARED_LIB_DESC = Build shared library
TETGEN_LIB_DESC = Enable tetgen as an alternative 3D mesh generator
METIS_LIB_DESC = Enable metis as an alternative 3D mesh generator
TAUCS_LIB_DESC = Enable the Taucs linear algebra solver
MED_LIB_DESC = Enable MED support
CGNS_LIB_DESC = Enable CGNS support
GMM_LIB_DESC = Enable gmm++ support
OCC_LIB_DESC = Enable STEP, IGES and BREP support
OPTIONS_SUB = yes
STATIC_LIB_CMAKE_ON = -DENABLE_BUILD_LIB= ON
STATIC_LIB_ALL_TARGET = lib
SHARED_LIB_CMAKE_ON = -DENABLE_BUILD_SHARED= ON
SHARED_LIB_ALL_TARGET = shared
SHARED_LIB_VARS = use_ldconfig = yes
PLIST_SUB += SHARED_LIB = "" VER = ${ PORTVERSION } VE = ${ PORTVERSION : R }
DOCS_CMAKE_OFF = -DINSTALL_DOCS= OFF
TETGEN_CMAKE_ON = -DENABLE_TETGEN= ON
TETGEN_CMAKE_OFF = -DENABLE_TETGEN= OFF
TETGEN_VARS = "no_cdrom=Contact appropriate authors for commercial purposes if including Tetgen or Metis"
METIS_CMAKE_ON = -DENABLE_METIS= ON
METIS_CMAKE_OFF = -DENABLE_METIS= OFF
METIS_VARS = "no_cdrom=Contact appropriate authors for commercial purposes if including Tetgen or Metis"
METIS_VARS = distfiles += manual.pdf
TAUCS_LIB_DEPENDS = libtaucs.so:${ PORTSDIR } /math/taucs
TAUCS_CMAKE_ON = -DENABLE_TAUCS= ON
TAUCS_CMAKE_OFF = -DENABLE_TAUCS= OFF
MED_LIB_DEPENDS = libmed.so:${ PORTSDIR } /french/med
MED_CMAKE_ON = -DENABLE_MED= ON
MED_CMAKE_OFF = -DENABLE_MED= OFF
CGNS_LIB_DEPENDS = libcgns.so:${ PORTSDIR } /science/cgnslib
CGNS_CMAKE_ON = -DENABLE_CGNS= ON
CGNS_CMAKE_OFF = -DENABLE_CGNS= OFF
GMM_CMAKE_OFF = -DENABLE_GMM= OFF
OCC_LIB_DEPENDS = libTKernel.so:${ PORTSDIR } /cad/opencascade
OCC_CMAKE_ON = -DENABLE_OCC= ON -DOCC_INC= ${ LOCALBASE } /include/OpenCASCADE
OCC_CFLAGS = -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DFREEBSD
OCC_CONFLICTS = gmsh-2.*
OCC_CMAKE_OFF = -DENABLE_OCC= OFF
OCC_CONFLICTS_OFF = gmsh-occ-2.*
. i n c l u d e < b s d . p o r t . o p t i o n s . m k >
2007-04-01 11:04:46 +02:00
2010-01-13 13:47:20 +01:00
# Even though the taucs port pulls in the metis port, we will still need
2016-01-18 02:21:38 +01:00
# METIS set when TAUCS is set, otherwise the linker does not find the
# libraries installed by the metis port.
.if ${PORT_OPTIONS : MTAUCS } && !${PORT_OPTIONS :MMETIS }
IGNORE = METIS must be set if TAUCS is set
2010-01-13 13:47:20 +01:00
. e n d i f
2016-01-18 02:21:38 +01:00
.if !${PORT_OPTIONS : MMETIS } && ${PORT_OPTIONS :MDOCS }
2011-07-25 21:04:03 +02:00
IGNORE = the license for Metis requires that its documentation is included
2010-01-13 13:47:20 +01:00
. e n d i f
2003-07-23 16:21:51 +02:00
2008-07-25 17:31:16 +02:00
2012-07-07 17:15:38 +02:00
# TODO
# Dependencies against PythonLibs, swig and petsc are found and registered if installed
# => add knobs to handle them.
2010-01-13 13:47:20 +01:00
PKGMESSAGE = ${ WRKDIR } /pkg-message
2004-12-23 13:23:05 +01:00
2009-02-04 15:07:54 +01:00
. i n c l u d e < b s d . p o r t . p r e . m k >
2004-08-23 20:49:45 +02:00
post-extract :
2010-01-13 13:47:20 +01:00
${ CP } ${ DISTDIR } /${ DIST_SUBDIR } /manual.pdf ${ WRKDIR }
2007-07-24 00:00:52 +02:00
${ TOUCH } ${ PKGMESSAGE }
2016-01-18 02:21:38 +01:00
.if ${PORT_OPTIONS : MTETGEN }
2007-07-24 00:00:52 +02:00
@${ ECHO } >> ${ PKGMESSAGE }
@${ ECHO } "The FreeBSD project has been granted redistribution rights" >> ${ PKGMESSAGE }
@${ ECHO } "but anyone attempting to redistribute Gmsh with Tetgen" >> ${ PKGMESSAGE }
@${ ECHO } "for strict commercial purposes must still contact the author" >> ${ PKGMESSAGE }
@${ ECHO } "(Hang Si) and license the code." >> ${ PKGMESSAGE }
2006-01-17 21:36:45 +01:00
. e n d i f
2016-01-18 02:21:38 +01:00
.if ${PORT_OPTIONS : MMETIS }
2010-01-13 13:47:20 +01:00
@${ ECHO } >> ${ PKGMESSAGE }
@${ ECHO } "The FreeBSD project has been granted redistribution rights" >> ${ PKGMESSAGE }
@${ ECHO } "but anyone attempting to redistribute Gmsh with Metis" >> ${ PKGMESSAGE }
@${ ECHO } "must still contact the author" >> ${ PKGMESSAGE }
@${ ECHO } "http://glaros.dtc.umn.edu/gkhome/metis/metis/faq?q=metis/metis/faq#distribute" >> ${ PKGMESSAGE }
@${ ECHO } "\"A Fast and Highly Quality Multilevel Scheme for Partitioning Irregular Graphs\". George Karypis and Vipin Kumar. SIAM Journal on Scientific Computing, Vol. 20, No. 1, pp. 359-392, 1999." >> ${ PKGMESSAGE }
. e n d i f
2016-01-18 02:21:38 +01:00
.if ${PORT_OPTIONS : MTAUCS }
2010-01-13 13:47:20 +01:00
@${ ECHO } >> ${ PKGMESSAGE }
@${ ECHO } "There might be licensing issues with using Taucs with Gmsh" >> ${ PKGMESSAGE }
@${ ECHO } "because Taucs requires Metis." >> ${ PKGMESSAGE }
2003-07-23 16:21:51 +02:00
. e n d i f
2014-11-22 18:46:21 +01:00
pre-configure :
2011-07-25 21:04:03 +02:00
${ REINPLACE_CMD } -e s+share/doc/gmsh+${ DOCSDIR_REL } + \
-e s+share/man/man1+man/man1+ ${ WRKSRC } /CMakeLists.txt
2007-07-24 00:00:52 +02:00
post-install :
2016-01-18 02:21:38 +01:00
.if ${PORT_OPTIONS : MMETIS }
2014-01-26 23:25:15 +01:00
${ MKDIR } ${ STAGEDIR } ${ DOCSDIR } /metis
${ INSTALL_DATA } ${ WRKDIR } /manual.pdf ${ STAGEDIR } ${ DOCSDIR } /metis
2010-01-13 13:47:20 +01:00
. e n d i f
2009-02-04 15:07:54 +01:00
. i n c l u d e < b s d . p o r t . p o s t . m k >