diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/fortran03.patch | 54 | ||||
-rw-r--r-- | debian/patches/java_ignore_nonexistent_files.patch | 18 | ||||
-rw-r--r-- | debian/patches/parallel_build.patch | 38 | ||||
-rw-r--r-- | debian/patches/remove_stale_files.patch | 31 | ||||
-rw-r--r-- | debian/patches/series | 4 |
5 files changed, 145 insertions, 0 deletions
diff --git a/debian/patches/fortran03.patch b/debian/patches/fortran03.patch new file mode 100644 index 0000000..c60b77b --- /dev/null +++ b/debian/patches/fortran03.patch @@ -0,0 +1,54 @@ +Description: Add fortran03 support; tested with gfortran +Author: Alastair McKinstry <mckinstry@debian.org> +Forwarded: no +Last-Updated: 2010-05-29 + +Index: scons-1.3.0/engine/SCons/Tool/FortranCommon.py +=================================================================== +--- scons-1.3.0.orig/engine/SCons/Tool/FortranCommon.py 2010-05-28 15:54:24.000000000 +0000 ++++ scons-1.3.0/engine/SCons/Tool/FortranCommon.py 2010-05-28 15:55:55.000000000 +0000 +@@ -231,6 +231,22 @@ + DialectAddToEnv(env, "F95", F95Suffixes, F95PPSuffixes, + support_module = 1) + ++def add_f03_to_env(env): ++ """Add Builders and construction variables for f03 to an Environment.""" ++ try: ++ F03Suffixes = env['F03FILESUFFIXES'] ++ except KeyError: ++ F03Suffixes = ['.f03'] ++ ++ #print "Adding %s to f95 suffixes" % F95Suffixes ++ try: ++ F03PPSuffixes = env['F03PPFILESUFFIXES'] ++ except KeyError: ++ F03PPSuffixes = [] ++ ++ DialectAddToEnv(env, "F03", F03Suffixes, F03PPSuffixes, ++ support_module = 1) ++ + def add_all_to_env(env): + """Add builders and construction variables for all supported fortran + dialects.""" +@@ -238,6 +254,7 @@ + add_f77_to_env(env) + add_f90_to_env(env) + add_f95_to_env(env) ++ add_f03_to_env(env) + + # Local Variables: + # tab-width:4 +Index: scons-1.3.0/engine/SCons/Tool/gfortran.py +=================================================================== +--- scons-1.3.0.orig/engine/SCons/Tool/gfortran.py 2010-05-28 15:53:05.000000000 +0000 ++++ scons-1.3.0/engine/SCons/Tool/gfortran.py 2010-05-28 15:53:28.000000000 +0000 +@@ -43,7 +43,7 @@ + Environment.""" + fortran.generate(env) + +- for dialect in ['F77', 'F90', 'FORTRAN', 'F95']: ++ for dialect in ['F77', 'F90', 'FORTRAN', 'F95', 'F03']: + env['%s' % dialect] = 'gfortran' + env['SH%s' % dialect] = '$%s' % dialect + if env['PLATFORM'] in ['cygwin', 'win32']: + diff --git a/debian/patches/java_ignore_nonexistent_files.patch b/debian/patches/java_ignore_nonexistent_files.patch new file mode 100644 index 0000000..4a5268a --- /dev/null +++ b/debian/patches/java_ignore_nonexistent_files.patch @@ -0,0 +1,18 @@ +Description: Check for file/symlink existence before trying to use it in Java() +Origin: Debian +Bug-Debian: http://bugs.debian.org/338232 +Forwarded: http://scons.tigris.org/issues/show_bug.cgi?id=2207 + +Index: b/engine/SCons/Tool/javac.py +=================================================================== +--- a/engine/SCons/Tool/javac.py 2010-01-23 15:11:20.016927869 +0100 ++++ b/engine/SCons/Tool/javac.py 2010-01-23 15:11:33.892932280 +0100 +@@ -90,6 +90,8 @@ + version = env.get('JAVAVERSION', '1.4') + full_tlist = [] + for f in slist: ++ if not os.path.exists(f.rfile().get_abspath()): ++ continue + tlist = [] + source_file_based = True + pkg_dir = None diff --git a/debian/patches/parallel_build.patch b/debian/patches/parallel_build.patch new file mode 100644 index 0000000..3af9a90 --- /dev/null +++ b/debian/patches/parallel_build.patch @@ -0,0 +1,38 @@ +Description: Disable parallel build on sparc machines +Origin: Debian +Bug-Debian: http://bugs.debian.org/632228 +Forwarded: no + +Index: scons/engine/SCons/Job.py +=================================================================== +--- scons.orig/engine/SCons/Job.py 2011-07-02 13:09:20.281651892 +0200 ++++ scons/engine/SCons/Job.py 2011-07-02 13:12:49.925651735 +0200 +@@ -83,7 +83,7 @@ + """ + + self.job = None +- if num > 1: ++ if num > 1 and not self._check_sparc_machine(): + stack_size = explicit_stack_size + if stack_size is None: + stack_size = default_stack_size +@@ -163,6 +163,19 @@ + except AttributeError: + pass + ++ def _check_sparc_machine(self): ++ """ Check whether machine is sparc""" ++ try: ++ from platform import machine ++ except ImportError: ++ pass ++ else: ++ if 'sparc' in machine(): ++ SCons.Warnings.warn(SCons.Warnings.StackSizeWarning, ++ 'Parallel build disabled on sparc, ' ++ 'see Debian bug #632228') ++ return True ++ + class Serial(object): + """This class is used to execute tasks in series, and is more efficient + than Parallel, but is only appropriate for non-parallel builds. Only diff --git a/debian/patches/remove_stale_files.patch b/debian/patches/remove_stale_files.patch new file mode 100644 index 0000000..b2e4053 --- /dev/null +++ b/debian/patches/remove_stale_files.patch @@ -0,0 +1,31 @@ +Description: Remove stale files created by SCons when building Debian packages +Origin: Debian +Bug-Debian: http://bugs.debian.org/519948 +Forwarded: http://scons.tigris.org/issues/show_bug.cgi?id=1571 + +Index: b/engine/SCons/Script/Main.py +=================================================================== +--- a/engine/SCons/Script/Main.py 2010-01-23 15:11:19.624932557 +0100 ++++ b/engine/SCons/Script/Main.py 2010-01-23 15:11:35.084931903 +0100 +@@ -1001,6 +1001,21 @@ + if not nodes: + exit_status = 2 + ++ # Remove temporary files left by SCons ++ if options.clean: ++ if os.environ.has_key('DH_INTERNAL_OPTIONS'): ++ import shutil ++ for path in ('.sconsign.dblite', '.sconf_temp'): ++ try: ++ if os.path.isfile(path): ++ print 'Removing autogenerated file %s' % path ++ os.remove(path) ++ if os.path.isdir(path): ++ print 'Removing autogenerated directory %s' % path ++ shutil.rmtree(path) ++ except OSError: ++ pass ++ + def _build_targets(fs, options, targets, target_top): + + global this_build_status diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..8192aea --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,4 @@ +java_ignore_nonexistent_files.patch +remove_stale_files.patch +fortran03.patch +parallel_build.patch |