Skip to contentSkip to conversation

package/cups-filters: fix build without NLS

PATCH New unixmania at gmail.com 3 participants 6 messages Jul 22, 2019 – Sep 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/cups-filters: fix build without NLS

From: Carlos Santos <[email protected]>

texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so patch Makefile.am to add the required -liconv argument.

We could patch configure.ac to use AM_ICONV but it would require more change adding AM_GNU_GETTEXT_VERSION([x.y.z]) to bring iconv.m4.

---
 package/cups-filters/cups-filters.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)
package/cups-filters/cups-filters.mk +11 -0
index 214647a90e..8368be5e4b 100644
@@ -13,6 +13,17 @@ CUPS_FILTERS_AUTORECONF = YES
 
 CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg
 
+# texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE. We could patch
+# configure.ac to use AM_ICONV but it would require iconv.m4, increasing the
+# patch size by at least 130 lines. Let's keep it simple and just patch
+# Makefile.am to append -liconv to the link command line.
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+define CUPS_FILTERS_LINK_LIBICONV
+	$(SED) '/texttotext_LDADD =/s/(CUPS_LIBS)$$/(CUPS_LIBS) -liconv/' $(@D)/Makefile.am
+endef
+CUPS_FILTERS_PRE_CONFIGURE_HOOKS += CUPS_FILTERS_LINK_LIBICONV
+endif
+
 CUPS_FILTERS_CONF_OPTS = --disable-imagefilters \
 	--disable-mutool \
 	--disable-foomatic \
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/1 package/cups-filters: fix build without NLS

Hi Carlos,

Quoted 41 lines · On Mon, Jul 22, 2019 at 10:12 AM <[email protected]> wrote:

From: Carlos Santos <[email protected]>

texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so patch Makefile.am to add the required -liconv argument.

We could patch configure.ac to use AM_ICONV but it would require more change adding AM_GNU_GETTEXT_VERSION([x.y.z]) to bring iconv.m4.

---
 package/cups-filters/cups-filters.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)
package/cups-filters/cups-filters.mk +11 -1
index 214647a90e..8368be5e4b 100644
@@ -13,6 +13,17 @@ CUPS_FILTERS_AUTORECONF = YES
 
 CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg
 
+# texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE. We could patch
+# configure.ac to use AM_ICONV but it would require iconv.m4, increasing the
+# patch size by at least 130 lines. Let's keep it simple and just patch
+# Makefile.am to append -liconv to the link command line.
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+define CUPS_FILTERS_LINK_LIBICONV
+       $(SED) '/texttotext_LDADD =/s/(CUPS_LIBS)$$/(CUPS_LIBS) -liconv/' $(@D)/Makefile.am
+endef
+CUPS_FILTERS_PRE_CONFIGURE_HOOKS += CUPS_FILTERS_LINK_LIBICONV
+endif
+
 CUPS_FILTERS_CONF_OPTS = --disable-imagefilters \
        --disable-mutool \
        --disable-foomatic \
--

2.18.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

I already sent patch to fix this problem (but I did not check the LOCALE config so looks like your version is better):

    https://patchwork.ozlabs.org/patch/1134318

but in case of your version is it not enough to just add:

    CUPS_FILTERS_CONF_ENV += LIBS=-liconv

?

Regards,
Vadim Kochan

#2 lore raw

PATCH 1/1 package/cups-filters: fix build without NLS

Quoted 53 lines · Vadim Kochan

Hi Carlos,

Quoted 41 lines · On Mon, Jul 22, 2019 at 10:12 AM <[email protected]> wrote:

From: Carlos Santos <[email protected]>

texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE so patch Makefile.am to add the required -liconv argument.

We could patch configure.ac to use AM_ICONV but it would require more change adding AM_GNU_GETTEXT_VERSION([x.y.z]) to bring iconv.m4.

---
 package/cups-filters/cups-filters.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)
package/cups-filters/cups-filters.mk +11 -1
index 214647a90e..8368be5e4b 100644
@@ -13,6 +13,17 @@ CUPS_FILTERS_AUTORECONF = YES
 
 CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg
 
+# texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE. We could patch
+# configure.ac to use AM_ICONV but it would require iconv.m4, increasing the
+# patch size by at least 130 lines. Let's keep it simple and just patch
+# Makefile.am to append -liconv to the link command line.
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+define CUPS_FILTERS_LINK_LIBICONV
+       $(SED) '/texttotext_LDADD =/s/(CUPS_LIBS)$$/(CUPS_LIBS) -liconv/' $(@D)/Makefile.am
+endef
+CUPS_FILTERS_PRE_CONFIGURE_HOOKS += CUPS_FILTERS_LINK_LIBICONV
+endif
+
 CUPS_FILTERS_CONF_OPTS = --disable-imagefilters \
        --disable-mutool \
        --disable-foomatic \
--

2.18.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

I already sent patch to fix this problem (but I did not check the LOCALE config so looks like your version is better):

Quoted 7 lines
    https://patchwork.ozlabs.org/patch/1134318

but in case of your version is it not enough to just add:

    CUPS_FILTERS_CONF_ENV += LIBS=-liconv

?

This would link all programs to libiconv, not just texttotext.

Signature · 1 line
Carlos Santos <[email protected]>
#3 lore raw

PATCH 1/1 package/cups-filters: fix build without NLS

In reply to unixmania at gmail.com

package/cups-filters/cups-filters.mk CUPS_FILTERS_AUTORECONF = YES · line 19

Quoted 4 lines · On Mon, 22 Jul 2019 04:11:46 -0300 unixmania at gmail.com wrote:
package/cups-filters/cups-filters.mk +4 -0
+# texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE. We could patch
+# configure.ac to use AM_ICONV but it would require iconv.m4, increasing the
+# patch size by at least 130 lines. Let's keep it simple and just patch
+# Makefile.am to append -liconv to the link command line.

Why is this AM_ICONV solution taking at least 130 lines ? This would be upstreamable, and looks a lot nicer. Could you propose a patch with an AM_ICONV base solution instead ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 1/1 package/cups-filters: fix build without NLS

Quoted 13 lines · Thomas Petazzoni

package/cups-filters/cups-filters.mk CUPS_FILTERS_AUTORECONF = YES · line 19

Quoted 4 lines · On Mon, 22 Jul 2019 04:11:46 -0300 unixmania at gmail.com wrote:
package/cups-filters/cups-filters.mk +4 -0
+# texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE. We could patch
+# configure.ac to use AM_ICONV but it would require iconv.m4, increasing the
+# patch size by at least 130 lines. Let's keep it simple and just patch
+# Makefile.am to append -liconv to the link command line.

Why is this AM_ICONV solution taking at least 130 lines ? This would be upstreamable, and looks a lot nicer. Could you propose a patch with an AM_ICONV base solution instead ?

Quoted 1 line

Thanks!

A change solving this was accepted upstream so I will submit a follow-up with that fix:

https://github.com/OpenPrinting/cups-filters/pull/155

Signature · 1 line
Carlos Santos <[email protected]>
#5 lore raw

PATCH 1/1 package/cups-filters: fix build without NLS

Quoted 18 lines · Carlos Santos
Quoted 13 lines · Thomas Petazzoni

package/cups-filters/cups-filters.mk CUPS_FILTERS_AUTORECONF = YES · line 19

Quoted 4 lines · On Mon, 22 Jul 2019 04:11:46 -0300 unixmania at gmail.com wrote:
package/cups-filters/cups-filters.mk +4 -0
+# texttotext must be linked to libiconv if !BR2_ENABLE_LOCALE. We could patch
+# configure.ac to use AM_ICONV but it would require iconv.m4, increasing the
+# patch size by at least 130 lines. Let's keep it simple and just patch
+# Makefile.am to append -liconv to the link command line.

Why is this AM_ICONV solution taking at least 130 lines ? This would be upstreamable, and looks a lot nicer. Could you propose a patch with an AM_ICONV base solution instead ?

Quoted 1 line

Thanks!

Quoted 7 lines

A change solving this was accepted upstream so I will submit a follow-up with that fix:

https://github.com/OpenPrinting/cups-filters/pull/155

--
Carlos Santos <[email protected]>

Patch updated:

    https://patchwork.ozlabs.org/patch/1164349/

I also sent a second patch, fixing a broken symlink:

    https://patchwork.ozlabs.org/patch/1164350/
Signature · 1 line
Carlos Santos <[email protected]>