summaryrefslogtreecommitdiff
path: root/app-text/noweb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-text/noweb
reinit the tree, so we can have metadata
Diffstat (limited to 'app-text/noweb')
-rw-r--r--app-text/noweb/Manifest9
-rw-r--r--app-text/noweb/files/50noweb-gentoo.el4
-rw-r--r--app-text/noweb/files/noweb-2.11b-ldflags.patch27
-rw-r--r--app-text/noweb/files/noweb-2.11b-recmake.patch136
-rw-r--r--app-text/noweb/files/noweb-2.9-security.patch178
-rw-r--r--app-text/noweb/metadata.xml8
-rw-r--r--app-text/noweb/noweb-2.11b-r4.ebuild99
7 files changed, 461 insertions, 0 deletions
diff --git a/app-text/noweb/Manifest b/app-text/noweb/Manifest
new file mode 100644
index 000000000000..67433d23f194
--- /dev/null
+++ b/app-text/noweb/Manifest
@@ -0,0 +1,9 @@
+AUX 50noweb-gentoo.el 180 SHA256 2c8c08cc2f6adc075496f1ad4e4d6615c0f183f2eee0df6639c05a8a0aef1d65 SHA512 96e3b747096d30ee2202b155dce79aee783c9adbc66f1392f5d6cee6be82ed951551de5c2c8f2f48f6a905ffb2be045cbe5bc5e999c6acd042b8d77e480384b0 WHIRLPOOL 615767ce947d29d16b469079abfb712acbe8323e9bfdddcdd8c3d0f1a8cf156854c7518f74635e6f34a55de01be8e71dac35cc99b44524be4d2eed1fedd4cd61
+AUX noweb-2.11b-ldflags.patch 619 SHA256 0a7c2712855ce1d5efd8eba3655df527312f23fc51bc551b8ae6a5b6be669056 SHA512 4d73c9025da77c39a359a90f2605c0f870bcca2b737b47bb64d4e0096f2c2c285867383e1accf221db8e83b98ccfa6dd02f4e77c837eb2d0f195394d07359106 WHIRLPOOL 2e1116a459213e1b52b0b4a7d21c377eb7d6c7e27ee9481cac2e013500debfbe5e8c9c5d508d5cca59d7dc7e011d0dd74657fa6f4fe9e6948fb32905e1db6264
+AUX noweb-2.11b-recmake.patch 5470 SHA256 2673b9719982285a6b1a4741160e702584854b56aa3873f4568ba29aa89f5078 SHA512 ca7fcc11710ade0ac903408fdb4c9388903c50b885fda27cfabd34ffc0db72ee9b8ecf10347a74af5b50cce0275e5e4ee81544caafd21df36e77b264c2a24438 WHIRLPOOL 5eccb10de71e60cd02a9ec78541e09ecd358dda1878cad20a7a56996c8a334e1be18bdd2f46a0b295c1023fc255ebf64b38591956652029b49208406facd574b
+AUX noweb-2.9-security.patch 6558 SHA256 45492023f74919efbf32806fd891c68697a00526eac9c924af2ef26b43477746 SHA512 259612cbb57a0c13d0d6e53818c4da7adf8389fa6a826cc9966c5924d2da6582c89b6457c8c77c0067e4e3580c0fd4156138de67671d30c52e9c63e75d6f80a2 WHIRLPOOL a3b0ec18a2cd93fdc92a44491fbf5f9926914293841a1ea158afefccc2e0085dfbaed26e2dd355913e64930c429716ec78951c6f768170bd3d2bb503c3bef7ea
+DIST noweb-2.11b.tgz 738870 SHA256 c913f26c1edb37e331c747619835b4cade000b54e459bb08f4d38899ab690d82 SHA512 0363c68aa31549fd806a575e6055b117db51fb5b5f28e7b30bdf3c108b3cf9546e1c6a4e64faf892b013c79665b14d436879800d4e970b0732fbd482b416d0f9 WHIRLPOOL b2f357e993d9e4af5b2d2d1f5a9c3bd720a8177b05d01fba501addecf884b739db0b17dd21e8a834a75ec6444d0b5c85679b8e868d3ed2a674010c3441b64f91
+EBUILD noweb-2.11b-r4.ebuild 2690 SHA256 cc6cf219056ced660e827f35d4ec2e2f5922d6bd369f7366a2d4864819d2a809 SHA512 b7d38298a1f2074fbd1d954721f1711fb55bcd9d73091a5e9a8666f7449c0811bb972666161e2b1a7d318f90ad56eec2efbd6b139ea23722594385768a26c491 WHIRLPOOL 0f18f435189b4b8740b942259e90964718013d2ac736149dd1ba6ec794af1d8102f57ff4bf9331e96134d5ebd915b4d9ab53bab7aa470a8b0fed29556d95b07c
+MISC ChangeLog 2556 SHA256 69fa180b4dcf922a999a341add27d1488f5d941a5d033517ea6bb4d2fbb700b8 SHA512 8f3ce7f323d46bba762a4d63c86f1bbf9a924f65473504e16ed68d059b7f91fe329555d047f3ed91d6964d3ffc7ee3e1249122d7b0a884b859b1f454e6fbeb5f WHIRLPOOL 96b1fe25e9a6d631c5752cb30b0b164757147d78c5fa073ec69ce13798115683e77e6c0855d7166d3edfa0932f821801b45c0e311fce547f647ace9f7ca24cc7
+MISC ChangeLog-2015 9122 SHA256 c7897c0df4bc48310b20a1b6af9f98a0f2f86d5dac16da786ff8e157e96abdef SHA512 a50077e9a6745392be7638b172f67bf9c836fdca1c8142889450465f005b7715ce63aba7e7e07a5c48e9212d840daa7393372e066890580a236956b3b79a6e65 WHIRLPOOL f50ec7ba179289a9eb4f9f12752be9f7433663f50410ae8d3c3c21fe5bd952fe848c38f4395392683874383dcc4d33d699e833821dc9abbf12aadd63b36f365a
+MISC metadata.xml 245 SHA256 b3de478821488be2cdc91b078e21c911dc384af882c5c44631a47dfa91516dc8 SHA512 1653777623e2c15e1ce13229e396723b2cc9c214983e0f8592de98c01a31badc6c38c6735ed44f937d145883b43fb6f049af3eddb9ff96b18c96ccf8f67dd690 WHIRLPOOL 701a78fc2214f5fd4bd781477f85e87e716b8d76ea831a0fa4afc8871c4286cc363679f1ff4f844555ad4f77cc7265208b83e805f56c22fc4baeed1062280c08
diff --git a/app-text/noweb/files/50noweb-gentoo.el b/app-text/noweb/files/50noweb-gentoo.el
new file mode 100644
index 000000000000..90b971d74635
--- /dev/null
+++ b/app-text/noweb/files/50noweb-gentoo.el
@@ -0,0 +1,4 @@
+(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))
diff --git a/app-text/noweb/files/noweb-2.11b-ldflags.patch b/app-text/noweb/files/noweb-2.11b-ldflags.patch
new file mode 100644
index 000000000000..3fe114cb1dd9
--- /dev/null
+++ b/app-text/noweb/files/noweb-2.11b-ldflags.patch
@@ -0,0 +1,27 @@
+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)
diff --git a/app-text/noweb/files/noweb-2.11b-recmake.patch b/app-text/noweb/files/noweb-2.11b-recmake.patch
new file mode 100644
index 000000000000..98b29935b7d1
--- /dev/null
+++ b/app-text/noweb/files/noweb-2.11b-recmake.patch
@@ -0,0 +1,136 @@
+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
diff --git a/app-text/noweb/files/noweb-2.9-security.patch b/app-text/noweb/files/noweb-2.9-security.patch
new file mode 100644
index 000000000000..951af7968ae7
--- /dev/null
+++ b/app-text/noweb/files/noweb-2.9-security.patch
@@ -0,0 +1,178 @@
+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 }
diff --git a/app-text/noweb/metadata.xml b/app-text/noweb/metadata.xml
new file mode 100644
index 000000000000..13170c3184d8
--- /dev/null
+++ b/app-text/noweb/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>tex@gentoo.org</email>
+ <name>Gentoo TeX Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/app-text/noweb/noweb-2.11b-r4.ebuild b/app-text/noweb/noweb-2.11b-r4.ebuild
new file mode 100644
index 000000000000..2f1d182a8cd6
--- /dev/null
+++ b/app-text/noweb/noweb-2.11b-r4.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+
+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="noweb emacs? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~ppc-macos ~x64-macos ~x86-macos"
+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_prepare() {
+ # 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-site/tex/inputs
+ emake ICONC="icont" \
+ BIN="${ED}/usr/bin" \
+ LIBSRC="icon" \
+ LIBNAME="${EPREFIX}/usr/libexec/${PN}" \
+ LIB="${ED}/usr/libexec/${PN}" \
+ MAN="${ED}/usr/share/man" \
+ TEXNAME="${EPREFIX}/usr/share/texmf-site/tex/inputs" \
+ TEXINPUTS="${ED}/usr/share/texmf-site/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
+}