blob: 244c0e1625bf943e897a364fd37e3ad0280efb4a [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001SUMMARY = "GNU Troff software"
2DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
3formatting commands and produces formatted output."
4SECTION = "base"
5HOMEPAGE = "http://www.gnu.org/software/groff/"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006LICENSE = "GPL-3.0-only"
Brad Bishopc342db32019-05-15 21:57:59 -04007
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
9
10SRC_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 Bishopc342db32019-05-15 21:57:59 -040013 file://0001-support-musl.patch \
Brad Bishop08902b02019-08-20 09:16:51 -040014 file://0001-Include-config.h.patch \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060015 file://0001-Make-manpages-mulitlib-identical.patch \
16 file://0001-Fix-code-style-issues.patch \
Brad Bishopc342db32019-05-15 21:57:59 -040017"
18
19SRC_URI[md5sum] = "08fb04335e2f5e73f23ea4c3adbf0c5f"
20SRC_URI[sha256sum] = "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293"
21
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060022# Remove at the next upgrade
23PR = "r1"
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060024
Brad Bishopc342db32019-05-15 21:57:59 -040025DEPENDS = "bison-native"
Patrick Williams213cb262021-08-07 19:21:33 -050026RDEPENDS:${PN} += "perl sed"
Brad Bishopc342db32019-05-15 21:57:59 -040027
28inherit autotools-brokensep texinfo multilib_script pkgconfig
29
30MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog"
31
32EXTRA_OECONF = "--without-x --without-doc"
33PARALLEL_MAKE = ""
34
Andrew Geisslerd1e89492021-02-12 15:35:20 -060035CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl' ac_cv_path_BASH_PROG='no' PAGE=A4"
Brad Bishopc342db32019-05-15 21:57:59 -040036
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060037# Delete these generated files since we depend on bison-native
38# and regenerate them. Do it deterministically (always).
Patrick Williams213cb262021-08-07 19:21:33 -050039do_configure:prepend() {
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060040 rm -f ${S}/src/preproc/eqn/eqn.cpp
41 rm -f ${S}/src/preproc/eqn/eqn.hpp
42}
43
Patrick Williams213cb262021-08-07 19:21:33 -050044do_install:append() {
Brad Bishopc342db32019-05-15 21:57:59 -040045 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
46 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
47 for i in afmtodit mmroff gropdf pdfmom grog; do
48 if [ -f ${D}${bindir}/$i ]; then
49 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
50 fi
51 done
52 if [ -e ${D}${libdir}/charset.alias ]; then
53 rm -rf ${D}${libdir}/charset.alias
54 fi
55
56 # awk is located at /usr/bin/, not /bin/
57 SPECIAL_AWK=`find ${D} -name special.awk`
58 if [ -f ${SPECIAL_AWK} ]; then
59 sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
60 fi
61
62 # not ship /usr/bin/glilypond and its releated files in embedded target system
63 rm -rf ${D}${bindir}/glilypond
64 rm -rf ${D}${libdir}/groff/glilypond
65 rm -rf ${D}${mandir}/man1/glilypond*
Andrew Geisslerc926e172021-05-07 16:11:35 -050066
67 # not ship /usr/bin/grap2graph and its releated man files
68 rm -rf ${D}${bindir}/grap2graph
69 rm -rf ${D}${mandir}/man1/grap2graph*
Brad Bishopc342db32019-05-15 21:57:59 -040070}
71
Patrick Williams213cb262021-08-07 19:21:33 -050072do_install:append:class-native() {
Brad Bishopc342db32019-05-15 21:57:59 -040073 create_cmdline_wrapper ${D}/${bindir}/groff \
74 -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
75 -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
76}
77
Patrick Williams213cb262021-08-07 19:21:33 -050078FILES:${PN} += "${libdir}/${BPN}/site-tmac \
Brad Bishopc342db32019-05-15 21:57:59 -040079 ${libdir}/${BPN}/groffer/"
80
81BBCLASSEXTEND = "native"