forked from pool/gettext-runtime
Accepting request 530806 from home:fstrba:branches:Base:System
Fix build with jdk9 OBS-URL: https://build.opensuse.org/request/show/530806 OBS-URL: https://build.opensuse.org/package/show/Base:System/gettext-runtime?expand=0&rev=136
This commit is contained in:
parent
00cd035a81
commit
8f82878260
88
gettext-0.19.8.1-jdk9.patch
Normal file
88
gettext-0.19.8.1-jdk9.patch
Normal file
@ -0,0 +1,88 @@
|
||||
--- gettext-0.19.8.1/gettext-runtime/configure.ac 2017-10-03 10:21:39.140553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-runtime/configure.ac 2017-10-03 10:21:45.772553392 +0200
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
gt_JAVA_CHOICE
|
||||
|
||||
-gt_JAVACOMP([1.3], [1.1])
|
||||
+gt_JAVACOMP([1.6], [1.6])
|
||||
AC_CHECK_PROG([JAR], [jar], [jar])
|
||||
if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
|
||||
BUILDJAVA=yes
|
||||
--- gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4 2017-10-03 10:21:39.152553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4 2017-10-03 10:40:49.418502181 +0200
|
||||
@@ -118,6 +118,8 @@
|
||||
failcode='class conftestfail<T> { T foo() { return null; } }' ;;
|
||||
1.5) goodcode='class conftest<T> { T foo() { return null; } }'
|
||||
failcode='class conftestfail syntax error' ;;
|
||||
+ 1.6) goodcode='class conftest<T> { T foo() { return null; } }'
|
||||
+ failcode='class conftestfail syntax error' ;;
|
||||
*) AC_MSG_ERROR([invalid source-version argument to gt_@&t@JAVACOMP: $source_version]) ;;
|
||||
esac
|
||||
case "$target_version" in
|
||||
--- gettext-0.19.8.1/gettext-tools/configure.ac 2017-10-03 10:21:39.180553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-tools/configure.ac 2017-10-03 10:46:20.107244296 +0200
|
||||
@@ -44,7 +44,7 @@
|
||||
AC_SUBST([BUILDJAVAEXE])
|
||||
|
||||
gt_JAVAEXEC
|
||||
-gt_JAVACOMP([1.3])
|
||||
+gt_JAVACOMP([1.6], [1.6])
|
||||
AC_CHECK_PROG([JAR], [jar], [jar])
|
||||
if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
|
||||
BUILDJAVA=yes
|
||||
--- gettext-0.19.8.1/gettext-tools/examples/hello-java/configure.ac 2017-10-03 10:21:39.260553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-tools/examples/hello-java/configure.ac 2017-10-03 10:50:44.964124163 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
dnl Check whether we can execute Java programs.
|
||||
gt_JAVAEXEC
|
||||
dnl Check whether we can build Java programs.
|
||||
-gt_JAVACOMP([1.3])
|
||||
+gt_JAVACOMP([1.6], [1.6])
|
||||
AC_CHECK_PROG(JAR, jar, jar)
|
||||
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
|
||||
BUILDJAVA=yes
|
||||
--- gettext-0.19.8.1/gettext-tools/examples/hello-java-awt/configure.ac 2017-10-03 10:21:39.244553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-tools/examples/hello-java-awt/configure.ac 2017-10-03 10:51:15.820124280 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
dnl Check whether we can execute Java programs.
|
||||
gt_JAVAEXEC([TestAWT], [$srcdir/m4])
|
||||
dnl Check whether we can build Java programs.
|
||||
-gt_JAVACOMP([1.3])
|
||||
+gt_JAVACOMP([1.6], [1.6])
|
||||
AC_CHECK_PROG(JAR, jar, jar)
|
||||
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
|
||||
BUILDJAVA=yes
|
||||
--- gettext-0.19.8.1/gettext-tools/examples/hello-java-qtjambi/configure.ac 2017-10-03 10:21:39.256553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-tools/examples/hello-java-qtjambi/configure.ac 2017-10-03 10:23:16.860553736 +0200
|
||||
@@ -26,7 +26,7 @@
|
||||
dnl Check whether we can execute Java programs.
|
||||
gt_JAVAEXEC([Test15], [$srcdir/m4])
|
||||
dnl Check whether we can build Java programs.
|
||||
-gt_JAVACOMP([1.5], [1.5])
|
||||
+gt_JAVACOMP([1.6], [1.6])
|
||||
AC_CHECK_PROG(JAR, jar, jar)
|
||||
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
|
||||
BUILDJAVA=yes
|
||||
--- gettext-0.19.8.1/gettext-tools/examples/hello-java-swing/configure.ac 2017-10-03 10:21:39.248553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-tools/examples/hello-java-swing/configure.ac 2017-10-03 10:51:00.308124221 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
dnl Check whether we can execute Java programs.
|
||||
gt_JAVAEXEC([TestAWT], [$srcdir/m4])
|
||||
dnl Check whether we can build Java programs.
|
||||
-gt_JAVACOMP([1.3])
|
||||
+gt_JAVACOMP([1.6], [1.6])
|
||||
AC_CHECK_PROG(JAR, jar, jar)
|
||||
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
|
||||
BUILDJAVA=yes
|
||||
--- gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4 2017-10-03 10:21:39.268553367 +0200
|
||||
+++ gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4 2017-10-03 10:40:23.914502085 +0200
|
||||
@@ -118,6 +118,8 @@
|
||||
failcode='class conftestfail<T> { T foo() { return null; } }' ;;
|
||||
1.5) goodcode='class conftest<T> { T foo() { return null; } }'
|
||||
failcode='class conftestfail syntax error' ;;
|
||||
+ 1.6) goodcode='class conftest<T> { T foo() { return null; } }'
|
||||
+ failcode='class conftestfail syntax error' ;;
|
||||
*) AC_MSG_ERROR([invalid source-version argument to gt_@&t@JAVACOMP: $source_version]) ;;
|
||||
esac
|
||||
case "$target_version" in
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 3 10:12:03 UTC 2017 - fstrba@suse.com
|
||||
|
||||
- Added patch:
|
||||
* gettext-0.19.8.1-jdk9.patch
|
||||
+ specify java soure and target level 6 to be able to build
|
||||
with jdk9
|
||||
- Do not depend on gcc-java and do not build native binaries of the
|
||||
gnu.gettext.GetURL and gnu.gettext.DumpResource tools, since
|
||||
gcc-java is bound to disappear
|
||||
- Build the gettext.jar using any java-devel provider and make the
|
||||
gnu.gettext.GetURL and gnu.gettext.DumpResource tools scripts
|
||||
running classes from this gettext.jar
|
||||
- Clean the spec file a bit
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 19 15:42:15 UTC 2016 - astieger@suse.com
|
||||
|
||||
|
@ -17,35 +17,36 @@
|
||||
|
||||
|
||||
Name: gettext-java
|
||||
Version: 0.19.8.1
|
||||
Release: 0
|
||||
Summary: Java Support for Native Language Support (NLS)
|
||||
License: LGPL-2.1+
|
||||
Group: Development/Tools/Other
|
||||
Url: http://www.gnu.org/software/gettext/
|
||||
Source0: http://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz
|
||||
Source1: gettext-rpmlintrc
|
||||
Source2: suse-start-po-mode.el
|
||||
Source3: gettext-linkdupes.sh
|
||||
Source4: http://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz.sig
|
||||
Source5: %{name}.keyring
|
||||
Patch0: gettext-0.12.1-sigfpe.patch
|
||||
Patch2: gettext-0.12.1-gettextize.patch
|
||||
Patch4: gettext-po-mode.diff
|
||||
Patch5: gettext-initialize_vars.patch
|
||||
Patch9: gettext-needlessly_init_vars.patch
|
||||
Patch10: gettext-0.19.8.1-jdk9.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gcc-java
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: libcroco-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: perl-libintl-perl
|
||||
BuildRequires: tcl
|
||||
BuildRequires: xz
|
||||
Url: http://www.gnu.org/software/gettext/
|
||||
Version: 0.19.8.1
|
||||
Release: 0
|
||||
Summary: Java Support for Native Language Support (NLS)
|
||||
License: LGPL-2.1+
|
||||
Group: Development/Tools/Other
|
||||
# FIXME: use proper Requires(pre/post/preun/...)
|
||||
PreReq: %{install_info_prereq}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source0: http://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz
|
||||
Source1: gettext-rpmlintrc
|
||||
Source2: suse-start-po-mode.el
|
||||
Source3: gettext-linkdupes.sh
|
||||
Source4: http://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz.sig
|
||||
Source5: %name.keyring
|
||||
Patch: gettext-0.12.1-sigfpe.patch
|
||||
Patch2: gettext-0.12.1-gettextize.patch
|
||||
Patch4: gettext-po-mode.diff
|
||||
Patch5: gettext-initialize_vars.patch
|
||||
Patch9: gettext-needlessly_init_vars.patch
|
||||
|
||||
%description
|
||||
This package includes the tools needed to support message catalogs in
|
||||
@ -54,19 +55,20 @@ java+swing.
|
||||
|
||||
%prep
|
||||
%setup -q -n gettext-%{version}
|
||||
%patch
|
||||
%patch0
|
||||
%patch2
|
||||
%patch4
|
||||
%patch5
|
||||
%patch9
|
||||
%patch10 -p1
|
||||
|
||||
%build
|
||||
# expect a couple "You should update your `aclocal.m4' by running aclocal."
|
||||
#autoreconf -fiv
|
||||
autoreconf -fiv
|
||||
#sh autogen.sh
|
||||
export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
|
||||
export CXXFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
|
||||
%configure --enable-shared
|
||||
%configure --enable-shared --disable-native-java --enable-java
|
||||
make GMSGFMT=../src/msgfmt %{?_smp_mflags} V=1
|
||||
|
||||
%install
|
||||
@ -89,6 +91,16 @@ fdupes -r *|while read dupe; do
|
||||
done
|
||||
cd ..
|
||||
find -size 0 -print0 | xargs -0 --no-run-if-empty rm
|
||||
mkdir -p %{buildroot}%{_libdir}/gettext
|
||||
mv %{buildroot}/%{_datadir}/gettext/gettext.jar %{buildroot}%{_libdir}/gettext/
|
||||
# Create scripts that will launch the tools
|
||||
for i in gnu.gettext.DumpResource gnu.gettext.GetURL; do
|
||||
cat <<EOF > %{buildroot}%{_libdir}/gettext/$i
|
||||
#!/bin/sh
|
||||
exec java -cp %{_libdir}/gettext/gettext.jar $i \${1+\$@}
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libdir}/gettext/$i
|
||||
done
|
||||
rm -rf %{buildroot}/%{_datadir}/*
|
||||
mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}
|
||||
cp -av * %{buildroot}/%{_defaultdocdir}/%{name}
|
||||
@ -112,23 +124,20 @@ diff %{SOURCE3} . || {
|
||||
######################################################
|
||||
END
|
||||
}
|
||||
ls -l %{buildroot}/%_datadir
|
||||
ls -l %{buildroot}/%{_datadir}
|
||||
# exclude files packaged via other spec files
|
||||
rm -rf %{buildroot}/%_prefix/bin
|
||||
rm -f %{buildroot}/%_libdir/lib*
|
||||
rm -f %{buildroot}/%_libdir/gettext/hostname
|
||||
rm -f %{buildroot}/%_libdir/gettext/project-id
|
||||
rm -f %{buildroot}/%_libdir/gettext/urlget
|
||||
rm -f %{buildroot}/%_libdir/gettext/user-email
|
||||
rm -f %{buildroot}/%_libdir/gettext/cldr-plurals
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
rm -rf %{buildroot}/%{_bindir}
|
||||
rm -f %{buildroot}/%{_libdir}/lib*
|
||||
rm -f %{buildroot}/%{_libdir}/gettext/hostname
|
||||
rm -f %{buildroot}/%{_libdir}/gettext/project-id
|
||||
rm -f %{buildroot}/%{_libdir}/gettext/urlget
|
||||
rm -f %{buildroot}/%{_libdir}/gettext/user-email
|
||||
rm -f %{buildroot}/%{_libdir}/gettext/cldr-plurals
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_defaultdocdir}/%{name}
|
||||
%_libdir/gettext/gnu.gettext.DumpResource
|
||||
%_libdir/gettext/gnu.gettext.GetURL
|
||||
%{_libdir}/gettext/gettext.jar
|
||||
%{_libdir}/gettext/gnu.gettext.DumpResource
|
||||
%{_libdir}/gettext/gnu.gettext.GetURL
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user