- do not build with gcc java
- use libedit instead of gnu readline (licensing issues) OBS-URL: https://build.opensuse.org/package/show/Java:packages/libreadline-java?expand=0&rev=7
This commit is contained in:
parent
226a6980a5
commit
3b2ac875b8
15
libreadline-java-libdir.patch
Normal file
15
libreadline-java-libdir.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -urN ../libreadline-java-0.8.0.orig/src/org/gnu/readline/Readline.java ./src/org/gnu/readline/Readline.java
|
||||
--- ../libreadline-java-0.8.0.orig/src/org/gnu/readline/Readline.java 2003-01-07 05:14:35.000000000 -0500
|
||||
+++ ./src/org/gnu/readline/Readline.java 2007-07-05 16:05:25.000000000 -0400
|
||||
@@ -130,8 +130,9 @@
|
||||
iLib = lib;
|
||||
return;
|
||||
}
|
||||
- System.loadLibrary(lib.getName()); // might throw UnsatisfiedLinkError
|
||||
- iLib = lib;
|
||||
+ // Load Editline backing library by default.
|
||||
+ System.load("@LIBDIR@/libreadline-java/libJavaEditline.so");
|
||||
+ iLib = ReadlineLibrary.Editline;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
24
libreadline-java-ncurses.patch
Normal file
24
libreadline-java-ncurses.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -urN ../libreadline-java-0.8.0.orig/src/native/Makefile ./src/native/Makefile
|
||||
--- ../libreadline-java-0.8.0.orig/src/native/Makefile 2003-01-07 05:14:35.000000000 -0500
|
||||
+++ ./src/native/Makefile 2007-07-05 13:54:47.000000000 -0400
|
||||
@@ -45,9 +45,8 @@
|
||||
CFLAGS=-DWIN32=$(WIN32) -D__IBMC__
|
||||
else
|
||||
INCLUDES = -I $(JAVAINCLUDE) -I $(JAVANATINC)
|
||||
-LIBPATH = -L/usr/lib/termcap
|
||||
-JavaReadline_LIBS = -lreadline -ltermcap -lhistory
|
||||
-JavaEditline_LIBS = -ledit -ltermcap
|
||||
+JavaReadline_LIBS = -lreadline -ltinfo -lhistory
|
||||
+JavaEditline_LIBS = -ledit -lncurses
|
||||
ifeq (cygwin,$(WIN32))
|
||||
JavaGetline_LIBS = -lcygwin
|
||||
endif
|
||||
@@ -97,7 +96,7 @@
|
||||
$(CC) -W1,$(ROOTDIR)/lib$(TG).exp -o $@ \
|
||||
$(OBJECTS) -W1,-e,_readline_init@12
|
||||
else
|
||||
- $(CC) -shared $(OBJECTS) $(LIBPATH) $($(TG)_LIBS) -o $@
|
||||
+ $(CC) -shared $(OBJECTS) $($(TG)_LIBS) -o $@
|
||||
endif
|
||||
endif
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 20 13:29:19 UTC 2012 - mvyskocil@suse.cz
|
||||
|
||||
- do not build with gcc java
|
||||
- use libedit instead of gnu readline (licensing issues)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 12 19:48:34 UTC 2012 - andreas.stieger@gmx.de
|
||||
|
||||
|
@ -18,38 +18,41 @@
|
||||
|
||||
|
||||
Name: libreadline-java
|
||||
BuildRequires: fastjar
|
||||
BuildRequires: gjdoc
|
||||
BuildRequires: java-1_4_2-gcj-compat-devel
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: termcap
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xerces-j2
|
||||
%define name libreadline-java
|
||||
%define version 0.8.0
|
||||
%define readline_ver 4.3
|
||||
%define release 9jpp
|
||||
%define section free
|
||||
Version: 0.8.0
|
||||
Release: 0
|
||||
Summary: Java Wrapper for the GNU Readline Library
|
||||
Summary: Java Wrapper for the EditLine Library
|
||||
License: LGPL-2.1+
|
||||
Group: Development/Libraries/Java
|
||||
Source0: http://download.sourceforge.net/java-readline/libreadline-java-0.8.0-src.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Patch1: libreadline-java-0.8.0-missing-return-type.patch
|
||||
Patch0: libreadline-java-ncurses.patch
|
||||
Patch1: libreadline-java-libdir.patch
|
||||
Patch2: libreadline-java-0.8.0-missing-return-type.patch
|
||||
Url: http://java-readline.sf.net/
|
||||
# Requires: readline = %{readline_ver}
|
||||
PreReq: /sbin/ldconfig
|
||||
Provides: java_readline
|
||||
Provides: gnu.readline
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: libedit-devel >= 2.9
|
||||
BuildRequires: ncurses-devel
|
||||
|
||||
Provides: gnu.readline
|
||||
Provides: java_readline
|
||||
|
||||
Requires: java >= 1.4.2
|
||||
Requires: libedit >= 2.9
|
||||
|
||||
#BuildRequires: fastjar
|
||||
#BuildRequires: gjdoc
|
||||
#BuildRequires: java-1_4_2-gcj-compat-devel
|
||||
#BuildRequires: readline-devel
|
||||
#BuildRequires: termcap
|
||||
#BuildRequires: unzip
|
||||
#BuildRequires: xerces-j2
|
||||
#PreReq: /sbin/ldconfig
|
||||
|
||||
%description
|
||||
Java-Readline is a port of GNU Readline for Java. To be more precise,
|
||||
it is a JNI wrapper for Readline. It is distributed under the LGPL.
|
||||
|
||||
|
||||
libreadline-java provides Java bindings for libedit though a JNI
|
||||
wrapper.
|
||||
|
||||
%package javadoc
|
||||
PreReq: coreutils
|
||||
@ -57,56 +60,54 @@ Summary: Javadoc for libreadline-java
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description javadoc
|
||||
Java-Readline is a port of GNU Readline for Java. Or, to be more
|
||||
precise, it is a JNI-wrapper to Readline. It is distributed under the
|
||||
LGPL.
|
||||
|
||||
This package contains the javadoc documentation for Java-Readline.
|
||||
|
||||
libreadline-java provides Java bindings for libedit though a JNI
|
||||
wrapper. This package contains the javadoc documentation for it.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
sed -i 's|@LIBDIR@|%{_libdir}|' src/org/gnu/readline/Readline.java
|
||||
|
||||
%build
|
||||
export JAVA_HOME=%{java_home}
|
||||
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
|
||||
%__make T_LIBS=JavaReadline LIBPATH=-L%{_libdir}/termcap
|
||||
%__make apidoc
|
||||
make T_LIBS=JavaEditline CFLAGS="%{optflags} -fPIC -DPOSIX"
|
||||
make apidoc
|
||||
|
||||
# fix debuginfo package
|
||||
rm -f org test
|
||||
for dir in org test
|
||||
do
|
||||
ln -s src/$dir
|
||||
done
|
||||
|
||||
%install
|
||||
# jar
|
||||
%__mkdir_p %{buildroot}%{_jnidir}-ext
|
||||
%__install -m 644 %{name}.jar %{buildroot}%{_jnidir}-ext/%{name}-%{version}.jar
|
||||
(cd %{buildroot}%{_jnidir}-ext && for jar in *-%{version}*; do \
|
||||
ln -sf ${jar} ${jar/-%{version}/}; done)
|
||||
# lib
|
||||
%__mkdir_p %{buildroot}%{_libdir}
|
||||
%__install -m 755 libJavaReadline.so %{buildroot}%{_libdir}/libJavaReadline.so.%{version}
|
||||
(cd %{buildroot}%{_libdir} && ln -sf libJavaReadline.so.%{version} libJavaReadline.so)
|
||||
# install jar file and JNI library under %{_libdir}/%{name}
|
||||
# FIXME: fix jpackage-utils to handle multilib correctly
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
|
||||
install -m 644 %{name}.jar \
|
||||
$RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}.jar
|
||||
install -m 755 libJavaEditline.so $RPM_BUILD_ROOT%{_libdir}/%{name}
|
||||
|
||||
# javadoc
|
||||
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||
%__cp -a api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -a api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc ChangeLog NEWS README README.1st VERSION
|
||||
%{_libdir}/*.so*
|
||||
%dir %{_jnidir}-ext
|
||||
%{_jnidir}-ext/*.jar
|
||||
%doc ChangeLog NEWS README README.1st VERSION COPYING.LIB
|
||||
%dir %{_libdir}/%{name}
|
||||
%attr(-,root,root) %{_libdir}/%{name}/*
|
||||
|
||||
%files javadoc
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc %{_javadocdir}
|
||||
%doc %{_javadocdir}/%{name}-%{version}
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user