* [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS
@ 2019-09-19 3:47 unixmania at gmail.com
2019-09-21 13:39 ` Arnout Vandecappelle
2019-09-30 13:30 ` Peter Korsgaard
0 siblings, 2 replies; 7+ messages in thread
From: unixmania at gmail.com @ 2019-09-19 3:47 UTC (permalink / raw)
To: buildroot
From: Carlos Santos <unixmania@gmail.com>
texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so pull a
patch applied upstream that adds libiconv discovery via autoconf.
With this change, autoreconf requires the config.rpath and ABOUT-NLS
files which are not in v1.25.4. Add a pre-configure hook to fake them.
Fixes: https://bugs.busybox.net/show_bug.cgi?id=12031
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
...otext.c-link-with-libiconv-if-needed.patch | 122 ++++++++++++++++++
package/cups-filters/cups-filters.mk | 8 ++
2 files changed, 130 insertions(+)
create mode 100644 package/cups-filters/0002-filter-texttotext.c-link-with-libiconv-if-needed.patch
diff --git a/package/cups-filters/0002-filter-texttotext.c-link-with-libiconv-if-needed.patch b/package/cups-filters/0002-filter-texttotext.c-link-with-libiconv-if-needed.patch
new file mode 100644
index 0000000000..cace0773ae
--- /dev/null
+++ b/package/cups-filters/0002-filter-texttotext.c-link-with-libiconv-if-needed.patch
@@ -0,0 +1,122 @@
+From 734ef160b428c545d8c6ae16c4bfe3c036173aa4 Mon Sep 17 00:00:00 2001
+From: Carlos Santos <unixmania@gmail.com>
+Date: Sun, 21 Jul 2019 23:54:29 -0300
+Subject: [PATCH] filter/texttotext.c: link with libiconv if needed
+
+texttotext.c uses iconv so it should link with libiconv on platforms
+where it is a separate library (e.g. uClibc-ng without built-in NLS)
+otherwise texttotext fails to link:
+
+ CCLD texttotext
+[...]/ld: texttotext-texttotext.o: in function `main':
+texttotext.c:(.text.startup+0xde0): undefined reference to `libiconv_open'
+[...]/ld: texttotext.c:(.text.startup+0xf9d): undefined reference to `libiconv'
+[...]/ld: texttotext.c:(.text.startup+0xfd6): undefined reference to `libiconv'
+[...]/ld: texttotext.c:(.text.startup+0x16c3): undefined reference to `libiconv_close'
+
+Modify autogen.sh to call autopoint, which adds the libiconv discovery.
+It also creates a "po" skeleton but we can discard it, since it is not
+really necessary.
+
+Fixes: https://bugs.busybox.net/show_bug.cgi?id=12031
+
+Signed-off-by: Carlos Santos <unixmania@gmail.com>
+---
+ Makefile.am | 4 +++-
+ autogen.sh | 17 +++++++++++++++++
+ configure.ac | 6 +++++-
+ 3 files changed, 25 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 72e023ed..76b81de5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -778,7 +778,7 @@ texttotext_SOURCES = \
+ filter/texttotext.c
+ EXTRA_texttotext_SOURCES = filter/strcasestr.c
+ texttotext_CFLAGS = $(CUPS_CFLAGS)
+-texttotext_LDADD = $(STRCASESTR) $(CUPS_LIBS)
++texttotext_LDADD = $(STRCASESTR) $(CUPS_LIBS) $(LIBICONV)
+ texttotext_DEPENDENCIES = $(STRCASESTR)
+
+ pdftops_SOURCES = \
+@@ -1049,3 +1049,5 @@ if ENABLE_BRAILLE
+ $(RM) $(DESTDIR)$(pkgfilterdir)/vectortoubrl
+ $(RM) $(DESTDIR)$(pkgfilterdir)/textbrftoindexv4
+ endif
++
++SUBDIRS =
+diff --git a/autogen.sh b/autogen.sh
+index 5462a323..cd7397a9 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -13,11 +13,22 @@ aclocal --version > /dev/null 2> /dev/null || {
+ echo "error: aclocal not found"
+ exit 1
+ }
++
+ automake --version > /dev/null 2> /dev/null || {
+ echo "error: automake not found"
+ exit 1
+ }
+
++autopoint --version > /dev/null 2> /dev/null || {
++ echo "error: autopoint not found"
++ exit 1
++}
++
++gettext --version > /dev/null 2> /dev/null || {
++ echo "error: gettext not found"
++ exit 1
++}
++
+ for i in $TESTLIBTOOLIZE; do
+ if which $i > /dev/null 2>&1; then
+ LIBTOOLIZE=$i
+@@ -39,6 +50,12 @@ fi
+
+ rm -rf autom4te*.cache
+
++autopoint --force || {
++ echo "error: autopoint failed"
++ exit 1
++}
++# autopoint is for libiconv discovery; we don't want the po directory
++rm -rf po
+ $LIBTOOLIZE --force --copy || {
+ echo "error: libtoolize failed"
+ exit 1
+diff --git a/configure.ac b/configure.ac
+index 607dc17a..d5a539b6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,7 +18,7 @@ AC_CONFIG_MACRO_DIR([m4])
+ m4_include([m4/ac_define_dir.m4])
+ m4_include([m4/ax_compare_version.m4])
+ m4_include([m4/basic-directories.m4])
+-AM_INIT_AUTOMAKE([1.11 gnu dist-xz dist-bzip2])
++AM_INIT_AUTOMAKE([1.11 gnu dist-xz dist-bzip2 subdir-objects])
+ AM_SILENT_RULES([yes])
+ AC_LANG([C++])
+ AC_CONFIG_HEADERS([config.h])
+@@ -54,6 +54,7 @@ AC_PROG_CC
+ AC_PROG_CXX
+ AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory])
+ AM_PROG_CC_C_O
++AM_ICONV
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+@@ -61,6 +62,9 @@ AC_PROG_MAKE_SET
+ AC_PROG_LIBTOOL
+ PKG_PROG_PKG_CONFIG([0.20])
+
++AM_GNU_GETTEXT_VERSION([0.18.3])
++AM_GNU_GETTEXT([external])
++
+ # ========================================
+ # Specify the fontdir patch if not default
+ # ========================================
+--
+2.18.1
+
diff --git a/package/cups-filters/cups-filters.mk b/package/cups-filters/cups-filters.mk
index 5355fc019e..7f8defb2cb 100644
--- a/package/cups-filters/cups-filters.mk
+++ b/package/cups-filters/cups-filters.mk
@@ -21,6 +21,14 @@ CUPS_FILTERS_CONF_OPTS = --disable-imagefilters \
--with-pdftops=pdftops \
--with-jpeg
+# After 0002-filter-texttotext.c-link-with-libiconv-if-needed.patch autoreconf
+# needs config.rpath and ABOUT-NLS, which are not in v1.25.4 yet. Fake them.
+define CUPS_FILTERS_ADD_MISSING_FILE
+ touch $(@D)/config.rpath $(@D)/ABOUT-NLS
+endef
+
+CUPS_FILTERS_PRE_CONFIGURE_HOOKS = CUPS_FILTERS_ADD_MISSING_FILE
+
ifeq ($(BR2_PACKAGE_LIBPNG),y)
CUPS_FILTERS_CONF_OPTS += --with-png
CUPS_FILTERS_DEPENDENCIES += libpng
--
2.18.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS
2019-09-19 3:47 [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS unixmania at gmail.com
@ 2019-09-21 13:39 ` Arnout Vandecappelle
2019-09-30 13:30 ` Peter Korsgaard
1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2019-09-21 13:39 UTC (permalink / raw)
To: buildroot
On 19/09/2019 05:47, unixmania at gmail.com wrote:
> From: Carlos Santos <unixmania@gmail.com>
>
> texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so pull a
> patch applied upstream that adds libiconv discovery via autoconf.
>
> With this change, autoreconf requires the config.rpath and ABOUT-NLS
> files which are not in v1.25.4. Add a pre-configure hook to fake them.
>
> Fixes: https://bugs.busybox.net/show_bug.cgi?id=12031
>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
Applied to master, thanks.
Regards,
Arnout
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS
2019-09-19 3:47 [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS unixmania at gmail.com
2019-09-21 13:39 ` Arnout Vandecappelle
@ 2019-09-30 13:30 ` Peter Korsgaard
2019-09-30 14:01 ` Carlos Santos
1 sibling, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2019-09-30 13:30 UTC (permalink / raw)
To: buildroot
>>>>> "unixmania" == unixmania <unixmania@gmail.com> writes:
> From: Carlos Santos <unixmania@gmail.com>
> texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so pull a
> patch applied upstream that adds libiconv discovery via autoconf.
> With this change, autoreconf requires the config.rpath and ABOUT-NLS
> files which are not in v1.25.4. Add a pre-configure hook to fake them.
> Fixes: https://bugs.busybox.net/show_bug.cgi?id=12031
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS
2019-09-30 13:30 ` Peter Korsgaard
@ 2019-09-30 14:01 ` Carlos Santos
2019-09-30 15:41 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Carlos Santos @ 2019-09-30 14:01 UTC (permalink / raw)
To: buildroot
On Mon, Sep 30, 2019 at 10:30 AM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "unixmania" == unixmania <unixmania@gmail.com> writes:
>
> > From: Carlos Santos <unixmania@gmail.com>
> > texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so pull a
> > patch applied upstream that adds libiconv discovery via autoconf.
>
> > With this change, autoreconf requires the config.rpath and ABOUT-NLS
> > files which are not in v1.25.4. Add a pre-configure hook to fake them.
>
> > Fixes: https://bugs.busybox.net/show_bug.cgi?id=12031
>
> > Signed-off-by: Carlos Santos <unixmania@gmail.com>
>
> Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.
>
> --
> Bye, Peter Korsgaard
I suggest you to pull commits 811f504ecd07df35ebf95c7b228ccc6461f7e736
and 3da92264c6dd693022d06fd2500878f7f5d492c2 too.
--
Carlos Santos <unixmania@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS
2019-09-30 14:01 ` Carlos Santos
@ 2019-09-30 15:41 ` Peter Korsgaard
2019-09-30 16:12 ` Carlos Santos
0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2019-09-30 15:41 UTC (permalink / raw)
To: buildroot
>>>>> "Carlos" == Carlos Santos <unixmania@gmail.com> writes:
> On Mon, Sep 30, 2019 at 10:30 AM Peter Korsgaard <peter@korsgaard.com> wrote:
>>
>> >>>>> "unixmania" == unixmania <unixmania@gmail.com> writes:
>>
>> > From: Carlos Santos <unixmania@gmail.com>
>> > texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so pull a
>> > patch applied upstream that adds libiconv discovery via autoconf.
>>
>> > With this change, autoreconf requires the config.rpath and ABOUT-NLS
>> > files which are not in v1.25.4. Add a pre-configure hook to fake them.
>>
>> > Fixes: https://bugs.busybox.net/show_bug.cgi?id=12031
>>
>> > Signed-off-by: Carlos Santos <unixmania@gmail.com>
>>
>> Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.
>>
>> --
>> Bye, Peter Korsgaard
> I suggest you to pull commits 811f504ecd07df35ebf95c7b228ccc6461f7e736
> and 3da92264c6dd693022d06fd2500878f7f5d492c2 too.
Yes, I will get to them (handling the backports in chronological
order). Is there any specific reason to include the version bump? Is
there a changelog/release notes available?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS
2019-09-30 15:41 ` Peter Korsgaard
@ 2019-09-30 16:12 ` Carlos Santos
2019-10-01 6:32 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Carlos Santos @ 2019-09-30 16:12 UTC (permalink / raw)
To: buildroot
On Mon, Sep 30, 2019 at 12:41 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "Carlos" == Carlos Santos <unixmania@gmail.com> writes:
>
> > On Mon, Sep 30, 2019 at 10:30 AM Peter Korsgaard <peter@korsgaard.com> wrote:
> >>
> >> >>>>> "unixmania" == unixmania <unixmania@gmail.com> writes:
> >>
> >> > From: Carlos Santos <unixmania@gmail.com>
> >> > texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so pull a
> >> > patch applied upstream that adds libiconv discovery via autoconf.
> >>
> >> > With this change, autoreconf requires the config.rpath and ABOUT-NLS
> >> > files which are not in v1.25.4. Add a pre-configure hook to fake them.
> >>
> >> > Fixes: https://bugs.busybox.net/show_bug.cgi?id=12031
> >>
> >> > Signed-off-by: Carlos Santos <unixmania@gmail.com>
> >>
> >> Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.
> >>
> >> --
> >> Bye, Peter Korsgaard
>
> > I suggest you to pull commits 811f504ecd07df35ebf95c7b228ccc6461f7e736
> > and 3da92264c6dd693022d06fd2500878f7f5d492c2 too.
>
> Yes, I will get to them (handling the backports in chronological
> order). Is there any specific reason to include the version bump? Is
> there a changelog/release notes available?
>
> --
> Bye, Peter Korsgaard
It includes the fixes contained in the previous two patches and make
autoreconf unnecessary, which speeds-up the build a little bit.
--
Carlos Santos <unixmania@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS
2019-09-30 16:12 ` Carlos Santos
@ 2019-10-01 6:32 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2019-10-01 6:32 UTC (permalink / raw)
To: buildroot
>>>>> "Carlos" == Carlos Santos <unixmania@gmail.com> writes:
Hi,
> On Mon, Sep 30, 2019 at 12:41 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>>
>> > I suggest you to pull commits 811f504ecd07df35ebf95c7b228ccc6461f7e736
>> > and 3da92264c6dd693022d06fd2500878f7f5d492c2 too.
>>
>> Yes, I will get to them (handling the backports in chronological
>> order). Is there any specific reason to include the version bump? Is
>> there a changelog/release notes available?
> It includes the fixes contained in the previous two patches and make
> autoreconf unnecessary, which speeds-up the build a little bit.
True, but it would also require bumping the version from the 1.21 series
(2019.02.x, 2019.05.x) and 1.23 series (2019.08.x).
But I will take the braille patch (if these older versions have that
configure option).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-10-01 6:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 3:47 [Buildroot] [PATCH v2] package/cups-filters: fix build without NLS unixmania at gmail.com
2019-09-21 13:39 ` Arnout Vandecappelle
2019-09-30 13:30 ` Peter Korsgaard
2019-09-30 14:01 ` Carlos Santos
2019-09-30 15:41 ` Peter Korsgaard
2019-09-30 16:12 ` Carlos Santos
2019-10-01 6:32 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.