summaryrefslogtreecommitdiff
path: root/french/aster/files/patch-as_setup.py
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/patch-as_setup.py
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/patch-as_setup.py')
-rw-r--r--french/aster/files/patch-as_setup.py45
1 files changed, 35 insertions, 10 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
+