summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-06 16:34:55 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-06 16:34:55 -0800
commit4b243dbd8774d246c4de19efb65a920b7afdb896 (patch)
treec13f10a999f0c69d2d4c6bec90bfa16280d57e28
parentca0dcb8410548638962277fb5b64ea142c972d72 (diff)
downloadtexinfo-4b243dbd8774d246c4de19efb65a920b7afdb896.tar.gz
texinfo-4b243dbd8774d246c4de19efb65a920b7afdb896.tar.bz2
texinfo-4b243dbd8774d246c4de19efb65a920b7afdb896.zip
add packaging
-rw-r--r--packaging/automake-1.12.patch13
-rw-r--r--packaging/texi2roff-2.0-gcc4.patch28
-rw-r--r--packaging/texinfo-4.12-zlib.patch155
-rw-r--r--packaging/texinfo-4.13a-bug640417.diff31
-rw-r--r--packaging/texinfo-4.13a-bug713517.diff20
-rw-r--r--packaging/texinfo-4.8-echo.patch26
-rw-r--r--packaging/texinfo.spec191
7 files changed, 464 insertions, 0 deletions
diff --git a/packaging/automake-1.12.patch b/packaging/automake-1.12.patch
new file mode 100644
index 00000000..e4d532c8
--- /dev/null
+++ b/packaging/automake-1.12.patch
@@ -0,0 +1,13 @@
+Index: texinfo-4.13/configure.ac
+===================================================================
+--- texinfo-4.13.orig/configure.ac
++++ texinfo-4.13/configure.ac
+@@ -13,7 +13,7 @@ AC_INIT([GNU Texinfo], [4.13], [bug-texi
+
+ dnl Must come before AM_INIT_AUTOMAKE.
+ AC_CONFIG_AUX_DIR([build-aux])
+-AM_INIT_AUTOMAKE([1.10.1 readme-alpha dist-lzma])
++AM_INIT_AUTOMAKE([1.10.1 readme-alpha dist-xz])
+
+ # Minimum Autoconf version required.
+ AC_PREREQ(2.59)
diff --git a/packaging/texi2roff-2.0-gcc4.patch b/packaging/texi2roff-2.0-gcc4.patch
new file mode 100644
index 00000000..a2d0baac
--- /dev/null
+++ b/packaging/texi2roff-2.0-gcc4.patch
@@ -0,0 +1,28 @@
+--- texi2roff-2.0/table.c
++++ texi2roff-2.0/table.c 2005-03-18 17:59:54.000000000 +0000
+@@ -32,13 +32,14 @@
+ struct misccmds * cmds;
+ struct tablerecd * table, * endoftable;
+
++static void patchtable();
++
+ void
+ initialize(macropkg, showInfo, makeindex)
+ int macropkg;
+ int showInfo;
+ int makeindex;
+ {
+- extern void patchtable();
+ int tablesize;
+
+ switch (macropkg) {
+--- texi2roff-2.0/texi2roff.c
++++ texi2roff-2.0/texi2roff.c 2012-07-17 16:09:22.852010105 +0000
+@@ -13,6 +13,7 @@
+ #include <sys/types.h>
+ #endif
+ #include <sys/stat.h>
++#include <unistd.h>
+ #include "texi2roff.h"
+
+ #if !defined(S_ISDIR) && defined(S_IFDIR)
diff --git a/packaging/texinfo-4.12-zlib.patch b/packaging/texinfo-4.12-zlib.patch
new file mode 100644
index 00000000..82e65547
--- /dev/null
+++ b/packaging/texinfo-4.12-zlib.patch
@@ -0,0 +1,155 @@
+--- configure.ac
++++ configure.ac
+@@ -224,6 +224,26 @@ AC_CONFIG_FILES([util/defs])
+ AC_CHECK_PROGS([HEVEA], [hevea], [])
+ AC_CHECK_PROGS([TEX], [tex], [])
+
++#
++# Check for zlib and libbz2 libraries to use this together
++# with SuSE's libzio to open compressed info files.
++#
++AC_CHECK_HEADER(zlib.h,[
++ for lib in z gz
++ do
++ AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -l$lib" ; break])
++ done])
++AC_CHECK_HEADER(bzlib.h,[
++ for lib in bz2 bzip2
++ do
++ AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib" ; break])
++ done])
++AC_CHECK_HEADER(zio.h,[
++ AC_CHECK_LIB(zio, fzopen, [LIBS="$LIBS -lzio"
++ AC_DEFINE(HAVE_ZIO, [],
++ [Define to 1 if you have libzio for opening compressed info files.])])
++ ])
++
+ AC_CONFIG_FILES([
+ Makefile
+ doc/Makefile
+--- install-info/install-info.c
++++ install-info/install-info.c
+@@ -21,6 +21,9 @@
+ #include <getopt.h>
+ #include <regex.h>
+ #include <argz.h>
++#ifdef HAVE_ZIO
++# include <zio.h>
++#endif
+
+ #define TAB_WIDTH 8
+
+@@ -655,15 +658,47 @@ open_possibly_compressed_file (char *fil
+
+ *opened_filename = filename;
+ f = fopen (*opened_filename, FOPEN_RBIN);
++#ifdef HAVE_ZIO
++ if (!compression_program)
++ compression_program = &local_compression_program;
++ *compression_program = NULL;
++ if (f)
++ {
++ nread = fread (data, sizeof (data), 1, f);
++ if (nread == 1)
++ {
++ if (data[0] == '\x1f' && data[1] == '\x8b')
++ *compression_program = "g";
++ else if (data[0] == '\x1f' && data[1] == '\x9d')
++ *compression_program = "Z";
++ else if (data[0] == '\x1f' && data[1] == '\x9e')
++ *compression_program = "z";
++ else if (data[0] == 'B' && data[1] == 'Z' && data[2] == 'h')
++ *compression_program = "b";
++ }
++ fclose (f);
++ f = fzopen (*opened_filename, FOPEN_RBIN);
++ }
++#endif
+ if (!f)
+ {
+ *opened_filename = concat (filename, ".gz", "");
++#ifdef HAVE_ZIO
++ f = fzopen (*opened_filename, FOPEN_RBIN);
++ *compression_program = "g";
++#else
+ f = fopen (*opened_filename, FOPEN_RBIN);
++#endif
+ if (!f)
+ {
+ free (*opened_filename);
+ *opened_filename = concat (filename, ".bz2", "");
++#ifdef HAVE_ZIO
++ f = fzopen (*opened_filename, FOPEN_RBIN);
++ *compression_program = "b";
++#else
+ f = fopen (*opened_filename, FOPEN_RBIN);
++#endif
+ }
+ if (!f)
+ {
+@@ -695,7 +730,11 @@ open_possibly_compressed_file (char *fil
+ /* And try opening it again. */
+ free (*opened_filename);
+ *opened_filename = filename;
++#ifdef HAVE_ZIO
++ f = fzopen (*opened_filename, FOPEN_RBIN);
++#else
+ f = fopen (*opened_filename, FOPEN_RBIN);
++#endif
+ if (!f)
+ pfatal_with_name (filename);
+ }
+@@ -704,6 +743,7 @@ open_possibly_compressed_file (char *fil
+ }
+ }
+
++#ifndef HAVE_ZIO
+ /* Read first few bytes of file rather than relying on the filename.
+ If the file is shorter than this it can't be usable anyway. */
+ nread = fread (data, sizeof (data), 1, f);
+@@ -778,6 +818,9 @@ open_possibly_compressed_file (char *fil
+ #endif
+ *is_pipe = 0;
+ }
++#else
++ *is_pipe = 0;
++#endif /* HAVE_ZIO */
+
+ return f;
+ }
+@@ -852,11 +895,23 @@ output_dirfile (char *dirfile, int dir_n
+ int i;
+ FILE *output;
+
++#ifndef HAVE_ZIO
+ if (compression_program)
+ {
+ char *command = concat (compression_program, ">", dirfile);
+ output = popen (command, "w");
+ }
++#else
++ if (compression_program)
++ {
++ if (*compression_program == 'g' || *compression_program == 'z')
++ output = fzopen (dirfile, "wg");
++ if (*compression_program == 'b')
++ output = fzopen (dirfile, "wb");
++ if (*compression_program == 'Z')
++ output = fzopen (dirfile, "wZ");
++ }
++#endif
+ else
+ output = fopen (dirfile, "w");
+
+@@ -969,9 +1024,11 @@ output_dirfile (char *dirfile, int dir_n
+ /* Some systems, such as MS-DOS, simulate pipes with temporary files.
+ On those systems, the compressor actually gets run inside pclose,
+ so we must call pclose. */
++#ifndef HAVE_ZIO
+ if (compression_program)
+ pclose (output);
+ else
++#endif
+ fclose (output);
+ }
+
diff --git a/packaging/texinfo-4.13a-bug640417.diff b/packaging/texinfo-4.13a-bug640417.diff
new file mode 100644
index 00000000..b2871ab5
--- /dev/null
+++ b/packaging/texinfo-4.13a-bug640417.diff
@@ -0,0 +1,31 @@
+--- texinfo-4.13-/info/window.c 2008-09-18 20:31:59.000000000 +0200
++++ texinfo-4.13/info/window.c 2010-09-20 21:32:41.941755338 +0200
+@@ -1581,7 +1581,7 @@
+ const char *carried_over_ptr;
+ size_t carried_over_len, carried_over_count;
+ const char *cur_ptr = mbi_cur_ptr (iter);
+- int cur_len = mb_len (mbi_cur (iter));
++ size_t cur_len = mb_len (mbi_cur (iter));
+ int replen;
+ int delim = 0;
+ int rc;
+@@ -1754,7 +1754,7 @@
+ mbi_advance (iter))
+ {
+ const char *cur_ptr = mbi_cur_ptr (iter);
+- int cur_len = mb_len (mbi_cur (iter));
++ size_t cur_len = mb_len (mbi_cur (iter));
+
+ if (cur_len == 1)
+ {
+@@ -1852,8 +1852,8 @@
+ mbi_advance (iter))
+ {
+ const char *cur_ptr = mbi_cur_ptr (iter);
+- int cur_len = mb_len (mbi_cur (iter));
+- int replen;
++ size_t cur_len = mb_len (mbi_cur (iter));
++ size_t replen;
+
+ if (cur_ptr >= endp)
+ break;
diff --git a/packaging/texinfo-4.13a-bug713517.diff b/packaging/texinfo-4.13a-bug713517.diff
new file mode 100644
index 00000000..3e0691bf
--- /dev/null
+++ b/packaging/texinfo-4.13a-bug713517.diff
@@ -0,0 +1,20 @@
+--- util/texi2dvi
++++ util/texi2dvi 2011-09-02 10:25:04.616426245 +0000
+@@ -78,7 +78,7 @@ newline='
+ IFS="$space$tab$newline"
+
+ # In case someone pedantic insists on using grep -E.
+-: ${EGREP=egrep}
++: ${EGREP=grep -E}
+
+ # Systems which define $COMSPEC or $ComSpec use semicolons to separate
+ # directories in TEXINPUTS -- except for Cygwin et al., where COMSPEC
+@@ -1683,7 +1683,7 @@ input_file_name_decode ()
+
+ # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
+ # prepend `./' in order to avoid that the tools take it as an option.
+- echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \
++ echo "$command_line_filename" | $EGREP '^(/|[A-Za-z]:/)' >&6 \
+ || command_line_filename="./$command_line_filename"
+
+ # See if the file exists. If it doesn't we're in trouble since, even
diff --git a/packaging/texinfo-4.8-echo.patch b/packaging/texinfo-4.8-echo.patch
new file mode 100644
index 00000000..0fb37bc7
--- /dev/null
+++ b/packaging/texinfo-4.8-echo.patch
@@ -0,0 +1,26 @@
+--- info/echo-area.c
++++ info/echo-area.c Tue Jan 25 17:32:07 2005
+@@ -1502,7 +1502,7 @@
+ void
+ inform_in_echo_area (const char *message)
+ {
+- int i;
++ int i, len;
+ char *text;
+ int avail = EA_MAX_INPUT + 1 - input_line_end;
+
+@@ -1512,7 +1512,13 @@
+ text[i] = 0;
+
+ echo_area_initialize_node ();
+- sprintf (&input_line[input_line_end], "%s[%s]\n",
++
++ len = EA_MAX_INPUT - input_line_end;
++ if (len <= 0) {
++ free (text);
++ return;
++ }
++ snprintf (&input_line[input_line_end], len, "%s[%s]\n",
+ echo_area_is_active ? " ": "", text);
+ free (text);
+ the_echo_area->point = input_line_point;
diff --git a/packaging/texinfo.spec b/packaging/texinfo.spec
new file mode 100644
index 00000000..e1386879
--- /dev/null
+++ b/packaging/texinfo.spec
@@ -0,0 +1,191 @@
+Name: texinfo
+Version: 4.13a
+Release: 0
+License: GPL-2.0+ ; GPL-3.0+
+Summary: Tools Needed to Create Documentation from Texinfo Sources
+Url: http://www.texinfo.org
+Group: Productivity/Publishing/Texinfo
+Source: ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-%{version}.tar.bz2
+Source1: http://download.savannah.nongnu.org/releases/texi2html/texi2html-%{version_t2h}.tar.bz2
+# texinfo.org: the domain is expired.
+# http://texinfo.org/texi2roff/texi2roff-%{version_t2r}.tar.bz2
+Source2: texi2roff-%{version_t2r}.tar.bz2
+Source10: info-dir
+Patch0: texinfo-4.12.dif
+Patch1: texi2html-1.78.dif
+Patch2: texi2roff-2.0.dif
+Patch3: texi2roff.patch.bz2
+Patch4: texinfo-4.12-zlib.patch
+Patch5: texinfo-4.8-echo.patch
+Patch6: texi2roff-2.0-gcc4.patch
+Patch7: texinfo-4.13a-bug640417.diff
+Patch8: texinfo-4.13a-bug713517.diff
+Patch9: automake-1.12.patch
+BuildRequires: automake
+BuildRequires: bzip2-devel
+BuildRequires: help2man
+BuildRequires: libzio-devel
+BuildRequires: ncurses-devel
+BuildRequires: perl-gettext
+BuildRequires: zlib-devel
+Provides: texi2html = %{version_t2h}
+Provides: texi2roff = %{version_t2r}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%global version_t2h 1.82
+%global version_t2r 2.0
+
+%description
+Texinfo is a documentation system that uses a single source file to
+produce both online information and printed output. Using Texinfo, you
+can create a printed document with the normal features of a book,
+including chapters, sections, cross-references, and indices. From the
+same Texinfo source file, you can create a menu-driven, online info
+file with nodes, menus, cross-references, and indices using the included
+makeinfo tool.
+
+Aggregated with texinfo in this package is texi2html and texi2roff.
+
+%package -n info
+License: GPL-3.0+
+Summary: A Stand-Alone Terminal-Based Info Browser
+Group: Productivity/Publishing/Texinfo
+Requires(pre): bash
+Requires(pre): libzio
+Requires(pre): zlib
+
+%description -n info
+Info is a terminal-based program for reading documentation of computer
+programs in the Info format. The GNU Project distributes most of its
+on-line manuals in the Info format, so you need a program called "Info
+reader" to read the manuals.
+
+%package -n makeinfo
+License: GPL-3.0+
+Summary: Translate Texinfo documents to info format
+Group: Productivity/Publishing/Texinfo
+Suggests: texinfo
+Provides: texinfo:/usr/bin/makeinfo
+
+%description -n makeinfo
+Makeinfo translates Texinfo source documentation to various other
+formats, by default Info files suitable for reading online with Emacs
+or standalone GNU Info.
+
+%prep
+rm -rf texi2html-%{version_t2h} texi2roff-%{version_t2r}
+%setup -q -b 1 -b 2 -n texinfo-4.13
+%patch4 -p0 -b .zlib
+%patch5 -p0 -b .echo
+%patch7 -p1 -b .size_t
+%patch8 -p0 -b .egrep
+%patch9 -p1
+%patch0 -p0
+pushd ../texi2html-%{version_t2h}
+%patch1 -p0
+popd
+pushd ../texi2roff-%{version_t2r}
+%patch3 -p0 -b .Bader
+%patch2 -p0
+%patch6 -p1
+popd
+
+%build
+ HOST=%{_target_cpu}-tizen-linux
+ CFLAGS="%{optflags} -pipe"
+ LDFLAGS=""
+ CC=gcc
+ export CFLAGS LDFLAGS CC
+ export LD_AS_NEEDED=0
+ AUTOPOINT=true autoreconf -fi
+ ./configure --build=$HOST \
+ --prefix=%{_prefix} \
+ --mandir=%{_mandir} \
+ --datadir=%{_datadir} \
+ --infodir=%{_infodir} \
+ --without-included-gettext \
+ --enable-nls
+ PATH=${PWD}/makeinfo:${PWD}/util:$PATH
+ export PATH
+ make %{?_smp_mflags};
+pushd ../texi2html-%{version_t2h}
+ ./configure --build=$HOST \
+ --prefix=%{_prefix} \
+ --mandir=%{_mandir} \
+ --datadir=%{_datadir} \
+ --infodir=%{_infodir} \
+ --without-included-gettext \
+ --enable-nls
+ make %{?_smp_mflags};
+popd
+pushd ../texi2roff-%{version_t2r}
+ rm -f texi2roff
+ make %{?_smp_mflags};
+popd
+
+%install
+ export LD_AS_NEEDED=0
+ make DESTDIR=%{buildroot} \
+ infodir=%{_infodir} \
+ htmldir=%{_defaultdocdir}/texi2html install
+ mkdir -p %{buildroot}/sbin
+ mv %{buildroot}%{_bindir}/install-info %{buildroot}/sbin/
+ ln -sf ../../sbin/install-info %{buildroot}%{_bindir}/install-info
+ mkdir -p %{buildroot}%{_infodir}
+ install -m 644 %{SOURCE10} %{buildroot}%{_infodir}/dir
+pushd ../texi2html-%{version_t2h}
+ make DESTDIR=%{buildroot} \
+ infodir=%{_infodir} \
+ texinfohtmldir=%{_defaultdocdir}/texi2html install
+ install -m 644 README %{buildroot}%{_defaultdocdir}/texi2html/
+ install -m 644 NEWS %{buildroot}%{_defaultdocdir}/texi2html/
+ install -m 644 COPYING %{buildroot}%{_defaultdocdir}/texi2html/
+popd
+pushd ../texi2roff-%{version_t2r}
+ doc=%{_defaultdocdir}/texi2roff
+ install -m 755 texi2roff %{buildroot}%{_bindir}/
+ install -m 755 texi2index %{buildroot}%{_bindir}/
+ install -m 644 texi2roff.1 %{buildroot}%{_mandir}/man1/
+ mkdir -p %{buildroot}${doc}
+ install -m 644 Readme %{buildroot}${doc}
+ install -m 644 copyright %{buildroot}${doc}
+popd
+%find_lang %{name} %{name}.lang
+
+%files
+%defattr(-, root, root)
+%dir %{_defaultdocdir}/texi2html
+%dir %{_defaultdocdir}/texi2roff
+%doc ABOUT-NLS AUTHORS COPYING INTRODUCTION NEWS README TODO
+%doc doc/texinfo.tex doc/txi-*.tex
+%doc %{_defaultdocdir}/texi2html/*
+%doc %{_defaultdocdir}/texi2roff/*
+%{_bindir}/pdftexi*
+%{_bindir}/texi*
+%{_infodir}/texinfo*.gz
+%{_infodir}/texi2html*.gz
+%{_mandir}/man1/pdftexi2dvi.1.gz
+%{_mandir}/man1/texi*.1.gz
+%{_mandir}/man5/texinfo.5.gz
+%{_datadir}/texinfo
+%{_datadir}/texi2html
+
+%files -n makeinfo -f %{name}.lang
+%defattr(-,root,root)
+%{_bindir}/makeinfo
+%{_mandir}/man1/makeinfo.1.gz
+
+%files -n info
+%defattr(-,root,root)
+%config(noreplace) %verify(not md5 size mtime) %{_infodir}/dir
+/sbin/install-info
+%{_bindir}/install-info
+%{_bindir}/info
+%{_bindir}/infokey
+%{_infodir}/info.info*
+%{_infodir}/info-stnd.info*
+%{_mandir}/man1/info.1*
+%{_mandir}/man1/infokey.1*
+%{_mandir}/man1/install-info.1*
+%{_mandir}/man5/info.5*
+
+%changelog