]> git.pld-linux.org Git - packages/mc.git/blame - gettext.patch
- fix gettext build (from upstream)
[packages/mc.git] / gettext.patch
CommitLineData
77bc361e
AM
1From f30e6ff283f4bc86177e4360de94dad794678395 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyfox@gentoo.org>
3Date: Wed, 11 Sep 2019 22:58:18 +0100
4Subject: [PATCH] Ticket #3629: configure.ac: drop bundled gettext
5
6Bundled libintl did not support linking to internal static
7libraries (libmc in our case): directly specified static
8libraries are not pulled by libtool and are not usable for
9dynamic libraries as PIC-related flags are not passed for
10compilation.
11
12This renders bundled libintl library unusable.
13
14The change drops libintl bundling support and always relies
15on external libintl (or falls back to disabled NLS).
16
17On a related note gettext-0.20 drops support for bundling
18or libintl and this change will ease migration to newer version.
19
20The change is tested on x86_64-gentoo-linux-musl: mc builds
21and links all tests successfully. A few tests fail for lack
22of NLS support.
23
24Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
25Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
26---
27 .gitignore | 1 -
28 Makefile.am | 2 +-
29 configure.ac | 5 +++--
30 doc/doxygen.cfg | 2 +-
31 lib/Makefile.am | 2 +-
32 m4.include/mc-i18n.m4 | 5 -----
33 6 files changed, 6 insertions(+), 11 deletions(-)
34
35diff --git a/Makefile.am b/Makefile.am
36index ac05a83ea0..f86f6ed384 100644
37--- a/Makefile.am
38+++ b/Makefile.am
39@@ -1,7 +1,7 @@
40 ## Process this file with automake to create Makefile.in.
41 AUTOMAKE_OPTIONS = 1.5
42
43-SUBDIRS = intl po lib src doc contrib misc
44+SUBDIRS = po lib src doc contrib misc
45
46 if HAVE_TESTS
47 SUBDIRS += tests
48diff --git a/configure.ac b/configure.ac
49index ad0a228f33..6abe53100c 100644
50--- a/configure.ac
51+++ b/configure.ac
52@@ -272,7 +272,9 @@ dnl ############################################################################
53 dnl Internationalization
54 dnl ############################################################################
55
56-AM_GNU_GETTEXT([no-libtool], [need-ngettext])
57+AC_CHECK_FUNCS([setlocale])
58+
59+AM_GNU_GETTEXT([external], [need-ngettext])
60 AM_GNU_GETTEXT_VERSION([0.18.1])
61
62 mc_I18N
63@@ -674,7 +676,6 @@ doc/hlp/pl/Makefile
64 doc/hlp/ru/Makefile
65 doc/hlp/sr/Makefile
66
67-intl/Makefile
68 po/Makefile.in
69 ])
70
71diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
72index 07bc973ae5..1118062f68 100644
73--- a/doc/doxygen.cfg
74+++ b/doc/doxygen.cfg
75@@ -91,7 +91,7 @@ FILE_PATTERNS = *.c \
76 RECURSIVE = YES
77 EXCLUDE =
78 EXCLUDE_SYMLINKS = NO
79-EXCLUDE_PATTERNS = */intl/* */tests/* */.git/*
80+EXCLUDE_PATTERNS = */tests/* */.git/*
81 EXCLUDE_SYMBOLS =
82 EXAMPLE_PATH = $(SRCDIR)
83 EXAMPLE_PATTERNS =
84diff --git a/lib/Makefile.am b/lib/Makefile.am
85index c448e2ddba..455f9ddf78 100644
86--- a/lib/Makefile.am
87+++ b/lib/Makefile.am
88@@ -74,4 +74,4 @@ else
89 libmc_la_LIBADD += $(GLIB_LIBS)
90 endif
91
92-libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(LIBINTL)
93+libmc_la_LIBADD += $(PCRE_LIBS)
94diff --git a/m4.include/mc-i18n.m4 b/m4.include/mc-i18n.m4
95index 724ca5d26c..8f1474139f 100644
96--- a/m4.include/mc-i18n.m4
97+++ b/m4.include/mc-i18n.m4
98@@ -8,11 +8,6 @@ dnl @license GPL
99 dnl @copyright Free Software Foundation, Inc.
100
101 AC_DEFUN([mc_I18N],[
102-
103- if test "x$USE_INCLUDED_LIBINTL" = xyes; then
104- CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
105- fi
106-
107 dnl User visible support for charset conversion.
108 AC_ARG_ENABLE([charset],
109 AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@]))
This page took 0.117882 seconds and 4 git commands to generate.