groff_1.22.3.bb 2.7 KB

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