[packages/gettext] - added libdir patch (avoid adding -L/usr/lib* in lib-link.m4) - made javac bcond disable gcj even i

qboosh qboosh at pld-linux.org
Sun Feb 5 20:26:28 CET 2017


commit 5c7ab0ff11514852f0a179545e8a931018a1395f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 5 20:28:06 2017 +0100

    - added libdir patch (avoid adding -L/usr/lib* in lib-link.m4)
    - made javac bcond disable gcj even if it exists
    - javaexe feature is still enabled (even with gcc 6.3) when using working gcj
    - release 5

 gettext-libdir.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 gettext.spec         | 38 ++++++++++++++++++++++---------
 2 files changed, 91 insertions(+), 11 deletions(-)
---
diff --git a/gettext.spec b/gettext.spec
index 6233ffb..19c69fa 100644
--- a/gettext.spec
+++ b/gettext.spec
@@ -8,12 +8,13 @@
 #   /usr/share/emacs/site-lisp/start-po.elc
 #
 # Conditional build:
-%bcond_without	asprintf	# without libasprintf C++ library
-%bcond_with	xemacs		# without po-mode for xemacs
-%bcond_without	gcj		# with Java support by gcj (preferred over javac)
-%bcond_with	javac		# with Java support by some javac
-%bcond_without	dotnet		# without .NET support
-%bcond_with	bootstrap	# use system GLib and libcroco
+%bcond_without	asprintf	# libasprintf C++ library
+%bcond_with	xemacs		# po-mode for xemacs
+%bcond_without	java		# convenience bcond to disable Java (any)
+%bcond_without	gcj		# Java support by gcj (preferred over javac)
+%bcond_with	javac		# Java support by some javac
+%bcond_without	dotnet		# .NET support package
+%bcond_with	bootstrap	# no system GLib and libcroco (for bootstrap)
 
 %ifnarch %{ix86} %{x8664} arm hppa ppc s390 s390x
 %undefine with_dotnet
@@ -25,9 +26,14 @@
 %if %{with javac}
 %undefine with_gcj
 %endif
-%{?with_dotnet:%include	/usr/lib/rpm/macros.mono}
+%if %{without java}
+%undefine with_gcj
+%undefine with_javac
+%endif
 
 %define build_java	%{?with_gcj:1}%{!?with_gcj:%{?with_javac:1}%{!?with_javac:0}}
+%define	build_javaexe	%{?with_gcj:1}%{!?with_gcj:0}
+%{?with_dotnet:%include	/usr/lib/rpm/macros.mono}
 Summary:	Utilties for program national language support
 Summary(de.UTF-8):	Utilities zum Programmieren von nationaler Sprachunterstützung
 Summary(es.UTF-8):	Utilitarios para el programa de soporte a lenguas locales
@@ -40,7 +46,7 @@ Summary(tr.UTF-8):	Desteği için kitaplık ve araçlar
 Summary(uk.UTF-8):	Бібліотеки та утиліти для підтримки національних мов
 Name:		gettext
 Version:	0.19.8.1
-Release:	4
+Release:	5
 License:	LGPL v2+ (libintl), GPL v3+ (tools)
 Group:		Development/Tools
 Source0:	http://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.lz
@@ -48,11 +54,12 @@ Source0:	http://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.lz
 Patch0:		%{name}-info.patch
 Patch1:		%{name}-killkillkill.patch
 Patch2:		%{name}-libintl_by_gcj.patch
+Patch3:		%{name}-libdir.patch
 URL:		http://www.gnu.org/software/gettext/
 BuildRequires:	acl-devel
 BuildRequires:	autoconf >= 2.62
 BuildRequires:	automake >= 1:1.13
-%{?with_gcj:BuildRequires:	gcj >= 3.0}
+%{?with_gcj:BuildRequires:	gcc-java >= 3.0}
 %{!?with_bootstrap:BuildRequires:	glib2-devel >= 2.0}
 %if %{build_java}
 BuildRequires:	jar
@@ -363,6 +370,7 @@ GNU gettext dla C#.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__sed} -i \
 	-e 's at m4_esyscmd(\[build-aux/git-version-gen \.tarball-version\])@[%{version}]@' \
@@ -395,10 +403,13 @@ cd ..
 %{__autoconf}
 %{__automake}
 %configure \
+	%{!?with_gcj:GCJ=none} \
 	%{?with_xemacs:--with-lispdir=%{_datadir}/xemacs-packages/lisp/po-mode} \
+	--enable-csharp=%{?with_dotnet:mono}%{!?with_dotnet:no} \
+%if !%{build_java}
+	--disable-java \
+%endif
 	--enable-nls \
-	%{!?with_dotnet:--disable-csharp} \
-	%{?with_dotnet:--enable-csharp=mono} \
 	--without-bzip2 \
 	--without-git \
 	--without-included-gettext \
@@ -615,7 +626,12 @@ rm -rf $RPM_BUILD_ROOT
 %files java-devel
 %defattr(644,root,root,755)
 %doc gettext-runtime/intl-java/javadoc2
+%if %{build_javaexe}
+%attr(755,root,root) %{_libdir}/gettext/gnu.gettext.DumpResource
+%attr(755,root,root) %{_libdir}/gettext/gnu.gettext.GetURL
+%else
 %{_datadir}/gettext/gettext.jar
+%endif
 %{_datadir}/gettext/javaversion.class
 %endif
 
diff --git a/gettext-libdir.patch b/gettext-libdir.patch
new file mode 100644
index 0000000..1baaf59
--- /dev/null
+++ b/gettext-libdir.patch
@@ -0,0 +1,64 @@
+--- gettext-0.19.8.1/gettext-runtime/gnulib-m4/lib-prefix.m4.orig	2016-06-11 14:59:32.000000000 +0200
++++ gettext-0.19.8.1/gettext-runtime/gnulib-m4/lib-prefix.m4	2017-02-05 14:26:12.237083553 +0100
+@@ -205,12 +205,14 @@
+         for searchdir in $searchpath; do
+           if test -d "$searchdir"; then
+             case "$searchdir" in
++              */libx32/ | */libx32 ) acl_libdirstem=libx32 ;;
+               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+               */../ | */.. )
+                 # Better ignore directories of this form. They are misleading.
+                 ;;
+               *) searchdir=`cd "$searchdir" && pwd`
+                  case "$searchdir" in
++                   */libx32 ) acl_libdirstem=libx32 ;;
+                    */lib64 ) acl_libdirstem=lib64 ;;
+                  esac ;;
+             esac
+--- gettext-0.19.8.1/gettext-runtime/gnulib-m4/lib-link.m4.orig	2016-06-11 14:59:32.000000000 +0200
++++ gettext-0.19.8.1/gettext-runtime/gnulib-m4/lib-link.m4	2017-02-05 14:27:31.840415976 +0100
+@@ -370,7 +370,12 @@
+           fi
+           if test "X$found_dir" != "X"; then
+             dnl Found the library.
++
++            if test "X$found_dir" = "X/usr/$acl_libdirstem" || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
++            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
++            else
+             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
++            fi
+             if test "X$found_so" != "X"; then
+               dnl Linking with a shared library. We attempt to hardcode its
+               dnl directory into the executable's runpath, unless it's the
+--- gettext-0.19.8.1/gettext-tools/gnulib-m4/lib-prefix.m4.orig	2016-06-11 14:59:32.000000000 +0200
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/lib-prefix.m4	2017-02-05 14:26:12.237083553 +0100
+@@ -205,12 +205,14 @@
+         for searchdir in $searchpath; do
+           if test -d "$searchdir"; then
+             case "$searchdir" in
++              */libx32/ | */libx32 ) acl_libdirstem=libx32 ;;
+               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+               */../ | */.. )
+                 # Better ignore directories of this form. They are misleading.
+                 ;;
+               *) searchdir=`cd "$searchdir" && pwd`
+                  case "$searchdir" in
++                   */libx32 ) acl_libdirstem=libx32 ;;
+                    */lib64 ) acl_libdirstem=lib64 ;;
+                  esac ;;
+             esac
+--- gettext-0.19.8.1/gettext-tools/gnulib-m4/lib-link.m4.orig	2016-06-11 14:59:32.000000000 +0200
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/lib-link.m4	2017-02-05 14:27:31.840415976 +0100
+@@ -370,7 +370,12 @@
+           fi
+           if test "X$found_dir" != "X"; then
+             dnl Found the library.
++
++            if test "X$found_dir" = "X/usr/$acl_libdirstem" || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
++            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
++            else
+             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
++            fi
+             if test "X$found_so" != "X"; then
+               dnl Linking with a shared library. We attempt to hardcode its
+               dnl directory into the executable's runpath, unless it's the
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gettext.git/commitdiff/5c7ab0ff11514852f0a179545e8a931018a1395f



More information about the pld-cvs-commit mailing list