diff --git a/Formula/jsvc.rb b/Formula/jsvc.rb index 12267c300a..fc13098bed 100644 --- a/Formula/jsvc.rb +++ b/Formula/jsvc.rb @@ -2,14 +2,20 @@ require 'formula' class Jsvc < Formula homepage 'http://commons.apache.org/daemon/jsvc.html' - url 'http://archive.apache.org/dist/commons/daemon/source/commons-daemon-1.0.10-native-src.tar.gz' - sha1 'b76272e39fb5c4695a102227d3c52d9c717c4ede' - version '1.0.10' + url 'http://archive.apache.org/dist/commons/daemon/source/commons-daemon-1.0.15-native-src.tar.gz' + version '1.0.15' + sha1 'f99fa9bcbc3faf6660e760af099eb003e2553b39' + + # Enable Java 7 JVMs: https://issues.apache.org/jira/browse/DAEMON-281 + def patches + DATA + end def install arch = Hardware.is_64_bit? ? "-arch x86_64" : "-arch i386" ENV.append "CFLAGS", arch ENV.append "LDFLAGS", arch + ENV.append "CPPFLAGS", "-I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers" prefix.install %w{ NOTICE.txt LICENSE.txt RELEASE-NOTES.txt } @@ -20,3 +26,33 @@ class Jsvc < Formula bin.install 'jsvc' end end + +__END__ +diff -r -u a/unix/native/java.c b/unix/native/java.c +--- a/unix/native/java.c 2013-03-28 13:53:58.000000000 +0100 ++++ b/unix/native/java.c 2013-05-14 21:52:01.000000000 +0200 +@@ -203,6 +203,13 @@ + return false; + } + } ++ if (stat(appf, &sb)) { ++ if (replace(appf, 1024, "$JAVA_HOME/../MacOS/libjli.dylib", ++ "$JAVA_HOME", data->path) != 0) { ++ log_error("Cannot replace values in loader library"); ++ return false; ++ } ++ } + apph = dso_link(appf); + if (apph == NULL) { + log_error("Cannot load required shell library %s", appf); +diff -r -u a/unix/native/location.c b/unix/native/location.c +--- a/unix/native/location.c 2013-03-28 13:53:58.000000000 +0100 ++++ b/unix/native/location.c 2013-05-14 21:50:31.000000000 +0200 +@@ -144,6 +144,7 @@ + char *location_jvm_configured[] = { + #if defined(OS_DARWIN) + "$JAVA_HOME/../Libraries/lib$VM_NAME.dylib", ++ "$JAVA_HOME/jre/lib/$VM_NAME/libjvm.dylib", + #elif defined(OS_CYGWIN) + "$JAVA_HOME/jre/bin/$VM_NAME/jvm.dll", /* Sun JDK 1.3 */ + #elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_FREEBSD) || defined(OS_TRU64)