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