diff options
| author | Jingdong Lu <jingdong.lu@windriver.com> | 2010-09-25 15:04:47 +0800 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-10 23:13:00 +0000 |
| commit | 56c897d8d0a31aba4c887eacdd3dbe1ee2d368a1 (patch) | |
| tree | 7ad9952f3d82ab50fbf35bd93fac929d256147a4 | |
| parent | 47a1f50d17e217d8d9dd5d1074449369defbea65 (diff) | |
| download | poky-56c897d8d0a31aba4c887eacdd3dbe1ee2d368a1.tar.gz | |
texinfo: Add new package
Texinfo is a documentation system that can produce both online information
and printed output from a single source file.
Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com>
6 files changed, 304 insertions, 0 deletions
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.12-zlib.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.12-zlib.patch new file mode 100644 index 0000000000..3635b55e33 --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.12-zlib.patch | |||
| @@ -0,0 +1,169 @@ | |||
| 1 | diff -up texinfo-4.12/install-info/Makefile.in_old texinfo-4.12/install-info/Makefile.in | ||
| 2 | --- texinfo-4.12/install-info/Makefile.in_old 2008-05-13 13:33:55.000000000 +0200 | ||
| 3 | +++ texinfo-4.12/install-info/Makefile.in 2008-05-13 13:52:35.000000000 +0200 | ||
| 4 | @@ -114,7 +114,7 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) | ||
| 5 | PROGRAMS = $(bin_PROGRAMS) | ||
| 6 | am_ginstall_info_OBJECTS = install-info.$(OBJEXT) | ||
| 7 | ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS) | ||
| 8 | -ginstall_info_LDADD = $(LDADD) | ||
| 9 | +ginstall_info_LDADD = $(LDADD) -lz | ||
| 10 | am__DEPENDENCIES_1 = | ||
| 11 | ginstall_info_DEPENDENCIES = ../lib/libtxi.a \ | ||
| 12 | $(top_builddir)/gnulib/lib/libgnu.a $(am__DEPENDENCIES_1) | ||
| 13 | diff -up texinfo-4.12/install-info/install-info.c_old texinfo-4.12/install-info/install-info.c | ||
| 14 | --- texinfo-4.12/install-info/install-info.c_old 2008-05-13 13:52:44.000000000 +0200 | ||
| 15 | +++ texinfo-4.12/install-info/install-info.c 2008-05-14 10:30:53.000000000 +0200 | ||
| 16 | @@ -21,6 +21,7 @@ | ||
| 17 | #include <getopt.h> | ||
| 18 | #include <regex.h> | ||
| 19 | #include <argz.h> | ||
| 20 | +#include <zlib.h> | ||
| 21 | |||
| 22 | #define TAB_WIDTH 8 | ||
| 23 | |||
| 24 | @@ -638,7 +639,7 @@ The first time you invoke Info you start | ||
| 25 | COMPRESSION_PROGRAM. The compression program is determined by the | ||
| 26 | magic number, not the filename. */ | ||
| 27 | |||
| 28 | -FILE * | ||
| 29 | +void * | ||
| 30 | open_possibly_compressed_file (char *filename, | ||
| 31 | void (*create_callback) (char *), | ||
| 32 | char **opened_filename, char **compression_program, int *is_pipe) | ||
| 33 | @@ -646,7 +647,7 @@ open_possibly_compressed_file (char *fil | ||
| 34 | char *local_opened_filename, *local_compression_program; | ||
| 35 | int nread; | ||
| 36 | char data[13]; | ||
| 37 | - FILE *f; | ||
| 38 | + gzFile *f; | ||
| 39 | |||
| 40 | /* We let them pass NULL if they don't want this info, but it's easier | ||
| 41 | to always determine it. */ | ||
| 42 | @@ -654,22 +655,22 @@ open_possibly_compressed_file (char *fil | ||
| 43 | opened_filename = &local_opened_filename; | ||
| 44 | |||
| 45 | *opened_filename = filename; | ||
| 46 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
| 47 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
| 48 | if (!f) | ||
| 49 | { | ||
| 50 | *opened_filename = concat (filename, ".gz", ""); | ||
| 51 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
| 52 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
| 53 | if (!f) | ||
| 54 | { | ||
| 55 | free (*opened_filename); | ||
| 56 | *opened_filename = concat (filename, ".bz2", ""); | ||
| 57 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
| 58 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
| 59 | } | ||
| 60 | if (!f) | ||
| 61 | { | ||
| 62 | free (*opened_filename); | ||
| 63 | *opened_filename = concat (filename, ".lzma", ""); | ||
| 64 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
| 65 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
| 66 | } | ||
| 67 | |||
| 68 | #ifdef __MSDOS__ | ||
| 69 | @@ -677,13 +678,13 @@ open_possibly_compressed_file (char *fil | ||
| 70 | { | ||
| 71 | free (*opened_filename); | ||
| 72 | *opened_filename = concat (filename, ".igz", ""); | ||
| 73 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
| 74 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
| 75 | } | ||
| 76 | if (!f) | ||
| 77 | { | ||
| 78 | free (*opened_filename); | ||
| 79 | *opened_filename = concat (filename, ".inz", ""); | ||
| 80 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
| 81 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
| 82 | } | ||
| 83 | #endif | ||
| 84 | if (!f) | ||
| 85 | @@ -695,7 +696,7 @@ open_possibly_compressed_file (char *fil | ||
| 86 | /* And try opening it again. */ | ||
| 87 | free (*opened_filename); | ||
| 88 | *opened_filename = filename; | ||
| 89 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
| 90 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
| 91 | if (!f) | ||
| 92 | pfatal_with_name (filename); | ||
| 93 | } | ||
| 94 | @@ -706,12 +707,12 @@ open_possibly_compressed_file (char *fil | ||
| 95 | |||
| 96 | /* Read first few bytes of file rather than relying on the filename. | ||
| 97 | If the file is shorter than this it can't be usable anyway. */ | ||
| 98 | - nread = fread (data, sizeof (data), 1, f); | ||
| 99 | - if (nread != 1) | ||
| 100 | + nread = gzread (f, data, sizeof (data)); | ||
| 101 | + if (nread != sizeof (data)) | ||
| 102 | { | ||
| 103 | /* Empty files don't set errno, so we get something like | ||
| 104 | "install-info: No error for foo", which is confusing. */ | ||
| 105 | - if (nread == 0) | ||
| 106 | + if (nread >= 0) | ||
| 107 | fatal (_("%s: empty file"), *opened_filename, 0); | ||
| 108 | pfatal_with_name (*opened_filename); | ||
| 109 | } | ||
| 110 | @@ -758,20 +759,22 @@ open_possibly_compressed_file (char *fil | ||
| 111 | |||
| 112 | if (*compression_program) | ||
| 113 | { /* It's compressed, so fclose the file and then open a pipe. */ | ||
| 114 | + FILE *p; | ||
| 115 | char *command = concat (*compression_program," -cd <", *opened_filename); | ||
| 116 | - if (fclose (f) < 0) | ||
| 117 | + if (gzclose (f) < 0) | ||
| 118 | pfatal_with_name (*opened_filename); | ||
| 119 | - f = popen (command, "r"); | ||
| 120 | - if (f) | ||
| 121 | + p = popen (command, "r"); | ||
| 122 | + if (p) | ||
| 123 | *is_pipe = 1; | ||
| 124 | else | ||
| 125 | pfatal_with_name (command); | ||
| 126 | + return p; | ||
| 127 | } | ||
| 128 | else | ||
| 129 | { /* It's a plain file, seek back over the magic bytes. */ | ||
| 130 | - if (fseek (f, 0, 0) < 0) | ||
| 131 | + if (gzseek (f, 0, SEEK_SET) < 0) | ||
| 132 | pfatal_with_name (*opened_filename); | ||
| 133 | -#if O_BINARY | ||
| 134 | +#if 0 && O_BINARY | ||
| 135 | /* Since this is a text file, and we opened it in binary mode, | ||
| 136 | switch back to text mode. */ | ||
| 137 | f = freopen (*opened_filename, "r", f); | ||
| 138 | @@ -796,7 +799,7 @@ readfile (char *filename, int *sizep, | ||
| 139 | char **compression_program) | ||
| 140 | { | ||
| 141 | char *real_name; | ||
| 142 | - FILE *f; | ||
| 143 | + void *f; | ||
| 144 | int pipe_p; | ||
| 145 | int filled = 0; | ||
| 146 | int data_size = 8192; | ||
| 147 | @@ -810,7 +813,12 @@ readfile (char *filename, int *sizep, | ||
| 148 | |||
| 149 | for (;;) | ||
| 150 | { | ||
| 151 | - int nread = fread (data + filled, 1, data_size - filled, f); | ||
| 152 | + int nread; | ||
| 153 | + | ||
| 154 | + if (pipe_p) | ||
| 155 | + nread = fread (data + filled, 1, data_size - filled, f); | ||
| 156 | + else | ||
| 157 | + nread = gzread (f, data + filled, data_size - filled); | ||
| 158 | if (nread < 0) | ||
| 159 | pfatal_with_name (real_name); | ||
| 160 | if (nread == 0) | ||
| 161 | @@ -832,7 +840,7 @@ readfile (char *filename, int *sizep, | ||
| 162 | if (pipe_p) | ||
| 163 | pclose (f); | ||
| 164 | else | ||
| 165 | - fclose (f); | ||
| 166 | + gzclose (f); | ||
| 167 | |||
| 168 | *sizep = filled; | ||
| 169 | return data; | ||
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-data_types.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-data_types.patch new file mode 100644 index 0000000000..2a87c2146d --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-data_types.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | diff -up texinfo-4.13/info/window.c_old texinfo-4.13/info/window.c | ||
| 2 | --- texinfo-4.13/info/window.c_old 2009-08-04 13:46:15.000000000 +0200 | ||
| 3 | +++ texinfo-4.13/info/window.c 2009-08-04 13:47:29.000000000 +0200 | ||
| 4 | @@ -1581,7 +1581,7 @@ process_node_text (WINDOW *win, char *st | ||
| 5 | const char *carried_over_ptr; | ||
| 6 | size_t carried_over_len, carried_over_count; | ||
| 7 | const char *cur_ptr = mbi_cur_ptr (iter); | ||
| 8 | - int cur_len = mb_len (mbi_cur (iter)); | ||
| 9 | + size_t cur_len = mb_len (mbi_cur (iter)); | ||
| 10 | int replen; | ||
| 11 | int delim = 0; | ||
| 12 | int rc; | ||
| 13 | @@ -1754,7 +1754,7 @@ clean_manpage (char *manpage) | ||
| 14 | mbi_advance (iter)) | ||
| 15 | { | ||
| 16 | const char *cur_ptr = mbi_cur_ptr (iter); | ||
| 17 | - int cur_len = mb_len (mbi_cur (iter)); | ||
| 18 | + size_t cur_len = mb_len (mbi_cur (iter)); | ||
| 19 | |||
| 20 | if (cur_len == 1) | ||
| 21 | { | ||
| 22 | @@ -1852,8 +1852,8 @@ window_scan_line (WINDOW *win, int line, | ||
| 23 | mbi_advance (iter)) | ||
| 24 | { | ||
| 25 | const char *cur_ptr = mbi_cur_ptr (iter); | ||
| 26 | - int cur_len = mb_len (mbi_cur (iter)); | ||
| 27 | - int replen; | ||
| 28 | + size_t cur_len = mb_len (mbi_cur (iter)); | ||
| 29 | + size_t replen; | ||
| 30 | |||
| 31 | if (cur_ptr >= endp) | ||
| 32 | break; | ||
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-help-index-segfault.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-help-index-segfault.patch new file mode 100644 index 0000000000..6194176db6 --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-help-index-segfault.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | diff -up texinfo-4.13/info/indices.c.orig texinfo-4.13/info/indices.c | ||
| 2 | --- texinfo-4.13/info/indices.c.orig 2010-08-31 12:04:38.317462471 +0200 | ||
| 3 | +++ texinfo-4.13/info/indices.c 2010-08-31 12:11:49.322624552 +0200 | ||
| 4 | @@ -192,6 +192,7 @@ do_info_index_search (WINDOW *window, in | ||
| 5 | index for, build and remember an index now. */ | ||
| 6 | fb = file_buffer_of_window (window); | ||
| 7 | if (!initial_index_filename || | ||
| 8 | + !fb || | ||
| 9 | (FILENAME_CMP (initial_index_filename, fb->filename) != 0)) | ||
| 10 | { | ||
| 11 | info_free_references (index_index); | ||
| 12 | @@ -287,8 +288,9 @@ index_entry_exists (WINDOW *window, char | ||
| 13 | return 0; | ||
| 14 | |||
| 15 | fb = file_buffer_of_window (window); | ||
| 16 | - if (!initial_index_filename | ||
| 17 | - || (FILENAME_CMP (initial_index_filename, fb->filename) != 0)) | ||
| 18 | + if (!initial_index_filename || | ||
| 19 | + !fb || | ||
| 20 | + (FILENAME_CMP (initial_index_filename, fb->filename) != 0)) | ||
| 21 | { | ||
| 22 | info_free_references (index_index); | ||
| 23 | index_index = info_indices_of_file_buffer (fb); | ||
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-mosdo-crash.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-mosdo-crash.patch new file mode 100644 index 0000000000..77e3a76dec --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-mosdo-crash.patch | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --- texinfo-4.13/install-info/install-info.c.mosdo-crash 2009-09-02 20:18:44.000000000 -0400 | ||
| 2 | +++ texinfo-4.13/install-info/install-info.c 2009-09-02 20:19:53.000000000 -0400 | ||
| 3 | @@ -1765,7 +1765,7 @@ | ||
| 4 | err = argz_add (&argz, &argz_len, opt); | ||
| 5 | free (opt); opt = NULL; | ||
| 6 | |||
| 7 | - opt = xmalloc (strlen (regex) + sizeof ("--section=")); | ||
| 8 | + opt = xmalloc (strlen (title) + sizeof ("--section=")); | ||
| 9 | if (sprintf (opt, "--section=%s", title) == -1) | ||
| 10 | err = 1; | ||
| 11 | if (!err) | ||
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-powerpc.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-powerpc.patch new file mode 100644 index 0000000000..b6c046e792 --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-powerpc.patch | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | diff -up texinfo-4.13/install-info/install-info.c.patch texinfo-4.13/install-info/install-info.c | ||
| 2 | --- texinfo-4.13/install-info/install-info.c.patch 2010-01-11 14:46:32.000000000 +0100 | ||
| 3 | +++ texinfo-4.13/install-info/install-info.c 2010-01-11 14:48:47.162152695 +0100 | ||
| 4 | @@ -772,7 +772,7 @@ open_possibly_compressed_file (char *fil | ||
| 5 | } | ||
| 6 | else | ||
| 7 | { /* It's a plain file, seek back over the magic bytes. */ | ||
| 8 | - if (gzseek (f, 0, SEEK_SET) < 0) | ||
| 9 | + if (gzseek (f, 0, SEEK_SET) == -1) | ||
| 10 | pfatal_with_name (*opened_filename); | ||
| 11 | #if 0 && O_BINARY | ||
| 12 | /* Since this is a text file, and we opened it in binary mode, | ||
diff --git a/meta/recipes-extended/texinfo/texinfo_4.13a.bb b/meta/recipes-extended/texinfo/texinfo_4.13a.bb new file mode 100644 index 0000000000..be10c26a0b --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo_4.13a.bb | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | DESCRIPTION = "Texinfo is a documentation system that can produce both online \ | ||
| 2 | information and printed output from a single source file. The GNU \ | ||
| 3 | Project uses the Texinfo file format for most of its documentation." | ||
| 4 | |||
| 5 | SECTION = "console/utils" | ||
| 6 | HOMEPAGE = "http://www.gnu.org/software/texinfo/" | ||
| 7 | PRIORITY = "required" | ||
| 8 | LICENSE = "GPLV3+" | ||
| 9 | PR = "r0" | ||
| 10 | |||
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010" | ||
| 12 | |||
| 13 | DEPENDS = "zlib" | ||
| 14 | |||
| 15 | SRC_URI = "http://ftp.gnu.org/gnu/texinfo/texinfo-${PV}.tar.gz \ | ||
| 16 | file://texinfo-4.12-zlib.patch;striplevel=1 \ | ||
| 17 | file://texinfo-4.13a-data_types.patch;striplevel=1 \ | ||
| 18 | file://texinfo-4.13a-mosdo-crash.patch;striplevel=1 \ | ||
| 19 | file://texinfo-4.13a-powerpc.patch;striplevel=1 \ | ||
| 20 | file://texinfo-4.13a-help-index-segfault.patch;striplevel=1" | ||
| 21 | |||
| 22 | inherit gettext autotools | ||
| 23 | |||
| 24 | S = ${WORKDIR}/texinfo-4.13 | ||
| 25 | tex_texinfo = "texmf/tex/texinfo" | ||
| 26 | |||
| 27 | do_configure() { | ||
| 28 | oe_runconf | ||
| 29 | } | ||
| 30 | |||
| 31 | do_compile_prepend(){ | ||
| 32 | if [ -d tools ];then | ||
| 33 | make -C tools/gnulib/lib | ||
| 34 | fi | ||
| 35 | } | ||
| 36 | |||
| 37 | do_install_append() { | ||
| 38 | mkdir -p ${D}${datadir}/${tex_texinfo} | ||
| 39 | install -p -m644 doc/texinfo.tex doc/txi-??.tex ${D}${datadir}/${tex_texinfo} | ||
| 40 | } | ||
| 41 | |||
| 42 | PACKAGES += "info info-doc info-dbg" | ||
| 43 | |||
| 44 | FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info" | ||
| 45 | FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \ | ||
| 46 | ${mandir}/man1/info.1* ${mandir}/man5/info.5* \ | ||
| 47 | ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*" | ||
| 48 | FILES_info-dbg = "${bindir}/.debug/info ${bindir}/.debug/install-info \ | ||
| 49 | ${bindir}/.debug/infokey" | ||
| 50 | |||
| 51 | FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi" | ||
| 52 | FILES_${PN}-doc = "${datadir}/texinfo ${infodir}/texinfo* \ | ||
| 53 | ${datadir}/${tex_texinfo} \ | ||
| 54 | ${mandir}/man1/makeinfo.1* ${mandir}/man5/texinfo.5* \ | ||
| 55 | ${mandir}/man1/texindex.1* ${mandir}/man1/texi2dvi.1* \ | ||
| 56 | ${mandir}/man1/texi2pdf.1* ${mandir}/man1/pdftexi2dvi.1*" | ||
| 57 | FILES_${PN}-dbg = "${bindir}/.debug/texindex ${bindir}/.debug/makeinfo" | ||
