Package: src:cgal
Version: 4.6.1-2
Tags: patch

Please enable parallel builds. it makes the build much faster.  Would be nice to
check other packages maintained by the Debian GIS team as well.

  * Enable parallel build.

diff -Nru cgal-4.6.1/debian/rules cgal-4.6.1/debian/rules
--- cgal-4.6.1/debian/rules     2015-08-15 11:01:33.000000000 +0200
+++ cgal-4.6.1/debian/rules     2015-08-29 21:17:34.000000000 +0200
@@ -15,8 +15,13 @@
 export TESTS_IEEE_FPU_OPTION = -mieee -mfp-rounding-mode=d
 endif
 
+COMMA = ,
+ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+  NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), 
,$(DEB_BUILD_OPTIONS))))
+endif
+
 %:
-       dh $@
+       dh $@ --parallel
 
 override_dh_auto_configure:
        mkdir -p static
@@ -39,9 +44,9 @@
          -DCGAL_DIR=$(CURDIR)/shared   
 
 override_dh_auto_build:
-       $(MAKE) -C static
-       $(MAKE) -C shared
-       $(MAKE) -C shared/demo/CGAL_ipelets
+       $(MAKE) $(NJOBS) -C static
+       $(MAKE) $(NJOBS) -C shared
+       $(MAKE) $(NJOBS) -C shared/demo/CGAL_ipelets
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))

Reply via email to