Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext)
@ 2014-07-16 22:00 Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 1/6 v3] pkg-autotools: add support to gettextize a package Yann E. MORIN
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-07-16 22:00 UTC (permalink / raw)
  To: buildroot

Hello All!

This small series introduces the gettextize of a package as an optional
sequence in the autotools package infra.

It has been only slightly tested, so is still in RFC stage.

Three packages have been converted: wget (the historical offender),
coreutils and parted. Others may need gettextizing, too, but the
autobuilders (or users) will catch them eventually.


Changes v2 -> v3:
  - fix double-dollars  (Gustavo)
  - fix hook name  (Gustavo)
  - reword commit log for wget package  (Gustavo)
  - gettextize gst1-plugins-bad  (Gustavo)
  - typoes  (Gustavo)

Changes RFCv1 -> RFCv2:
  - only getttextize with autoreconf  (Gustavo)


Regards,
Yann E. MORIN.


The following changes since commit cff18c2f347a46fb996808b6ac439e2a222aa189:

  opencv: add jasper support (2014-07-16 22:59:03 +0200)

are available in the git repository at:

  git://gitorious.org/buildroot/buildroot.git yem/gettext

for you to fetch changes up to f200992ff52ec38350cf0fcd1d79c5b459da175f:

  package/gst1-plugins-bad: gettextize to match the new gettext version (2014-07-16 23:57:48 +0200)

----------------------------------------------------------------
Yann E. MORIN (6):
      pkg-autotools: add support to gettextize a package
      manual: add gettextize explanations in the manual
      package/wget: use the new gettextize infra
      package/coreutils: gettextize to match the new gettext version
      package/parted: gettextize to match the new gettext version
      package/gst1-plugins-bad: gettextize to match the new gettext version

 docs/manual/adding-packages-autotools.txt          | 12 ++++++++
 package/coreutils/coreutils.mk                     |  1 +
 .../gst1-plugins-bad/gst1-plugins-bad.mk           |  1 +
 package/parted/parted.mk                           |  1 +
 package/pkg-autotools.mk                           | 33 ++++++++++++++++++++--
 package/wget/wget.mk                               |  9 +-----
 6 files changed, 47 insertions(+), 10 deletions(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/6 v3] pkg-autotools: add support to gettextize a package
  2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
@ 2014-07-16 22:00 ` Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 2/6 v3] manual: add gettextize explanations in the manual Yann E. MORIN
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-07-16 22:00 UTC (permalink / raw)
  To: buildroot

In case a package comes with a gettext infra which is different from
the one Buildroot provides, we'd get autoreconf errors, like:
    http://autobuild.buildroot.net/results/c0f/c0f7c801f61fdc310cde64342060b00a70155431/

To avoid that, we need to gettextize the package prior to running
autoreconf.

Provide the necessary infrastructure in the autotools infrastructure,
so we can do it consistently across packages.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>

---
Changes v2 -> v3:
  - fix double-dollars  (Gustavo)
  - fix hook name  (Gustavo)

Changes v1 -> v2:
  - only gettextize with autoreconf  (Gustavo)
  - add host-gettext to the filter-out  (Gustavo)
---
 package/pkg-autotools.mk | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
index ddff9bf..50876cb 100644
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -87,6 +87,22 @@ ifndef $(2)_AUTORECONF
  endif
 endif
 
+ifndef $(2)_GETTEXTIZE
+ ifdef $(3)_GETTEXTIZE
+  $(2)_GETTEXTIZE = $$($(3)_GETTEXTIZE)
+ else
+  $(2)_GETTEXTIZE ?= NO
+ endif
+endif
+
+ifndef $(2)_GETTEXTIZE_OPT
+ ifdef $(3)_GETTEXTIZE_OPT
+  $(2)_GETTEXTIZE_OPT = $$($(3)_GETTEXTIZE)
+ else
+  $(2)_GETTEXTIZE_OPT ?= -f
+ endif
+endif
+
 ifeq ($(4),host)
  $(2)_AUTORECONF_OPT ?= $$($(3)_AUTORECONF_OPT)
 endif
@@ -200,6 +216,14 @@ $(2)_POST_PATCH_HOOKS += LIBTOOL_PATCH_HOOK
 endif
 
 #
+# Hook to gettextize the package if needed
+#
+define GETTEXTIZE_HOOK
+	@$$(call MESSAGE,"Gettextizing")
+	$(Q)cd $$($$(PKG)_SRCDIR) && $(HOST_DIR)/usr/bin/gettextize $$($$(PKG)_GETTEXTIZE_OPT)
+endef
+
+#
 # Hook to autoreconf the package if needed
 #
 define AUTORECONF_HOOK
@@ -222,14 +246,19 @@ endef
 
 # This must be repeated from inner-generic-package, otherwise we get an empty
 # _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
-# away from the non-host rule
+# and _GETTEXTIZE away from the non-host rule
 ifeq ($(4),host)
 $(2)_DEPENDENCIES ?= $$(filter-out host-automake host-autoconf host-libtool \
-				host-toolchain $(1),\
+				host-gettext host-toolchain $(1),\
     $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
 endif
 
 ifeq ($$($(2)_AUTORECONF),YES)
+# This has to come before autoreconf
+ifeq ($$($(2)_GETTEXTIZE),YES)
+$(2)_PRE_CONFIGURE_HOOKS += GETTEXTIZE_HOOK
+$(2)_DEPENDENCIES += host-gettext
+endif
 $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK
 $(2)_DEPENDENCIES += host-automake host-autoconf host-libtool
 endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/6 v3] manual: add gettextize explanations in the manual
  2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 1/6 v3] pkg-autotools: add support to gettextize a package Yann E. MORIN
@ 2014-07-16 22:00 ` Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 3/6 v3] package/wget: use the new gettextize infra Yann E. MORIN
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-07-16 22:00 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>

---
Changes v2 -> v3:
  - fix typoes  (Gustavo)

Changes v1 -> v2:
  - gettextize is only valid if autoreconf=yes  (Gustavo)
---
 docs/manual/adding-packages-autotools.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/manual/adding-packages-autotools.txt b/docs/manual/adding-packages-autotools.txt
index c7e797f..3f40503 100644
--- a/docs/manual/adding-packages-autotools.txt
+++ b/docs/manual/adding-packages-autotools.txt
@@ -125,6 +125,18 @@ cases, typical packages will therefore only use a few of them.
   passed to the 'autoreconf' program if
   +LIBFOO_AUTORECONF=YES+. By default, empty.
 
+* +LIBFOO_GETTEXTIZE+, tells whether the package should be
+  gettextized or not (i.e. if the package uses a different gettext
+  version than Buildroot provides, and it is needed to run
+  'gettextize'.) Only valid when +LIBFOO_AUTORECONF=YES+. Valid
+  values are +YES+ and +NO+. The default is +NO+.
+
+* +LIBFOO_GETTEXTIZE_OPT+, to specify additional options passed to
+  the 'gettextize' program, if +LIBFOO_GETTEXTIZE=YES+. You may
+  use that if, for example, the +.po+ files are not located in the
+  standard place (i.e. in +po/+ at the root of the package.) By
+  default, '-f'.
+
 * +LIBFOO_LIBTOOL_PATCH+ tells whether the Buildroot
   patch to fix libtool cross-compilation issues should be applied or
   not. Valid values are +YES+ and +NO+. By
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 3/6 v3] package/wget: use the new gettextize infra
  2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 1/6 v3] pkg-autotools: add support to gettextize a package Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 2/6 v3] manual: add gettextize explanations in the manual Yann E. MORIN
@ 2014-07-16 22:00 ` Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 4/6 v3] package/coreutils: gettextize to match the new gettext version Yann E. MORIN
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-07-16 22:00 UTC (permalink / raw)
  To: buildroot

Instead of using a custom hook to gettextize wget, use the new
gettextize infra we just added in the previous patch.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

---
Changes v2 -> v3:
  - reword commit log  (Gustavo)
  - remove comment  (Baruch)
---
 package/wget/wget.mk | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/package/wget/wget.mk b/package/wget/wget.mk
index 56ccfb5..8046a61 100644
--- a/package/wget/wget.mk
+++ b/package/wget/wget.mk
@@ -12,14 +12,7 @@ WGET_LICENSE_FILES = COPYING
 
 # patching gnulib .m4 file
 WGET_AUTORECONF = YES
-
-# Ugly kludge to fix autoreconf with old gettext infra
-# We need to gettextize before autoreconf to upgrade
-WGET_DEPENDENCIES += host-gettext
-define WGET_GETTEXTIZE
-	cd $(@D) ; $(HOST_DIR)/usr/bin/gettextize -f
-endef
-WGET_PRE_CONFIGURE_HOOKS += WGET_GETTEXTIZE
+WGET_GETTEXTIZE = YES
 
 # Prefer full-blown wget over busybox
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 4/6 v3] package/coreutils: gettextize to match the new gettext version
  2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2014-07-16 22:00 ` [Buildroot] [PATCH 3/6 v3] package/wget: use the new gettextize infra Yann E. MORIN
@ 2014-07-16 22:00 ` Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 5/6 v3] package/parted: " Yann E. MORIN
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-07-16 22:00 UTC (permalink / raw)
  To: buildroot

The gettext macros in the package are from a gettext version older than
the one we have in Buildroot, so autoreconf fails.

Run gettextize prior to running autoreconf, like we do in wget.

Fixes:
    http://autobuild.buildroot.net/results/228/228224668be4376844fe924d0a5b346af0414460/
    http://autobuild.buildroot.net/results/ac4/ac4dbb1342e9c9f1de5412e0b71fe4422ef744ef/
    http://autobuild.buildroot.net/results/a0c/a0c25faf149de9d51768eed8ff5a2274282cd797/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/coreutils/coreutils.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index c90396d..af202b4 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -12,6 +12,7 @@ COREUTILS_LICENSE_FILES = COPYING
 
 # patching gnulib .m4 file
 COREUTILS_AUTORECONF = YES
+COREUTILS_GETTEXTIZE = YES
 
 # If both coreutils and busybox are selected, make certain coreutils
 # wins the fight over who gets to have their utils actually installed.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 5/6 v3] package/parted: gettextize to match the new gettext version
  2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2014-07-16 22:00 ` [Buildroot] [PATCH 4/6 v3] package/coreutils: gettextize to match the new gettext version Yann E. MORIN
@ 2014-07-16 22:00 ` Yann E. MORIN
  2014-07-16 22:00 ` [Buildroot] [PATCH 6/6 v3] package/gst1-plugins-bad: " Yann E. MORIN
  2014-07-17  7:56 ` [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Thomas Petazzoni
  6 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-07-16 22:00 UTC (permalink / raw)
  To: buildroot

The gettext macros in the package are from a gettext version older than
the one we have in Buildroot, so autoreconf fails.

Run gettextize prior to running autoreconf, like we do in wget.

Fixes:
    http://autobuild.buildroot.net/results/ee2/ee20455ead785200847f50e463c32c55821f8925/
    http://autobuild.buildroot.net/results/3fe/3fe46e1a6ef10645e46a2e9efdf651f60f05dea8/
    http://autobuild.buildroot.net/results/ecd/ecdacafb3245afa1cce4f587eff9bdfe5c162f81/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/parted/parted.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/parted/parted.mk b/package/parted/parted.mk
index fd82684..75537a7 100644
--- a/package/parted/parted.mk
+++ b/package/parted/parted.mk
@@ -11,6 +11,7 @@ PARTED_DEPENDENCIES = util-linux
 PARTED_INSTALL_STAGING = YES
 # For uclinux patch
 PARTED_AUTORECONF = YES
+PARTED_GETTEXTIZE = YES
 PARTED_LICENSE = GPLv3+
 PARTED_LICENSE_FILES = COPYING
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 6/6 v3] package/gst1-plugins-bad: gettextize to match the new gettext version
  2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
                   ` (4 preceding siblings ...)
  2014-07-16 22:00 ` [Buildroot] [PATCH 5/6 v3] package/parted: " Yann E. MORIN
@ 2014-07-16 22:00 ` Yann E. MORIN
  2014-07-17  7:56 ` [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Thomas Petazzoni
  6 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-07-16 22:00 UTC (permalink / raw)
  To: buildroot

The gettext macros in the package are from a gettext version older than
the ones we have in Buildroot, so autoreconf fails.

Run gettextize prior to running autoreconf, like we do in wget.

Fixes:
    http://autobuild.buildroot.org/results/ea6/ea6797f9595c34734229c78b4e25bf624925144b/
    http://autobuild.buildroot.org/results/578/5781774ae1b7ba85efee4bc933235304169b9196/
    http://autobuild.buildroot.org/results/188/18888e06058dff0249d7c5e10a2c4f46e059878a/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
index 25289d2..e7d265f 100644
--- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
+++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
@@ -14,6 +14,7 @@ GST1_PLUGINS_BAD_LICENSE = LGPLv2+ LGPLv2.1+
 
 GST1_PLUGINS_BAD_AUTORECONF = YES
 GST1_PLUGINS_BAD_AUTORECONF_OPT = -I $(@D)/common/m4
+GST1_PLUGINS_BAD_GETTEXTIZE = YES
 
 GST1_PLUGINS_BAD_CONF_OPT = \
 	--disable-examples \
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext)
  2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
                   ` (5 preceding siblings ...)
  2014-07-16 22:00 ` [Buildroot] [PATCH 6/6 v3] package/gst1-plugins-bad: " Yann E. MORIN
@ 2014-07-17  7:56 ` Thomas Petazzoni
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2014-07-17  7:56 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Thu, 17 Jul 2014 00:00:29 +0200, Yann E. MORIN wrote:

> This small series introduces the gettextize of a package as an optional
> sequence in the autotools package infra.
> 
> It has been only slightly tested, so is still in RFC stage.
> 
> Three packages have been converted: wget (the historical offender),
> coreutils and parted. Others may need gettextizing, too, but the
> autobuilders (or users) will catch them eventually.

Since this issue was causing some much breakage in the autobuilders,
I've applied your series. If there are some fixes or improvements to be
made, either due to additional review, or additional issues being
discovered, we can handle them as followup patches.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-07-17  7:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-16 22:00 [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Yann E. MORIN
2014-07-16 22:00 ` [Buildroot] [PATCH 1/6 v3] pkg-autotools: add support to gettextize a package Yann E. MORIN
2014-07-16 22:00 ` [Buildroot] [PATCH 2/6 v3] manual: add gettextize explanations in the manual Yann E. MORIN
2014-07-16 22:00 ` [Buildroot] [PATCH 3/6 v3] package/wget: use the new gettextize infra Yann E. MORIN
2014-07-16 22:00 ` [Buildroot] [PATCH 4/6 v3] package/coreutils: gettextize to match the new gettext version Yann E. MORIN
2014-07-16 22:00 ` [Buildroot] [PATCH 5/6 v3] package/parted: " Yann E. MORIN
2014-07-16 22:00 ` [Buildroot] [PATCH 6/6 v3] package/gst1-plugins-bad: " Yann E. MORIN
2014-07-17  7:56 ` [Buildroot] [PATCH 0/6 v3] pkg-autotools: introduce infra to gettextize packages (branch yem/gettext) Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox