diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-08 06:31:20 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-08 06:31:20 +0000 |
commit | d187e08cf6208d35ced546f064833913d34ebccd (patch) | |
tree | 2073afe32eb993d8ab296db4889a1e6bd274c909 /sys-apps | |
parent | Cleanup autotools to fix building with 2.4 headers #114858. (diff) | |
download | gentoo-2-d187e08cf6208d35ced546f064833913d34ebccd.tar.gz gentoo-2-d187e08cf6208d35ced546f064833913d34ebccd.tar.bz2 gentoo-2-d187e08cf6208d35ced546f064833913d34ebccd.zip |
Update tempfile patch #114499.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/texinfo/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/texinfo/files/digest-texinfo-4.8-r3 | 1 | ||||
-rw-r--r-- | sys-apps/texinfo/files/texinfo-4.8-tempfile-owl.patch | 111 | ||||
-rw-r--r-- | sys-apps/texinfo/texinfo-4.8-r3.ebuild | 69 |
4 files changed, 189 insertions, 2 deletions
diff --git a/sys-apps/texinfo/ChangeLog b/sys-apps/texinfo/ChangeLog index 9c087450f8dc..0636f56aa1b9 100644 --- a/sys-apps/texinfo/ChangeLog +++ b/sys-apps/texinfo/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/texinfo -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/texinfo/ChangeLog,v 1.68 2005/10/08 17:24:42 vapier Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/texinfo/ChangeLog,v 1.69 2006/02/08 06:31:20 vapier Exp $ + +*texinfo-4.8-r3 (08 Feb 2006) + + 08 Feb 2006; Mike Frysinger <vapier@gentoo.org> + +files/texinfo-4.8-tempfile-owl.patch, +texinfo-4.8-r3.ebuild: + Update tempfile patch #114499. *texinfo-4.8-r2 (08 Oct 2005) diff --git a/sys-apps/texinfo/files/digest-texinfo-4.8-r3 b/sys-apps/texinfo/files/digest-texinfo-4.8-r3 new file mode 100644 index 000000000000..89aa6b29dbe2 --- /dev/null +++ b/sys-apps/texinfo/files/digest-texinfo-4.8-r3 @@ -0,0 +1 @@ +MD5 6ba369bbfe4afaa56122e65b3ee3a68c texinfo-4.8.tar.bz2 1521822 diff --git a/sys-apps/texinfo/files/texinfo-4.8-tempfile-owl.patch b/sys-apps/texinfo/files/texinfo-4.8-tempfile-owl.patch new file mode 100644 index 000000000000..449b30e81560 --- /dev/null +++ b/sys-apps/texinfo/files/texinfo-4.8-tempfile-owl.patch @@ -0,0 +1,111 @@ +http://bugs.gentoo.org/114499 + +--- texinfo-4.8/util/texindex.c ++++ texinfo-4.8/util/texindex.c +@@ -20,6 +20,7 @@ + + #include "system.h" + #include <getopt.h> ++#include <stdlib.h> + + static char *program_name = "texindex"; + +@@ -37,8 +38,6 @@ static char *program_name = "texindex"; + #define memset(ptr, ignore, count) bzero (ptr, count) + #endif + +-char *mktemp (char *); +- + #if !defined (SEEK_SET) + # define SEEK_SET 0 + # define SEEK_CUR 1 +@@ -146,6 +145,7 @@ void error (const char *format, const ch + void *xmalloc (), *xrealloc (); + char *concat (char *s1, char *s2); + void flush_tempfiles (int to_count); ++void flush_tempfiles_atexit (); + + #define MAX_IN_CORE_SORT 500000 + +@@ -307,6 +307,7 @@ decode_command (int argc, char **argv) + int arg_index = 1; + char **ip; + char **op; ++ int retries; + + /* Store default values into parameter variables. */ + +@@ -320,8 +321,26 @@ decode_command (int argc, char **argv) + else + tempdir = concat (tempdir, "/"); + ++ tempdir = concat (tempdir, "txidx.XXXXXX"); ++ retries = 0x1000; ++ ++ do ++ { ++ char *dot; ++ if (mktemp(tempdir) == NULL || !tempdir[0]) ++ fatal("mktemp failed for '%s'", tempdir); ++ if (mkdir(tempdir, 0700) == 0) break; ++ if (errno != EEXIST || !--retries) ++ pfatal_with_name(tempdir); ++ if ((dot = strrchr (tempdir, "."))) ++ strcpy (dot, ".XXXXXX"); ++ } ++ while (1); ++ + keep_tempfiles = 0; + ++ atexit(flush_tempfiles_atexit); ++ + /* Allocate ARGC input files, which must be enough. */ + + infiles = (char **) xmalloc (argc * sizeof (char *)); +@@ -389,21 +408,9 @@ For more information about these matters + static char * + maketempname (int count) + { +- static char *tempbase = NULL; + char tempsuffix[10]; +- +- if (!tempbase) +- { +- int fd; +- tempbase = concat (tempdir, "txidxXXXXXX"); +- +- fd = mkstemp (tempbase); +- if (fd == -1) +- pfatal_with_name (tempbase); +- } +- +- sprintf (tempsuffix, ".%d", count); +- return concat (tempbase, tempsuffix); ++ sprintf (tempsuffix, "/%d", count); ++ return concat (tempdir, tempsuffix); + } + + +@@ -416,6 +423,13 @@ flush_tempfiles (int to_count) + return; + while (last_deleted_tempcount < to_count) + unlink (maketempname (++last_deleted_tempcount)); ++ rmdir(tempdir); ++} ++ ++void ++flush_tempfiles_atexit (void) ++{ ++ flush_tempfiles (tempcount); + } + + +@@ -1622,7 +1636,7 @@ concat (char *s1, char *s2) + + strcpy (result, s1); + strcpy (result + len1, s2); +- *(result + len1 + len2) = 0; ++ result[len1 + len2] = '\0'; + + return result; + } diff --git a/sys-apps/texinfo/texinfo-4.8-r3.ebuild b/sys-apps/texinfo/texinfo-4.8-r3.ebuild new file mode 100644 index 000000000000..61fe50fbfeee --- /dev/null +++ b/sys-apps/texinfo/texinfo-4.8-r3.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/texinfo/texinfo-4.8-r3.ebuild,v 1.1 2006/02/08 06:31:20 vapier Exp $ + +inherit flag-o-matic eutils + +DESCRIPTION="The GNU info program and utilities" +HOMEPAGE="http://www.gnu.org/software/texinfo/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="nls build static" + +RDEPEND="!build? ( >=sys-libs/ncurses-5.2-r2 )" +DEPEND="${RDEPEND} + !build? ( nls? ( sys-devel/gettext ) )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-freebsd.patch + epatch "${FILESDIR}"/${P}-tempfile-owl.patch #114499 + + cd doc + # Get the texinfo info page to have a proper name of texinfo.info + sed -i 's:setfilename texinfo:setfilename texinfo.info:' texinfo.txi + sed -i \ + -e 's:INFO_DEPS = texinfo:INFO_DEPS = texinfo.info:' \ + -e 's:texinfo\::texinfo.info\::' \ + Makefile.in +} + +src_compile() { + local myconf= + if ! use nls || use build ; then + myconf="--disable-nls" + fi + use static && append-ldflags -static + + econf ${myconf} || die + + # work around broken dependency's in info/Makefile.am #85540 + emake -C lib || die "emake lib" + emake -C info makedoc || die "emake makedoc" + emake -C info doc.c || die "emake doc.c" + emake || die "emake" +} + +src_install() { + if use build ; then + newbin util/ginstall-info install-info + dobin makeinfo/makeinfo util/{texi2dvi,texindex} + else + make DESTDIR="${D}" install || die "install failed" + dosbin ${FILESDIR}/mkinfodir + # tetex installs this guy #76812 + has_version '<app-text/tetex-3' && rm -f "${D}"/usr/bin/texi2pdf + + if [[ ! -f ${D}/usr/share/info/texinfo.info ]] ; then + die "Could not install texinfo.info!!!" + fi + + dodoc AUTHORS ChangeLog INTRODUCTION NEWS README TODO + newdoc info/README README.info + newdoc makeinfo/README README.makeinfo + fi +} |