xref: /openbmc/openbmc/poky/meta/recipes-extended/texinfo/texinfo_7.1.1.bb (revision 8460358c3d24c71d9d38fd126c745854a6301564)
1*8460358cSPatrick WilliamsSUMMARY = "Documentation system for on-line information and printed output"
2*8460358cSPatrick WilliamsDESCRIPTION = "Texinfo is a documentation system that can produce both \
3*8460358cSPatrick Williamsonline information and printed output from a single source file. The \
4*8460358cSPatrick WilliamsGNU Project uses the Texinfo file format for most of its documentation."
5*8460358cSPatrick WilliamsHOMEPAGE = "http://www.gnu.org/software/texinfo/"
6*8460358cSPatrick WilliamsSECTION = "console/utils"
7*8460358cSPatrick WilliamsLICENSE = "GPL-3.0-or-later"
8*8460358cSPatrick WilliamsLIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
9*8460358cSPatrick Williams
10*8460358cSPatrick WilliamsPROVIDES:append:class-native = " texinfo-replacement-native"
11*8460358cSPatrick Williams
12*8460358cSPatrick Williamsdef compress_pkg(d):
13*8460358cSPatrick Williams    if bb.data.inherits_class('compress_doc', d):
14*8460358cSPatrick Williams         compress = d.getVar("DOC_COMPRESS")
15*8460358cSPatrick Williams         if compress == "gz":
16*8460358cSPatrick Williams             return "gzip"
17*8460358cSPatrick Williams         elif compress == "bz2":
18*8460358cSPatrick Williams             return "bzip2"
19*8460358cSPatrick Williams         elif compress == "xz":
20*8460358cSPatrick Williams             return "xz"
21*8460358cSPatrick Williams    return ""
22*8460358cSPatrick Williams
23*8460358cSPatrick WilliamsRDEPENDS:info += "${@compress_pkg(d)}"
24*8460358cSPatrick Williams
25*8460358cSPatrick WilliamsDEPENDS = "zlib ncurses texinfo-replacement-native"
26*8460358cSPatrick WilliamsDEPENDS:class-native = "zlib-native ncurses-native"
27*8460358cSPatrick Williams
28*8460358cSPatrick WilliamsTARGET_PATCH = "file://0003-texinfo-Update-to-5.1.patch"
29*8460358cSPatrick WilliamsTARGET_PATCH:class-native = ""
30*8460358cSPatrick Williams
31*8460358cSPatrick WilliamsSRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
32*8460358cSPatrick Williams           file://0001-texinfo-several-changes-to-build-without-zlib-and-nc.patch \
33*8460358cSPatrick Williams           file://0001-Makefile.am-do-not-build-manpages.patch \
34*8460358cSPatrick Williams           ${TARGET_PATCH} \
35*8460358cSPatrick Williams           "
36*8460358cSPatrick Williams
37*8460358cSPatrick WilliamsSRC_URI[sha256sum] = "a46b46b54fd79641a8af5be4ad525788956ccf9798d3113396abeafa9020ef63"
38*8460358cSPatrick Williams
39*8460358cSPatrick Williamstex_texinfo = "texmf/tex/texinfo"
40*8460358cSPatrick Williams
41*8460358cSPatrick Williamsinherit gettext autotools multilib_script
42*8460358cSPatrick Williams
43*8460358cSPatrick WilliamsMULTILIB_SCRIPTS = "${PN}:${bindir}/texi2any"
44*8460358cSPatrick Williams
45*8460358cSPatrick WilliamsEXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
46*8460358cSPatrick WilliamsCACHED_CONFIGUREVARS += "texinfo_cv_sys_iconv_converts_euc_cn=yes"
47*8460358cSPatrick Williams
48*8460358cSPatrick Williamsdo_configure:prepend () {
49*8460358cSPatrick Williams	# autotools_do_configure updates po/Makefile.in.in, we also need
50*8460358cSPatrick Williams	# update po_document.
51*8460358cSPatrick Williams	cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
52*8460358cSPatrick Williams}
53*8460358cSPatrick Williams
54*8460358cSPatrick Williamsdo_compile:prepend() {
55*8460358cSPatrick Williams	if [ -d tools ];then
56*8460358cSPatrick Williams		oe_runmake -C tools/gnulib/lib
57*8460358cSPatrick Williams	fi
58*8460358cSPatrick Williams}
59*8460358cSPatrick Williams
60*8460358cSPatrick Williamsdo_install:append() {
61*8460358cSPatrick Williams	mkdir -p ${D}${datadir}/${tex_texinfo}
62*8460358cSPatrick Williams	install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
63*8460358cSPatrick Williams	sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
64*8460358cSPatrick Williams	sed -i -e 's,${HOSTTOOLS_DIR},,' ${D}${bindir}/texindex
65*8460358cSPatrick Williams}
66*8460358cSPatrick Williams
67*8460358cSPatrick Williamsdo_install:append:class-native() {
68*8460358cSPatrick Williams	install -m 755 info/makedoc ${D}${bindir}
69*8460358cSPatrick Williams}
70*8460358cSPatrick Williams
71*8460358cSPatrick WilliamsPACKAGES += "info info-doc"
72*8460358cSPatrick Williams
73*8460358cSPatrick WilliamsFILES:info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
74*8460358cSPatrick WilliamsFILES:info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
75*8460358cSPatrick Williams                  ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
76*8460358cSPatrick Williams                  ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
77*8460358cSPatrick Williams
78*8460358cSPatrick WilliamsFILES:${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
79*8460358cSPatrick WilliamsRDEPENDS:${PN} = "perl"
80*8460358cSPatrick WilliamsFILES:${PN}-doc = "${infodir}/texi* \
81*8460358cSPatrick Williams                   ${datadir}/${tex_texinfo} \
82*8460358cSPatrick Williams                   ${mandir}/man1 ${mandir}/man5"
83*8460358cSPatrick Williams
84*8460358cSPatrick Williams# Lie about providing the Locale::gettext_xs module. It is not actually built,
85*8460358cSPatrick Williams# but the code will test for it and if not found use Locale::gettext_pp instead.
86*8460358cSPatrick Williams# However, this causes a file dependency on perl(Locale::gettext_xs) to be
87*8460358cSPatrick Williams# generated, which must be satisfied.
88*8460358cSPatrick WilliamsRPROVIDES:${PN} += "perl(Locale::gettext_xs)"
89*8460358cSPatrick Williams
90*8460358cSPatrick WilliamsBBCLASSEXTEND = "native nativesdk"
91