summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2022-02-15 21:01:05 +0100
committergregor herrmann <gregoa@debian.org>2022-02-15 21:01:05 +0100
commitf9c2c8f36174ae11eb045c83170e198d41582fa5 (patch)
tree44887f07bd906492464ece1ba059b0db23cc42e5
parentdc5a4c2c438434b17e19c95fed6c306dd8077b49 (diff)
debian/rules: fix building of JNI extension.
We still used DEB_MAKEMAKER_USER_FLAGS, which is a cdbs variable, to set BUILD_JNI after the switch from cdbs to dh. Set a make variable and use it in override_dh_auto_configure instead.
-rwxr-xr-xdebian/rules9
1 files changed, 7 insertions, 2 deletions
diff --git a/debian/rules b/debian/rules
index dfaeb9c..f22a725 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,11 +12,12 @@ export JAVA_HOME=/usr/lib/jvm/default-java
NO_JNI_ARCH = hppa hurd-i386 mips mipsel armel powerpc
ifeq (,$(filter $(DEB_HOST_ARCH), $(NO_JNI_ARCH)))
-# Have testsuite use JNI
+# Build JNI extension and have testsuite use it
+BUILD_JNI=1
export PERL_INLINE_JAVA_JNI=1
else
# Don't build JNI extension
-DEB_MAKEMAKER_USER_FLAGS = BUILD_JNI=0
+BUILD_JNI=0
endif
%:
@@ -29,6 +30,10 @@ execute_after_dh_auto_clean:
execute_before_dh_auto_configure:
[ ! -f t/t13.txt ] || mv t/t13.txt t/t13.txt.save
+# With our without JNI
+override_dh_auto_configure:
+ dh_auto_configure -- BUILD_JNI=$(BUILD_JNI)
+
# Have testsuite use the C locale's decimal point
override_dh_auto_test:
LC_NUMERIC=C dh_auto_test