Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/4] gettext_0.16.1: use musl gettext implementation
@ 2016-08-18 16:15 André Draszik
  2016-08-18 16:15 ` [PATCH 2/4] gettext_0.16.1: fix lispdir configure option André Draszik
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: André Draszik @ 2016-08-18 16:15 UTC (permalink / raw)
  To: openembedded-core

gettext uses internal symbols to detect whether the
implementation is compatible with GNU gettext. However,
these symbols don't are not part of the public API, they
are specific to glibc.

While musl implements the GNU gettext *API* version 1 and 2
  http://www.openwall.com/lists/musl/2015/04/16/3
it doesn't implement glibc internals. This means that
gettext fails to detect musl's working implementation.

More recent versions of gettext have changed the way
GNU gettext compatibility is done
  https://lists.gnu.org/archive/html/bug-gettext/2016-04/msg00000.html
  http://git.savannah.gnu.org/cgit/gettext.git/commit/gettext-runtime/m4/gettext.m4?id=b67399b40bc5bf3165b09e6a095ec941d4b30a97
and while we could backport the corresponding patch to
gettext.m4, we avoid doing that so as to avoid any
potential GPL-v3 issues.

So instead we force ./configure to assume that the gettext
implementation of the c-library (musl) is compatible.

As a side-effect, this also reduces image sizes as the
internal gettext implementation isn't built anymore, and
it's otherwise packaged into the main gettext package
which blows up the image as the main gettext package
contains a lot of things.

Similarly, libintl.h isn't generated anymore, as the one
from musl is OK.

Signed-off-by: André Draszik <git@andred.net>
---
 meta/recipes-core/gettext/gettext_0.16.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/gettext/gettext_0.16.1.bb b/meta/recipes-core/gettext/gettext_0.16.1.bb
index 8b6f0a7..5a58578 100644
--- a/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -31,6 +31,11 @@ PARALLEL_MAKE = ""
 inherit autotools texinfo
 
 EXTRA_OECONF += "--without-lisp --disable-csharp --disable-openmp --without-emacs"
+EXTRA_OECONF_append_libc-musl = "\
+                                 gt_cv_func_gnugettext1_libc=yes \
+                                 gt_cv_func_gnugettext2_libc=yes \
+                                "
+
 acpaths = '-I ${S}/autoconf-lib-link/m4/ \
            -I ${S}/gettext-runtime/m4 \
            -I ${S}/gettext-tools/m4'
@@ -41,7 +46,6 @@ do_configure_prepend() {
 
 do_install_append_libc-musl () {
 	rm -f ${D}${libdir}/charset.alias
-	rm -f ${D}${includedir}/libintl.h
 }
 
 # these lack the .x behind the .so, but shouldn't be in the -dev package
-- 
2.9.3



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

* [PATCH 2/4] gettext_0.16.1: fix lispdir configure option
  2016-08-18 16:15 [PATCH 1/4] gettext_0.16.1: use musl gettext implementation André Draszik
@ 2016-08-18 16:15 ` André Draszik
  2016-08-18 16:15 ` [PATCH 3/4] gettext_0.16.1: align configure options with v0.19.8.1 recipe André Draszik
  2016-08-18 16:15 ` [PATCH 4/4] gettext_0.16.1: whitespace changes to align with v0.19.8.1 André Draszik
  2 siblings, 0 replies; 5+ messages in thread
From: André Draszik @ 2016-08-18 16:15 UTC (permalink / raw)
  To: openembedded-core

The option is called --with(out)-lispdir, not --with(out)-lisp

Signed-off-by: André Draszik <git@andred.net>
---
 meta/recipes-core/gettext/gettext_0.16.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/gettext/gettext_0.16.1.bb b/meta/recipes-core/gettext/gettext_0.16.1.bb
index 5a58578..6710c8d 100644
--- a/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -30,7 +30,11 @@ PARALLEL_MAKE = ""
 
 inherit autotools texinfo
 
-EXTRA_OECONF += "--without-lisp --disable-csharp --disable-openmp --without-emacs"
+EXTRA_OECONF += "--without-lispdir \
+                 --disable-csharp \
+                 --disable-openmp \
+                 --without-emacs \
+                "
 EXTRA_OECONF_append_libc-musl = "\
                                  gt_cv_func_gnugettext1_libc=yes \
                                  gt_cv_func_gnugettext2_libc=yes \
-- 
2.9.3



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

* [PATCH 3/4] gettext_0.16.1: align configure options with v0.19.8.1 recipe
  2016-08-18 16:15 [PATCH 1/4] gettext_0.16.1: use musl gettext implementation André Draszik
  2016-08-18 16:15 ` [PATCH 2/4] gettext_0.16.1: fix lispdir configure option André Draszik
@ 2016-08-18 16:15 ` André Draszik
  2016-08-18 16:15 ` [PATCH 4/4] gettext_0.16.1: whitespace changes to align with v0.19.8.1 André Draszik
  2 siblings, 0 replies; 5+ messages in thread
From: André Draszik @ 2016-08-18 16:15 UTC (permalink / raw)
  To: openembedded-core

It doesn't look like we need any of those features, so
let's disable them explicitly.

Signed-off-by: André Draszik <git@andred.net>
---
 meta/recipes-core/gettext/gettext_0.16.1.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/gettext/gettext_0.16.1.bb b/meta/recipes-core/gettext/gettext_0.16.1.bb
index 6710c8d..93f5fcd 100644
--- a/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -32,6 +32,9 @@ inherit autotools texinfo
 
 EXTRA_OECONF += "--without-lispdir \
                  --disable-csharp \
+                 --disable-libasprintf \
+                 --disable-java \
+                 --disable-native-java \
                  --disable-openmp \
                  --without-emacs \
                 "
-- 
2.9.3



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

* [PATCH 4/4] gettext_0.16.1: whitespace changes to align with v0.19.8.1
  2016-08-18 16:15 [PATCH 1/4] gettext_0.16.1: use musl gettext implementation André Draszik
  2016-08-18 16:15 ` [PATCH 2/4] gettext_0.16.1: fix lispdir configure option André Draszik
  2016-08-18 16:15 ` [PATCH 3/4] gettext_0.16.1: align configure options with v0.19.8.1 recipe André Draszik
@ 2016-08-18 16:15 ` André Draszik
  2016-08-18 16:21   ` Robert P. J. Day
  2 siblings, 1 reply; 5+ messages in thread
From: André Draszik @ 2016-08-18 16:15 UTC (permalink / raw)
  To: openembedded-core

This further aligns this recipe with the GPLv3 version to make
it easier to  spot differences between the two recipes.

Signed-off-by: André Draszik <git@andred.net>
---
 meta/recipes-core/gettext/gettext_0.16.1.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/gettext/gettext_0.16.1.bb b/meta/recipes-core/gettext/gettext_0.16.1.bb
index 93f5fcd..e79f4da 100644
--- a/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -21,13 +21,13 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
            file://hardcode_macro_version.patch \
           "
 
-LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-
 SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"
 SRC_URI[sha256sum] = "0bf850d1a079fb5a61f0a47b1a9efd35eb44032255375e1cedb0253bc27b376d"
 
 PARALLEL_MAKE = ""
 
+LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
+
 inherit autotools texinfo
 
 EXTRA_OECONF += "--without-lispdir \
@@ -104,9 +104,8 @@ FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
                              ${infodir}/autosprintf.info \
                             "
 
-
 do_install_append() {
-	rm -f ${D}${libdir}/preloadable_libintl.so
+    rm -f ${D}${libdir}/preloadable_libintl.so
 }
 
 do_install_append_class-native () {
-- 
2.9.3



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

* Re: [PATCH 4/4] gettext_0.16.1: whitespace changes to align with v0.19.8.1
  2016-08-18 16:15 ` [PATCH 4/4] gettext_0.16.1: whitespace changes to align with v0.19.8.1 André Draszik
@ 2016-08-18 16:21   ` Robert P. J. Day
  0 siblings, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2016-08-18 16:21 UTC (permalink / raw)
  To: André Draszik; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

On Thu, 18 Aug 2016, André Draszik wrote:

> +LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "

  i'm not a big fan of doing the above; that is, adding *both* leading
and trailing space to a string, just to play it safe. i know it
doesn't hurt, but it's sloppy and might actually conceal incorrect
string values elsewhere.

  if you're "_append"ing, then the string should have only a leading
space; if you're "_prepend"ing, then only a trailing space. the reason
for that is that, if you're rigorous like that, you might actually
catch a string that *doesn't* have the appropriate spaces, but is
getting away with it only because a string elsewhere is being generous
and covering for it.

  and, yes, i *am* that pedantic.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

end of thread, other threads:[~2016-08-18 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 16:15 [PATCH 1/4] gettext_0.16.1: use musl gettext implementation André Draszik
2016-08-18 16:15 ` [PATCH 2/4] gettext_0.16.1: fix lispdir configure option André Draszik
2016-08-18 16:15 ` [PATCH 3/4] gettext_0.16.1: align configure options with v0.19.8.1 recipe André Draszik
2016-08-18 16:15 ` [PATCH 4/4] gettext_0.16.1: whitespace changes to align with v0.19.8.1 André Draszik
2016-08-18 16:21   ` Robert P. J. Day

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