xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-extended/groff/groff_1.22.4.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "GNU Troff software"
2*4882a593SmuzhiyunDESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
3*4882a593Smuzhiyunformatting commands and produces formatted output."
4*4882a593SmuzhiyunSECTION = "base"
5*4882a593SmuzhiyunHOMEPAGE = "http://www.gnu.org/software/groff/"
6*4882a593SmuzhiyunLICENSE = "GPL-3.0-only"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
11*4882a593Smuzhiyun	file://0001-replace-perl-w-with-use-warnings.patch \
12*4882a593Smuzhiyun	file://groff-not-search-fonts-on-build-host.patch \
13*4882a593Smuzhiyun	file://0001-support-musl.patch \
14*4882a593Smuzhiyun	file://0001-Include-config.h.patch \
15*4882a593Smuzhiyun        file://0001-Make-manpages-mulitlib-identical.patch \
16*4882a593Smuzhiyun"
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunSRC_URI[md5sum] = "08fb04335e2f5e73f23ea4c3adbf0c5f"
19*4882a593SmuzhiyunSRC_URI[sha256sum] = "e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293"
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun# Remove at the next upgrade
22*4882a593SmuzhiyunPR = "r1"
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunDEPENDS = "bison-native"
25*4882a593SmuzhiyunRDEPENDS:${PN} += "perl sed"
26*4882a593Smuzhiyun
27*4882a593Smuzhiyuninherit autotools-brokensep texinfo multilib_script pkgconfig
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunMULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin ${PN}:${bindir}/groffer ${PN}:${bindir}/grog"
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunEXTRA_OECONF = "--without-x --without-doc"
32*4882a593SmuzhiyunPARALLEL_MAKE = ""
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunCACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl' ac_cv_path_BASH_PROG='no' PAGE=A4"
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun# Delete these generated files since we depend on bison-native
37*4882a593Smuzhiyun# and regenerate them. Do it deterministically (always).
38*4882a593Smuzhiyundo_configure:prepend() {
39*4882a593Smuzhiyun	rm -f ${S}/src/preproc/eqn/eqn.cpp
40*4882a593Smuzhiyun	rm -f ${S}/src/preproc/eqn/eqn.hpp
41*4882a593Smuzhiyun}
42*4882a593Smuzhiyun
43*4882a593Smuzhiyundo_install:append() {
44*4882a593Smuzhiyun	# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
45*4882a593Smuzhiyun	# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
46*4882a593Smuzhiyun	for i in afmtodit mmroff gropdf pdfmom grog; do
47*4882a593Smuzhiyun		if [ -f ${D}${bindir}/$i ]; then
48*4882a593Smuzhiyun			sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
49*4882a593Smuzhiyun		fi
50*4882a593Smuzhiyun	done
51*4882a593Smuzhiyun	if [ -e ${D}${libdir}/charset.alias ]; then
52*4882a593Smuzhiyun		rm -rf ${D}${libdir}/charset.alias
53*4882a593Smuzhiyun	fi
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun	# awk is located at /usr/bin/, not /bin/
56*4882a593Smuzhiyun	SPECIAL_AWK=`find ${D} -name special.awk`
57*4882a593Smuzhiyun	if [ -f ${SPECIAL_AWK} ]; then
58*4882a593Smuzhiyun		sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
59*4882a593Smuzhiyun	fi
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun	# not ship /usr/bin/glilypond and its releated files in embedded target system
62*4882a593Smuzhiyun	rm -rf ${D}${bindir}/glilypond
63*4882a593Smuzhiyun	rm -rf ${D}${libdir}/groff/glilypond
64*4882a593Smuzhiyun	rm -rf ${D}${mandir}/man1/glilypond*
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun	# not ship /usr/bin/grap2graph and its releated man files
67*4882a593Smuzhiyun	rm -rf ${D}${bindir}/grap2graph
68*4882a593Smuzhiyun	rm -rf ${D}${mandir}/man1/grap2graph*
69*4882a593Smuzhiyun}
70*4882a593Smuzhiyun
71*4882a593Smuzhiyundo_install:append:class-native() {
72*4882a593Smuzhiyun	create_cmdline_wrapper ${D}/${bindir}/groff \
73*4882a593Smuzhiyun		-F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
74*4882a593Smuzhiyun		-M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
75*4882a593Smuzhiyun}
76*4882a593Smuzhiyun
77*4882a593SmuzhiyunFILES:${PN} += "${libdir}/${BPN}/site-tmac \
78*4882a593Smuzhiyun                ${libdir}/${BPN}/groffer/"
79*4882a593Smuzhiyun
80*4882a593SmuzhiyunBBCLASSEXTEND = "native"
81