diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2016-11-28 23:49:33 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2016-11-28 23:49:33 -0800 |
commit | 9a5e23a882489d5ada36690e05a77382e630b398 (patch) | |
tree | b9589bced771797ec4fda94696a229ff29210560 /dev-ruby/facter/files | |
parent | dev-ruby/qed: add ruby23 (diff) | |
download | gentoo-9a5e23a882489d5ada36690e05a77382e630b398.tar.gz gentoo-9a5e23a882489d5ada36690e05a77382e630b398.tar.bz2 gentoo-9a5e23a882489d5ada36690e05a77382e630b398.zip |
dev-ruby/facter: fix icedtea compile.
Package-Manager: portage-2.3.2
Diffstat (limited to 'dev-ruby/facter/files')
-rw-r--r-- | dev-ruby/facter/files/facter-3.5.0-jar.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-ruby/facter/files/facter-3.5.0-jar.patch b/dev-ruby/facter/files/facter-3.5.0-jar.patch new file mode 100644 index 000000000000..36b5279debb5 --- /dev/null +++ b/dev-ruby/facter/files/facter-3.5.0-jar.patch @@ -0,0 +1,34 @@ +Fix javah for strict javah & ordering. + +* javah on some JDKs is strict about sourcing, and no classpath entry + referencing the jar was present for the javah command, either as an argument + or in the environment. +* javah was chained as a post-build of the jar creation. This caused breakage + if src/java/*.cc tried to use the javah-generated .h file before it was + generated. + +Fixes: https://tickets.puppetlabs.com/browse/FACT-1541 +Fixes: https://bugs.gentoo.org/show_bug.cgi?id=600942 +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar facter-9999.orig/lib/CMakeLists.txt facter-9999/lib/CMakeLists.txt +--- facter-9999.orig/lib/CMakeLists.txt 2016-11-28 22:18:29.366271544 -0800 ++++ facter-9999/lib/CMakeLists.txt 2016-11-28 22:28:36.244894899 -0800 +@@ -267,7 +267,15 @@ + include(UseJava) +- add_jar(facter-jruby "${CMAKE_BINARY_DIR}/lib/com/puppetlabs/Facter.java" OUTPUT_NAME facter OUTPUT_DIR "${CMAKE_BINARY_DIR}/lib" ENTRY_POINT com/puppetlabs/Facter) ++ add_jar(facter-jruby-jar "${CMAKE_BINARY_DIR}/lib/com/puppetlabs/Facter.java" OUTPUT_NAME facter OUTPUT_DIR "${CMAKE_BINARY_DIR}/lib" ENTRY_POINT com/puppetlabs/Facter) + +- add_custom_command(TARGET facter-jruby POST_BUILD COMMAND javah ARGS -d "${CMAKE_CURRENT_LIST_DIR}/src/java" com.puppetlabs.Facter WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib") ++ # javah does not atomically write the header file, so parallel builds can ++ # read it before it finishes writing if not careful. ++ add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/src/java/com_puppetlabs_Facter.h" ++ COMMAND javah ARGS -classpath facter.jar -d "${CMAKE_CURRENT_LIST_DIR}/src/java" com.puppetlabs.Facter ++ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib" ++ DEPENDS facter-jruby-jar) ++ # Anything that depends on facter-jruby wants both the jar AND the completely written header. ++ add_custom_target(facter-jruby DEPENDS facter-jruby-jar "${CMAKE_CURRENT_LIST_DIR}/src/java/com_puppetlabs_Facter.h") ++ set(LIBFACTER_COMMON_SOURCES ${LIBFACTER_COMMON_SOURCES} src/java/com_puppetlabs_Facter.h) + endif() + + # Set include directories |