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 \ |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 11 | file://groff-not-search-fonts-on-build-host.patch \ |
| 12 | file://0001-Make-manpages-mulitlib-identical.patch \ |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 13 | file://0001-build-Fix-Savannah-64681-webpage.ps-deps.patch \ |
| 14 | file://0001-build-meintro_fr.ps-depends-on-tbl.patch \ |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 15 | " |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 16 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 17 | SRC_URI[sha256sum] = "6b9757f592b7518b4902eb6af7e54570bdccba37a871fddb2d30ae3863511c13" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 18 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 19 | DEPENDS = "bison-native groff-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | RDEPENDS:${PN} += "perl sed" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 21 | |
| 22 | inherit autotools-brokensep texinfo multilib_script pkgconfig |
| 23 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 24 | MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/grog" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 25 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 26 | EXTRA_OECONF = "--without-x --with-urw-fonts-dir=/completely/bogus/dir/" |
| 27 | EXTRA_OEMAKE:class-target = "GROFFBIN=groff GROFF_BIN_PATH=${STAGING_BINDIR_NATIVE}" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 28 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 29 | 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] | 30 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 31 | # Delete these generated files since we depend on bison-native |
| 32 | # and regenerate them. Do it deterministically (always). |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 33 | do_configure:prepend() { |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 34 | rm -f ${S}/src/preproc/eqn/eqn.cpp |
| 35 | rm -f ${S}/src/preproc/eqn/eqn.hpp |
| 36 | } |
| 37 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | do_install:append() { |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 39 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location |
| 40 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. |
| 41 | for i in afmtodit mmroff gropdf pdfmom grog; do |
| 42 | if [ -f ${D}${bindir}/$i ]; then |
| 43 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i |
| 44 | fi |
| 45 | done |
| 46 | if [ -e ${D}${libdir}/charset.alias ]; then |
| 47 | rm -rf ${D}${libdir}/charset.alias |
| 48 | fi |
| 49 | |
| 50 | # awk is located at /usr/bin/, not /bin/ |
| 51 | SPECIAL_AWK=`find ${D} -name special.awk` |
| 52 | if [ -f ${SPECIAL_AWK} ]; then |
| 53 | sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK} |
| 54 | fi |
| 55 | |
| 56 | # not ship /usr/bin/glilypond and its releated files in embedded target system |
| 57 | rm -rf ${D}${bindir}/glilypond |
| 58 | rm -rf ${D}${libdir}/groff/glilypond |
| 59 | rm -rf ${D}${mandir}/man1/glilypond* |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 60 | |
| 61 | # not ship /usr/bin/grap2graph and its releated man files |
| 62 | rm -rf ${D}${bindir}/grap2graph |
| 63 | rm -rf ${D}${mandir}/man1/grap2graph* |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 64 | |
| 65 | # strip hosttool path out of generated files |
| 66 | sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${docdir}/${BP}/examples/hdtbl/*.roff |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 67 | } |
| 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | do_install:append:class-native() { |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 70 | create_cmdline_wrapper ${D}/${bindir}/groff \ |
| 71 | -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \ |
| 72 | -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac |
| 73 | } |
| 74 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 75 | FILES:${PN} += "${libdir}/${BPN}/site-tmac \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 76 | ${libdir}/${BPN}/groffer/" |
| 77 | |
| 78 | BBCLASSEXTEND = "native" |