summaryrefslogtreecommitdiff
path: root/french/aster/files
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2014-03-18 21:09:03 +0000
committerThierry Thomas <thierry@FreeBSD.org>2014-03-18 21:09:03 +0000
commit55e6556d123a5c0c057d2c0a9b645123225b50a6 (patch)
treebee32239c442ebaba930b9099409230b15af97f7 /french/aster/files
parent- Add pwhois user in preparation for new pwhois port (diff)
Upgrade Code_Aster to 11.5.0-4.
N.B.: french/aster is still marked BROKEN, but this allows to unbreak other ports sharing the same dependencies. Patch for french/med provided by tijl.
Notes
Notes: svn path=/head/; revision=348597
Diffstat (limited to 'french/aster/files')
-rw-r--r--french/aster/files/patch-as_setup.py45
-rw-r--r--french/aster/files/patch-check_compilers.py12
-rw-r--r--french/aster/files/patch-check_compilers_src.py13
-rw-r--r--french/aster/files/patch-products.py60
-rw-r--r--french/aster/files/patch-setup.py24
5 files changed, 83 insertions, 71 deletions
diff --git a/french/aster/files/patch-as_setup.py b/french/aster/files/patch-as_setup.py
index 2aa326d64935..2e0f4f597dc4 100644
--- a/french/aster/files/patch-as_setup.py
+++ b/french/aster/files/patch-as_setup.py
@@ -1,26 +1,51 @@
---- as_setup.py.orig 2010-07-07 18:18:13.000000000 +0200
-+++ as_setup.py 2010-08-12 19:01:09.000000000 +0200
-@@ -46,6 +46,8 @@
+--- as_setup.py.orig 2014-01-06 14:30:14.000000000 +0100
++++ as_setup.py 2014-01-17 23:16:39.000000000 +0100
+@@ -45,6 +45,8 @@
import compileall
import imp
import pprint
+import fileinput
+import string
import distutils.sysconfig as SC
- from types import StringTypes
- EnumTypes=(list, tuple)
-@@ -472,6 +474,17 @@
+ from subprocess import Popen, PIPE
+
+@@ -516,6 +518,42 @@
if iextr_as:
self.Clean(to_delete=path)
+ # Insert FreeBSD patches here
-+ file2patch = os.path.join(self.installdir, self.content, 'bibc/utilitai/mempid.c')
-+ self._print('different /proc/pid/status => change ' + file2patch)
++ file2patch = os.path.join(self.workdir, self.content, 'bibc/wscript')
++ self._print('FreeBSD patch: no libdl + -O2 (GCC Bug 51267) => modify ' + file2patch)
++ for ligne in fileinput.input(file2patch, inplace=1):
++ nl = 0
++ nl = string.find(ligne, "uselib_store='SYS', lib='dl'")
++ if nl > 0:
++ ligne =ligne.replace("self.check_cc", "# self.check_cc")
++ else:
++ nl = string.find(ligne, "-O2")
++ if nl > 0:
++ ligne =ligne.replace("-O2", "-O0")
++ sys.stdout.write(ligne)
++ file2patch = os.path.join(self.workdir, self.content, 'bibc/utilitai/hpalloc.c')
++ self._print('FreeBSD patch: stdlib + no mallopt => modify ' + file2patch)
++ for ligne in fileinput.input(file2patch, inplace=1):
++ nl = 0
++ nl = string.find(ligne, 'ir=mallopt')
++ if nl > 0:
++ ligne =ligne.replace('ir=mallopt', '/* ir=mallopt')
++ ligne =ligne.replace(');', '); */')
++ else:
++ nl = string.find(ligne, "malloc.h")
++ if nl > 0:
++ ligne =ligne.replace("malloc.h", "stdlib.h")
++ sys.stdout.write(ligne)
++ file2patch = os.path.join(self.workdir, self.content, 'bibfor/wscript')
++ self._print('FreeBSD patch: -O2 (GCC Bug 51267) => modify ' + file2patch)
+ for ligne in fileinput.input(file2patch, inplace=1):
+ nl = 0
-+ nl = string.find(ligne, 'ifdef _POSIX')
++ nl = string.find(ligne, "-O2")
+ if nl > 0:
-+ ligne =ligne.replace('ifdef _POSIX', 'ifndef __FreeBSD__')
++ ligne =ligne.replace("-O2", "-O0")
+ sys.stdout.write(ligne)
+ # End of FreeBSD patches
+
diff --git a/french/aster/files/patch-check_compilers.py b/french/aster/files/patch-check_compilers.py
new file mode 100644
index 000000000000..717ea0f5ef71
--- /dev/null
+++ b/french/aster/files/patch-check_compilers.py
@@ -0,0 +1,12 @@
+--- check_compilers.py.orig 2014-03-05 09:41:19.000000000 +0100
++++ check_compilers.py 2014-03-17 18:52:14.000000000 +0100
+@@ -413,8 +413,7 @@
+ def after_compilers(self):
+ """Define libs to search."""
+ # prefer always libstdc++.so to the static one
+- self.libs.extend([('math', 'lapack'), ('math', 'blas'),
+- ('cxx', ['libstdc++.so', 'libstdc++.a']),])
++ self.libs.extend([('math', 'lapack'), ('math', 'blas'),])
+
+ def add_on(self):
+ """After searching compilers, libs... search again other bin or lib."""
diff --git a/french/aster/files/patch-check_compilers_src.py b/french/aster/files/patch-check_compilers_src.py
index ab8ef58c75ec..5743593874f3 100644
--- a/french/aster/files/patch-check_compilers_src.py
+++ b/french/aster/files/patch-check_compilers_src.py
@@ -1,6 +1,6 @@
---- check_compilers_src.py.orig 2013-01-28 13:35:55.000000000 +0100
-+++ check_compilers_src.py 2013-03-17 21:11:35.000000000 +0100
-@@ -109,12 +109,15 @@
+--- check_compilers_src.py.orig 2013-12-19 15:44:50.000000000 +0100
++++ check_compilers_src.py 2013-12-28 15:09:39.000000000 +0100
+@@ -109,6 +109,9 @@
You must choose another compiler or change the optimization level.
You can cancel now or make the changes later in the config.txt file of
Code_Aster and rebuild it.
@@ -10,10 +10,3 @@
-------------------------------------------------------------------------------
""",
- 'main.f' : r"""
- program testloc
-- volatile ius
-+C volatile ius
- integer*8 ius(1)
- integer*8 i,iad,n,loc
- common /jvcomm/ ius
diff --git a/french/aster/files/patch-products.py b/french/aster/files/patch-products.py
index c3bffc46b845..7c0e9052efc7 100644
--- a/french/aster/files/patch-products.py
+++ b/french/aster/files/patch-products.py
@@ -1,54 +1,12 @@
---- products.py.orig 2013-01-28 13:35:55.000000000 +0100
-+++ products.py 2013-03-17 21:30:27.000000000 +0100
-@@ -995,9 +995,10 @@
+--- products.py.orig 2014-03-05 09:41:19.000000000 +0100
++++ products.py 2014-03-17 18:39:24.000000000 +0100
+@@ -701,7 +701,8 @@
'HOME_PYTHON', 'PYTHON_EXE', 'PYTHONLIB',
'HOME_MUMPS', 'HOME_ZMAT', 'HOME_MPI', 'INCLUDE_MUMPS', 'HOME_METIS',
- 'HOME_MED', 'HOME_HDF', 'HOME_CRPCRS', 'HOME_NUMPY', 'USE_NUMPY',
-- 'LD', 'CC', 'F77', 'F90', 'CXXLIB', 'OTHERLIB', 'SYSLIB', ],
-- reqobj=['file:?ASTER_ROOT?/bin/as_run',
-- 'file:?ASTER_ROOT?/etc/codeaster/profile.sh'],
-+ 'LD', 'CC', 'F77', 'F90', 'CXXLIB', 'OTHERLIB', 'SYSLIB', 'CFLAGS',
+ 'HOME_MED', 'HOME_HDF',
+- 'LD', 'CC', 'F90', 'CXXLIB', 'OTHERLIB', 'SYSLIB', ],
++ 'LD', 'CC', 'F90', 'CXXLIB', 'OTHERLIB', 'SYSLIB', 'CFLAGS', 'LDFLAGS',
+ 'CFLAGS_DBG', 'FFLAGS', 'FFLAGS_DBG','F90FLAGS', 'F90FLAGS_DBG', 'CXXLIB', ],
-+ reqobj=['file:/usr/ports/french/aster/work/aster-full-src-10.8.0/instdir/bin/as_run',
-+ 'file:/usr/ports/french/aster/work/aster-full-src-10.8.0/instdir/etc/codeaster/profile.sh'],
- set=['MEDLIB', 'HDFLIB', 'MATHLIB',
- 'MUMPSLIB', 'ZMATLIB', 'SCOTCHLIB',
- 'CINCLUDE', 'FINCLUDE', 'F90INCLUDE',
-@@ -1043,6 +1044,19 @@
- if cfg['IFDEF'] in ('LINUX', 'P_LINUX'):
- zmat_platform = 'Linux'
- mpilibs.extend(['mpich'])
-+ elif cfg['IFDEF']=='FREEBSD':
-+ # Don't check gfortran, already part of SYSLIB
-+ opt['MATH_LIST'] = [cfg['LAPACKLIB'], cfg['BLASLIB']]
-+ opt['SYSLIB'] = cfg['SYSLIB']
-+ opt['LDFLAGS'] = cfg['LDFLAGS']
-+ opt['CFLAGS_DBG'] = cfg['CFLAGS_DBG']
-+ opt['CFLAGS'] = cfg['CFLAGS']
-+ opt['FFLAGS_DBG'] = cfg['FFLAGS_DBG']
-+ opt['FFLAGS'] = cfg['FFLAGS']
-+ opt['FINCLUDE'] = ''
-+ cxxlibs.extend(['stdc++', 'supc++'])
-+ zmat_platform=''
-+ mpilibs.extend(['mpich', 'mpl'])
- elif cfg['IFDEF'] == 'LINUX64':
- mpilibs.extend(['mpich'])
- # others have not been tested !
-@@ -1097,11 +1111,12 @@
-
- # ----- libs c++ (for MED and ZMAT)
- #XXX probably to remove (done by check_compiler)
-- if cfg['HOME_MED'] != '' or cfg['HOME_ZMAT'] != '':
-- for lib in cxxlibs:
-- ftools.findlib_and_set(cfg, 'CXXLIB', lib,
-- [cfg['HOME_MED'], cfg['HOME_ZMAT']],
-- err=False, append=True, maxdepth=max(ftools.maxdepth,10))
-+ # CXXLIB already set for FreeBSD
-+ #if cfg['HOME_MED'] != '' or cfg['HOME_ZMAT'] != '':
-+ # for lib in cxxlibs:
-+ # ftools.findlib_and_set(cfg, 'CXXLIB', lib,
-+ # [cfg['HOME_MED'], cfg['HOME_ZMAT']],
-+ # err=False, append=True, maxdepth=max(ftools.maxdepth,10))
-
- # ----- METIS
- if cfg.get('METISLIB'):
+ reqobj=['file:?ASTER_ROOT?/bin/as_run',
+ 'file:?ASTER_ROOT?/etc/codeaster/profile.sh'],
+ )
diff --git a/french/aster/files/patch-setup.py b/french/aster/files/patch-setup.py
new file mode 100644
index 000000000000..c8a53909884e
--- /dev/null
+++ b/french/aster/files/patch-setup.py
@@ -0,0 +1,24 @@
+--- setup.py.orig 2013-07-29 11:39:57.000000000 +0200
++++ setup.py 2013-08-15 17:14:57.000000000 +0200
+@@ -330,7 +330,8 @@
+ log._print(_separ, """Installation on :
+ %s""" % sident, _separ)
+
+- common_libs = ['pthread', 'z']
++ # FreeBSD patch: no -lpthread, but PTHREAD_LIBS already added
++ common_libs = ['z']
+ if plt.startswith('linux'):
+ plt = 'linux'
+ if plt == 'win32':
+@@ -502,7 +503,10 @@
+ # 1.4.1g. ----- check for system dependent libraries (and only used by Code_Aster)
+ cfg['SYSLIB'] = cfg.get('SYSLIB', '')
+ aster_sys_lib = []
+- if cfg['IFDEF'] in ('LINUX', 'P_LINUX', 'LINUX64'):
++ if cfg['IFDEF'] == 'FREEBSD':
++ cfg['SYSLIB'] += ' -Wl,--allow-multiple-definition -Wl,--export-dynamic'
++ aster_sys_lib.extend(['util', 'm'])
++ elif cfg['IFDEF'] in ('LINUX', 'P_LINUX', 'LINUX64'):
+ cfg['SYSLIB'] += ' -Wl,--allow-multiple-definition -Wl,--export-dynamic'
+ aster_sys_lib.extend(['dl', 'util', 'm'])
+ elif cfg['IFDEF'] == 'TRU64':