Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "GNU Troff software" |
| 2 | DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ |
| 3 | formatting commands and produces formatted output." |
| 4 | SECTION = "base" |
| 5 | HOMEPAGE = "http://www.gnu.org/software/groff/" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 6 | LICENSE = "GPL-3.0-only" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 7 | |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 9 | |
| 10 | SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ |
| 11 | file://0001-replace-perl-w-with-use-warnings.patch \ |
| 12 | file://groff-not-search-fonts-on-build-host.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 13 | file://0001-support-musl.patch \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 14 | file://0001-Include-config.h.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | file://0001-Make-manpages-mulitlib-identical.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 16 | " |
| 17 | |
| 18 | SRC_URI[md5sum] = "08fb04335e2f5e73f23ea4c3adbf0c5f" |
| 19 | SRC_URI[sha256sum] = "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293" |
| 20 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 21 | # Remove at the next upgrade |
| 22 | PR = "r1" |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 23 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 24 | DEPENDS = "bison-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 25 | RDEPENDS:${PN} += "perl sed" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 26 | |
| 27 | inherit autotools-brokensep texinfo multilib_script pkgconfig |
| 28 | |
| 29 | MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog" |
| 30 | |
| 31 | EXTRA_OECONF = "--without-x --without-doc" |
| 32 | PARALLEL_MAKE = "" |
| 33 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 34 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl' ac_cv_path_BASH_PROG='no' PAGE=A4" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 35 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 36 | # Delete these generated files since we depend on bison-native |
| 37 | # and regenerate them. Do it deterministically (always). |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | do_configure:prepend() { |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 39 | rm -f ${S}/src/preproc/eqn/eqn.cpp |
| 40 | rm -f ${S}/src/preproc/eqn/eqn.hpp |
| 41 | } |
| 42 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | do_install:append() { |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 44 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location |
| 45 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. |
| 46 | for i in afmtodit mmroff gropdf pdfmom grog; do |
| 47 | if [ -f ${D}${bindir}/$i ]; then |
| 48 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i |
| 49 | fi |
| 50 | done |
| 51 | if [ -e ${D}${libdir}/charset.alias ]; then |
| 52 | rm -rf ${D}${libdir}/charset.alias |
| 53 | fi |
| 54 | |
| 55 | # awk is located at /usr/bin/, not /bin/ |
| 56 | SPECIAL_AWK=`find ${D} -name special.awk` |
| 57 | if [ -f ${SPECIAL_AWK} ]; then |
| 58 | sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK} |
| 59 | fi |
| 60 | |
| 61 | # not ship /usr/bin/glilypond and its releated files in embedded target system |
| 62 | rm -rf ${D}${bindir}/glilypond |
| 63 | rm -rf ${D}${libdir}/groff/glilypond |
| 64 | rm -rf ${D}${mandir}/man1/glilypond* |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 65 | |
| 66 | # not ship /usr/bin/grap2graph and its releated man files |
| 67 | rm -rf ${D}${bindir}/grap2graph |
| 68 | rm -rf ${D}${mandir}/man1/grap2graph* |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 69 | } |
| 70 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | do_install:append:class-native() { |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 72 | create_cmdline_wrapper ${D}/${bindir}/groff \ |
| 73 | -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \ |
| 74 | -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac |
| 75 | } |
| 76 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 77 | FILES:${PN} += "${libdir}/${BPN}/site-tmac \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 78 | ${libdir}/${BPN}/groffer/" |
| 79 | |
| 80 | BBCLASSEXTEND = "native" |