diff mbox series

[2/2] gettext: rationalise optional dependencies

Message ID 20180110172858.22739-2-ross.burton@intel.com
State Accepted
Commit a82aa376a9229428ec25629e97a1efa56f0afae7
Headers show
Series [1/2] glib-2.0: rationalise build dependencies | expand

Commit Message

Ross Burton Jan. 10, 2018, 5:28 p.m. UTC
gettext has optional dependencies on libxml2, glib, libcroco and libunistring.
If they're not available then gettext will use internal copies, but it can also
use system libraries.

For gettext-native and nativesdk-gettext continue to use the internal copies to
reduce the dependencies, but for target use the system shared libraries.

Also gettext 0.19.7 onwards swapped expat for libxm2, so remove the build
dependency on expat.

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/recipes-core/gettext/gettext_0.19.8.1.bb | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Khem Raj Jan. 11, 2018, 6:55 p.m. UTC | #1
On Wed, Jan 10, 2018 at 9:28 AM, Ross Burton <ross.burton@intel.com> wrote:
> gettext has optional dependencies on libxml2, glib, libcroco and libunistring.

> If they're not available then gettext will use internal copies, but it can also

> use system libraries.

>

> For gettext-native and nativesdk-gettext continue to use the internal copies to

> reduce the dependencies, but for target use the system shared libraries.

>


Do we get any reduction in size ? if yes how much, not sure whats the defaults
generally used by other distributions but it would nice to be using
the default config
options for best results.

> Also gettext 0.19.7 onwards swapped expat for libxm2, so remove the build

> dependency on expat.

>

> Signed-off-by: Ross Burton <ross.burton@intel.com>

> ---

>  meta/recipes-core/gettext/gettext_0.19.8.1.bb | 18 +++++++++++-------

>  1 file changed, 11 insertions(+), 7 deletions(-)

>

> diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.19.8.1.bb

> index c2059e608b1..97083c0da2d 100644

> --- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb

> +++ b/meta/recipes-core/gettext/gettext_0.19.8.1.bb

> @@ -8,7 +8,7 @@ SECTION = "libs"

>  LICENSE = "GPLv3+ & LGPL-2.1+"

>  LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

>

> -DEPENDS = "gettext-native virtual/libiconv expat"

> +DEPENDS = "gettext-native virtual/libiconv"

>  DEPENDS_class-native = "gettext-minimal-native"

>  PROVIDES = "virtual/libintl virtual/gettext"

>  PROVIDES_class-native = "virtual/gettext-native"

> @@ -22,8 +22,6 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \

>  SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"

>  SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"

>

> -PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"

> -

>  inherit autotools texinfo

>

>  EXTRA_OECONF += "--without-lispdir \

> @@ -33,18 +31,24 @@ EXTRA_OECONF += "--without-lispdir \

>                   --disable-native-java \

>                   --disable-openmp \

>                   --disable-acl \

> -                 --with-included-glib \

>                   --without-emacs \

>                   --without-cvs \

>                   --without-git \

> -                 --with-included-libxml \

> -                 --with-included-libcroco \

> -                 --with-included-libunistring \

>                  "

>  EXTRA_OECONF_append_class-target = " \

>                   --with-bisonlocaledir=${datadir}/locale \

>  "

>

> +PACKAGECONFIG ??= "croco glib libxml libunistring"

> +PACKAGECONFIG_class-native = ""

> +PACKAGECONFIG_class-nativesdk = ""

> +

> +PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco"

> +PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0"

> +PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2"

> +PACKAGECONFIG[libunistring] = "--without-included-libunistring,--with-included-libunistring,libunistring"

> +PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"

> +

>  acpaths = '-I ${S}/gettext-runtime/m4 \

>             -I ${S}/gettext-tools/m4'

>

> --

> 2.11.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton Jan. 12, 2018, 10:30 a.m. UTC | #2
On 11 January 2018 at 18:55, Khem Raj <raj.khem@gmail.com> wrote:

> On Wed, Jan 10, 2018 at 9:28 AM, Ross Burton <ross.burton@intel.com>

> wrote:

> > gettext has optional dependencies on libxml2, glib, libcroco and

> libunistring.

> > If they're not available then gettext will use internal copies, but it

> can also

> > use system libraries.

> >

> > For gettext-native and nativesdk-gettext continue to use the internal

> copies to

> > reduce the dependencies, but for target use the system shared libraries.

> >

>

> Do we get any reduction in size ? if yes how much, not sure whats the

> defaults

> generally used by other distributions but it would nice to be using

> the default config

> options for best results.



When using the system shared libraries the gettext package is about a
megabyte smaller from memory, but obviously it has more deps (which is why
I left it as a packageconfig).

For native, circular dependencies mean we can't use system libraries anyway.

Ross
<div dir="ltr">On 11 January 2018 at 18:55, Khem Raj <span dir="ltr">&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Jan 10, 2018 at 9:28 AM, Ross Burton &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt; wrote:<br>
&gt; gettext has optional dependencies on libxml2, glib, libcroco and libunistring.<br>
&gt; If they&#39;re not available then gettext will use internal copies, but it can also<br>
&gt; use system libraries.<br>
&gt;<br>
&gt; For gettext-native and nativesdk-gettext continue to use the internal copies to<br>
&gt; reduce the dependencies, but for target use the system shared libraries.<br>
&gt;<br>
<br>
</span>Do we get any reduction in size ? if yes how much, not sure whats the defaults<br>
generally used by other distributions but it would nice to be using<br>
the default config<br>
options for best results.</blockquote><div><br></div><div>When using the system shared libraries the gettext package is about a megabyte smaller from memory, but obviously it has more deps (which is why I left it as a packageconfig).</div><div><br></div><div>For native, circular dependencies mean we can&#39;t use system libraries anyway.</div><div><br></div><div>Ross</div></div></div></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
index c2059e608b1..97083c0da2d 100644
--- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -8,7 +8,7 @@  SECTION = "libs"
 LICENSE = "GPLv3+ & LGPL-2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-DEPENDS = "gettext-native virtual/libiconv expat"
+DEPENDS = "gettext-native virtual/libiconv"
 DEPENDS_class-native = "gettext-minimal-native"
 PROVIDES = "virtual/libintl virtual/gettext"
 PROVIDES_class-native = "virtual/gettext-native"
@@ -22,8 +22,6 @@  SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
 SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
 SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"
 
-PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-
 inherit autotools texinfo
 
 EXTRA_OECONF += "--without-lispdir \
@@ -33,18 +31,24 @@  EXTRA_OECONF += "--without-lispdir \
                  --disable-native-java \
                  --disable-openmp \
                  --disable-acl \
-                 --with-included-glib \
                  --without-emacs \
                  --without-cvs \
                  --without-git \
-                 --with-included-libxml \
-                 --with-included-libcroco \
-                 --with-included-libunistring \
                 "
 EXTRA_OECONF_append_class-target = " \
                  --with-bisonlocaledir=${datadir}/locale \
 "
 
+PACKAGECONFIG ??= "croco glib libxml libunistring"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco"
+PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0"
+PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2"
+PACKAGECONFIG[libunistring] = "--without-included-libunistring,--with-included-libunistring,libunistring"
+PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
+
 acpaths = '-I ${S}/gettext-runtime/m4 \
            -I ${S}/gettext-tools/m4'