Bug#1110323: generator-scripting-language FTCBFS: Uses custom script and manual cmake command
Package: generator-scripting-language
Version: 4.1.5-4
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
X-Debbugs-Cc: debian-cross@lists.debian.org
Dear Maintainer,
generator-scripting-language uses cmake and make commands manually in d/rules
to compile embedded pcre3 library. This would be compiled with the build arch
compiler.
Other than that, it seems to use a custom script (src/c) for compilation which
defaults to using build arch's gcc unless it is overridden.
The patch attached fixes this. Please consider to apply.
Thanks
Nilesh
diff --git a/debian/rules b/debian/rules
index 3d830a8..7c6e338 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+-include /usr/share/dpkg/buildtools.mk
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -16,10 +17,12 @@ export DEB_CPPFLAGS_MAINT_APPEND=-I$(CURDIR)/debian/pcre3-$(DEB_HOST_GNU_TYPE)/
execute_after_dh_auto_clean:
rm -rf $(CURDIR)/debian/pcre3-$(DEB_HOST_GNU_TYPE)
-execute_before_dh_auto_build:
+override_dh_auto_build:
mkdir -p $(CURDIR)/debian/pcre3-$(DEB_HOST_GNU_TYPE)
cd $(CURDIR)/debian/pcre3-$(DEB_HOST_GNU_TYPE) && \
cmake ../pcre3 \
+ -DCMAKE_CXX_COMPILER=$(CXX) \
+ -DCMAKE_C_COMPILER=$(CC) \
-DPCRE_SUPPORT_UTF=ON \
-DPCRE_SUPPORT_UNICODE_PROPERTIES=ON \
-DPCRE_BUILD_PCRECPP=OFF \
@@ -28,4 +31,5 @@ execute_before_dh_auto_build:
-DPCRE_SUPPORT_LIBZ=OFF \
-DPCRE_SUPPORT_LIBBZ2=OFF \
-DPCRE_SUPPORT_LIBREADLINE=OFF && \
- make
+ $(MAKE) CC="$(CC)"
+ dh_auto_build -- CC="CCNAME=$(CC) ./c -q"
Reply to: