blob: 7472f5982572956070c64799fea66f5cf7982b06 [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 \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 file://0001-replace-perl-w-with-use-warnings.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014"
15
16SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
17SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5"
18
19DEPENDS = "groff-native"
20DEPENDS_class-native = ""
21RDEPENDS_${PN} += "perl sed"
22
23inherit autotools texinfo
24
25EXTRA_OECONF = "--without-x"
26PARALLEL_MAKE = ""
27
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
29
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030do_configure_prepend() {
31 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
32 sed -i \
33 -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
34 -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
35 -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
36 -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
37 ${S}/contrib/*/Makefile.sub \
38 ${S}/doc/Makefile.in \
39 ${S}/doc/Makefile.sub
40 fi
41}
42
43do_configure_append() {
44 # generate gnulib configure script
45 olddir=`pwd`
46 cd ${S}/src/libs/gnulib/
47 ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
48 cd ${olddir}
49}
50
51do_install_append() {
52 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
53 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
54 for i in afmtodit mmroff gropdf pdfmom grog; do
55 if [ -f ${D}${bindir}/$i ]; then
56 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
57 fi
58 done
59 if [ -e ${D}${libdir}/charset.alias ]; then
60 rm -rf ${D}${libdir}/charset.alias
61 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -060062
63 # awk is located at /usr/bin/, not /bin/
64 SPECIAL_AWK=`find ${D} -name special.awk`
65 if [ -f ${SPECIAL_AWK} ]; then
66 sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
67 fi
68
69 # not ship /usr/bin/glilypond and its releated files in embedded target system
70 rm -rf ${D}${bindir}/glilypond
71 rm -rf ${D}${libdir}/groff/glilypond
72 rm -rf ${D}${mandir}/man1/glilypond*
Patrick Williamsc124f4f2015-09-15 14:41:29 -050073}
74
75do_install_append_class-native() {
76 create_cmdline_wrapper ${D}/${bindir}/groff \
77 -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
78 -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
79}
80
81FILES_${PN} += "${libdir}/${BPN}/site-tmac \
82 ${libdir}/${BPN}/groffer/"
83
84BBCLASSEXTEND = "native"