[packages/mc] - fix gettext build (from upstream)

arekm arekm at pld-linux.org
Thu Dec 19 13:15:20 CET 2019


commit 77bc361e88afd1b952bb97f979c01745de20876a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Dec 19 13:15:11 2019 +0100

    - fix gettext build (from upstream)

 gettext.patch | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mc.spec       |   2 ++
 2 files changed, 111 insertions(+)
---
diff --git a/mc.spec b/mc.spec
index 27f09df..cd14172 100644
--- a/mc.spec
+++ b/mc.spec
@@ -34,6 +34,7 @@ Patch3:		%{name}-noperl-vfs.patch
 # at now syntax highligthing for PLD-update-TODO and CVSROOT/users
 Patch4:		%{name}-pld-developerfriendly.patch
 Patch5:		ebook-ext.patcch
+Patch6:		gettext.patch
 URL:		http://www.midnight-commander.org/
 BuildRequires:	autoconf >= 2.60
 BuildRequires:	automake >= 1.5
@@ -162,6 +163,7 @@ tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir.
 %{!?with_perl_vfs:%patch3 -p1}
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %{__rm} po/stamp-po
 
diff --git a/gettext.patch b/gettext.patch
new file mode 100644
index 0000000..250a96e
--- /dev/null
+++ b/gettext.patch
@@ -0,0 +1,109 @@
+From f30e6ff283f4bc86177e4360de94dad794678395 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox at gentoo.org>
+Date: Wed, 11 Sep 2019 22:58:18 +0100
+Subject: [PATCH] Ticket #3629: configure.ac: drop bundled gettext
+
+Bundled libintl did not support linking to internal static
+libraries (libmc in our case): directly specified static
+libraries are not pulled by libtool and are not usable for
+dynamic libraries as PIC-related flags are not passed for
+compilation.
+
+This renders bundled libintl library unusable.
+
+The change drops libintl bundling support and always relies
+on external libintl (or falls back to disabled NLS).
+
+On a related note gettext-0.20 drops support for bundling
+or libintl and this change will ease migration to newer version.
+
+The change is tested on x86_64-gentoo-linux-musl: mc builds
+and links all tests successfully. A few tests fail for lack
+of NLS support.
+
+Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
+Signed-off-by: Andrew Borodin <aborodin at vmail.ru>
+---
+ .gitignore            | 1 -
+ Makefile.am           | 2 +-
+ configure.ac          | 5 +++--
+ doc/doxygen.cfg       | 2 +-
+ lib/Makefile.am       | 2 +-
+ m4.include/mc-i18n.m4 | 5 -----
+ 6 files changed, 6 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ac05a83ea0..f86f6ed384 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to create Makefile.in.
+ AUTOMAKE_OPTIONS = 1.5
+ 
+-SUBDIRS = intl po lib src doc contrib misc
++SUBDIRS = po lib src doc contrib misc
+ 
+ if HAVE_TESTS
+     SUBDIRS += tests
+diff --git a/configure.ac b/configure.ac
+index ad0a228f33..6abe53100c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -272,7 +272,9 @@ dnl ############################################################################
+ dnl Internationalization
+ dnl ############################################################################
+ 
+-AM_GNU_GETTEXT([no-libtool], [need-ngettext])
++AC_CHECK_FUNCS([setlocale])
++
++AM_GNU_GETTEXT([external], [need-ngettext])
+ AM_GNU_GETTEXT_VERSION([0.18.1])
+ 
+ mc_I18N
+@@ -674,7 +676,6 @@ doc/hlp/pl/Makefile
+ doc/hlp/ru/Makefile
+ doc/hlp/sr/Makefile
+ 
+-intl/Makefile
+ po/Makefile.in
+ ])
+ 
+diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
+index 07bc973ae5..1118062f68 100644
+--- a/doc/doxygen.cfg
++++ b/doc/doxygen.cfg
+@@ -91,7 +91,7 @@ FILE_PATTERNS          = *.c \
+ RECURSIVE              = YES
+ EXCLUDE                =
+ EXCLUDE_SYMLINKS       = NO
+-EXCLUDE_PATTERNS       = */intl/* */tests/* */.git/*
++EXCLUDE_PATTERNS       = */tests/* */.git/*
+ EXCLUDE_SYMBOLS        =
+ EXAMPLE_PATH           = $(SRCDIR)
+ EXAMPLE_PATTERNS       =
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index c448e2ddba..455f9ddf78 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -74,4 +74,4 @@ else
+     libmc_la_LIBADD += $(GLIB_LIBS)
+ endif
+ 
+-libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(LIBINTL)
++libmc_la_LIBADD += $(PCRE_LIBS)
+diff --git a/m4.include/mc-i18n.m4 b/m4.include/mc-i18n.m4
+index 724ca5d26c..8f1474139f 100644
+--- a/m4.include/mc-i18n.m4
++++ b/m4.include/mc-i18n.m4
+@@ -8,11 +8,6 @@ dnl @license GPL
+ dnl @copyright Free Software Foundation, Inc.
+ 
+ AC_DEFUN([mc_I18N],[
+-
+-    if test "x$USE_INCLUDED_LIBINTL" = xyes; then
+-        CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
+-    fi
+-
+     dnl User visible support for charset conversion.
+     AC_ARG_ENABLE([charset],
+         AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@]))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mc.git/commitdiff/77bc361e88afd1b952bb97f979c01745de20876a



More information about the pld-cvs-commit mailing list