Accepting request 125540 from Java:packages
- do not build with gcc java - use libedit instead of gnu readline (licensing issues) OBS-URL: https://build.opensuse.org/request/show/125540 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreadline-java?expand=0&rev=19
This commit is contained in:
commit
1c9421cddc
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
|
Thu Jan 12 19:48:34 UTC 2012 - andreas.stieger@gmx.de
|
||||||
|
|
||||||
|
@ -18,38 +18,41 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: libreadline-java
|
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
|
Version: 0.8.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Java Wrapper for the GNU Readline Library
|
Summary: Java Wrapper for the EditLine Library
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
Source0: http://download.sourceforge.net/java-readline/libreadline-java-0.8.0-src.tar.gz
|
Source0: http://download.sourceforge.net/java-readline/libreadline-java-0.8.0-src.tar.gz
|
||||||
Source1: baselibs.conf
|
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/
|
Url: http://java-readline.sf.net/
|
||||||
# Requires: readline = %{readline_ver}
|
|
||||||
PreReq: /sbin/ldconfig
|
|
||||||
Provides: java_readline
|
|
||||||
Provides: gnu.readline
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
%description
|
||||||
Java-Readline is a port of GNU Readline for Java. To be more precise,
|
libreadline-java provides Java bindings for libedit though a JNI
|
||||||
it is a JNI wrapper for Readline. It is distributed under the LGPL.
|
wrapper.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
PreReq: coreutils
|
PreReq: coreutils
|
||||||
@ -57,56 +60,54 @@ Summary: Javadoc for libreadline-java
|
|||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
Java-Readline is a port of GNU Readline for Java. Or, to be more
|
libreadline-java provides Java bindings for libedit though a JNI
|
||||||
precise, it is a JNI-wrapper to Readline. It is distributed under the
|
wrapper. This package contains the javadoc documentation for it.
|
||||||
LGPL.
|
|
||||||
|
|
||||||
This package contains the javadoc documentation for Java-Readline.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch1 -p1
|
%patch0
|
||||||
|
%patch1
|
||||||
|
%patch2 -p1
|
||||||
find . -name "*.jar" -exec rm -f {} \;
|
find . -name "*.jar" -exec rm -f {} \;
|
||||||
|
sed -i 's|@LIBDIR@|%{_libdir}|' src/org/gnu/readline/Readline.java
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export JAVA_HOME=%{java_home}
|
export JAVA_HOME=%{java_home}
|
||||||
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
|
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
|
||||||
%__make T_LIBS=JavaReadline LIBPATH=-L%{_libdir}/termcap
|
make T_LIBS=JavaEditline CFLAGS="%{optflags} -fPIC -DPOSIX"
|
||||||
%__make apidoc
|
make apidoc
|
||||||
|
|
||||||
|
# fix debuginfo package
|
||||||
|
rm -f org test
|
||||||
|
for dir in org test
|
||||||
|
do
|
||||||
|
ln -s src/$dir
|
||||||
|
done
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# jar
|
# install jar file and JNI library under %{_libdir}/%{name}
|
||||||
%__mkdir_p %{buildroot}%{_jnidir}-ext
|
# FIXME: fix jpackage-utils to handle multilib correctly
|
||||||
%__install -m 644 %{name}.jar %{buildroot}%{_jnidir}-ext/%{name}-%{version}.jar
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
|
||||||
(cd %{buildroot}%{_jnidir}-ext && for jar in *-%{version}*; do \
|
install -m 644 %{name}.jar \
|
||||||
ln -sf ${jar} ${jar/-%{version}/}; done)
|
$RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}.jar
|
||||||
# lib
|
install -m 755 libJavaEditline.so $RPM_BUILD_ROOT%{_libdir}/%{name}
|
||||||
%__mkdir_p %{buildroot}%{_libdir}
|
|
||||||
%__install -m 755 libJavaReadline.so %{buildroot}%{_libdir}/libJavaReadline.so.%{version}
|
|
||||||
(cd %{buildroot}%{_libdir} && ln -sf libJavaReadline.so.%{version} libJavaReadline.so)
|
|
||||||
# javadoc
|
# javadoc
|
||||||
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
|
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
%__cp -a api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
cp -a api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%doc ChangeLog NEWS README README.1st VERSION
|
%doc ChangeLog NEWS README README.1st VERSION COPYING.LIB
|
||||||
%{_libdir}/*.so*
|
%dir %{_libdir}/%{name}
|
||||||
%dir %{_jnidir}-ext
|
%attr(-,root,root) %{_libdir}/%{name}/*
|
||||||
%{_jnidir}-ext/*.jar
|
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%doc %{_javadocdir}
|
%doc %{_javadocdir}/%{name}
|
||||||
%doc %{_javadocdir}/%{name}-%{version}
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user