]> git.pld-linux.org Git - packages/gettext.git/commitdiff
- added libdir patch (avoid adding -L/usr/lib* in lib-link.m4) auto/th/gettext-0.19.8.1-5
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 5 Feb 2017 19:28:06 +0000 (20:28 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 5 Feb 2017 19:28:06 +0000 (20:28 +0100)
- 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 [new file with mode: 0644]
gettext.spec

diff --git a/gettext-libdir.patch b/gettext-libdir.patch
new file mode 100644 (file)
index 0000000..1baaf59
--- /dev/null
@@ -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
index 6233ffbbfd7fde2ada48808208d3d71852f2aa1c..19c69fae9db5415571267c74e1477134ccb5ad08 100644 (file)
@@ -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
 %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@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
 
This page took 0.235034 seconds and 4 git commands to generate.