aboutsummaryrefslogtreecommitdiff
path: root/french/aster/files/patch-as_setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'french/aster/files/patch-as_setup.py')
-rw-r--r--french/aster/files/patch-as_setup.py40
1 files changed, 28 insertions, 12 deletions
diff --git a/french/aster/files/patch-as_setup.py b/french/aster/files/patch-as_setup.py
index 86a08f9e1c69..13d83fc41f0c 100644
--- a/french/aster/files/patch-as_setup.py
+++ b/french/aster/files/patch-as_setup.py
@@ -1,17 +1,33 @@
---- as_setup.py.orig 2007-12-21 17:08:17.000000000 +0100
-+++ as_setup.py 2008-01-08 22:32:14.000000000 +0100
-@@ -397,6 +397,10 @@
- traceback.print_exc()
- self.exit_code=iret
- raise SetupExtractError, _('error during extracting archive %s') % archive
-+ # Insert FreeBSD patches here
-+ self._print('Handle gfortran C-like pre-processor directives')
-+ os.rename(os.path.join(self.content, 'bibf90/utilitai/traceb.f'), os.path.join(self.content, 'bibf90/utilitai/traceb.F'))
-+ # End of FreeBSD patches
+--- as_setup.py.orig 2010-02-09 10:04:57.000000000 +0100
++++ as_setup.py 2010-02-20 15:49:39.000000000 +0100
+@@ -47,6 +47,8 @@
+ import imp
+ import shutil
+ import pprint
++import fileinput
++import string
+ from types import StringTypes
+ EnumTypes=(list, tuple)
+@@ -449,6 +451,17 @@
if iextr_as:
- iret=0
-@@ -1216,7 +1220,10 @@
+ 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)
++ for ligne in fileinput.input(file2patch, inplace=1):
++ nl = 0
++ nl = string.find(ligne, 'ifdef _POSIX')
++ if nl > 0:
++ ligne =ligne.replace('ifdef _POSIX', 'ifndef __FreeBSD__')
++ sys.stdout.write(ligne)
++ # End of FreeBSD patches
++
+ #-------------------------------------------------------------------------------
+ def Configure(self, **kargs):
+ """Configuration of the product.
+@@ -1302,7 +1315,10 @@
from socket import gethostname, gethostbyaddr
if host==None:
host = gethostname()