[packages/gjdoc] - added link patch, fixed native build

qboosh qboosh at pld-linux.org
Sun Sep 20 07:53:24 CEST 2015


commit 63d7b591b273634b9eee03aa5b690e477b9f3b2e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Sep 20 07:54:17 2015 +0200

    - added link patch, fixed native build

 gjdoc-link.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 gjdoc.spec       | 23 ++++++++++++++++++++---
 2 files changed, 70 insertions(+), 3 deletions(-)
---
diff --git a/gjdoc.spec b/gjdoc.spec
index 220574b..acdb7e7 100644
--- a/gjdoc.spec
+++ b/gjdoc.spec
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_with	native	# build native library (needs as-needed fix)
+%bcond_with	native	# build native library
 #
 Summary:	Documentation generation framework for Java source files
 Summary(pl.UTF-8):	Szkielet do generowania dokumentacji dla plików źródłowych w Javie
@@ -13,15 +13,25 @@ Source0:	http://ftp.gnu.org/gnu/classpath/%{name}-%{version}.tar.gz
 # Source0-md5:	24cade2efe22d5adefcbabb21f094803
 Patch0:		%{name}-info.patch
 Patch1:		%{name}-launcher.patch
+Patch2:		%{name}-link.patch
 URL:		http://www.gnu.org/software/classpath/cp-tools/
 BuildRequires:	antlr >= 2.7.5-3
+BuildRequires:	autoconf >= 2.59
+BuildRequires:	automake
 # Some versions of gcj are known to produce bad bytecode.
 # At least bug 19921 is known to affect gjdoc (in Feb 2005).
 BuildRequires:	gcc-java >= 5:4.0.0-0.20050416.1
+BuildRequires:	libtool >= 2:1.5
 BuildRequires:	texinfo
 Requires:	jpackage-utils
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# circular dependency with lib-gnu-classpath-tools (void gnu::classpath::tools::gjdoc::Main::main(JArray<java::lang::String*>*))
+%define		skip_post_check_so	lib-com-sun-javadoc.so.*
+
+# some -W flags are not valid for Java, filter them out to avoid warnings (which break libtool configure)
+%define		gcjflags	%(echo %{rpmcflags} | sed -e 's/ -Wformat[^ ]*//g')
+
 %description
 Gjdoc is a documentation framework for generating documentation in
 various formats from Java source files. It is both a drop-in
@@ -60,12 +70,17 @@ kompilatorem, np. "gcj -fsyntax-only" lub "jikes +B".
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__automake}
 %configure \
-	GCJFLAGS="%{rpmcflags}" \
+	GCJFLAGS="%{gcjflags}" \
 	--with-antlr-jar=%{_javadir}/antlr.jar \
-	--%{?with_native:en}%{!?with_native:dis}able-native \
+	--enable-native%{!?with_native:=no} \
 	--enable-shared \
 	--disable-static
 
@@ -77,6 +92,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/{lib-com-sun-javadoc,lib-com-sun-tools-doclets-Taglet,lib-gnu-classpath-tools-gjdoc}.{la,so}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
diff --git a/gjdoc-link.patch b/gjdoc-link.patch
new file mode 100644
index 0000000..3ce0b79
--- /dev/null
+++ b/gjdoc-link.patch
@@ -0,0 +1,50 @@
+--- gjdoc-0.7.9/Makefile.am.orig	2015-09-18 22:34:09.153733209 +0200
++++ gjdoc-0.7.9/Makefile.am	2015-09-18 22:34:12.750399726 +0200
+@@ -49,15 +49,14 @@
+ gjdoc_SOURCES = 
+ gjdoc_LINK = $(GCJLINK) $(gjdoc_LDFLAGS)
+ gjdoc_LDADD = -l-com-sun-javadoc -l-com-sun-tools-doclets-Taglet \
+-	-l-gnu-classpath-tools-gjdoc antlr.so \
++	-l-gnu-classpath-tools-gjdoc \
+ 	$(jni_linkflag)
+ 
+ gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
+ 	-Dgnu.gcj.runtime.VMClassLoader.library_control=never
+ gjdoc_DEPENDENCIES = lib-com-sun-javadoc.la \
+ 	lib-com-sun-tools-doclets-Taglet.la \
+-	lib-gnu-classpath-tools-gjdoc.la \
+-	antlr.so
++	lib-gnu-classpath-tools-gjdoc.la
+ 
+ lib_com_sun_javadoc_la_SOURCES = \
+ 	src/com/sun/tools/javadoc/Main.java \
+@@ -259,7 +259,28 @@
+ 	$(lib_gnu_classpath_tools_gjdoc_la_XSLS) \
+ 	$(lib_gnu_classpath_tools_gjdoc_la_XHTML) \
+ 	$(lib_gnu_classpath_tools_gjdoc_la_TXTS) \
+-	version.lo
++	version.lo \
++	-L. -l:antlr.so \
++	lib-com-sun-javadoc.la \
++	lib-com-sun-tools-doclets-Taglet.la
++
++lib_gnu_classpath_tools_gjdoc_la_DEPENDENCIES = \
++	$(lib_gnu_classpath_tools_gjdoc_la_CSS) \
++	$(lib_gnu_classpath_tools_gjdoc_la_DTDS) \
++	$(lib_gnu_classpath_tools_gjdoc_la_ENTS) \
++	$(lib_gnu_classpath_tools_gjdoc_la_HTML) \
++	$(lib_gnu_classpath_tools_gjdoc_la_JS) \
++	$(lib_gnu_classpath_tools_gjdoc_la_PNG) \
++	$(lib_gnu_classpath_tools_gjdoc_la_MODS) \
++	$(lib_gnu_classpath_tools_gjdoc_la_PROPERTIES) \
++	$(lib_gnu_classpath_tools_gjdoc_la_RNGS) \
++	$(lib_gnu_classpath_tools_gjdoc_la_XSLS) \
++	$(lib_gnu_classpath_tools_gjdoc_la_XHTML) \
++	$(lib_gnu_classpath_tools_gjdoc_la_TXTS) \
++	version.lo \
++	antlr.so \
++	lib-com-sun-javadoc.la \
++	lib-com-sun-tools-doclets-Taglet.la
+ 
+ gnu_classpath_tools_gjdoc_jar_CSS = \
+ 	doctranslets/html/res/gjdochtml-clean.css \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gjdoc.git/commitdiff/63d7b591b273634b9eee03aa5b690e477b9f3b2e



More information about the pld-cvs-commit mailing list