blob: ba90cadd88cef6790fe465ff62b8dcb6c5b38a05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
SUMMARY = "GNU Troff software"
DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
formatting commands and produces formatted output."
SECTION = "base"
HOMEPAGE = "http://www.gnu.org/software/groff/"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
file://groff-1.22.2-correct-man.local-install-path.patch \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://0001-replace-perl-w-with-use-warnings.patch \
file://groff-not-search-fonts-on-build-host.patch \
"
SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5"
DEPENDS = "groff-native"
DEPENDS_class-native = ""
RDEPENDS_${PN} += "perl sed"
inherit autotools texinfo multilib_script
MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog"
EXTRA_OECONF = "--without-x"
PARALLEL_MAKE = ""
CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
do_configure_prepend() {
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
sed -i \
-e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
-e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
-e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
-e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
${S}/contrib/*/Makefile.sub \
${S}/doc/Makefile.in \
${S}/doc/Makefile.sub
fi
}
do_configure_append() {
# generate gnulib configure script
olddir=`pwd`
cd ${S}/src/libs/gnulib/
ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
cd ${olddir}
}
do_install_append() {
# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
for i in afmtodit mmroff gropdf pdfmom grog; do
if [ -f ${D}${bindir}/$i ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
fi
done
if [ -e ${D}${libdir}/charset.alias ]; then
rm -rf ${D}${libdir}/charset.alias
fi
# awk is located at /usr/bin/, not /bin/
SPECIAL_AWK=`find ${D} -name special.awk`
if [ -f ${SPECIAL_AWK} ]; then
sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
fi
# not ship /usr/bin/glilypond and its releated files in embedded target system
rm -rf ${D}${bindir}/glilypond
rm -rf ${D}${libdir}/groff/glilypond
rm -rf ${D}${mandir}/man1/glilypond*
}
do_install_append_class-native() {
create_cmdline_wrapper ${D}/${bindir}/groff \
-F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
-M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
}
FILES_${PN} += "${libdir}/${BPN}/site-tmac \
${libdir}/${BPN}/groffer/"
BBCLASSEXTEND = "native"
|