blob: 6475b02f8b63824e4e849f9cc9a435357b620b88 [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
Brad Bishopc342db32019-05-15 21:57:59 -04007inherit autotools texinfo ptest
Brad Bishop316dfdd2018-06-25 12:45:53 -04008
9SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
10 file://ac_config_links.patch \
Khem Raj0eeb9cd2018-08-06 15:57:00 -070011 file://m4-1.4.18-glibc-change-work-around.patch \
Andrew Geisslerc926e172021-05-07 16:11:35 -050012 file://0001-c-stack-stop-using-SIGSTKSZ.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040013 "
Brad Bishopc342db32019-05-15 21:57:59 -040014SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
15 file://run-ptest \
16 file://serial-tests-config.patch \
17 file://0001-test-getopt-posix-fix.patch \
18 "
Brad Bishop316dfdd2018-06-25 12:45:53 -040019
20SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
21SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022
23LICENSE = "GPLv3"
24
25LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
26 file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
27
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028# Fix "Argument list too long" error when len(TMPDIR) = 410
29acpaths = "-I ./m4"
30
Brad Bishop316dfdd2018-06-25 12:45:53 -040031EXTRA_OECONF += "--without-libsigsegv-prefix"
32
33EXTRA_OEMAKE += "'infodir=${infodir}'"
Brad Bishopc342db32019-05-15 21:57:59 -040034
35do_compile_ptest() {
36 cd ${B}/tests
37 sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile
38 oe_runmake buildtest-TESTS
39}
40
41do_install_ptest() {
42 cp -r ${B}/tests ${D}${PTEST_PATH}
43 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
44 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
45 sed -i -e "s;LOCALE_FR='fr_FR';LOCALE_FR='fr_FR.iso88591';g" \
46 -e "s;LOCALE_FR_UTF8='none';LOCALE_FR_UTF8='fr_FR.utf8';g" ${D}${PTEST_PATH}/tests/Makefile
47 find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
48 cp ${S}/build-aux/update-copyright ${D}${PTEST_PATH}/tests/
49 sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh
50 chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
51 ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \
52 ${D}${PTEST_PATH}/tests/test-xalloc-die
53}
54
Brad Bishop393846f2019-05-20 12:24:11 -040055
Brad Bishop15ae2502019-06-18 21:44:24 -040056RDEPENDS_${PN}-ptest += "make coreutils diffutils"
Brad Bishopc342db32019-05-15 21:57:59 -040057RDEPENDS_${PN}-ptest_append_libc-glibc = "\
58 locale-base-fr-fr.iso-8859-1 \
59"
60
61INSANE_SKIP_${PN}-ptest += "ldflags"
62INSANE_SKIP_${PN}-ptest += "rpaths"
63