Source: cmake
Version: 3.2.2-2
Severity: normal
Tags: patch

Attached patch makes cmake find JNI on Debian/x32, fixing
FTBFS in openjpeg and others.

-- System Information:
Debian Release: stretch/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64

Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)
diff -Nru cmake-3.2.2/debian/changelog cmake-3.2.2/debian/changelog
--- cmake-3.2.2/debian/changelog	2015-05-14 04:04:10.000000000 +0200
+++ cmake-3.2.2/debian/changelog	2015-07-13 12:30:16.000000000 +0200
@@ -1,3 +1,10 @@
+cmake (3.2.2-2+x32.1) unreleased; urgency=medium
+
+  * Non-maintainer upload.
+  * New: FindJNI.cmake.x32.patch
+
+ -- Thorsten Glaser <[email protected]>  Mon, 13 Jul 2015 12:30:15 +0200
+
 cmake (3.2.2-2) unstable; urgency=medium
 
   * Make cmake.bash-completion use wildcards for the minor version
diff -Nru cmake-3.2.2/debian/patches/FindJNI.cmake.x32.patch cmake-3.2.2/debian/patches/FindJNI.cmake.x32.patch
--- cmake-3.2.2/debian/patches/FindJNI.cmake.x32.patch	1970-01-01 01:00:00.000000000 +0100
+++ cmake-3.2.2/debian/patches/FindJNI.cmake.x32.patch	2015-07-13 12:29:45.000000000 +0200
@@ -0,0 +1,16 @@
+# DP: find JNI on x32
+
+--- a/Modules/FindJNI.cmake
++++ b/Modules/FindJNI.cmake
+@@ -42,7 +42,11 @@ macro(java_append_library_directories _v
+     # 1.6.0_18 + icedtea patches. However, it would be much better to base the
+     # guess on the first part of the GNU config.guess platform triplet.
+     if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
++      if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
++        set(_java_libarch "x32" "amd64" "i386")
++      else()
+         set(_java_libarch "amd64" "i386")
++      endif()
+     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
+         set(_java_libarch "i386")
+     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
diff -Nru cmake-3.2.2/debian/patches/series cmake-3.2.2/debian/patches/series
--- cmake-3.2.2/debian/patches/series	2015-05-14 02:22:47.000000000 +0200
+++ cmake-3.2.2/debian/patches/series	2015-07-13 12:28:28.000000000 +0200
@@ -8,3 +8,4 @@
 custom-sphinx-flags.patch
 fix-mips-endian.patch
 openjdk-8-detection.patch
+FindJNI.cmake.x32.patch

Reply via email to