Skip to contentSkip to conversation

gettext_0.19.8.1.bb: Add 'gettext-libintl' package

PATCH In review Nathan Rossi 1 participant 2 messages Jan 30, 2017 – Feb 21, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gettext_0.19.8.1.bb: Add 'gettext-libintl' package

Whilst gettext is not the default provider of libintl for most libc configurations it is possible for it to be the provider of libintl. In the cases where it is provided it should be shipped in a separate package so as to allow for it to be included without pulling in additional gettext content/dependencies.

This change adds a package called 'gettext-libintl' which ships the libintl shared objects (and is otherwise empty if libintl is not provided). This allows for the library to be shipped without the additional components included in the gettext-runtime package.

This package is prefixed with 'gettext-' to define the source of the library due to the existence of multiple providers for libintl.

This change also makes the libintl*.so and .h packaged into the gettext-runtime-dev package by default. Removing the need for a uclibc override to handle packaging these files. Targets that don't intend to distribute these files already remove them during the do_install stage (e.g. musl).

---
 meta/recipes-core/gettext/gettext_0.19.8.1.bb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/recipes-core/gettext/gettext_0.19.8.1.bb +6 -6
index 7b8c1e8eb4..2af7373209 100644
@@ -66,6 +66,9 @@ PACKAGES =+ "libgettextlib libgettextsrc"
 FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
 FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
 
+PACKAGES =+ "gettext-libintl"
+FILES_gettext-libintl = "${libdir}/libintl*.so.*"
+
 PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc"
 
 FILES_${PN} += "${libdir}/${BPN}/*"
@@ -82,15 +85,12 @@ FILES_gettext-runtime = "${bindir}/gettext \
                          ${libdir}/libasprintf.so* \
                          ${libdir}/GNU.Gettext.dll \
                         "
-FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
-                                             ${libdir}/charset.alias \
-                                           "
+FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/charset.alias"
 FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
                       ${includedir}/autosprintf.h \
+                      ${libdir}/libintl*.so \
+                      ${includedir}/libintl.h \
                      "
-FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
-                                                 ${includedir}/libintl.h \
-                                               "
 FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
                              ${mandir}/man1/ngettext.* \
                              ${mandir}/man1/envsubst.* \
Signature · 1 line
2.11.0
#1 lore raw
Quoted 11 lines · Nathan Rossi

Whilst gettext is not the default provider of libintl for most libc configurations it is possible for it to be the provider of libintl. In the cases where it is provided it should be shipped in a separate package so as to allow for it to be included without pulling in additional gettext content/dependencies.

This change adds a package called 'gettext-libintl' which ships the libintl shared objects (and is otherwise empty if libintl is not provided). This allows for the library to be shipped without the additional components included in the gettext-runtime package.

Quoted 8 lines

This package is prefixed with 'gettext-' to define the source of the library due to the existence of multiple providers for libintl.

This change also makes the libintl*.so and .h packaged into the gettext-runtime-dev package by default. Removing the need for a uclibc override to handle packaging these files. Targets that don't intend to distribute these files already remove them during the do_install stage (e.g. musl).

Ping, any comments or feedback?

Thanks,
Nathan

Quoted 42 lines
---
 meta/recipes-core/gettext/gettext_0.19.8.1.bb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/recipes-core/gettext/gettext_0.19.8.1.bb +6 -7
index 7b8c1e8eb4..2af7373209 100644
@@ -66,6 +66,9 @@ PACKAGES =+ "libgettextlib libgettextsrc"
 FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
 FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
 
+PACKAGES =+ "gettext-libintl"
+FILES_gettext-libintl = "${libdir}/libintl*.so.*"
+
 PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc"
 
 FILES_${PN} += "${libdir}/${BPN}/*"
@@ -82,15 +85,12 @@ FILES_gettext-runtime = "${bindir}/gettext \
                          ${libdir}/libasprintf.so* \
                          ${libdir}/GNU.Gettext.dll \
                         "
-FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
-                                             ${libdir}/charset.alias \
-                                           "
+FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/charset.alias"
 FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
                       ${includedir}/autosprintf.h \
+                      ${libdir}/libintl*.so \
+                      ${includedir}/libintl.h \
                      "
-FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
-                                                 ${includedir}/libintl.h \
-                                               "
 FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
                              ${mandir}/man1/ngettext.* \
                              ${mandir}/man1/envsubst.* \
--

2.11.0