--- /dev/null
+# ChangeLog for app-text/noweb
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/noweb/ChangeLog,v 1.48 2010/10/30 22:23:22 aballier Exp $
+
+*noweb-2.11b-r2 (30 Oct 2010)
+
+ 30 Oct 2010; Alexis Ballier <aballier@gentoo.org> +noweb-2.11b-r2.ebuild,
+ +files/noweb-2.11b-ldflags.patch, +files/noweb-2.11b-recmake.patch:
+ Respect ldflags (bug #338899) and use $(MAKE) for recursive make, by
+ Wormo, bug #264273
+
+ 30 Oct 2010; Alexis Ballier <aballier@gentoo.org> -noweb-2.9-r5.ebuild,
+ -noweb-2.9-r6.ebuild, -files/noweb-2.9-gentoo.diff, -noweb-2.11b.ebuild:
+ remove old
+
+ 06 Jan 2010; Brent Baude <ranger@gentoo.org> noweb-2.11b-r1.ebuild:
+ Marking noweb-2.11b-r1 ppc64 for bug 290530
+
+ 12 Nov 2009; Jeroen Roovers <jer@gentoo.org> noweb-2.11b-r1.ebuild:
+ Stable for HPPA (bug #290530).
+
+ 08 Nov 2009; nixnut <nixnut@gentoo.org> noweb-2.11b-r1.ebuild:
+ ppc stable #290530
+
+ 03 Nov 2009; Raúl Porcel <armin76@gentoo.org> noweb-2.11b-r1.ebuild:
+ alpha/ia64/sparc stable wrt #290530
+
+ 30 Oct 2009; Markus Meier <maekke@gentoo.org> noweb-2.11b-r1.ebuild:
+ amd64/x86 stable, bug #290530
+
+*noweb-2.11b-r1 (21 May 2009)
+
+ 21 May 2009; Marijn Schouten <hkBst@gentoo.org> +noweb-2.11b-r1.ebuild:
+ glibc2.10 compat (bug 270757)
+
+ 25 Aug 2008; Markus Meier <maekke@gentoo.org> noweb-2.11b.ebuild:
+ amd64 stable, bug #234191
+
+ 09 Aug 2008; Raúl Porcel <armin76@gentoo.org> noweb-2.11b.ebuild:
+ alpha/ia64/sparc stable wrt #234191
+
+ 08 Aug 2008; Markus Rothe <corsair@gentoo.org> noweb-2.11b.ebuild:
+ Stable on ppc64; bug #234191
+
+ 08 Aug 2008; Markus Meier <maekke@gentoo.org> noweb-2.11b.ebuild:
+ x86 stable, bug #234191
+
+ 08 Aug 2008; nixnut <nixnut@gentoo.org> noweb-2.11b.ebuild:
+ Stable on ppc wrt bug 234191
+
+ 08 Aug 2008; Jeroen Roovers <jer@gentoo.org> noweb-2.11b.ebuild:
+ Stable for HPPA (bug #234191).
+
+ 02 Aug 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
+ Add USE flag description to metadata wrt GLEP 56.
+
+ 04 Jul 2008; Ulrich Mueller <ulm@gentoo.org> +files/50noweb-gentoo.el,
+ noweb-2.11b.ebuild:
+ Optionally install Emacs noweb-mode. Ebuild and site-init file provided by
+ Denys Duchier <denys.duchier@univ-orleans.fr>, bug 230229.
+
+ 18 Jun 2008; Stephanie Lockwood-Childs <wormo@gentoo.org>
+ noweb-2.11b.ebuild:
+ mark ~ppc (bug #209567)
+
+ 12 May 2008; Alexis Ballier <aballier@gentoo.org> noweb-2.9-r5.ebuild,
+ noweb-2.9-r6.ebuild:
+ virtual/tetex -> virtual/tex-base
+
+ 05 Apr 2008; Joseph Jezak <josejx@gentoo.org> noweb-2.9-r6.ebuild:
+ Marked ~ppc for bug #209567.
+
+ 24 Feb 2008; Brent Baude <ranger@gentoo.org> noweb-2.9-r6.ebuild:
+ Marking noweb-2.9-r6 ppc64 for bug 209465
+
+ 14 Feb 2008; Raúl Porcel <armin76@gentoo.org> noweb-2.9-r6.ebuild:
+ alpha/ia64 stable wrt #209465
+
+ 14 Feb 2008; Jeroen Roovers <jer@gentoo.org> noweb-2.9-r6.ebuild:
+ Stable for HPPA (bug #209465).
+
+*noweb-2.11b (10 Feb 2008)
+
+ 10 Feb 2008; Alexis Ballier <aballier@gentoo.org> +noweb-2.11b.ebuild:
+ version bump, bug #149688
+
+ 18 Dec 2007; Jeroen Roovers <jer@gentoo.org> noweb-2.9-r6.ebuild:
+ Marked ~hppa (bug #195815).
+
+ 26 Oct 2007; Raúl Porcel <armin76@gentoo.org> noweb-2.9-r6.ebuild:
+ Add ~ia64
+
+ 12 Mar 2007; Alexandre Buisse <nattfodd@gentoo.org> metadata.xml:
+ Replaced text-markup by tex as maintaining herd (text-markup split).
+
+ 21 Feb 2007; Piotr Jaroszyński <peper@gentoo.org> ChangeLog:
+ Transition to Manifest2.
+
+ 25 Sep 2006; Markus Rothe <corsair@gentoo.org> noweb-2.9-r6.ebuild:
+ Added ~ppc64; bug #149013
+
+ 27 Apr 2006; Marien Zwart <marienz@gentoo.org> Manifest:
+ Fixing SHA256 digest, pass four
+
+*noweb-2.9-r6 (17 Feb 2006)
+*noweb-2.9-r5 (17 Feb 2006)
+
+ 17 Feb 2006; Martin Ehmsen <ehmsen@gentoo.org>
+ files/noweb-2.9-security.patch, -noweb-2.9-r3.ebuild,
+ -noweb-2.9-r4.ebuild, +noweb-2.9-r5.ebuild, +noweb-2.9-r6.ebuild:
+ Fix insecure temporary file creation (CVE-2005-3342), bug #122705.
+
+ 02 Sep 2004; Mamoru KOMACHI <usata@gentoo.org> noweb-2.9-r3.ebuild,
+ noweb-2.9-r4.ebuild:
+ Fixed corrupted totex when installing noweb for the first time.
+ See bug #50429.
+
+*noweb-2.9-r4 (01 Sep 2004)
+
+ 01 Sep 2004; Mamoru KOMACHI <usata@gentoo.org> files/noweb-2.9-gentoo.diff,
+ -files/noweb-2.9-r1-gentoo.diff, -files/noweb-2.9-r2-gentoo.diff,
+ noweb-2.9-r3.ebuild, +noweb-2.9-r4.ebuild:
+ Added icon USE flag, see bug #62163.
+
+ 09 Feb 2004; Dylan Carlson <absinthe@gentoo.org> noweb-2.9-r3.ebuild:
+ added amd64 keyword.
+
+ 29 Nov 2003; Mike Gardiner <obz@gentoo.org> metadata.xml,
+ noweb-2.9-r2.ebuild, noweb-2.9-r3.ebuild:
+ Let's try again on the timestamps fix. Changed the 'find all and touch' method
+ to the 'make touch' method, which should be more selective in the files it
+ touches
+
+ 04 Oct 2003; Mamoru KOMACHI <usata@gentoo.org> noweb-2.9-r2.ebuild,
+ noweb-2.9-r3.ebuild:
+ Changed app-text/tetex to virtual/tetex
+
+ 22 Jul 2003; Daniel Ahlberg <aliz@gentoo.org> noweb-2.9-r3 :
+ Touch everything in ${S} so it doesnt try to use the program itself to generate files.
+ Closes #23663.
+
+*noweb-2.9-r3 (28 Jun 2003)
+
+ 28 Jun 2003; Daniel Ahlberg <aliz@gentoo.org> :
+ Security update. Added Debian patch.
+
+ 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
+
+*noweb-2.9-r2 (30 Apr 2002)
+
+ 10 Mar 2003; Aron Griffis <agriffis@gentoo.org> noweb-2.9-r2.ebuild:
+ Mark stable on alpha
+
+ 2 Aug 2002; phoen][x <phoenix@gentoo.org> noweb-2.9-r2.ebuild :
+ Added LICENSE, SLOT.
+
+ 15 Jul 2002; Owen Stampflee <owen@gentoo.org> :
+
+ Added KEYWORDS.
+
+ 30 Apr 2002; Seemant Kulleen <seemant@gentoo.org> noweb-2.9-r2.ebuild
+ files/noweb-2.9-r2-gentoo.diff files/digest-noweb-2.9-r2 :
+
+ man pages now installed in /usr/share/man instead.
+
+*noweb-2.9 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
--- /dev/null
+AUX 50noweb-gentoo.el 216 RMD160 e6685f97704dac9dd922c7c83277f49ec3541e02 SHA1 be9e3b9d3c2f9bd4459d48572b50a7b9f7e6412e SHA256 8216492bf2537ed68953c64e72f12dc073a579eb866a4e0e23f1320ec056680e
+AUX noweb-2.11b-ldflags.patch 619 RMD160 843f553269e9f111e2b00a3927862e750986e0c5 SHA1 ddbf2f5eb54aab77535e73ff1725f65ce0747de4 SHA256 0a7c2712855ce1d5efd8eba3655df527312f23fc51bc551b8ae6a5b6be669056
+AUX noweb-2.11b-recmake.patch 5470 RMD160 373dcaa86ac50650c82f196a5dc78f10d01f9f8e SHA1 ccdcf02b49d88bf5dfa2be1812f08b55d995c1c6 SHA256 2673b9719982285a6b1a4741160e702584854b56aa3873f4568ba29aa89f5078
+AUX noweb-2.9-security.patch 6558 RMD160 df2613a2278b13f032a74af62b553495e1b11786 SHA1 8aa4f219c4cfa691b99c46a645b3cb0b2176ff9c SHA256 45492023f74919efbf32806fd891c68697a00526eac9c924af2ef26b43477746
+DIST noweb-2.11b.tgz 738870 RMD160 01e4fbb636dfd0f6d117caa045cf105e49d25fca SHA1 3b391c42f46dcb8a002b863fb2e483560a7da51d SHA256 c913f26c1edb37e331c747619835b4cade000b54e459bb08f4d38899ab690d82
+EBUILD noweb-2.11b-r2.ebuild 2725 RMD160 1dbc4b1f2ab40857cb511251a2cd65549806ae73 SHA1 4c74f0e24c3757fe48647d2c260908135d9d27ed SHA256 7ed4b924376d4e0e5fe2d07ee85822067846ac7eafed2e42cafabaac348e48ff
+MISC ChangeLog 6182 RMD160 cdde70ed0a5a64d9f44cec4de55cad494979ce5b SHA1 6b59a5346ae3415220c42ece2a5b418dac7d45d1 SHA256 ff984c9bb7ed72c789548f43425550065ea7ae65336f90ff4a0e585bcefdba3f
+MISC metadata.xml 156 RMD160 2bf6b2ed9ff0fcef1e902cf093ccf4ae2dcc70a0 SHA1 e9260cd53905d8569cf3327ded4c6d01653fc389 SHA256 b4971b8472ab3fe4fbfe41b331a79193ca19e86c08d055ad1c20eaf9e04b79b6
--- /dev/null
+
+;;; noweb site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'noweb-mode "noweb-mode"
+ "Minor meta mode for editing noweb files." t)
+(add-to-list 'auto-mode-alist '("\\.nw\\'" . noweb-mode))
--- /dev/null
+https://bugs.gentoo.org/show_bug.cgi?id=338899
+
+Index: noweb-2.11b/src/c/Makefile
+===================================================================
+--- noweb-2.11b.orig/src/c/Makefile
++++ noweb-2.11b/src/c/Makefile
+@@ -41,16 +41,16 @@ CPIF=>
+ all: nt markup mnt finduses
+
+ nt: $(TANGLEOBJS)
+- $(CC) $(CFLAGS) -o nt $(TANGLEOBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o nt $(TANGLEOBJS)
+
+ finduses: $(FINDUSESOBJS)
+- $(CC) $(CFLAGS) -o finduses $(FINDUSESOBJS)
++
+
+ markup: $(MARKUPOBJS)
+- $(CC) $(CFLAGS) -o markup $(MARKUPOBJS)
++
+
+ mnt: $(MNTOBJS)
+- $(CC) $(CFLAGS) -o mnt $(MNTOBJS)
++
+
+ source: $(SRCS)
+ touch: $(SRCS)
--- /dev/null
+https://bugs.gentoo.org/show_bug.cgi?id=264273
+
+Index: noweb-2.11b/Makefile
+===================================================================
+--- noweb-2.11b.orig/Makefile
++++ noweb-2.11b/Makefile
+@@ -9,14 +9,14 @@ SHELL=/bin/sh
+ CINAME=-Nv`echo $(VERSION) | tr . _`
+ CIMSG=-f -m'standard checkin preparing to export version $(VERSION)'
+
+-source: ; for i in src; do (cd $$i; make source); done
+-www: ; for i in src/xdoc examples; do (cd $$i; make www); done
++source: ; for i in src; do (cd $$i; $(MAKE) source); done
++www: ; for i in src/xdoc examples; do (cd $$i; $(MAKE) www); done
+
+ clean:
+- for i in src examples contrib; do (cd $$i; make clean); done
++ for i in src examples contrib; do (cd $$i; $(MAKE) clean); done
+ rm -f nwsrcfilter *~ */*~
+ clobber: clean
+- for i in src examples contrib; do (cd $$i; make clobber); done
++ for i in src examples contrib; do (cd $$i; $(MAKE) clobber); done
+
+ DATE:
+ (./echo -n "Version $(VERSION) of "; date) > DATE
+@@ -51,6 +51,6 @@ emacscheck:
+ diff src/elisp/noweb-mode.el $(HOME)/emacs/noweb-mode.el
+
+ checkin:
+- (cd src; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin)
++ (cd src; $(MAKE) "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin)
+
+
+Index: noweb-2.11b/contrib/norman/Makefile
+===================================================================
+--- noweb-2.11b.orig/contrib/norman/Makefile
++++ noweb-2.11b/contrib/norman/Makefile
+@@ -1,10 +1,10 @@
+ LIB=/dev/null # to be overridden
+ DIRS=numarkup
+
+-all: ; for i in $(DIRS); do (cd $$i; make ICONC=$(ICONC) ICONT=$(ICONT) all); done
+-install: ; for i in $(DIRS); do (cd $$i; make LIB=$(LIB) BIN=$(BIN) install); done
+-source: ; for i in $(DIRS); do (cd $$i; make source); done
+-clean: ; for i in $(DIRS); do (cd $$i; make clean); done
++all: ; for i in $(DIRS); do (cd $$i; $(MAKE) ICONC=$(ICONC) ICONT=$(ICONT) all); done
++install: ; for i in $(DIRS); do (cd $$i; $(MAKE) LIB=$(LIB) BIN=$(BIN) install); done
++source: ; for i in $(DIRS); do (cd $$i; $(MAKE) source); done
++clean: ; for i in $(DIRS); do (cd $$i; $(MAKE) clean); done
+ iconlib: # cheap hack for slackmake
+ true
+
+Index: noweb-2.11b/contrib/norman/numarkup/Makefile
+===================================================================
+--- noweb-2.11b.orig/contrib/norman/numarkup/Makefile
++++ noweb-2.11b/contrib/norman/numarkup/Makefile
+@@ -11,11 +11,11 @@ OBJS = main.o pass1.o latex.o input.o sc
+
+ all:
+ noweb -t numarkup.nw
+- make $(TARGET)
++ $(MAKE) $(TARGET)
+
+ install:
+ noweb -t numarkup.nw
+- make $(TARGET)
++ $(MAKE) $(TARGET)
+ strip $(TARGET)
+ cp $(TARGET) $(LIB)
+
+Index: noweb-2.11b/src/Makefile
+===================================================================
+--- noweb-2.11b.orig/src/Makefile
++++ noweb-2.11b/src/Makefile
+@@ -41,9 +41,9 @@ LIBNAME=$(LIB)
+ TEXNAME=$(TEXINPUTS)
+
+ all:
+- cd c; make "CC=$(CC)" "CFLAGS=$(CFLAGS)" all
+- for i in shell lib xdoc tex; do (cd $$i; make all); done
+- cd $(LIBSRC); make "ICONT=$(ICONT)" "ICONC=$(ICONC)" all
++ cd c; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)" all
++ for i in shell lib xdoc tex; do (cd $$i; $(MAKE) all); done
++ cd $(LIBSRC); $(MAKE) "ICONT=$(ICONT)" "ICONC=$(ICONC)" all
+
+ FAQ: FAQ.html
+ sleep 1; html2ascii FAQ.html > FAQ
+@@ -101,13 +101,13 @@ install-code: install-shell
+ -mkdir $(BIN) $(LIB) 2>/dev/null
+ true c/nt c/markup c/mnt c/finduses
+ cp c/nt c/markup c/mnt c/finduses $(LIB)
+- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
+- cd lib; make LIB=$(LIB) install
++ cd $(LIBSRC); $(MAKE) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install
++ cd lib; $(MAKE) LIB=$(LIB) install
+
+ uninstall-code: uninstall-shell
+ rm $(LIB)/nt $(LIB)/markup $(LIB)/mnt $(LIB)/finduses
+- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
+- cd lib; make LIB=$(LIB) uninstall
++ cd $(LIBSRC); $(MAKE) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall
++ cd lib; $(MAKE) LIB=$(LIB) uninstall
+ install-man:
+ -mkdir $(MAN) $(MANDIR) $(MAN7DIR) 2>/dev/null
+ sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/cpif.1 > $(MANDIR)/cpif.$(MANEXT)
+@@ -193,24 +193,24 @@ install-elisp:
+ uninstall-elisp:
+ rm -f $(ELISP)/noweb-mode.el
+ checkin:
+- for i in lib tex xdoc; do (cd $$i; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done
++ for i in lib tex xdoc; do (cd $$i; $(MAKE) "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done
+ for i in c icon awk; do (cd $$i; ci -l $(CINAME) $(CIMSG) *.nw Makefile); done
+ (cd elisp; ci -l $(CINAME) $(CIMSG) *.el)
+ ci -l $(CINAME) $(CIMSG) Makefile.nw INSTALL INSTALL.DOS README FAQ COPYRIGHT nwmake *.nw
+
+ source: FAQ
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make CPIF=">" source); done
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) CPIF=">" source); done
+ sleep 1
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) touch); done
+ touch:
+ touch FAQ
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) touch); done
+ clean:
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make clean); done
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) clean); done
+ rm -f nwsrcfilter *~ */*~
+
+ clobber: clean
+- for i in c lib icon awk xdoc; do (cd $$i; make clobber); done
++ for i in c lib icon awk xdoc; do (cd $$i; $(MAKE) clobber); done
+
+ Makefile: Makefile.nw
+ chmod +w Makefile
--- /dev/null
+diff -urN noweb-2.9.orig/src/awk/totex.nw noweb-2.9/src/awk/totex.nw
+--- noweb-2.9.orig/src/awk/totex.nw 2000-03-27 02:00:00.000000000 +0200
++++ noweb-2.9/src/awk/totex.nw 2006-02-17 12:47:05.000000000 +0100
+@@ -24,7 +24,7 @@
+ @
+ On an ugly system, we have to put it in a file.
+ <<invoke awk program using file>>=
+-awkfile=/tmp/totex$$.awk
++awkfile=$(tempfile -p totex)
+ trap 'rm -f $awkfile; exit 1' 0 1 2 15 # clean up files
+ cat > $awkfile << 'EOF'
+ <<awk program for conversion to {\TeX}>>
+diff -urN noweb-2.9.orig/src/awkname noweb-2.9/src/awkname
+--- noweb-2.9.orig/src/awkname 2000-06-23 12:56:00.000000000 +0200
++++ noweb-2.9/src/awkname 2006-02-17 12:47:05.000000000 +0100
+@@ -5,7 +5,7 @@
+ esac
+
+ rc=0
+-new=/tmp/$$.new; old=/tmp/$$.old
++new=$(tempfile -p new); old=$(tempfile -p old)
+
+ for file in lib/emptydefn lib/unmarkup lib/toascii lib/btdefn \
+ awk/noidx awk/totex awk/tohtml awk/noindex \
+diff -urN noweb-2.9.orig/src/lib/toascii noweb-2.9/src/lib/toascii
+--- noweb-2.9.orig/src/lib/toascii 2001-03-28 15:49:00.000000000 +0200
++++ noweb-2.9/src/lib/toascii 2006-02-17 12:47:05.000000000 +0100
+@@ -7,9 +7,9 @@
+ *) echo "This can't happen -- $i passed to toascii" 1>&2 ; exit 1 ;;
+ esac
+ done
+-awkfile="tmp/awk$$.tmp"
+-textfile="/tmp/text$$.tmp"
+-tagsfile="/tmp/tags$$.tmp"
++awkfile=$(tempfile -p awk -s .tmp)
++textfile=$(tempfile -p text -s .tmp)
++tagsfile=$(tempfile -p tags -s .tmp)
+ export awkfile textfile tagsfile
+ trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15
+ nawk 'BEGIN { textfile=ENVIRON["textfile"]
+diff -urN noweb-2.9.orig/src/lib/toascii.nw noweb-2.9/src/lib/toascii.nw
+--- noweb-2.9.orig/src/lib/toascii.nw 2000-03-27 02:00:00.000000000 +0200
++++ noweb-2.9/src/lib/toascii.nw 2006-02-17 12:48:20.000000000 +0100
+@@ -28,9 +28,9 @@
+ Also arranged here is a temporary file for storage of the awk program on an
+ ugly system, as discussed below.
+ <<arrange temporary files>>=
+-awkfile="tmp/awk$$.tmp"
+-textfile="/tmp/text$$.tmp"
+-tagsfile="/tmp/tags$$.tmp"
++awkfile=$(tempfile -p awk -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
++textfile=$(tempfile -p text -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
++tagsfile=$(tempfile -p tags -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
+ export awkfile textfile tagsfile
+ trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15
+ @ %def textfile tagsfile awkfile
+diff -urN noweb-2.9.orig/src/shell/cpif noweb-2.9/src/shell/cpif
+--- noweb-2.9.orig/src/shell/cpif 2000-03-27 02:00:00.000000000 +0200
++++ noweb-2.9/src/shell/cpif 2006-02-17 12:47:05.000000000 +0100
+@@ -17,7 +17,7 @@
+ 0) echo 'Usage: '`basename $0`' [ -eq -ne ] file...' 1>&2; exit 2
+ esac
+
+-new=/tmp/$$
++new=$(tempfile)
+ trap 'rm -f $new; exit 1' 1 2 15 # clean up files
+
+ cat >$new
+diff -urN noweb-2.9.orig/src/shell/nonu noweb-2.9/src/shell/nonu
+--- noweb-2.9.orig/src/shell/nonu 2000-03-27 02:00:00.000000000 +0200
++++ noweb-2.9/src/shell/nonu 2006-02-17 12:47:05.000000000 +0100
+@@ -2,7 +2,7 @@
+ LIB=/usr/public/pkg/noweb/lib
+ # attempt to convert nuweb to noweb using sam
+
+-tmp=/tmp/nonu$$
++tmp=$(tempfile -p nonu)
+ trap '/bin/rm -f $tmp; exit 1' 1 2 15 # clean up files
+ cp $1 $tmp || exit 1
+
+diff -urN noweb-2.9.orig/src/shell/noroff noweb-2.9/src/shell/noroff
+--- noweb-2.9.orig/src/shell/noroff 2001-03-28 15:49:00.000000000 +0200
++++ noweb-2.9/src/shell/noroff 2006-02-17 12:47:05.000000000 +0100
+@@ -35,9 +35,10 @@
+
+ base="`basename $1 | sed '/\./s/\.[^.]*$//'`"
+ tagsfile="$base.nwt"
++tmpfile=$(tempfile -p tags)
+ (echo ".so $macrodir/tmac.w"
+ if [ -r "$tagsfile" ]; then
+- cp $tagsfile /tmp/tags.$$
++ cp $tagsfile $tmpfile
+ $AWK '{
+ if (sub(/^###TAG### / , "")) tags[$1] = $2
+ else if (sub(/^###BEGINCHUNKS###/, "")) printf ".de CLIST\n.CLISTBEGIN\n"
+@@ -88,8 +89,8 @@
+ # print str3
+ # print convquote(str3)
+ # }
+- function tag(s) { if (s in tags) return tags[s]; else return "???" }' /tmp/tags.$$
+- rm -f /tmp/tags.$$
++ function tag(s) { if (s in tags) return tags[s]; else return "???" }' $tmpfile
++ rm -f $tmpfile
+ fi
+ cat "$@") |
+ ($ROFF $opts 2>$tagsfile)
+diff -urN noweb-2.9.orig/src/shell/roff.mm noweb-2.9/src/shell/roff.mm
+--- noweb-2.9.orig/src/shell/roff.mm 2000-03-27 02:00:00.000000000 +0200
++++ noweb-2.9/src/shell/roff.mm 2006-02-17 12:48:20.000000000 +0100
+@@ -214,7 +214,7 @@
+ .ADDLIST 1a
+ .PRINTLIST
+
+-awkfile="/tmp/noweb$$.awk"
++awkfile=$(tempfile -p noweb -s .awk) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
+ trap 'rm -f $awkfile' 0 1 2 10 14 15
+ cat > $awkfile \&<< 'EOF'
+ \c
+@@ -1628,14 +1628,15 @@
+ tagsfile="$base.nwt"
+ (echo ".so $macrodir/tmac.w"
+ if [ -r "$tagsfile" ]; then
+- cp $tagsfile /tmp/tags.$$
++ tagstemp=$(tempfile -p tags) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
++ cp $tagsfile $tagstemp
+ $AWK '\c
+ .USE "action for \*[BEGINCONVQUOTE]tags\*[ENDCONVQUOTE] line" 11c
+ \&
+ \c
+ .USE "functions" 8a
+-\&' /tmp/tags.$$
+- rm -f /tmp/tags.$$
++\&' $tagstemp
++ rm -f $tagstemp
+ fi
+ cat "$@") |
+ ($ROFF $opts 2>$tagsfile)
+diff -urN noweb-2.9.orig/src/shell/roff.nw noweb-2.9/src/shell/roff.nw
+--- noweb-2.9.orig/src/shell/roff.nw 2000-03-27 02:00:00.000000000 +0200
++++ noweb-2.9/src/shell/roff.nw 2006-02-17 12:47:05.000000000 +0100
+@@ -80,7 +80,7 @@
+ other, and quoting each quote is ugly. The pragmatic solution is to
+ copy the awk program into a temporary file, using a shell here-document.
+ <<invoke awk program>>=
+-awkfile="/tmp/noweb$$.awk"
++awkfile=$(tempfile -p noweb -s .awk)
+ trap 'rm -f $awkfile' 0 1 2 10 14 15
+ cat > $awkfile << 'EOF'
+ <<awk program>>
+@@ -662,12 +662,13 @@
+
+ base="`basename $1 | sed '/\./s/\.[^.]*$//'`"
+ tagsfile="$base.nwt"
++tmpfile=$(tempfile -p tags)
+ (echo ".so $macrodir/tmac.w"
+ if [ -r "$tagsfile" ]; then
+- cp $tagsfile /tmp/tags.$$
++ cp $tagsfile $tmpfile
+ $AWK '<<action for [[tags]] line>>
+- <<functions>>' /tmp/tags.$$
+- rm -f /tmp/tags.$$
++ <<functions>>' $tmpfile
++ rm -f $tmpfile
+ fi
+ cat "$@") |
+ ($ROFF $opts 2>$tagsfile)
+diff -urN noweb-2.9.orig/src/shell/toroff noweb-2.9/src/shell/toroff
+--- noweb-2.9.orig/src/shell/toroff 2001-03-28 15:49:00.000000000 +0200
++++ noweb-2.9/src/shell/toroff 2006-02-17 12:47:05.000000000 +0100
+@@ -9,7 +9,7 @@
+ exit 1;;
+ esac
+ done
+-awkfile="/tmp/noweb$$.awk"
++awkfile=$(tempfile -p noweb -s .awk)
+ trap 'rm -f $awkfile' 0 1 2 10 14 15
+ cat > $awkfile << 'EOF'
+ /^@begin docs 0$/ { if (delay) next }
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>tex</herd>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/noweb/noweb-2.11b-r2.ebuild,v 1.1 2010/10/30 22:23:22 aballier Exp $
+
+inherit eutils toolchain-funcs elisp-common
+
+DESCRIPTION="a literate programming tool, lighter than web"
+HOMEPAGE="http://www.eecs.harvard.edu/~nr/noweb/"
+SRC_URI="http://www.eecs.harvard.edu/~nr/noweb/dist/${P}.tgz"
+
+LICENSE="freedist emacs? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="~amd64-linux"
+IUSE="emacs examples"
+
+DEPEND="virtual/tex-base
+ dev-lang/icon
+ sys-apps/debianutils
+ emacs? ( virtual/emacs )"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${P}/src
+
+SITEFILE=50${PN}-gentoo.el
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # glibc2.10 compat (bug 270757)
+# mkdir d && cp -r c/* d/
+ sed "s:getline (:getline_nonlibc (:" -i c/getline.{c,h} || die
+ sed "s:getline(:getline_nonlibc(:" -i c/{notangle.c,getline.c,finduses.c} || die
+# diff -u d/ c/
+
+ epatch "${FILESDIR}"/${PN}-2.9-security.patch
+ # dont run texhash...
+ sed -i -e "s/texhash/true/" Makefile
+ # dont strip...
+ sed -i -e "s/strip/true/" Makefile
+
+ cd "${WORKDIR}/${P}"
+ epatch "${FILESDIR}"/${P}-recmake.patch
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+}
+
+src_compile() {
+ # noweb tries to use notangle and noweb; see bug #50429
+ ( cd c; emake ICONC="icont" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LIBSRC="icon" ) || die
+ export PATH="${PATH}:${T}"
+ emake ICONC="icont" CC="$(tc-getCC)" BIN="${T}" LIB="${T}" LIBSRC="icon" install-code \
+ || die "make temporal install failed."
+
+ emake ICONC="icont" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LIBSRC="icon" || die "make failed"
+ # Set awk to awk not nawk
+ ./awkname awk
+
+ if use emacs; then
+ elisp-compile elisp/noweb-mode.el || die "elisp-compile failed"
+ fi
+}
+
+src_install () {
+ # It needs the directories to exist first...
+ dodir /usr/bin
+ dodir /usr/libexec/${PN}
+ dodir /usr/share/man
+ dodir /usr/share/texmf/tex/inputs
+ emake ICONC="icont" \
+ BIN="${ED}/usr/bin" \
+ LIBSRC="icon" \
+ LIBNAME="/usr/libexec/${PN}" \
+ LIB="${ED}/usr/libexec/${PN}" \
+ MAN="${ED}/usr/share/man" \
+ TEXNAME="/usr/share/texmf/tex/inputs" \
+ TEXINPUTS="${ED}/usr/share/texmf/tex/inputs" \
+ install || die "make install failed"
+ cd "${WORKDIR}/${P}"
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+ fi
+ dodoc CHANGES README
+
+ if use emacs; then
+ elisp-install ${PN} src/elisp/noweb-mode.{el,elc} \
+ || die "elisp-install failed"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "elisp-site-file-install failed"
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Running texhash to complete installation.."
+ texhash
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}