diff options
Diffstat (limited to 'meta/recipes-core/gettext/gettext_0.22.5.bb')
-rw-r--r-- | meta/recipes-core/gettext/gettext_0.22.5.bb | 213 |
1 files changed, 213 insertions, 0 deletions
diff --git a/meta/recipes-core/gettext/gettext_0.22.5.bb b/meta/recipes-core/gettext/gettext_0.22.5.bb new file mode 100644 index 0000000000..1a66d37916 --- /dev/null +++ b/meta/recipes-core/gettext/gettext_0.22.5.bb | |||
@@ -0,0 +1,213 @@ | |||
1 | SUMMARY = "Utilities and libraries for producing multi-lingual messages" | ||
2 | DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. \ | ||
3 | These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file \ | ||
4 | naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and \ | ||
5 | a few stand-alone programs to massage in various ways the sets of translatable and already translated strings." | ||
6 | SECTION = "libs" | ||
7 | LICENSE = "GPL-3.0-or-later & LGPL-2.1-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" | ||
9 | |||
10 | # without libxml in PACKAGECONFIG vendor copy of the lib will be used | ||
11 | LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'libxml', '', '& MIT', d)}" | ||
12 | LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'libxml', '', 'file://libtextstyle/lib/libxml/COPYING;md5=2044417e2e5006b65a8b9067b683fcf1', d)}" | ||
13 | # without glib in PACKAGECONFIG vendor copy of the lib will be used | ||
14 | LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'glib', '', 'file://libtextstyle/lib/glib/ghash.c;md5=e3159f5ac38dfe77af5cc0ee104dab2d;beginline=10;endline=27', d)}" | ||
15 | |||
16 | |||
17 | DEPENDS = "gettext-native virtual/libiconv" | ||
18 | DEPENDS:class-native = "gettext-minimal-native" | ||
19 | PROVIDES = "virtual/libintl virtual/gettext" | ||
20 | PROVIDES:class-native = "virtual/gettext-native" | ||
21 | RCONFLICTS:${PN} = "proxy-libintl" | ||
22 | |||
23 | require gettext-sources.inc | ||
24 | SRC_URI += " \ | ||
25 | file://parallel.patch \ | ||
26 | file://use-pkgconfig.patch \ | ||
27 | file://run-ptest \ | ||
28 | file://serial-tests-config.patch \ | ||
29 | file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ | ||
30 | file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \ | ||
31 | " | ||
32 | |||
33 | inherit autotools texinfo pkgconfig ptest | ||
34 | |||
35 | EXTRA_OECONF += "--without-lispdir \ | ||
36 | --disable-csharp \ | ||
37 | --disable-libasprintf \ | ||
38 | --disable-java \ | ||
39 | --disable-native-java \ | ||
40 | --disable-openmp \ | ||
41 | --disable-acl \ | ||
42 | --without-emacs \ | ||
43 | --without-cvs \ | ||
44 | --without-git \ | ||
45 | --without-included-libcroco \ | ||
46 | --cache-file=${B}/config.cache \ | ||
47 | " | ||
48 | EXTRA_OECONF:append:class-target = " \ | ||
49 | --with-bisonlocaledir=${datadir}/locale \ | ||
50 | gt_cv_locale_fr_utf8=fr_FR \ | ||
51 | gt_cv_locale_fr=fr_FR.ISO-8859-1 \ | ||
52 | gt_cv_locale_de_utf8=de_DE \ | ||
53 | gt_cv_locale_de=de_DE.ISO-8859-1 \ | ||
54 | " | ||
55 | |||
56 | PACKAGECONFIG ??= "glib libxml" | ||
57 | PACKAGECONFIG:class-native = "" | ||
58 | PACKAGECONFIG:class-nativesdk = "" | ||
59 | |||
60 | PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0" | ||
61 | PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2" | ||
62 | # Need paths here to avoid host contamination but this can cause RPATH warnings | ||
63 | # or problems if $libdir isn't $prefix/lib. | ||
64 | PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring" | ||
65 | PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," | ||
66 | |||
67 | acpaths = '-I ${S}/gettext-runtime/m4 \ | ||
68 | -I ${S}/gettext-tools/m4' | ||
69 | |||
70 | do_install:append:libc-musl () { | ||
71 | rm -f ${D}${libdir}/charset.alias | ||
72 | rm -f ${D}${includedir}/libintl.h | ||
73 | rm -f ${D}${libdir}/libintl.la | ||
74 | } | ||
75 | |||
76 | # these lack the .x behind the .so, but shouldn't be in the -dev package | ||
77 | # Otherwise you get the following results: | ||
78 | # 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz | ||
79 | # 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz | ||
80 | # because gettext depends on gettext-dev, which pulls in more -dev packages: | ||
81 | # 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk | ||
82 | # 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk | ||
83 | # 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk | ||
84 | # 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk | ||
85 | |||
86 | PACKAGES =+ "libgettextlib libgettextsrc" | ||
87 | FILES:libgettextlib = "${libdir}/libgettextlib-*.so*" | ||
88 | FILES:libgettextsrc = "${libdir}/libgettextsrc-*.so*" | ||
89 | |||
90 | PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc" | ||
91 | |||
92 | FILES:${PN} += "${libdir}/${BPN}/*" | ||
93 | |||
94 | # The its/Makefile.am has defined: | ||
95 | # itsdir = $(pkgdatadir)$(PACKAGE_SUFFIX)/its | ||
96 | # not itsdir = $(pkgdatadir), so use wildcard to match the version. | ||
97 | FILES:${PN} += "${datadir}/${BPN}-*/*" | ||
98 | |||
99 | FILES:gettext-runtime = "${bindir}/gettext \ | ||
100 | ${bindir}/ngettext \ | ||
101 | ${bindir}/envsubst \ | ||
102 | ${bindir}/gettext.sh \ | ||
103 | ${libdir}/libasprintf.so* \ | ||
104 | ${libdir}/GNU.Gettext.dll \ | ||
105 | " | ||
106 | FILES:gettext-runtime-dev += "${libdir}/libasprintf.a \ | ||
107 | ${includedir}/autosprintf.h \ | ||
108 | " | ||
109 | FILES:gettext-runtime-doc = "${mandir}/man1/gettext.* \ | ||
110 | ${mandir}/man1/ngettext.* \ | ||
111 | ${mandir}/man1/envsubst.* \ | ||
112 | ${mandir}/man1/.* \ | ||
113 | ${mandir}/man3/* \ | ||
114 | ${docdir}/gettext/gettext.* \ | ||
115 | ${docdir}/gettext/ngettext.* \ | ||
116 | ${docdir}/gettext/envsubst.* \ | ||
117 | ${docdir}/gettext/*.3.html \ | ||
118 | ${datadir}/gettext/ABOUT-NLS \ | ||
119 | ${docdir}/gettext/csharpdoc/* \ | ||
120 | ${docdir}/libasprintf/autosprintf.html \ | ||
121 | ${infodir}/autosprintf.info \ | ||
122 | " | ||
123 | |||
124 | do_install:append() { | ||
125 | rm -f ${D}${libdir}/preloadable_libintl.so | ||
126 | } | ||
127 | |||
128 | do_install:append:class-native () { | ||
129 | rm ${D}${datadir}/aclocal/* | ||
130 | rm ${D}${datadir}/gettext/config.rpath | ||
131 | rm ${D}${datadir}/gettext/po/Makefile.in.in | ||
132 | rm ${D}${datadir}/gettext/po/remove-potcdate.sin | ||
133 | |||
134 | create_wrapper ${D}${bindir}/msgfmt \ | ||
135 | GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-${PV}/" | ||
136 | |||
137 | } | ||
138 | |||
139 | do_compile_ptest() { | ||
140 | cd ${B}/gettext-tools/tests/ | ||
141 | sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_PROGRAMS)' Makefile | ||
142 | oe_runmake buildtest-TESTS | ||
143 | cd - | ||
144 | } | ||
145 | |||
146 | do_install_ptest() { | ||
147 | if [ ${PTEST_ENABLED} = "1" ]; then | ||
148 | mkdir -p ${D}${PTEST_PATH}/tests | ||
149 | mkdir -p ${D}${PTEST_PATH}/src | ||
150 | mkdir -p ${D}${PTEST_PATH}/po | ||
151 | mkdir -p ${D}${PTEST_PATH}/misc | ||
152 | mkdir -p ${D}${PTEST_PATH}/its | ||
153 | mkdir -p ${D}${PTEST_PATH}/styles | ||
154 | mkdir -p ${D}${PTEST_PATH}/gnulib-lib | ||
155 | mkdir -p ${D}${PTEST_PATH}/examples | ||
156 | cp -rf ${S}/gettext-tools/its/* ${D}${PTEST_PATH}/its | ||
157 | cp -rf ${S}/gettext-tools/styles/* ${D}${PTEST_PATH}/styles | ||
158 | cp -rf ${S}/gettext-tools/gnulib-lib/gettext.h ${D}${PTEST_PATH}/gnulib-lib | ||
159 | cp -rf ${S}/gettext-tools/examples/hello-c ${D}${PTEST_PATH}/examples | ||
160 | cp -rf ${S}/gettext-tools/tests/* ${D}${PTEST_PATH}/tests | ||
161 | cp -rf ${B}/gettext-tools/tests/.libs/* ${D}${PTEST_PATH}/tests | ||
162 | cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8* ${D}${libdir}/ | ||
163 | cp -rf ${B}/gettext-tools/tests/Makefile ${D}${PTEST_PATH}/tests | ||
164 | cp -rf ${B}/gettext-tools/tests/init-env ${D}${PTEST_PATH}/tests | ||
165 | sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile | ||
166 | sed -i -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile | ||
167 | install ${S}/gettext-tools/src/msgunfmt.tcl ${D}${PTEST_PATH}/src | ||
168 | install ${S}/gettext-tools/src/project-id ${D}${PTEST_PATH}/src | ||
169 | install ${B}/gettext-runtime/src/gettext.sh ${D}${PTEST_PATH}/src | ||
170 | install ${B}/gettext-runtime/src/ngettext ${D}${PTEST_PATH}/src | ||
171 | install ${B}/gettext-runtime/src/envsubst ${D}${PTEST_PATH}/src | ||
172 | install ${B}/gettext-runtime/src/gettext ${D}${PTEST_PATH}/src | ||
173 | install ${B}/gettext-tools/src/.libs/cldr-plurals ${D}${PTEST_PATH}/src | ||
174 | install ${S}/gettext-tools/po/gettext-tools.pot ${D}${PTEST_PATH}/po | ||
175 | install ${B}/gettext-tools/misc/* ${D}${PTEST_PATH}/misc | ||
176 | find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; | ||
177 | chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \ | ||
178 | ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 ${D}${PTEST_PATH}/tests/xgettext-vala-6 | ||
179 | sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env | ||
180 | fi | ||
181 | } | ||
182 | |||
183 | RDEPENDS:${PN}-ptest += "make xz bash gawk autoconf locale-base-de-de locale-base-fr-fr" | ||
184 | RDEPENDS:${PN}-ptest:append:libc-glibc = "\ | ||
185 | glibc-gconv-big5 \ | ||
186 | glibc-charmap-big5 \ | ||
187 | glibc-gconv-cp1251 \ | ||
188 | glibc-charmap-cp1251 \ | ||
189 | glibc-charmap-iso-8859-9 \ | ||
190 | glibc-gconv-iso8859-9 \ | ||
191 | glibc-charmap-koi8-r \ | ||
192 | glibc-gconv-koi8-r \ | ||
193 | glibc-gconv-iso8859-2 \ | ||
194 | glibc-charmap-iso-8859-2 \ | ||
195 | glibc-gconv-iso8859-1 \ | ||
196 | glibc-charmap-iso-8859-1 \ | ||
197 | glibc-gconv-euc-kr \ | ||
198 | glibc-charmap-euc-kr \ | ||
199 | glibc-gconv-euc-jp \ | ||
200 | glibc-charmap-euc-jp \ | ||
201 | glibc-gconv-gb18030 \ | ||
202 | glibc-charmap-gb18030 \ | ||
203 | " | ||
204 | |||
205 | RRECOMMENDS:${PN}-ptest:append:libc-glibc = "\ | ||
206 | locale-base-de-de.iso-8859-1 \ | ||
207 | locale-base-fr-fr.iso-8859-1 \ | ||
208 | " | ||
209 | |||
210 | INSANE_SKIP:${PN}-ptest += "ldflags" | ||
211 | INSANE_SKIP:${PN}-ptest += "rpaths" | ||
212 | |||
213 | BBCLASSEXTEND = "native nativesdk" | ||