[med-svn] [gdcm] 04/05: d/p: Add patch to remove local FindJNI.cmake file
Gert Wollny
gewo at moszumanska.debian.org
Thu Oct 5 09:06:18 UTC 2017
This is an automated email from the git hooks/post-receive script.
gewo pushed a commit to branch master
in repository gdcm.
commit c31f4fb0b76d8e1fff936d175c5e977ae5106b52
Author: Gert Wollny <gewo at debian.org>
Date: Thu Oct 5 07:33:54 2017 +0000
d/p: Add patch to remove local FindJNI.cmake file
---
debian/patches/series | 1 +
debian/patches/use_system_findjni.patch | 86 +++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index 9e084ff..29c4b15 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
02_fixhurd.patch
03_linkvtkdoc.patch
04_multiarch.patch
+use_system_findjni.patch
diff --git a/debian/patches/use_system_findjni.patch b/debian/patches/use_system_findjni.patch
new file mode 100644
index 0000000..c3a27da
--- /dev/null
+++ b/debian/patches/use_system_findjni.patch
@@ -0,0 +1,86 @@
+--- a/CMake/FindJNI.cmake
++++ /dev/null
+@@ -1,83 +0,0 @@
+-# Copyright (c) 2006-2011 Mathieu Malaterre <mathieu.malaterre at gmail.com>
+-#
+-# Redistribution and use is allowed according to the terms of the New
+-# BSD license.
+-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+-
+-# Make sure to not use FindJNI anymore and prefer FindJavaProperties
+-find_package(JavaProperties REQUIRED)
+-find_path(JAVA_INCLUDE_PATH jni.h
+- ${JavaProp_JAVA_HOME}/../include
+-)
+-
+-string(TOLOWER ${JavaProp_OS_NAME} include_os_name) # Linux -> linux
+-set(JAVA_JNI_MD_INCLUDE_DIRECTORIES
+- ${JAVA_INCLUDE_PATH}/${include_os_name}
+- ${JAVA_INCLUDE_PATH}/win32 # win32
+- ${JAVA_INCLUDE_PATH}/linux # kFreeBSD
+- ${JAVA_INCLUDE_PATH}/solaris # SunOS
+- )
+-find_path(JAVA_INCLUDE_PATH2 jni_md.h
+- ${JAVA_JNI_MD_INCLUDE_DIRECTORIES}
+- )
+-
+-find_path(JAVA_AWT_INCLUDE_PATH jawt.h
+- ${JAVA_INCLUDE_PATH}
+-)
+-
+-set(JAVA_AWT_LIBRARY_DIRECTORIES
+- ${JavaProp_SUN_BOOT_LIBRARY_PATH} # works for linux
+- ${JavaProp_JAVA_HOME}/../lib # works for win32
+- )
+-
+-foreach(dir ${JAVA_AWT_LIBRARY_DIRECTORIES})
+- set(JAVA_JVM_LIBRARY_DIRECTORIES
+- ${JAVA_JVM_LIBRARY_DIRECTORIES}
+- "${dir}"
+- "${dir}/client"
+- "${dir}/server"
+- )
+-endforeach()
+-
+-find_library(JAVA_AWT_LIBRARY NAMES jawt
+- PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES}
+- )
+-
+-find_library(JAVA_JVM_LIBRARY NAMES jvm JavaVM
+- PATHS ${JAVA_JVM_LIBRARY_DIRECTORIES}
+- )
+-
+-# on linux I get this annoying error:
+-# Exception in thread "main" java.lang.UnsatisfiedLinkError: libvtkgdcmJava.so:
+-# libmawt.so: cannot open shared object file: No such file or directory
+-
+-# let's find this lib here then
+-if(UNIX)
+- find_library(JAVA_MAWT_LIBRARY NAMES mawt
+- # there is one also in headless but it does not work...
+- PATHS ${JavaProp_SUN_BOOT_LIBRARY_PATH}/xawt
+- )
+-endif()
+-
+-FIND_PACKAGE_HANDLE_STANDARD_ARGS(JNI DEFAULT_MSG JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
+- JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
+-
+-mark_as_advanced(
+- JAVA_AWT_LIBRARY
+- JAVA_MAWT_LIBRARY
+- JAVA_JVM_LIBRARY
+- JAVA_AWT_INCLUDE_PATH
+- JAVA_INCLUDE_PATH
+- JAVA_INCLUDE_PATH2
+-)
+-
+-set(JNI_LIBRARIES
+- ${JAVA_AWT_LIBRARY}
+- ${JAVA_JVM_LIBRARY}
+-)
+-
+-set(JNI_INCLUDE_DIRS
+- ${JAVA_INCLUDE_PATH}
+- ${JAVA_INCLUDE_PATH2}
+- ${JAVA_AWT_INCLUDE_PATH}
+-)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/gdcm.git
More information about the debian-med-commit
mailing list