blob: 082597f693998aefa33786ce1f9a4e6911e694a0 [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/"
6LICENSE = "GPLv3"
7
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 \
Brad Bishopc342db32019-05-15 21:57:59 -040015"
16
17SRC_URI[md5sum] = "08fb04335e2f5e73f23ea4c3adbf0c5f"
18SRC_URI[sha256sum] = "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293"
19
20DEPENDS = "bison-native"
21RDEPENDS_${PN} += "perl sed"
22
23inherit autotools-brokensep texinfo multilib_script pkgconfig
24
25MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog"
26
27EXTRA_OECONF = "--without-x --without-doc"
28PARALLEL_MAKE = ""
29
Brad Bishop15ae2502019-06-18 21:44:24 -040030CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl' ac_cv_path_BASH_PROG='no'"
Brad Bishopc342db32019-05-15 21:57:59 -040031
32do_install_append() {
33 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
34 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
35 for i in afmtodit mmroff gropdf pdfmom grog; do
36 if [ -f ${D}${bindir}/$i ]; then
37 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
38 fi
39 done
40 if [ -e ${D}${libdir}/charset.alias ]; then
41 rm -rf ${D}${libdir}/charset.alias
42 fi
43
44 # awk is located at /usr/bin/, not /bin/
45 SPECIAL_AWK=`find ${D} -name special.awk`
46 if [ -f ${SPECIAL_AWK} ]; then
47 sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
48 fi
49
50 # not ship /usr/bin/glilypond and its releated files in embedded target system
51 rm -rf ${D}${bindir}/glilypond
52 rm -rf ${D}${libdir}/groff/glilypond
53 rm -rf ${D}${mandir}/man1/glilypond*
54}
55
56do_install_append_class-native() {
57 create_cmdline_wrapper ${D}/${bindir}/groff \
58 -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
59 -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
60}
61
62FILES_${PN} += "${libdir}/${BPN}/site-tmac \
63 ${libdir}/${BPN}/groffer/"
64
65BBCLASSEXTEND = "native"