1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

french/aster: switch to HDF5-1.10

Note: this port should be upgraded to a newer release, WIP.

PR:		265152
This commit is contained in:
Thierry Thomas 2022-09-16 13:01:42 +02:00
parent aa43592e85
commit 35fb1d0012
6 changed files with 67 additions and 12 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= aster
DISTVERSION= ${ASTER_DISTVERSION}
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= french cad
MAINTAINER= thierry@FreeBSD.org
@ -34,7 +34,7 @@ BUILD_DEPENDS+= astk-serveur>0:cad/astk-serveur \
${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}sympy>0:math/py-sympy@${PY_FLAVOR}
# pylupdate5:textproc/py-qt5-xml
LIB_DEPENDS+= libhdf5.so:science/hdf5 \
LIB_DEPENDS+= libhdf5-110.so:science/hdf5-110 \
libscotch.so:cad/scotch \
libmetis.so:math/metis \
libmed.so:french/med \
@ -52,6 +52,7 @@ USE_QT= linguisttools:build
#CONFLICTS_BUILD=${PYTHON_PKGNAMEPREFIX}cysignals-1.*
HAS_CONFIGURE= yes
CFLAGS+= -I${LOCALBASE}/include/hdf5-110
MAKE_ENV= INCLUDES="${LOCALBASE}/include" \
INCLUDEDIR="${LOCALBASE}/include" \
LD_PRELOAD="${LOCALBASE}/lib/gcc${_GCC_VER}/libgcc_s.so.1" \
@ -255,7 +256,7 @@ pre-configure:
${ECHO_CMD} "HOME_GMSH = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg
${ECHO_CMD} "HOME_GIBI = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg
${ECHO_CMD} "HOME_HOMARD = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg
${ECHO_CMD} "INCLUDEDIR = ['${LOCALBASE}/include', '${LOCALBASE}/include/metis', ]"\
${ECHO_CMD} "INCLUDEDIR = ['${LOCALBASE}/include/hdf5-110', '${LOCALBASE}/include', '${LOCALBASE}/include/metis', ]"\
>> ${WRKSRC}/setup.cfg
${ECHO_CMD} "HOME_MUMPS = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg
${ECHO_CMD} "HOME_MFRONT = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg

View File

@ -1,6 +1,6 @@
--- as_setup.py.orig 2020-10-26 15:54:27 UTC
+++ as_setup.py
@@ -45,6 +45,8 @@ import tarfile
@@ -45,6 +45,8 @@ import pprint
import compileall
import imp
import pprint
@ -17,7 +17,7 @@
self._print(self._fmt_title % _('Extraction'))
if kargs.get('external')!=None:
self._call_external(**kargs)
@@ -518,6 +521,88 @@ class SETUP:
@@ -518,6 +521,96 @@ class SETUP:
os.chdir(prev)
if iextr_as:
self.Clean(to_delete=path)
@ -31,6 +31,14 @@
+ if nl > 0:
+ ligne =ligne.replace("self.check_cc", "# self.check_cc")
+ sys.stdout.write(ligne)
+ file2patch = os.path.join(self.workdir, self.content, 'waftools/med.py')
+ self._print('FreeBSD patch: use hdf5-110 ' + file2patch)
+ for ligne in fileinput.input(file2patch, inplace=1):
+ nl = 0
+ nl = ligne.find("self.env.INCLUDEDIR, 'hdf5'")
+ if nl > 0:
+ ligne =ligne.replace("'hdf5'", "'hdf5-110'")
+ sys.stdout.write(ligne)
+ # file2patch = os.path.join(self.workdir, self.content, 'bibcxx/wscript')
+ # self._print('FreeBSD patch: explicit link with libc++ required since Gcc 4.9 => modify ' + file2patch)
+ # for ligne in fileinput.input(file2patch, inplace=1):

View File

@ -1,6 +1,26 @@
--- products.py.orig 2020-10-26 15:54:27 UTC
+++ products.py
@@ -658,7 +658,8 @@ def setup_mumps(dep, summary, **kargs):
@@ -136,8 +136,8 @@ def setup_hdf5(dep, summary, **kargs):
actions=(
('IsInstalled', { 'filename' :
- [osp.join('__setup.installdir__', 'lib', 'libhdf5.a'),
- osp.join('__setup.installdir__', 'include', 'hdf5.h')]
+ [osp.join('__setup.installdir__', 'lib', 'libhdf5-110.a'),
+ osp.join('__setup.installdir__', 'include/hdf5-110', 'hdf5.h')]
} ),
('Extract' , {}),
# gcc>=4.9 not supported by configure, should not use -ansi
@@ -651,14 +651,15 @@ def setup_mumps(dep, summary, **kargs):
('Configure', {
'command' : '%(PYTHON_ALIAS)s ; CC=%(CC)s FC=%(F90)s '
'LIBPATH="%(HOME_SCOTCH)s/lib %(HOME_METIS)s/lib" '
- 'INCLUDES="%(HOME_SCOTCH)s/include %(HOME_METIS)s/include" '
+ 'INCLUDES="%(HOME_HDF)s/include/hdf5-110 %(HOME_SCOTCH)s/include %(HOME_METIS)s/include" '
'OPTLIB_FLAGS="%(MATHLIB)s %(OTHERLIB)s" '
- './waf configure --maths-libs="" '
+ './waf configure --maths-libs="" --hdf5-libs="hdf5-110"'
' --prefix=%(HOME_MUMPS)s --install-tests' % cfg,
'capturestderr' : False,
}),
('Make' , {
@ -20,3 +40,16 @@
set=['LIBPATH_HDF', 'LIBPATH_MED', 'LIBPATH_METIS', 'LIBPATH_SCOTCH',
'LIBPATH_MUMPS', 'LIBPATH_MFRONT'],
reqobj=['file:?ASTER_ROOT?/bin/as_run',
@@ -736,9 +738,9 @@ def setup_aster(dep, summary, **kargs):
os.environ['DEVTOOLS_COMPUTER_ID'] = cfg['DEVTOOLS_COMPUTER_ID']
if cfg['ASTER_NUMVERS'] < (15, 2):
WAF_ENV = ""
- WAF_CONFIGURE = ("./waf configure"
- " --use-config=aster_full_config"
- " --install-tests --prefix=%(ASTER_VERSION_DIR)s")
+ WAF_CONFIGURE = ('./waf configure'
+ ' --use-config=aster_full_config --hdf5-libs="hdf5-110"'
+ ' --install-tests --prefix=%(ASTER_VERSION_DIR)s')
else:
WAF_ENV = ". env.d/aster_full_std.sh ; "
WAF_CONFIGURE = ("./waf configure"

View File

@ -1,7 +1,20 @@
--- products_data.py.orig 2020-10-26 15:54:27 UTC
+++ products_data.py
@@ -130,10 +130,8 @@ def configure(self):
'%(HOME_HDF)s/include',
@@ -48,7 +48,7 @@ export LIBPATH_HDF5="%(LIBPATH_HDF)s"
export PYPATH_ASRUN="%(ASTER_ROOT)s/lib/python%(PYTHON_XY)s/site-packages"
export LIBPATH_HDF5="%(LIBPATH_HDF)s"
-export INCLUDES_HDF5="%(HOME_HDF)s/include"
+export INCLUDES_HDF5="%(HOME_HDF)s/include/hdf5-110"
export LIBPATH_MED="%(LIBPATH_MED)s"
export INCLUDES_MED="%(HOME_MED)s/include"
@@ -127,13 +127,11 @@ def configure(self):
])
self.env.append_value('INCLUDES', [
- '%(HOME_HDF)s/include',
+ '%(HOME_HDF)s/include/hdf5-110',
'%(HOME_MED)s/include',
'%(HOME_MUMPS)s/include',
- '%(HOME_MUMPS)s/include_seq',

View File

@ -4,8 +4,8 @@
To run Code_Aster through ASTK, type:
%%tools_dir%%/astk
On i386 or amd64 platforms, we suggest you install the ports french/gibi
and french/homard, two additional meshing tools.
On i386 or amd64 platforms, we suggest you install the port french/homard,
an additional meshing tool.
EOM
}
]

View File

@ -5,8 +5,8 @@ After Code_Aster installation you could install ASTK
[cad/astk-serveur and cad/astk-client].
ASTK is a graphic interface to run Code_Aster.
On i386 platform, we suggest you install the ports french/gibi and
french/homard, two additional meshing tools.
On i386 platform, we suggest you install the port french/homard,
an additional meshing tool.
EOM
}
]