blob: f9f7a7f4c86e850fc4a132942bb2ee37773b1eb0 [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
42# these lack the .x behind the .so, but shouldn't be in the -dev package
43# Otherwise you get the following results:
44# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
45# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
46# because gettext depends on gettext-dev, which pulls in more -dev packages:
47# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
48# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
49# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
50# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
51
52PACKAGES =+ "libgettextlib libgettextsrc"
53FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
54FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
55
56PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-staticdev gettext-runtime-doc"
57
58FILES_${PN} += "${libdir}/${BPN}/*"
59
60FILES_gettext-runtime = "${bindir}/gettext \
61 ${bindir}/ngettext \
62 ${bindir}/envsubst \
63 ${bindir}/gettext.sh \
64 ${libdir}/libasprintf${SODEV} \
65 ${libdir}/GNU.Gettext.dll \
66 "
67FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
68 ${libdir}/charset.alias \
69 "
70FILES_gettext-runtime-staticdev += "${libdir}/libasprintf.a"
71FILES_gettext-runtime-dev += "${includedir}/autosprintf.h \
72 ${libdir}/libasprintf${SOLIBDEV}"
73FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
74 ${includedir}/libintl.h \
75 "
76FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
77 ${mandir}/man1/ngettext.* \
78 ${mandir}/man1/envsubst.* \
79 ${mandir}/man1/.* \
80 ${mandir}/man3/* \
81 ${docdir}/gettext/gettext.* \
82 ${docdir}/gettext/ngettext.* \
83 ${docdir}/gettext/envsubst.* \
84 ${docdir}/gettext/*.3.html \
85 ${datadir}/gettext/ABOUT-NLS \
86 ${docdir}/gettext/csharpdoc/* \
87 ${docdir}/libasprintf/autosprintf.html \
88 ${infodir}/autosprintf.info \
89 "
90
91
92do_install_append() {
93 rm -f ${D}${libdir}/preloadable_libintl.so
94}
95
96# Anyone inheriting gettext will have both gettext-native and gettext
97# available, and we don't want to use older macros from the target gettext in
98# a non-gplv3 build, so kill them and let dependent recipes rely on
99# gettext-native.
100
101SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_m4_macros"
102
103remove_sysroot_m4_macros () {
104 rm -r "${SYSROOT_DESTDIR}${datadir}/aclocal"
105}
106
107BBCLASSEXTEND = "native nativesdk"