From 80ce211d4529cc336a7f19588aaba3eaa48065d0 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Wed, 4 May 2016 06:44:25 -0700 Subject: [PATCH] libreadline-java: disable javadoc doclint checks The javadocs in the current code aren't compliant with JDK 8 javadoc's doclint, so disable that feature when it's detected. Closes #837. Signed-off-by: ilovezfs --- Formula/libreadline-java.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Formula/libreadline-java.rb b/Formula/libreadline-java.rb index 1952161a33..55963faf34 100644 --- a/Formula/libreadline-java.rb +++ b/Formula/libreadline-java.rb @@ -13,7 +13,7 @@ class LibreadlineJava < Formula end depends_on "readline" - depends_on :java => "1.6" + depends_on :java => "1.6+" # Fix "non-void function should return a value"-Error # https://sourceforge.net/tracker/?func=detail&atid=453822&aid=3566332&group_id=48669 @@ -22,6 +22,14 @@ class LibreadlineJava < Formula def install java_home = ENV["JAVA_HOME"] + # Reported 4th May 2016: https://sourceforge.net/p/java-readline/bugs/12/ + # JDK 8 doclint for Javadoc complains about minor HTML conformance issues + if `javadoc -X`.include? "doclint" + inreplace "Makefile", + "-version -author org.gnu.readline test", + "-version -author org.gnu.readline -Xdoclint:none test" + end + # Current Oracle JDKs put the jni.h and jni_md.h in a different place than the # original Apple/Sun JDK used to. if File.exist? "#{java_home}/include/jni.h" @@ -56,7 +64,7 @@ class LibreadlineJava < Formula s.gsub! "$(CC) -shared $(OBJECTS) $(LIBPATH) $($(TG)_LIBS) -o $@", "$(CC) -install_name #{HOMEBREW_PREFIX}/lib/$(LIB_PRE)$(TG).$(LIB_EXT) -dynamiclib $(OBJECTS) $(LIBPATH) $($(TG)_LIBS) -o $@" end - (share/"libreadline-java").mkpath + pkgshare.mkpath system "make", "jar" system "make", "build-native" @@ -73,7 +81,7 @@ class LibreadlineJava < Formula # Testing libreadline-java (can we execute and exit libreadline without exceptions?) test do - assert /Exception/ !~ pipe_output("java -Djava.library.path=#{lib} -cp #{share}/libreadline-java/libreadline-java.jar test.ReadlineTest", "exit") + assert /Exception/ !~ pipe_output("java -Djava.library.path=#{lib} -cp #{pkgshare}/libreadline-java.jar test.ReadlineTest", "exit") end end