blob: 50eae77ad0a45274a52116365b09e9644a4795c8 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Documentation system for on-line information and printed output"
2DESCRIPTION = "Texinfo is a documentation system that can produce both \
3online information and printed output from a single source file. The \
4GNU Project uses the Texinfo file format for most of its documentation."
5HOMEPAGE = "http://www.gnu.org/software/texinfo/"
6SECTION = "console/utils"
7LICENSE = "GPLv3+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
9
10PROVIDES_append_class-native = " texinfo-replacement-native"
11
12def compress_pkg(d):
13 if bb.data.inherits_class('compress_doc', d):
14 compress = d.getVar("DOC_COMPRESS")
15 if compress == "gz":
16 return "gzip"
17 elif compress == "bz2":
18 return "bzip2"
19 elif compress == "xz":
20 return "xz"
21 return ""
22
23RDEPENDS_info += "${@compress_pkg(d)}"
24
25DEPENDS = "zlib ncurses texinfo-replacement-native"
26DEPENDS_class-native = "zlib-native ncurses-native"
27
28TARGET_PATCH = "file://use_host_makedoc.patch"
29TARGET_PATCH_class-native = ""
30
31SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
32 file://texinfo-4.12-zlib.patch \
33 file://disable-native-tools.patch \
34 file://link-zip.patch \
35 file://dont-depend-on-help2man.patch \
36 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
37 ${TARGET_PATCH} \
38 "
39
40SRC_URI[md5sum] = "94e8f7149876793030e5518dd8d6e956"
41SRC_URI[sha256sum] = "d34272e4042c46186ddcd66bd5d980c0ca14ff734444686ccf8131f6ec8b1427"
42
43tex_texinfo = "texmf/tex/texinfo"
44
Brad Bishop79641f22019-09-10 07:20:22 -040045inherit gettext autotools multilib_script
46
47MULTILIB_SCRIPTS = "${PN}:${bindir}/texi2any"
Brad Bishop316dfdd2018-06-25 12:45:53 -040048
49EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
50
51do_configure_prepend () {
52 # autotools_do_configure updates po/Makefile.in.in, we also need
53 # update po_document.
54 cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
55}
56
57do_compile_prepend() {
58 if [ -d tools ];then
59 oe_runmake -C tools/gnulib/lib
60 fi
61}
62
63do_install_append() {
64 mkdir -p ${D}${datadir}/${tex_texinfo}
65 install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
66 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
67}
68
69do_install_append_class-native() {
70 install -m 755 info/makedoc ${D}${bindir}
71}
72
73PACKAGES += "info info-doc"
74
75FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
76FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
77 ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
78 ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
79
80FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
81RDEPENDS_${PN} = "perl"
82FILES_${PN}-doc = "${infodir}/texinfo* \
83 ${datadir}/${tex_texinfo} \
84 ${mandir}/man1 ${mandir}/man5"
85
86# Lie about providing the Locale::gettext_xs module. It is not actually built,
87# but the code will test for it and if not found use Locale::gettext_pp instead.
88# However, this causes a file dependency on perl(Locale::gettext_xs) to be
89# generated, which must be satisfied.
90RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
91
92BBCLASSEXTEND = "native nativesdk"