Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "GNU Troff software" |
| 2 | DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ |
| 3 | formatting commands and produces formatted output." |
| 4 | SECTION = "base" |
| 5 | HOMEPAGE = "http://www.gnu.org/software/groff/" |
| 6 | LICENSE = "GPLv3" |
| 7 | |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 9 | |
| 10 | SRC_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 | |
| 15 | SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5" |
| 16 | SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5" |
| 17 | |
| 18 | DEPENDS = "groff-native" |
| 19 | DEPENDS_class-native = "" |
| 20 | RDEPENDS_${PN} += "perl sed" |
| 21 | |
| 22 | inherit autotools texinfo |
| 23 | |
| 24 | EXTRA_OECONF = "--without-x" |
| 25 | PARALLEL_MAKE = "" |
| 26 | |
| 27 | do_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 | |
| 40 | do_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 | |
| 48 | do_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 | |
| 61 | do_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 | |
| 67 | FILES_${PN} += "${libdir}/${BPN}/site-tmac \ |
| 68 | ${libdir}/${BPN}/groffer/" |
| 69 | |
| 70 | BBCLASSEXTEND = "native" |