diff options
Diffstat (limited to 'meta/recipes-core/gettext/gettext_0.20.2.bb')
-rw-r--r-- | meta/recipes-core/gettext/gettext_0.20.2.bb | 210 |
1 files changed, 210 insertions, 0 deletions
diff --git a/meta/recipes-core/gettext/gettext_0.20.2.bb b/meta/recipes-core/gettext/gettext_0.20.2.bb new file mode 100644 index 0000000000..fda11c44cc --- /dev/null +++ b/meta/recipes-core/gettext/gettext_0.20.2.bb | |||
@@ -0,0 +1,210 @@ | |||
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 | HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" | ||
7 | SECTION = "libs" | ||
8 | LICENSE = "GPLv3+ & LGPL-2.1+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" | ||
10 | |||
11 | # Because po-gram-gen.y has been modified by fix-CVE-2018-18751.patch, | ||
12 | # it requires yacc which provided by bison-native | ||
13 | # Please remove bison-native from DEPENDS* when next upgrade | ||
14 | DEPENDS = "bison-native gettext-native virtual/libiconv" | ||
15 | DEPENDS_class-native = "bison-native gettext-minimal-native" | ||
16 | PROVIDES = "virtual/libintl virtual/gettext" | ||
17 | PROVIDES_class-native = "virtual/gettext-native" | ||
18 | RCONFLICTS_${PN} = "proxy-libintl" | ||
19 | SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ | ||
20 | file://parallel.patch \ | ||
21 | file://add-with-bisonlocaledir.patch \ | ||
22 | file://use-pkgconfig.patch \ | ||
23 | file://run-ptest \ | ||
24 | file://serial-tests-config.patch \ | ||
25 | file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ | ||
26 | file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \ | ||
27 | " | ||
28 | SRC_URI[md5sum] = "30fec34a895fab4c02584449c500aac2" | ||
29 | SRC_URI[sha256sum] = "ecb9d0908ca41d5ca5fef974323b3bba6bec19eebba0b44f396de98cfcc089f1" | ||
30 | |||
31 | inherit autotools texinfo pkgconfig ptest | ||
32 | |||
33 | EXTRA_OECONF += "--without-lispdir \ | ||
34 | --disable-csharp \ | ||
35 | --disable-libasprintf \ | ||
36 | --disable-java \ | ||
37 | --disable-native-java \ | ||
38 | --disable-openmp \ | ||
39 | --disable-acl \ | ||
40 | --without-emacs \ | ||
41 | --without-cvs \ | ||
42 | --without-git \ | ||
43 | --cache-file=${B}/config.cache \ | ||
44 | " | ||
45 | EXTRA_OECONF_append_class-target = " \ | ||
46 | --with-bisonlocaledir=${datadir}/locale \ | ||
47 | gt_cv_locale_fr_utf8=fr_FR \ | ||
48 | gt_cv_locale_fr=fr_FR.ISO-8859-1 \ | ||
49 | gt_cv_locale_de_utf8=de_DE \ | ||
50 | gt_cv_locale_de=de_DE.ISO-8859-1 \ | ||
51 | " | ||
52 | |||
53 | PACKAGECONFIG ??= "croco glib libxml" | ||
54 | PACKAGECONFIG_class-native = "" | ||
55 | PACKAGECONFIG_class-nativesdk = "" | ||
56 | |||
57 | PACKAGECONFIG[croco] = "--without-included-libcroco,--with-included-libcroco,libcroco" | ||
58 | PACKAGECONFIG[glib] = "--without-included-glib,--with-included-glib,glib-2.0" | ||
59 | PACKAGECONFIG[libxml] = "--without-included-libxml,--with-included-libxml,libxml2" | ||
60 | # Need paths here to avoid host contamination but this can cause RPATH warnings | ||
61 | # or problems if $libdir isn't $prefix/lib. | ||
62 | PACKAGECONFIG[libunistring] = "--with-libunistring-prefix=${STAGING_LIBDIR}/..,--with-included-libunistring,libunistring" | ||
63 | PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses," | ||
64 | |||
65 | acpaths = '-I ${S}/gettext-runtime/m4 \ | ||
66 | -I ${S}/gettext-tools/m4' | ||
67 | |||
68 | do_install_append_libc-musl () { | ||
69 | rm -f ${D}${libdir}/charset.alias | ||
70 | rm -f ${D}${includedir}/libintl.h | ||
71 | rm -f ${D}${libdir}/libintl.la | ||
72 | } | ||
73 | |||
74 | # these lack the .x behind the .so, but shouldn't be in the -dev package | ||
75 | # Otherwise you get the following results: | ||
76 | # 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz | ||
77 | # 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz | ||
78 | # because gettext depends on gettext-dev, which pulls in more -dev packages: | ||
79 | # 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk | ||
80 | # 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk | ||
81 | # 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk | ||
82 | # 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk | ||
83 | |||
84 | PACKAGES =+ "libgettextlib libgettextsrc" | ||
85 | FILES_libgettextlib = "${libdir}/libgettextlib-*.so*" | ||
86 | FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*" | ||
87 | |||
88 | PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc" | ||
89 | |||
90 | FILES_${PN} += "${libdir}/${BPN}/*" | ||
91 | |||
92 | # The its/Makefile.am has defined: | ||
93 | # itsdir = $(pkgdatadir)$(PACKAGE_SUFFIX)/its | ||
94 | # not itsdir = $(pkgdatadir), so use wildcard to match the version. | ||
95 | FILES_${PN} += "${datadir}/${BPN}-*/*" | ||
96 | |||
97 | FILES_gettext-runtime = "${bindir}/gettext \ | ||
98 | ${bindir}/ngettext \ | ||
99 | ${bindir}/envsubst \ | ||
100 | ${bindir}/gettext.sh \ | ||
101 | ${libdir}/libasprintf.so* \ | ||
102 | ${libdir}/GNU.Gettext.dll \ | ||
103 | " | ||
104 | FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \ | ||
105 | ${includedir}/autosprintf.h \ | ||
106 | " | ||
107 | FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \ | ||
108 | ${mandir}/man1/ngettext.* \ | ||
109 | ${mandir}/man1/envsubst.* \ | ||
110 | ${mandir}/man1/.* \ | ||
111 | ${mandir}/man3/* \ | ||
112 | ${docdir}/gettext/gettext.* \ | ||
113 | ${docdir}/gettext/ngettext.* \ | ||
114 | ${docdir}/gettext/envsubst.* \ | ||
115 | ${docdir}/gettext/*.3.html \ | ||
116 | ${datadir}/gettext/ABOUT-NLS \ | ||
117 | ${docdir}/gettext/csharpdoc/* \ | ||
118 | ${docdir}/libasprintf/autosprintf.html \ | ||
119 | ${infodir}/autosprintf.info \ | ||
120 | " | ||
121 | |||
122 | do_install_append() { | ||
123 | rm -f ${D}${libdir}/preloadable_libintl.so | ||
124 | } | ||
125 | |||
126 | do_install_append_class-native () { | ||
127 | rm ${D}${datadir}/aclocal/* | ||
128 | rm ${D}${datadir}/gettext/config.rpath | ||
129 | rm ${D}${datadir}/gettext/po/Makefile.in.in | ||
130 | rm ${D}${datadir}/gettext/po/remove-potcdate.sin | ||
131 | |||
132 | create_wrapper ${D}${bindir}/msgfmt \ | ||
133 | GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.20.2/" | ||
134 | |||
135 | } | ||
136 | |||
137 | do_compile_ptest() { | ||
138 | cd ${B}/gettext-tools/tests/ | ||
139 | sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_PROGRAMS)' Makefile | ||
140 | oe_runmake buildtest-TESTS | ||
141 | cd - | ||
142 | } | ||
143 | |||
144 | do_install_ptest() { | ||
145 | if [ ${PTEST_ENABLED} = "1" ]; then | ||
146 | mkdir -p ${D}${PTEST_PATH}/tests | ||
147 | mkdir -p ${D}${PTEST_PATH}/src | ||
148 | mkdir -p ${D}${PTEST_PATH}/po | ||
149 | mkdir -p ${D}${PTEST_PATH}/misc | ||
150 | mkdir -p ${D}${PTEST_PATH}/its | ||
151 | mkdir -p ${D}${PTEST_PATH}/styles | ||
152 | mkdir -p ${D}${PTEST_PATH}/gnulib-lib | ||
153 | mkdir -p ${D}${PTEST_PATH}/examples | ||
154 | cp -rf ${S}/gettext-tools/its/* ${D}${PTEST_PATH}/its | ||
155 | cp -rf ${S}/gettext-tools/styles/* ${D}${PTEST_PATH}/styles | ||
156 | cp -rf ${S}/gettext-tools/gnulib-lib/gettext.h ${D}${PTEST_PATH}/gnulib-lib | ||
157 | cp -rf ${S}/gettext-tools/examples/hello-c ${D}${PTEST_PATH}/examples | ||
158 | cp -rf ${S}/gettext-tools/tests/* ${D}${PTEST_PATH}/tests | ||
159 | cp -rf ${B}/gettext-tools/tests/.libs/* ${D}${PTEST_PATH}/tests | ||
160 | cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8* ${D}${libdir}/ | ||
161 | cp -rf ${B}/gettext-tools/tests/Makefile ${D}${PTEST_PATH}/tests | ||
162 | cp -rf ${B}/gettext-tools/tests/init-env ${D}${PTEST_PATH}/tests | ||
163 | sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile | ||
164 | sed -i -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile | ||
165 | install ${S}/gettext-tools/src/msgunfmt.tcl ${D}${PTEST_PATH}/src | ||
166 | install ${S}/gettext-tools/src/project-id ${D}${PTEST_PATH}/src | ||
167 | install ${B}/gettext-runtime/src/gettext.sh ${D}${PTEST_PATH}/src | ||
168 | install ${B}/gettext-runtime/src/ngettext ${D}${PTEST_PATH}/src | ||
169 | install ${B}/gettext-runtime/src/envsubst ${D}${PTEST_PATH}/src | ||
170 | install ${B}/gettext-runtime/src/gettext ${D}${PTEST_PATH}/src | ||
171 | install ${B}/gettext-tools/src/.libs/cldr-plurals ${D}${PTEST_PATH}/src | ||
172 | install ${S}/gettext-tools/po/gettext-tools.pot ${D}${PTEST_PATH}/po | ||
173 | install ${B}/gettext-tools/misc/* ${D}${PTEST_PATH}/misc | ||
174 | find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; | ||
175 | chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \ | ||
176 | ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 | ||
177 | fi | ||
178 | } | ||
179 | |||
180 | RDEPENDS_${PN}-ptest += "make" | ||
181 | RDEPENDS_${PN}-ptest_append_libc-glibc = "\ | ||
182 | glibc-gconv-big5 \ | ||
183 | glibc-charmap-big5 \ | ||
184 | glibc-gconv-cp1251 \ | ||
185 | glibc-charmap-cp1251 \ | ||
186 | glibc-charmap-iso-8859-9 \ | ||
187 | glibc-gconv-iso8859-9 \ | ||
188 | glibc-charmap-koi8-r \ | ||
189 | glibc-gconv-koi8-r \ | ||
190 | glibc-gconv-iso8859-2 \ | ||
191 | glibc-charmap-iso-8859-2 \ | ||
192 | glibc-gconv-iso8859-1 \ | ||
193 | glibc-charmap-iso-8859-1 \ | ||
194 | glibc-gconv-euc-kr \ | ||
195 | glibc-charmap-euc-kr \ | ||
196 | glibc-gconv-euc-jp \ | ||
197 | glibc-charmap-euc-jp \ | ||
198 | locale-base-de-de \ | ||
199 | locale-base-fr-fr \ | ||
200 | " | ||
201 | |||
202 | RRECOMMENDS_${PN}-ptest_append_libc-glibc = "\ | ||
203 | locale-base-de-de.iso-8859-1 \ | ||
204 | locale-base-fr-fr.iso-8859-1 \ | ||
205 | " | ||
206 | |||
207 | INSANE_SKIP_${PN}-ptest += "ldflags" | ||
208 | INSANE_SKIP_${PN}-ptest += "rpaths" | ||
209 | |||
210 | BBCLASSEXTEND = "native nativesdk" | ||