summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0100-parallel_build.patch38
-rw-r--r--debian/patches/0105-java_ignore_nonexistent_files.patch21
-rw-r--r--debian/patches/0110-remove_stale_files.patch31
-rw-r--r--debian/patches/0115-secure_script_scons.patch21
-rw-r--r--debian/patches/0120-fix-bibtex-call.patch40
-rw-r--r--debian/patches/0125-printf_regression.patch37
-rw-r--r--debian/patches/0600-manpage-spelling.patch144
-rw-r--r--debian/patches/series7
8 files changed, 339 insertions, 0 deletions
diff --git a/debian/patches/0100-parallel_build.patch b/debian/patches/0100-parallel_build.patch
new file mode 100644
index 0000000..3af9a90
--- /dev/null
+++ b/debian/patches/0100-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/0105-java_ignore_nonexistent_files.patch b/debian/patches/0105-java_ignore_nonexistent_files.patch
new file mode 100644
index 0000000..6cf704e
--- /dev/null
+++ b/debian/patches/0105-java_ignore_nonexistent_files.patch
@@ -0,0 +1,21 @@
+Description: Ignore nonexistent files before trying to use them in Java()
+Origin: Debian
+Bug-Debian: http://bugs.debian.org/338232
+Forwarded: http://scons.tigris.org/issues/show_bug.cgi?id=2207
+
+Index: trunk/engine/SCons/Tool/JavaCommon.py
+===================================================================
+--- trunk.orig/engine/SCons/Tool/JavaCommon.py
++++ trunk/engine/SCons/Tool/JavaCommon.py
+@@ -283,7 +283,10 @@ if java_parsing:
+ return self.outer_state
+
+ def parse_java_file(fn, version=default_java_version):
+- return parse_java(open(fn, 'r').read(), version)
++ try:
++ return parse_java(open(fn, 'r').read(), version)
++ except IOError:
++ return (None, [])
+
+ def parse_java(contents, version=default_java_version, trace=None):
+ """Parse a .java file and return a double of package directory,
diff --git a/debian/patches/0110-remove_stale_files.patch b/debian/patches/0110-remove_stale_files.patch
new file mode 100644
index 0000000..9fbb186
--- /dev/null
+++ b/debian/patches/0110-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: trunk/engine/SCons/Script/Main.py
+===================================================================
+--- trunk.orig/engine/SCons/Script/Main.py
++++ trunk/engine/SCons/Script/Main.py
+@@ -1115,6 +1115,21 @@ def _main(parser):
+ print('Found nothing to build')
+ exit_status = 2
+
++ # Remove temporary files left by SCons
++ if options.clean:
++ if 'DH_INTERNAL_OPTIONS' in os.environ:
++ 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/0115-secure_script_scons.patch b/debian/patches/0115-secure_script_scons.patch
new file mode 100644
index 0000000..24d9cf6
--- /dev/null
+++ b/debian/patches/0115-secure_script_scons.patch
@@ -0,0 +1,21 @@
+Description: Comment out the search for libs in local source dirs
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Forwarded: https://pairlist2.pair.net/pipermail/scons-dev/2014-November/002008.html
+Last-Update: 2015-02-11
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/script/scons
+===================================================================
+--- trunk.orig/script/scons
++++ trunk/script/scons
+@@ -77,8 +77,8 @@ if "SCONS_LIB_DIR" in os.environ:
+
+ # - running from source takes priority (since 2.3.2), excluding SCONS_LIB_DIR settings
+ script_path = os.path.abspath(os.path.dirname(__file__))
+-source_path = os.path.join(script_path, '..', 'engine')
+-libs.append(source_path)
++# source_path = os.path.join(script_path, '..', 'engine')
++# libs.append(source_path)
+
+ local_version = 'scons-local-' + __version__
+ local = 'scons-local'
diff --git a/debian/patches/0120-fix-bibtex-call.patch b/debian/patches/0120-fix-bibtex-call.patch
new file mode 100644
index 0000000..98b2db6
--- /dev/null
+++ b/debian/patches/0120-fix-bibtex-call.patch
@@ -0,0 +1,40 @@
+Description: Create Bibtex bibliography always
+Author: Alvaro G. M. <alvaro.gamez@hazent.com>
+Bug: http://scons.tigris.org/issues/show_bug.cgi?id=2967
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749716
+Forwarded: http://scons.tigris.org/issues/show_bug.cgi?id=2967
+Last-Update: 2016-01-31
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/engine/SCons/Tool/tex.py
+===================================================================
+--- trunk.orig/engine/SCons/Tool/tex.py
++++ trunk/engine/SCons/Tool/tex.py
+@@ -351,6 +351,13 @@ def InternalLaTeXAuxAction(XXXLaTeXActio
+ if result != 0:
+ check_file_error_message(env['BIBTEX'], 'blg')
+ must_rerun_latex = True
++ if Verbose:
++ print ("Need to run bibtex on " + auxfilename)
++ bibfile = env.fs.File(SCons.Util.splitext(target_aux)[0])
++ result = BibTeXAction(bibfile, bibfile, env)
++ if result != 0:
++ check_file_error_message(env['BIBTEX'], 'blg')
++ must_rerun_latex = True
+
+ # Now decide if biber will need to be run.
+ # When the backend for biblatex is biber (by choice or default) the
+@@ -375,6 +382,13 @@ def InternalLaTeXAuxAction(XXXLaTeXActio
+ if result != 0:
+ check_file_error_message(env['BIBER'], 'blg')
+ must_rerun_latex = True
++ if Verbose:
++ print ("Need to run biber on " + bcffilename)
++ bibfile = env.fs.File(SCons.Util.splitext(target_bcf)[0])
++ result = BiberAction(bibfile, bibfile, env)
++ if result != 0:
++ check_file_error_message(env['BIBER'], 'blg')
++ must_rerun_latex = True
+
+ # Now decide if latex will need to be run again due to index.
+ if check_MD5(suffix_nodes['.idx'],'.idx') or (count == 1 and run_makeindex):
diff --git a/debian/patches/0125-printf_regression.patch b/debian/patches/0125-printf_regression.patch
new file mode 100644
index 0000000..1d5cee0
--- /dev/null
+++ b/debian/patches/0125-printf_regression.patch
@@ -0,0 +1,37 @@
+Description: Support python 2 print statements in SConscripts
+ This fixes a regression introduced in scons-3.0.0, where
+ SConscripts containing python 2 print statements would cause
+ syntax errors even when executing scons with python 2.7.
+Origin: upstream, https://github.com/SConsProject/scons/commit/2e0de3c55f22b3eaa7767b69740b898f3d2f46bf
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878327
+Forwarded: not-needed
+Last-Update: 2017-10-13
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/CHANGES.txt
+===================================================================
+--- trunk.orig/CHANGES.txt
++++ trunk/CHANGES.txt
+@@ -11,6 +11,9 @@ NOTE: This is a major release. You shou
+ Significant changes in some python action signatures. Also switching between PY 2.7 and PY 3.5, 3.6
+ will cause rebuilds.
+
++ From Thomas Berg:
++ - Fixed a regression in scons-3.0.0 where "from __future__ import print_function" was imposed
++ on the scope where SConstruct is executed, breaking existing builds using PY 2.7.
+
+ From William Blevins:
+ - Updated D language scanner support to latest: 2.071.1. (PR #1924)
+Index: trunk/engine/SCons/Script/SConscript.py
+===================================================================
+--- trunk.orig/engine/SCons/Script/SConscript.py
++++ trunk/engine/SCons/Script/SConscript.py
+@@ -5,8 +5,6 @@ files.
+
+ """
+
+-from __future__ import print_function
+-
+ #
+ # Copyright (c) 2001 - 2017 The SCons Foundation
+ #
diff --git a/debian/patches/0600-manpage-spelling.patch b/debian/patches/0600-manpage-spelling.patch
new file mode 100644
index 0000000..1b7e99d
--- /dev/null
+++ b/debian/patches/0600-manpage-spelling.patch
@@ -0,0 +1,144 @@
+Description: Correct manpage spelling errors
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Last-Update: 2016-09-11
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/scons.1
+===================================================================
+--- trunk.orig/scons.1
++++ trunk/scons.1
+@@ -447,7 +447,7 @@ call should use or generate the results
+ .PP
+ \-\-config=auto
+ .RS 4
+-scons will use its normal dependency mechanisms to decide if a test must be rebuilt or not\&. This saves time by not running the same configuration tests every time you invoke scons, but will overlook changes in system header files or external commands (such as compilers) if you don\*(Aqt specify those dependecies explicitly\&. This is the default behavior\&.
++scons will use its normal dependency mechanisms to decide if a test must be rebuilt or not\&. This saves time by not running the same configuration tests every time you invoke scons, but will overlook changes in system header files or external commands (such as compilers) if you don\*(Aqt specify those dependencies explicitly\&. This is the default behavior\&.
+ .RE
+ .PP
+ \-\-config=force
+@@ -1566,7 +1566,7 @@ The tool definition (i\&.e\&. my_tool())
+ .PP
+ If no tool list is specified, then SCons will auto\-detect the installed tools using the PATH variable in the ENV construction variable and the platform name when the Environment is constructed\&. Changing the PATH variable after the Environment is constructed will not cause the tools to be redetected\&.
+ .PP
+-One feature now present within Scons is the ability to have nested tools\&. Tools which can be located within a subdirectory in the toolpath\&. With a nested tool name the dot represents a directory seperator
++One feature now present within Scons is the ability to have nested tools\&. Tools which can be located within a subdirectory in the toolpath\&. With a nested tool name the dot represents a directory separator
+ .sp
+ .if n \{\
+ .RS 4
+@@ -6484,7 +6484,7 @@ env\&.Substfile(\*(Aqfoo\&.in\*(Aq, SUBS
+ good_foo = [(\*(Aq$foobar\*(Aq, \*(Aq$foobar\*(Aq), (\*(Aq$foo\*(Aq, \*(Aq$foo\*(Aq)]
+ env\&.Substfile(\*(Aqfoo\&.in\*(Aq, SUBST_DICT = good_foo)
+
+-# UNPREDICTABLE \- one substitution could be futher expanded
++# UNPREDICTABLE \- one substitution could be further expanded
+ bad_bar = {\*(Aq@bar@\*(Aq: \*(Aq@soap@\*(Aq, \*(Aq@soap@\*(Aq: \*(Aqlye\*(Aq}
+ env\&.Substfile(\*(Aqbar\&.in\*(Aq, SUBST_DICT = bad_bar)
+
+@@ -6633,7 +6633,7 @@ files will be automatically created (i\&
+ \fB$LINGUAS_FILE\fR
+ and
+ \fB$POTDOMAIN\fR
+-are taken into acount too\&. All other construction variables used by
++are taken into account too\&. All other construction variables used by
+ \fBPOTUpdate\fR, and
+ \fBPOUpdate\fR
+ work here too\&.
+@@ -6716,7 +6716,7 @@ file\&. Note, that the updated
+ POT
+ and
+ PO
+-files are usually going to be committed back to the repository, so they must be updated within the source directory (and not in variant directories)\&. Additionaly, the file listing of
++files are usually going to be committed back to the repository, so they must be updated within the source directory (and not in variant directories)\&. Additionally, the file listing of
+ po/
+ directory contains
+ LINGUAS
+@@ -7256,7 +7256,7 @@ Example:
+ AllowSubstExceptions()
+
+ # Also allow a string containing a zero\-division expansion
+-# like \*(Aq${1 / 0}\*(Aq to evalute to \*(Aq\*(Aq\&.
++# like \*(Aq${1 / 0}\*(Aq to evaluate to \*(Aq\*(Aq\&.
+ AllowSubstExceptions(IndexError, NameError, ZeroDivisionError)
+ .fi
+ .if n \{\
+@@ -9231,7 +9231,7 @@ Return([vars\&.\&.\&., stop=])
+ .RS 4
+ By default, this stops processing the current SConscript file and returns to the calling SConscript file the values of the variables named in the
+ \fIvars\fR
+-string arguments\&. Multiple strings contaning variable names may be passed to
++string arguments\&. Multiple strings containing variable names may be passed to
+ \fBReturn\fR\&. Any strings that contain white space
+ .sp
+ The optional
+@@ -10139,7 +10139,7 @@ function to create a copy of your source
+ \fIvariant_dir\fR
+ is not found but exists under
+ \fIsrc_dir\fR, the file or directory is copied to
+-\fIvariant_dir\fR\&. Target files can be built in a different directory than the original sources by simply refering to the sources (and targets) within the variant tree\&.
++\fIvariant_dir\fR\&. Target files can be built in a different directory than the original sources by simply referring to the sources (and targets) within the variant tree\&.
+ .sp
+
+ \fBVariantDir\fR
+@@ -11479,7 +11479,7 @@ is used to create PDF output from an XML
+ .PP
+ DOCBOOK_FOPFLAGS
+ .RS 4
+-Additonal command\-line flags for the PDF renderer
++Additional command\-line flags for the PDF renderer
+ fop
+ or
+ xep\&.
+@@ -11506,7 +11506,7 @@ is used to resolve XIncludes for a given
+ .PP
+ DOCBOOK_XMLLINTFLAGS
+ .RS 4
+-Additonal command\-line flags for the external executable
++Additional command\-line flags for the external executable
+ xmllint\&.
+ .RE
+ .PP
+@@ -11537,7 +11537,7 @@ is used to transform an XML file via a g
+ .PP
+ DOCBOOK_XSLTPROCFLAGS
+ .RS 4
+-Additonal command\-line flags for the external executable
++Additional command\-line flags for the external executable
+ xsltproc
+ (or
+ saxon,
+@@ -11546,7 +11546,7 @@ xalan)\&.
+ .PP
+ DOCBOOK_XSLTPROCPARAMS
+ .RS 4
+-Additonal parameters that are not intended for the XSLT processor executable, but the XSL processing itself\&. By default, they get appended at the end of the command line for
++Additional parameters that are not intended for the XSLT processor executable, but the XSL processing itself\&. By default, they get appended at the end of the command line for
+ saxon
+ and
+ saxon\-xslt, respectively\&.
+@@ -14216,7 +14216,7 @@ A list of installed versions of the Metr
+ .PP
+ NAME
+ .RS 4
+-Specfies the name of the project to package\&.
++Specifies the name of the project to package\&.
+ .RE
+ .PP
+ no_import_lib
+@@ -16584,7 +16584,7 @@ builder\&.
+ .PP
+ _XGETTEXTFROMFLAGS
+ .RS 4
+-Internal "macro"\&. Genrates list of
++Internal "macro"\&. Generates list of
+ \-D<dir>
+ flags from the
+ \fB$XGETTEXTPATH\fR
+@@ -18526,7 +18526,7 @@ a = Action("build < ${SOURCE\&.file} > $
+ The
+ \fBAction\fR() global function also takes an
+ \fBexitstatfunc\fR
+-keyword argument which specifies a function that is passed the exit status (or return value) from the specified action and can return an arbitrary or modified value\&. This can be used, for example, to specify that an Action object\*(Aqs return value should be ignored under special conditions and SCons should, therefore, consider that the action always suceeds:
++keyword argument which specifies a function that is passed the exit status (or return value) from the specified action and can return an arbitrary or modified value\&. This can be used, for example, to specify that an Action object\*(Aqs return value should be ignored under special conditions and SCons should, therefore, consider that the action always succeeds:
+ .sp
+ .if n \{\
+ .RS 4
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..20ca14e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+0600-manpage-spelling.patch
+#0115-secure_script_scons.patch
+#0105-java_ignore_nonexistent_files.patch
+0110-remove_stale_files.patch
+0100-parallel_build.patch
+0120-fix-bibtex-call.patch
+#0125-printf_regression.patch