diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-text/noweb | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-text/noweb')
-rw-r--r-- | app-text/noweb/Manifest | 1 | ||||
-rw-r--r-- | app-text/noweb/files/50noweb-gentoo.el | 4 | ||||
-rw-r--r-- | app-text/noweb/files/noweb-2.11b-ldflags.patch | 27 | ||||
-rw-r--r-- | app-text/noweb/files/noweb-2.11b-recmake.patch | 136 | ||||
-rw-r--r-- | app-text/noweb/files/noweb-2.9-security.patch | 178 | ||||
-rw-r--r-- | app-text/noweb/metadata.xml | 5 | ||||
-rw-r--r-- | app-text/noweb/noweb-2.11b-r4.ebuild | 100 |
7 files changed, 451 insertions, 0 deletions
diff --git a/app-text/noweb/Manifest b/app-text/noweb/Manifest new file mode 100644 index 000000000000..46a3f62a4acf --- /dev/null +++ b/app-text/noweb/Manifest @@ -0,0 +1 @@ +DIST noweb-2.11b.tgz 738870 SHA256 c913f26c1edb37e331c747619835b4cade000b54e459bb08f4d38899ab690d82 SHA512 0363c68aa31549fd806a575e6055b117db51fb5b5f28e7b30bdf3c108b3cf9546e1c6a4e64faf892b013c79665b14d436879800d4e970b0732fbd482b416d0f9 WHIRLPOOL b2f357e993d9e4af5b2d2d1f5a9c3bd720a8177b05d01fba501addecf884b739db0b17dd21e8a834a75ec6444d0b5c85679b8e868d3ed2a674010c3441b64f91 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..ba6a8a8800d5 --- /dev/null +++ b/app-text/noweb/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>tex</herd> +</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..78391b729fc0 --- /dev/null +++ b/app-text/noweb/noweb-2.11b-r4.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 +} |