From d872a16def8598d4861da8a710f7b39b564db773 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sun, 3 Nov 2013 19:57:25 +0200 Subject: [PATCH] Properly find Java when kernel is 64bit, userland - 32bit (amd64/ppc64). Patch: FindJNI_amd64_ppc_biarch.diff (Closes: #718290) --- debian/changelog | 2 ++ debian/patches/FindJNI_amd64_ppc_biarch.diff | 29 ++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 32 insertions(+) create mode 100644 debian/patches/FindJNI_amd64_ppc_biarch.diff diff --git a/debian/changelog b/debian/changelog index 576e20216..42f391964 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ cmake (2.8.12-0r2) UNRELEASED; urgency=low Thanks to Kevin Ryde. (Closes: #710572) * Fix a code typo in PHP4 (patch FindPHP4_fix_typo.diff). Thanks to Mathieu Malaterre for the patch. (Closes: #722475) + * Properly find Java when kernel is 64bit, userland - 32bit (amd64/ppc64). + (patch: FindJNI_amd64_ppc_biarch.diff) (Closes: #718290) -- Modestas Vainius Sun, 03 Nov 2013 12:28:06 +0200 diff --git a/debian/patches/FindJNI_amd64_ppc_biarch.diff b/debian/patches/FindJNI_amd64_ppc_biarch.diff new file mode 100644 index 000000000..1ab903faf --- /dev/null +++ b/debian/patches/FindJNI_amd64_ppc_biarch.diff @@ -0,0 +1,29 @@ +From: Modestas Vainius +Subject: amd64/ppc64 kernels might be running on 32bit system +Origin: vendor +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718290 + +On biarch architecture, CMAKE_SYSTEM_PROCESSOR might be a 64bit one while the +system 32bit one. Take this into consideration while looking for Java library +directory. + +--- a/Modules/FindJNI.cmake ++++ b/Modules/FindJNI.cmake +@@ -33,7 +33,7 @@ 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") +- set(_java_libarch "amd64") ++ set(_java_libarch "amd64" "i386") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") + set(_java_libarch "i386") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha") +@@ -46,7 +46,7 @@ macro(java_append_library_directories _v + # endianess of the underlying system. + set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64") +- set(_java_libarch "ppc64") ++ set(_java_libarch "ppc64" "ppc") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)") + set(_java_libarch "ppc") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc") diff --git a/debian/patches/series b/debian/patches/series index 9aede6a00..9fd62e690 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ install_to_multiarch_libdir_on_kfreebsd_hurd.diff multiarch-python-include-dirs.diff qt_import_dir_variable.diff FindPHP4_fix_typo.diff +FindJNI_amd64_ppc_biarch.diff