2003-07-23 16:21:51 +02:00
# New ports collection makefile for: gmsh
# Date created: 19 April 2003
2003-08-22 07:24:42 +02:00
# Whom: Pedro Giffuni <giffunip@asme.org>
2003-07-23 16:21:51 +02:00
#
# $FreeBSD$
#
PORTNAME = gmsh
2010-01-13 13:47:20 +01:00
PORTVERSION = 2.4.2
2010-03-28 08:47:48 +02:00
PORTREVISION = 5
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
EXTRACT_SUFX = .tgz
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
2009-04-05 22:50:49 +02:00
MAINTAINER = stephen@missouri.edu
2003-07-23 16:21:51 +02:00
COMMENT = An automatic 3D finite element mesh generator
2009-07-18 13:11:29 +02:00
LIB_DEPENDS = fltk.1:${ PORTSDIR } /x11-toolkits/fltk \
2010-02-05 12:46:55 +01:00
jpeg.11:${ PORTSDIR } /graphics/jpeg \
2010-01-13 13:47:20 +01:00
lapack.4:${ PORTSDIR } /math/lapack
2003-07-23 16:21:51 +02:00
2008-12-31 13:47:22 +01:00
SLAVEDIRS = cad/gmsh-occ
2008-07-25 17:31:16 +02:00
USE_FORTRAN = yes
2010-01-13 13:47:20 +01:00
USE_CMAKE = yes
2008-02-24 21:50:35 +01:00
USE_GMAKE = yes
2010-01-13 13:47:20 +01:00
USE_GL = yes
ALL_TARGET = all
MAN1 = gmsh.1
2010-03-23 22:14:39 +01:00
CMAKE_ARGS += -DCMAKE_SKIP_RPATH:BOOL= YES \
-DCMAKE_VERBOSE_MAKEFILE:BOOL= YES \
-DCMAKE_USE_PTHREADS:BOOL= YES
2003-07-23 16:21:51 +02:00
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ S T A T I C _ L I B )
ALL_TARGET += lib
PLIST_SUB += STATIC_LIB = ""
. e l s e
PLIST_SUB += STATIC_LIB = "@comment "
2007-04-01 11:04:46 +02:00
. e n d i f
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ S H A R E D _ L I B )
ALL_TARGET += shared
PLIST_SUB += SHARED_LIB = ""
USE_LDCONFIG = yes
2007-04-01 11:04:46 +02:00
. e l s e
2010-01-13 13:47:20 +01:00
PLIST_SUB += SHARED_LIB = "@comment "
. e n d i f
. i f d e f i n e d ( N O P O R T D O C S )
CMAKE_ARGS += -DINSTALL_DOCS= OFF
2007-04-01 11:04:46 +02:00
. e n d i f
2010-01-13 13:47:20 +01:00
. i f d e f i n e d ( W I T H O U T _ T E T G E N )
CMAKE_ARGS += -DENABLE_TETGEN= OFF
2007-04-01 11:04:46 +02:00
. e l s e
2010-01-13 13:47:20 +01:00
CMAKE_ARGS += -DENABLE_TETGEN= ON
2007-04-01 11:04:46 +02:00
. e n d i f
2010-01-13 13:47:20 +01:00
# Even though the taucs port pulls in the metis port, we will still need
2010-02-13 09:26:46 +01:00
# WITHOUT_METIS not set when WITH_TAUCS is set, otherwise the linker
2010-01-13 13:47:20 +01:00
# does not find the libraries installed by the metis port.
2010-02-13 09:26:46 +01:00
. i f d e f i n e d ( W I T H _ T A U C S ) & & d e f i n e d ( W I T H O U T _ M E T I S )
IGNORE = requires that WITHOUT_METIS is not set if WITH_TAUCS is set
2010-01-13 13:47:20 +01:00
. e n d i f
. i f ! d e f i n e d ( W I T H O U T _ M E T I S )
CMAKE_ARGS += -DENABLE_METIS= ON
. i f d e f i n e d ( N O P O R T D O C S )
IGNORE = The license for Metis requires that its documentation is included
. e n d i f
DISTFILES += manual.pdf
PLIST_SUB += METIS = ""
2007-04-01 11:04:46 +02:00
. e l s e
2010-01-13 13:47:20 +01:00
CMAKE_ARGS += -DENABLE_METIS= OFF
PLIST_SUB += METIS = "@comment "
2007-04-01 11:04:46 +02:00
. e n d i f
2010-02-13 09:26:46 +01:00
. i f d e f i n e d ( W I T H _ T A U C S )
2010-01-13 13:47:20 +01:00
LIB_DEPENDS += taucs.1:${ PORTSDIR } /math/taucs
CMAKE_ARGS += -DENABLE_TAUCS= ON
. e l s e
CMAKE_ARGS += -DENABLE_TAUCS= OFF
2009-02-04 15:07:54 +01:00
. e n d i f
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ M E D )
LIB_DEPENDS += med.2:${ PORTSDIR } /french/med
CMAKE_ARGS += -DENABLE_MED= ON
2008-07-25 17:31:16 +02:00
. e l s e
2010-01-13 13:47:20 +01:00
CMAKE_ARGS += -DENABLE_MED= OFF
2008-07-25 17:31:16 +02:00
. e n d i f
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ C G N S )
LIB_DEPENDS += cgns.0:${ PORTSDIR } /science/cgnslib
CMAKE_ARGS += -DENABLE_CGNS= ON
2007-04-01 11:04:46 +02:00
. e l s e
2010-01-13 13:47:20 +01:00
CMAKE_ARGS += -DENABLE_CGNS= OFF
2007-04-01 11:04:46 +02:00
. e n d i f
2010-01-13 13:47:20 +01:00
. i f d e f i n e d ( W I T H O U T _ G M M )
CMAKE_ARGS += -DENABLE_GMM= OFF
. e n d i f
2003-07-23 16:21:51 +02:00
2010-01-13 13:47:20 +01:00
. i f d e f i n e d ( W I T H _ O C C )
LIB_DEPENDS += TKernel.0:${ PORTSDIR } /cad/opencascade
CMAKE_ARGS += -DENABLE_OCC= ON
CONFLICTS = gmsh-2.*
. e l s e
CMAKE_ARGS += -DENABLE_OCC= OFF
CONFLICTS = gmsh-occ-2.*
. e n d i f
2008-07-25 17:31:16 +02:00
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 >
2010-01-13 13:47:20 +01:00
CMAKE_USE_PTHREAD = yes
2009-02-04 15:07:54 +01:00
2007-04-01 11:04:46 +02:00
pre-everything ::
@${ ECHO_MSG } ""
. i f ! d e f i n e d ( W I T H O U T _ T E T G E N )
@${ ECHO_MSG } "Define WITHOUT_TETGEN to disable Tetgen as an alternative"
@${ ECHO_MSG } "3D mesh generator."
@${ ECHO_MSG } ""
. e n d i f
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ M E T I S )
@${ ECHO_MSG } "Define WITHOUT_METIS to disable Metis as an alternative"
@${ ECHO_MSG } "3D mesh generator."
@${ ECHO_MSG } ""
. e n d i f
2010-02-13 09:26:46 +01:00
. i f ! d e f i n e d ( W I T H _ T A U C S )
@${ ECHO_MSG } "Define WITH_TAUCS to enable the Taucs linear algebra solver."
2007-04-01 11:04:46 +02:00
@${ ECHO_MSG } ""
. e n d i f
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ M E D )
@${ ECHO_MSG } "Define WITHOUT_MED to disable MED support."
2007-04-01 11:04:46 +02:00
@${ ECHO_MSG } ""
. e n d i f
. i f ! d e f i n e d ( W I T H O U T _ C G N S )
@${ ECHO_MSG } "Define WITHOUT_CGNS to disable CGNS support."
@${ ECHO_MSG } ""
. e n d i f
2009-02-04 15:07:54 +01:00
. i f ! d e f i n e d ( W I T H O U T _ G M M )
@${ ECHO_MSG } "Define WITHOUT_GMM to disable gmm++ support."
@${ ECHO_MSG } ""
. e n d i f
2008-02-23 12:12:53 +01:00
. i f ! d e f i n e d ( W I T H _ O C C )
@${ ECHO_MSG } "Define WITH_OCC to enable STEP, IGES and BREP support"
2007-04-01 11:04:46 +02:00
@${ ECHO_MSG } "(through OpenCascade)."
@${ ECHO_MSG } ""
2004-12-23 13:23:05 +01:00
. e n d i f
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ S T A T I C _ L I B )
@${ ECHO_MSG } "Define WITHOUT_STATIC_LIB to avoid building and installing the static library."
@${ ECHO_MSG } "(You would want to do this to reduce build time.)"
@${ ECHO_MSG } ""
. e n d i f
. i f ! d e f i n e d ( W I T H O U T _ S H A R E D _ L I B )
@${ ECHO_MSG } "Define WITHOUT_SHARED_LIB to avoid building and installing the shared library."
@${ ECHO_MSG } "(You would want to do this to reduce build time.)"
@${ ECHO_MSG } ""
. e n d i f
2004-12-23 13:23:05 +01:00
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 }
2006-01-17 21:36:45 +01:00
. i f ! d e f i n e d ( W I T H O U T _ T E T G E N )
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
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ M E T I S )
@${ 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
2010-02-13 09:26:46 +01:00
. i f d e f i n e d ( W I T H _ T A U C S )
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
2007-07-24 00:00:52 +02:00
post-install :
2010-01-13 13:47:20 +01:00
. i f ! d e f i n e d ( W I T H O U T _ S H A R E D _ L I B )
${ MV } -f ${ PREFIX } /lib/libGmsh.so ${ PREFIX } /lib/libGmsh.so.0
${ LN } -s ${ PREFIX } /lib/libGmsh.so.0 ${ PREFIX } /lib/libGmsh.so
. e n d i f
. i f ! d e f i n e d ( W I T H O U T _ M E T I S )
${ MKDIR } ${ DOCSDIR } /metis
${ INSTALL_DATA } ${ WRKDIR } /manual.pdf ${ DOCSDIR } /metis
. e n d i f
2008-10-26 21:07:43 +01:00
@${ ECHO_MSG }
2007-07-24 00:00:52 +02:00
@${ CAT } ${ PKGMESSAGE }
2008-10-26 21:07:43 +01:00
@${ ECHO_MSG }
2007-07-24 00:00:52 +02:00
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 >