1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

science/cgnslib: Update to 3.3.1 and modernize

- Obtain sources from GitHub
- Use option helpers
- Remove SZIP option, since HDF5 always wants to link to it

Approved by:	thierry (maintainer)
Differential Revision:	https://reviews.freebsd.org/D17432
This commit is contained in:
Joseph Mingrone 2018-10-18 00:27:01 +00:00
parent 960f11ca2e
commit 6a752510b9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=482316
10 changed files with 58 additions and 86 deletions

View File

@ -2,12 +2,10 @@
# $FreeBSD$
PORTNAME= cgnslib
DISTVERSION= 3.2.1
PORTREVISION= 13
DISTVERSIONPREFIX= v
DISTVERSION= 3.3.1
PORTEPOCH= 1
CATEGORIES= science
MASTER_SITES= SF/cgns/${PORTNAME}_${PORTVERSION:R}/
DISTNAME= ${PORTNAME}_${DISTVERSION}
MAINTAINER= thierry@FreeBSD.org
COMMENT= CFD General Notation System library code
@ -18,57 +16,40 @@ LICENSE_FILE= ${WRKSRC}/license.txt
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
USES= cmake
USE_GITHUB= yes
GH_ACCOUNT= CGNS
GH_PROJECT= CGNS
USE_LDCONFIG= yes
OPTIONS_DEFINE= HDF5 SZIP TESTS TOOLS
HDF5_DESC= Enable HDF5 interface
TESTS_DESC= Enable test programs
TOOLS_DESC= Build the CGNSTools package
SZIP_DESC= SZIP support in HDF5
OPTIONS_DEFINE= HDF5 TESTS TOOLS
OPTIONS_DEFAULT= HDF5 TESTS TOOLS
OPTIONS_SUB= yes
OPTIONS_DEFAULT=HDF5 TESTS TOOLS
HDF5_DESC= Enable HDF5 interface
TESTS_DESC= Enable test programs
TOOLS_DESC= Build the CGNSTools package
SZIP_DESC= SZIP support in HDF5
.include <bsd.port.options.mk>
HDF5_LIB_DEPENDS= libhdf5.so:science/hdf5 libsz.so:science/szip
HDF5_CMAKE_BOOL= CGNS_ENABLE_HDF5
HDF5_CMAKE_ON= -DHDF5_INCLUDE_PATH:PATH="${LOCALBASE}/include"
.if ${PORT_OPTIONS:MHDF5}
LIB_DEPENDS+= libhdf5.so:science/hdf5
CMAKE_ARGS+= -DCGNS_ENABLE_HDF5:BOOL=TRUE -DHDF5_NEED_ZLIB:BOOL=TRUE \
-DHDF5_INCLUDE_PATH:PATH="${LOCALBASE}/include"
PLIST_SUB+= HDF5=""
. if ${PORT_OPTIONS:MSZIP}
CMAKE_ARGS+= -DHDF5_NEED_SZIP:BOOL=OFF
. endif
.else
CMAKE_ARGS+= -DCGNS_ENABLE_HDF5:BOOL=OFF
PLIST_SUB+= HDF5="@comment "
.endif
TESTS_USES= fortran
TESTS_CMAKE_BOOL= ENABLE_TESTS CGNS_ENABLE_FORTRAN
.if ${PORT_OPTIONS:MTESTS}
USES+= fortran
CMAKE_ARGS+= -DCGNS_ENABLE_TESTS:BOOL=TRUE -DCGNS_ENABLE_FORTRAN:BOOL=TRUE
TESTSBIN= cgwrite cgread test_partial
.endif
.if ${PORT_OPTIONS:MTOOLS}
USES+= tk
USE_GL= gl glu
USE_XORG= x11 xmu
CMAKE_ARGS+= -DCGNS_BUILD_CGNSTOOLS:BOOL=TRUE \
-DTCL_INCLUDE_PATH:STRING="${TCL_INCLUDEDIR}" \
-DTK_INCLUDE_PATH:STRING="${TK_INCLUDEDIR}"
PLIST_SUB+= TOOLS=""
.else
PLIST_SUB+= TOOLS="@comment "
.endif
LIBVER= ${PORTVERSION:R}
TOOLS_USES= gl localbase tk
TOOLS_USE= GL=gl,glu XORG=x11,xmu
TOOLS_CMAKE_BOOL= CGNS_BUILD_CGNSTOOLS
TOOLS_CMAKE_ON= -DTCL_INCLUDE_PATH:STRING="${TCL_INCLUDEDIR}" \
-DTK_INCLUDE_PATH:STRING="${TK_INCLUDEDIR}"
do-test-TESTS-on:
.for pg in ${TESTSBIN}
.for pg in cgwrite cgread test_partial
@(cd ${BUILD_WRKSRC}/src/tests; ./${pg})
.endfor
post-install:
${LN} -sf libcgns.so.${LIBVER} ${STAGEDIR}${PREFIX}/lib/libcgns.so.${LIBVER:R}
${RLN} ${STAGEDIR}${PREFIX}/lib/libcgns.so.${DISTVERSION:R} \
${STAGEDIR}${PREFIX}/lib/libcgns.so.${DISTVERSION:R:R}
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (cgnslib_3.2.1.tar.gz) = 34306316f04dbf6484343a4bc611b3bf912ac7dbc3c13b581defdaebbf6c1fc3
SIZE (cgnslib_3.2.1.tar.gz) = 865223
TIMESTAMP = 1538602109
SHA256 (CGNS-CGNS-v3.3.1_GH0.tar.gz) = 81093693b2e21a99c5640b82b267a495625b663d7b8125d5f1e9e7aaa1f8d469
SIZE (CGNS-CGNS-v3.3.1_GH0.tar.gz) = 3340675

View File

@ -1,5 +1,5 @@
--- src/cgnstools/cgnscalc/calcwish.c.orig 2011-02-12 23:52:41.000000000 +0100
+++ src/cgnstools/cgnscalc/calcwish.c 2012-03-13 22:15:02.000000000 +0100
--- src/cgnstools/cgnscalc/calcwish.c.orig 2017-07-17 21:51:06 UTC
+++ src/cgnstools/cgnscalc/calcwish.c
@@ -20,8 +20,10 @@
* Sun shared libraries to be used for Tcl.
*/

View File

@ -1,5 +1,5 @@
--- ./src/cgnstools/cgnsplot/plotwish.c.orig 2011-02-12 23:50:31.000000000 +0100
+++ ./src/cgnstools/cgnsplot/plotwish.c 2012-03-13 22:19:20.000000000 +0100
--- src/cgnstools/cgnsplot/plotwish.c.orig 2017-07-17 21:51:06 UTC
+++ src/cgnstools/cgnsplot/plotwish.c
@@ -20,8 +20,10 @@
* Sun shared libraries to be used for Tcl.
*/

View File

@ -1,5 +1,5 @@
--- ./src/cgnstools/cgnsview/cgiowish.c.orig 2011-02-12 23:47:39.000000000 +0100
+++ ./src/cgnstools/cgnsview/cgiowish.c 2012-03-13 22:04:59.000000000 +0100
--- src/cgnstools/cgnsview/cgiowish.c.orig 2017-07-17 21:51:06 UTC
+++ src/cgnstools/cgnsview/cgiowish.c
@@ -20,8 +20,10 @@
* Sun shared libraries to be used for Tcl.
*/

View File

@ -1,5 +1,5 @@
--- ./src/cgnstools/utilities/binaryio.h.orig 2011-02-12 23:52:26.000000000 +0100
+++ ./src/cgnstools/utilities/binaryio.h 2012-03-13 22:38:55.000000000 +0100
--- src/cgnstools/utilities/binaryio.h.orig 2017-07-17 21:51:06 UTC
+++ src/cgnstools/utilities/binaryio.h
@@ -98,7 +98,7 @@
# define MACH_LOCAL MACH_WIN32
#endif

View File

@ -1,11 +0,0 @@
--- src/cgnstools/utilities/p3dfout.c.orig 2011-02-12 23:52:26.000000000 +0100
+++ src/cgnstools/utilities/p3dfout.c 2012-03-13 22:40:39.000000000 +0100
@@ -20,7 +20,7 @@
MACH_LOCAL == MACH_UNKNOWN
fprintf (stderr,
"Fortran unformatted output not supported for %s machine\n",
- bf_machname (MACH_LOCAL);
+ bf_machname (MACH_LOCAL));
exit (1);
#else
buff = (char *) malloc (length + 1);

View File

@ -1,6 +1,6 @@
--- ./src/make.defs.in.orig 2011-03-12 00:38:33.000000000 +0100
+++ ./src/make.defs.in 2012-03-13 21:31:59.000000000 +0100
@@ -16,7 +16,7 @@
--- src/make.defs.in.orig 2017-07-17 21:51:06 UTC
+++ src/make.defs.in
@@ -16,7 +16,7 @@ CFLAGS = @CFLAGS@ @SYSCFLAGS@
COOUT = @COOUT@
CEOUT = @CEOUT@
LDFLAGS = @LDFLAGS@
@ -9,7 +9,7 @@
#------------------------------------------------------------------------
# SPACE - used to force a space in the compiler executable output flag
@@ -64,7 +64,7 @@
@@ -68,7 +68,7 @@ BUILDFORTRAN = @BUILDFORTRAN@
F77 = @F77@
FFLAGS = @FFLAGS@ @SYSFFLAGS@
FEOUT = @FEOUT@

View File

@ -2,4 +2,4 @@ The CFD General Notation System (CGNS) provides a standard for recording and
recovering computer data associated with the numerical solution of the equations
of fluid dynamics.
WWW: http://www.cgns.org/
WWW: http://cgns.github.io/

View File

@ -1,14 +1,9 @@
bin/adf2hdf
bin/cgconfig
bin/cgnscalc
bin/cgnscheck
bin/cgnscompress
bin/cgnsconvert
bin/cgnsdiff
bin/cgnslist
bin/cgnsnames
bin/cgnsnodes
bin/cgnsplot
%%HDF5%%bin/adf2hdf
%%HDF5%%bin/hdf2adf
%%TOOLS%%bin/cgconfig
%%TOOLS%%bin/cgnscalc
%%TOOLS%%bin/cgnsnodes
%%TOOLS%%bin/cgnsplot
%%TOOLS%%bin/cgnstools/aflr3_to_cgns
%%TOOLS%%bin/cgnstools/calcwish
%%TOOLS%%bin/cgnstools/cgiowish
@ -29,22 +24,28 @@ bin/cgnsplot
%%TOOLS%%bin/cgnstools/tecplot_to_cgns
%%TOOLS%%bin/cgnstools/tetgen_to_cgns
%%TOOLS%%bin/cgnstools/vgrid_to_cgns
%%TOOLS%%bin/cgnsview
%%TOOLS%%bin/unitconv
bin/cgnscheck
bin/cgnscompress
bin/cgnsconvert
bin/cgnsdiff
bin/cgnslist
bin/cgnsnames
bin/cgnsupdate
bin/cgnsview
bin/hdf2adf
bin/unitconv
%%TESTS%%include/cgns.mod
include/cgnsBuild.defs
include/cgns_io.h
include/cgnsconfig.h
include/cgnslib.h
include/cgnslib_f.h
include/cgnstypes.h
include/cgnstypes_f.h
include/cgnstypes_f03.h
include/cgnswin_f.h
lib/libcgns.a
lib/libcgns.so
lib/libcgns.so.3
lib/libcgns.so.3.2
lib/libcgns.so.3.3
%%TOOLS%%share/cgnstools/aflr3.tcl
%%TOOLS%%share/cgnstools/balloon.tcl
%%TOOLS%%share/cgnstools/cgns-icon.xbm