]> git.pld-linux.org Git - packages/mc.git/blob - gettext.patch
- fix gettext build (from upstream)
[packages/mc.git] / gettext.patch
1 From f30e6ff283f4bc86177e4360de94dad794678395 Mon Sep 17 00:00:00 2001
2 From: Sergei Trofimovich <slyfox@gentoo.org>
3 Date: Wed, 11 Sep 2019 22:58:18 +0100
4 Subject: [PATCH] Ticket #3629: configure.ac: drop bundled gettext
5
6 Bundled libintl did not support linking to internal static
7 libraries (libmc in our case): directly specified static
8 libraries are not pulled by libtool and are not usable for
9 dynamic libraries as PIC-related flags are not passed for
10 compilation.
11
12 This renders bundled libintl library unusable.
13
14 The change drops libintl bundling support and always relies
15 on external libintl (or falls back to disabled NLS).
16
17 On a related note gettext-0.20 drops support for bundling
18 or libintl and this change will ease migration to newer version.
19
20 The change is tested on x86_64-gentoo-linux-musl: mc builds
21 and links all tests successfully. A few tests fail for lack
22 of NLS support.
23
24 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
25 Signed-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
35 diff --git a/Makefile.am b/Makefile.am
36 index 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
48 diff --git a/configure.ac b/configure.ac
49 index 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  
71 diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg
72 index 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       =
84 diff --git a/lib/Makefile.am b/lib/Makefile.am
85 index 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)
94 diff --git a/m4.include/mc-i18n.m4 b/m4.include/mc-i18n.m4
95 index 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.053003 seconds and 3 git commands to generate.