Package: mkvtoolnix
Version: 5.4.0-1
Severity: minor
Tags: patch

Hi!

  Find attached a patch that supports DEB_BUILD_OPTIONS=parallel=n as
specified by Debian Policy. Please consider applying to improve
handling of parallel builds (e.g. on HT capable CPUs you don't want to
have one compiler per virtual core). I don't intend to NMU this, just
dch -i is the most comfortable way to build diffs.

Regards

     Christoph

-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer
diff -Nru mkvtoolnix-5.4.0/debian/changelog mkvtoolnix-5.4.0/debian/changelog
--- mkvtoolnix-5.4.0/debian/changelog	2012-03-11 07:37:19.000000000 +0100
+++ mkvtoolnix-5.4.0/debian/changelog	2012-03-12 16:16:09.000000000 +0100
@@ -1,3 +1,10 @@
+mkvtoolnix (5.4.0-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Support DEB_BUILD_OPTIONS=parallel=n
+
+ -- Christoph Egger <christ...@debian.org>  Mon, 12 Mar 2012 16:16:09 +0100
+
 mkvtoolnix (5.4.0-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru mkvtoolnix-5.4.0/debian/rules mkvtoolnix-5.4.0/debian/rules
--- mkvtoolnix-5.4.0/debian/rules	2011-11-29 14:21:31.000000000 +0100
+++ mkvtoolnix-5.4.0/debian/rules	2012-03-12 16:30:39.000000000 +0100
@@ -2,14 +2,16 @@
 
 LDFLAGS += -Wl,-z,defs -Wl,--as-needed
 
-NCPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
-
-ifeq ($(NCPUS),-1)
-	NCPUS:=1
-endif
-
-ifeq ($(NCPUS),0)
-	NCPUS:=1 
+ifneq (,$(findstring parallel=,$(DEB_BUILD_OPTIONS)))
+  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+  NUMJOBS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
+  ifeq ($(NUMJOBS),-1)
+    NUMJOBS:=1
+  endif
+  ifeq ($(NUMJOBS),0)
+    NUMJOBS:=1
+  endif
 endif
 
 %:
@@ -21,7 +23,7 @@
 
 #	exit 1
 
-	./drake -j $(NCPUS)
+	./drake -j $(NUMJOBS)
 
 	mv src/mkvinfo src/mkvinfo-gui
 	mv src/mmg/mmg src/mmg/mmg-gui
@@ -31,7 +33,7 @@
 	dh_auto_configure -- \
 	--disable-gui
 
-	./drake -j $(NCPUS) default 'translations:guides'
+	./drake -j $(NUMJOBS) default 'translations:guides'
 
 override_dh_clean:
 	[ ! -f build-config ] || ./drake clean:dist

Reply via email to