blob: 4bffa814ff5544d40b3e4636e18e4fe7efa507b0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "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://groff-1.22.2-correct-man.local-install-path.patch \
12 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
13"
14
15SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
16SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5"
17
18DEPENDS = "groff-native"
19DEPENDS_class-native = ""
20RDEPENDS_${PN} += "perl sed"
21
22inherit autotools texinfo
23
24EXTRA_OECONF = "--without-x"
25PARALLEL_MAKE = ""
26
27do_configure_prepend() {
28 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
29 sed -i \
30 -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
31 -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
32 -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
33 -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
34 ${S}/contrib/*/Makefile.sub \
35 ${S}/doc/Makefile.in \
36 ${S}/doc/Makefile.sub
37 fi
38}
39
40do_configure_append() {
41 # generate gnulib configure script
42 olddir=`pwd`
43 cd ${S}/src/libs/gnulib/
44 ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
45 cd ${olddir}
46}
47
48do_install_append() {
49 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
50 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
51 for i in afmtodit mmroff gropdf pdfmom grog; do
52 if [ -f ${D}${bindir}/$i ]; then
53 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
54 fi
55 done
56 if [ -e ${D}${libdir}/charset.alias ]; then
57 rm -rf ${D}${libdir}/charset.alias
58 fi
59}
60
61do_install_append_class-native() {
62 create_cmdline_wrapper ${D}/${bindir}/groff \
63 -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
64 -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
65}
66
67FILES_${PN} += "${libdir}/${BPN}/site-tmac \
68 ${libdir}/${BPN}/groffer/"
69
70BBCLASSEXTEND = "native"