Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Documentation system for on-line information and printed output" |
| 2 | DESCRIPTION = "Texinfo is a documentation system that can produce both \ |
| 3 | online information and printed output from a single source file. The \ |
| 4 | GNU Project uses the Texinfo file format for most of its documentation." |
| 5 | HOMEPAGE = "http://www.gnu.org/software/texinfo/" |
| 6 | SECTION = "console/utils" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7 | LICENSE = "GPL-3.0-or-later" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" |
| 9 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 10 | PROVIDES:append:class-native = " texinfo-replacement-native" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | |
| 12 | def 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 23 | RDEPENDS:info += "${@compress_pkg(d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | |
| 25 | DEPENDS = "zlib ncurses texinfo-replacement-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | DEPENDS:class-native = "zlib-native ncurses-native" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | |
| 28 | TARGET_PATCH = "file://use_host_makedoc.patch" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | TARGET_PATCH:class-native = "" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | |
| 31 | SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | file://0001-gnulib-Update.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 33 | file://disable-native-tools.patch \ |
| 34 | file://link-zip.patch \ |
| 35 | file://dont-depend-on-help2man.patch \ |
| 36 | ${TARGET_PATCH} \ |
| 37 | " |
| 38 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 39 | SRC_URI[sha256sum] = "8e09cf753ad1833695d2bac0f57dc3bd6bcbbfbf279450e1ba3bc2d7fb297d08" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 40 | |
| 41 | tex_texinfo = "texmf/tex/texinfo" |
| 42 | |
| 43 | inherit gettext autotools multilib_script |
| 44 | |
| 45 | MULTILIB_SCRIPTS = "${PN}:${bindir}/texi2any" |
| 46 | |
| 47 | EXTRA_AUTORECONF += "-I ${S}/gnulib/m4" |
| 48 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | do_configure:prepend () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | # autotools_do_configure updates po/Makefile.in.in, we also need |
| 51 | # update po_document. |
| 52 | cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/ |
| 53 | } |
| 54 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | do_compile:prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | if [ -d tools ];then |
| 57 | oe_runmake -C tools/gnulib/lib |
| 58 | fi |
| 59 | } |
| 60 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 61 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | mkdir -p ${D}${datadir}/${tex_texinfo} |
| 63 | install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo} |
| 64 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi |
| 65 | } |
| 66 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 67 | do_install:append:class-native() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 68 | install -m 755 info/makedoc ${D}${bindir} |
| 69 | } |
| 70 | |
| 71 | PACKAGES += "info info-doc" |
| 72 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 73 | FILES:info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info" |
| 74 | FILES:info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 75 | ${mandir}/man1/info.1* ${mandir}/man5/info.5* \ |
| 76 | ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*" |
| 77 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | FILES:${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo" |
| 79 | RDEPENDS:${PN} = "perl" |
| 80 | FILES:${PN}-doc = "${infodir}/texinfo* \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 81 | ${datadir}/${tex_texinfo} \ |
| 82 | ${mandir}/man1 ${mandir}/man5" |
| 83 | |
| 84 | # Lie about providing the Locale::gettext_xs module. It is not actually built, |
| 85 | # but the code will test for it and if not found use Locale::gettext_pp instead. |
| 86 | # However, this causes a file dependency on perl(Locale::gettext_xs) to be |
| 87 | # generated, which must be satisfied. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 88 | RPROVIDES:${PN} += "perl(Locale::gettext_xs)" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 89 | |
| 90 | BBCLASSEXTEND = "native nativesdk" |