Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "Traditional Unix macro processor" |
| 2 | HOMEPAGE = "https://www.gnu.org/software/m4/m4.html" |
| 3 | DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \ |
| 4 | compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \ |
| 5 | GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc." |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 6 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 7 | inherit autotools texinfo ptest gettext |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | |
| 9 | SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ |
| 10 | file://ac_config_links.patch \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 11 | file://0001-sigsegv-Fix-build-on-ppc-musl.patch \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 12 | file://0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 13 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 14 | SRC_URI:append:class-target = " file://run-ptest \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 15 | file://serial-tests-config.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 16 | " |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 18 | SRC_URI[md5sum] = "f4a2b0284d80353b995f8ef2385ed73c" |
| 19 | SRC_URI[sha256sum] = "3be4a26d825ffdfda52a56fc43246456989a3630093cced3fbddf4771ee58a70" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 20 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 21 | LICENSE = "GPL-3.0-only" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 23 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464\ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede" |
| 25 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 26 | # Fix "Argument list too long" error when len(TMPDIR) = 410 |
| 27 | acpaths = "-I ./m4" |
| 28 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 29 | EXTRA_OECONF += "--without-libsigsegv-prefix" |
| 30 | |
| 31 | EXTRA_OEMAKE += "'infodir=${infodir}'" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 32 | |
| 33 | do_compile_ptest() { |
| 34 | cd ${B}/tests |
| 35 | sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile |
| 36 | oe_runmake buildtest-TESTS |
| 37 | } |
| 38 | |
| 39 | do_install_ptest() { |
| 40 | cp -r ${B}/tests ${D}${PTEST_PATH} |
| 41 | cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ |
| 42 | sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 43 | find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} |
| 44 | cp ${S}/build-aux/update-copyright ${D}${PTEST_PATH}/tests/ |
| 45 | sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh |
| 46 | chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \ |
| 47 | ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \ |
| 48 | ${D}${PTEST_PATH}/tests/test-xalloc-die |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 49 | |
| 50 | ln -s ptest ${D}${libdir}/${BPN}/${BP} |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 51 | } |
| 52 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 53 | do_install_ptest:append:libc-glibc() { |
| 54 | sed -i -e "s;LOCALE_FR='fr_FR';LOCALE_FR='fr_FR.iso88591';g" \ |
| 55 | -e "s;LOCALE_FR_UTF8='none';LOCALE_FR_UTF8='fr_FR.utf8';g" ${D}${PTEST_PATH}/tests/Makefile |
| 56 | } |
Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame] | 57 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 58 | RDEPENDS:${PN}-ptest += "make coreutils diffutils bash" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 59 | RDEPENDS:${PN}-ptest:append:libc-glibc = "\ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 60 | locale-base-fr-fr \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 61 | locale-base-fr-fr.iso-8859-1 \ |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 62 | glibc-gconv-iso8859-1 \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 63 | " |
| 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | INSANE_SKIP:${PN}-ptest += "ldflags" |
| 66 | INSANE_SKIP:${PN}-ptest += "rpaths" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 67 | |