---
 debian/changelog |    3 ++-
 debian/rules     |   13 +++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1c70a28..f1f9c32 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,8 @@ openscenegraph (2.4.0-1.1) unstable; urgency=low
   * No longer try to detect (using /proc/cpuinfo when available) how many
     CPUs are available, fixing the FTBFS (due to -j0) on various platforms
     (Closes: #477353). The right way to do it is to support parallel=n in
-    DEB_BUILD_OPTIONS, see Debian Policy §4.9.1.
+    DEB_BUILD_OPTIONS (see Debian Policy §4.9.1), and adequate support has
+    been implemented.
   * Add patch to fix FTBFS due to the build system now refusing to handle
     whitespaces (Policy CMP0004 say the logs), thanks to Andreas Putzo who
     provided it (Closes: #482239):
diff --git a/debian/rules b/debian/rules
index d68405a..3425d5d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,9 +24,14 @@ else
        # Full path to make ccache happy
        CCACHE = $(shell which $(CXX))
 endif
-#ifeq (smp,$(findstring smp,$(DEB_BUILD_OPTIONS)))
-#      SMP = -j2
-#endif
+
+# Detect parallel builds.
+ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
+    PARALLEL_JOBS = $(shell echo $(DEB_BUILD_OPTIONS) | \
+        sed -e 's/.*parallel=\([0-9]\+\).*/\1/')
+    PARALLEL_OPTIONS = -j$(PARALLEL_JOBS)
+endif
+

 # shared library versions, option 1
 # version=2.0.5
@@ -126,7 +131,7 @@ build-stamp: configure-stamp
                -D CMAKE_CXX_COMPILER='${CCACHE}' \
                -D BUILD_OSG_WRAPPERS:BOOL=$$COMPILE_INTROSPECTION \
                -D BUILD_OSG_EXAMPLES:BOOL=ON ../../${OSG}
-       cd build/osg ; ${MAKE} VERBOSE=1
+       cd build/osg ; ${MAKE} ${PARALLEL_OPTIONS} VERBOSE=1
        touch build-stamp

 clean: clean-patched unpatch
--
1.5.6.2




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to