blob: cd0b759d527f7352e93500ad0fe023962c3515b9 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Utilities and libraries for producing multi-lingual messages"
2DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
3HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
4SECTION = "libs"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=9ea3144f04c41cd2eada5d3f472e6ea5"
7
8PR = "r6"
9DEPENDS = "virtual/libiconv"
10DEPENDS_class-native = ""
11PROVIDES = "virtual/libintl virtual/gettext"
12PROVIDES_class-native = ""
13
14SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
15 file://gettext-vpath.patch \
16 file://linklib_from_0.17.patch \
17 file://gettext-autoconf-lib-link-no-L.patch \
18 file://disable_java.patch \
19 file://fix_aclocal_version.patch \
20 file://fix_gnu_source_circular.patch \
21 file://hardcode_macro_version.patch \
22 "
23
24LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
25
26SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"
27SRC_URI[sha256sum] = "0bf850d1a079fb5a61f0a47b1a9efd35eb44032255375e1cedb0253bc27b376d"
28
29PARALLEL_MAKE = ""
30
31inherit autotools texinfo
32
33EXTRA_OECONF += "--without-lisp --disable-csharp --disable-openmp --without-emacs"
34acpaths = '-I ${S}/autoconf-lib-link/m4/ \
35 -I ${S}/gettext-runtime/m4 \
36 -I ${S}/gettext-tools/m4'
37
38do_configure_prepend() {
39 rm -f ${S}/config/m4/libtool.m4
40}
41
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050042do_install_append_libc-musl () {
43 rm -f ${D}${libdir}/charset.alias
44 rm -f ${D}${includedir}/libintl.h
45}
46
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047# these lack the .x behind the .so, but shouldn't be in the -dev package
48# Otherwise you get the following results:
49# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
50# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
51# because gettext depends on gettext-dev, which pulls in more -dev packages:
52# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
53# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
54# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
55# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
56
57PACKAGES =+ "libgettextlib libgettextsrc"
58FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
59FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
60
61PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-staticdev gettext-runtime-doc"
62
63FILES_${PN} += "${libdir}/${BPN}/*"
64
65FILES_gettext-runtime = "${bindir}/gettext \
66 ${bindir}/ngettext \
67 ${bindir}/envsubst \
68 ${bindir}/gettext.sh \
69 ${libdir}/libasprintf${SODEV} \
70 ${libdir}/GNU.Gettext.dll \
71 "
72FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
73 ${libdir}/charset.alias \
74 "
75FILES_gettext-runtime-staticdev += "${libdir}/libasprintf.a"
76FILES_gettext-runtime-dev += "${includedir}/autosprintf.h \
77 ${libdir}/libasprintf${SOLIBDEV}"
78FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
79 ${includedir}/libintl.h \
80 "
81FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
82 ${mandir}/man1/ngettext.* \
83 ${mandir}/man1/envsubst.* \
84 ${mandir}/man1/.* \
85 ${mandir}/man3/* \
86 ${docdir}/gettext/gettext.* \
87 ${docdir}/gettext/ngettext.* \
88 ${docdir}/gettext/envsubst.* \
89 ${docdir}/gettext/*.3.html \
90 ${datadir}/gettext/ABOUT-NLS \
91 ${docdir}/gettext/csharpdoc/* \
92 ${docdir}/libasprintf/autosprintf.html \
93 ${infodir}/autosprintf.info \
94 "
95
96
97do_install_append() {
98 rm -f ${D}${libdir}/preloadable_libintl.so
99}
100
101# Anyone inheriting gettext will have both gettext-native and gettext
102# available, and we don't want to use older macros from the target gettext in
103# a non-gplv3 build, so kill them and let dependent recipes rely on
104# gettext-native.
105
106SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_m4_macros"
107
108remove_sysroot_m4_macros () {
109 rm -r "${SYSROOT_DESTDIR}${datadir}/aclocal"
110}
111
112BBCLASSEXTEND = "native nativesdk"