blob: 2adf4de6f2f18a48ef9cd79cecb7cec8b15cd63e [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Traditional Unix macro processor"
2HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
3DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \
4compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
5GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006
Andrew Geissler09036742021-06-25 14:25:14 -05007inherit autotools texinfo ptest gettext
Brad Bishop316dfdd2018-06-25 12:45:53 -04008
9SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
10 file://ac_config_links.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000011 file://0001-sigsegv-Fix-build-on-ppc-musl.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040012 "
Patrick Williams213cb262021-08-07 19:21:33 -050013SRC_URI:append:class-target = " file://run-ptest \
Brad Bishopc342db32019-05-15 21:57:59 -040014 file://serial-tests-config.patch \
Brad Bishopc342db32019-05-15 21:57:59 -040015 "
Brad Bishop316dfdd2018-06-25 12:45:53 -040016
Andrew Geissler09036742021-06-25 14:25:14 -050017SRC_URI[md5sum] = "f4a2b0284d80353b995f8ef2385ed73c"
18SRC_URI[sha256sum] = "3be4a26d825ffdfda52a56fc43246456989a3630093cced3fbddf4771ee58a70"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000020LICENSE = "GPL-3.0-only"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021
Andrew Geissler09036742021-06-25 14:25:14 -050022LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464\
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023 file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
24
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025# Fix "Argument list too long" error when len(TMPDIR) = 410
26acpaths = "-I ./m4"
27
Brad Bishop316dfdd2018-06-25 12:45:53 -040028EXTRA_OECONF += "--without-libsigsegv-prefix"
29
30EXTRA_OEMAKE += "'infodir=${infodir}'"
Brad Bishopc342db32019-05-15 21:57:59 -040031
32do_compile_ptest() {
33 cd ${B}/tests
34 sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile
35 oe_runmake buildtest-TESTS
36}
37
38do_install_ptest() {
39 cp -r ${B}/tests ${D}${PTEST_PATH}
40 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
41 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
42 sed -i -e "s;LOCALE_FR='fr_FR';LOCALE_FR='fr_FR.iso88591';g" \
43 -e "s;LOCALE_FR_UTF8='none';LOCALE_FR_UTF8='fr_FR.utf8';g" ${D}${PTEST_PATH}/tests/Makefile
44 find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
45 cp ${S}/build-aux/update-copyright ${D}${PTEST_PATH}/tests/
46 sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh
47 chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
48 ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \
49 ${D}${PTEST_PATH}/tests/test-xalloc-die
Andrew Geissler09036742021-06-25 14:25:14 -050050
51 ln -s ptest ${D}${libdir}/${BPN}/${BP}
Brad Bishopc342db32019-05-15 21:57:59 -040052}
53
Brad Bishop393846f2019-05-20 12:24:11 -040054
Patrick Williams213cb262021-08-07 19:21:33 -050055RDEPENDS:${PN}-ptest += "make coreutils diffutils"
56RDEPENDS:${PN}-ptest:append:libc-glibc = "\
Brad Bishopc342db32019-05-15 21:57:59 -040057 locale-base-fr-fr.iso-8859-1 \
58"
59
Patrick Williams213cb262021-08-07 19:21:33 -050060INSANE_SKIP:${PN}-ptest += "ldflags"
61INSANE_SKIP:${PN}-ptest += "rpaths"
Brad Bishopc342db32019-05-15 21:57:59 -040062