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