1 |
commit: 64939e25ca5ecd888c86677d57443d8b91f6f0f5 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Feb 25 05:42:35 2020 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Feb 25 05:49:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=64939e25 |
7 |
|
8 |
app-text/noweb: new package |
9 |
|
10 |
Bug: https://bugs.gentoo.org/644258 |
11 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
12 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
13 |
|
14 |
app-text/noweb/Manifest | 1 + |
15 |
app-text/noweb/files/50noweb-gentoo.el | 4 + |
16 |
app-text/noweb/files/noweb-2.12-ldflags.patch | 23 +++++ |
17 |
app-text/noweb/files/noweb-2.12-recmake.patch | 142 ++++++++++++++++++++++++++ |
18 |
app-text/noweb/metadata.xml | 17 +++ |
19 |
app-text/noweb/noweb-2.12.ebuild | 116 +++++++++++++++++++++ |
20 |
6 files changed, 303 insertions(+) |
21 |
|
22 |
diff --git a/app-text/noweb/Manifest b/app-text/noweb/Manifest |
23 |
new file mode 100644 |
24 |
index 0000000..2ad9f81 |
25 |
--- /dev/null |
26 |
+++ b/app-text/noweb/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST noweb-2.12.tar.gz 579230 BLAKE2B 2b4b252a79df6b030c2e09dff62c2dbb59d4cdfc6dac76eb9d387b355f940a7431bb69f7200bfe0a2269542430cc00720c4391d3dd15978fc39b36e81a9fb5fe SHA512 b4e45f288b6ae99d2457b69628bb5dfca16f7d1ce1bb06722ae598b5ff50a4ed2819313c5f5991cd3d1062c9d306c1308b0336916b6582dba7a405a343958c2a |
29 |
|
30 |
diff --git a/app-text/noweb/files/50noweb-gentoo.el b/app-text/noweb/files/50noweb-gentoo.el |
31 |
new file mode 100644 |
32 |
index 0000000..90b971d |
33 |
--- /dev/null |
34 |
+++ b/app-text/noweb/files/50noweb-gentoo.el |
35 |
@@ -0,0 +1,4 @@ |
36 |
+(add-to-list 'load-path "@SITELISP@") |
37 |
+(autoload 'noweb-mode "noweb-mode" |
38 |
+ "Minor meta mode for editing noweb files." t) |
39 |
+(add-to-list 'auto-mode-alist '("\\.nw\\'" . noweb-mode)) |
40 |
|
41 |
diff --git a/app-text/noweb/files/noweb-2.12-ldflags.patch b/app-text/noweb/files/noweb-2.12-ldflags.patch |
42 |
new file mode 100644 |
43 |
index 0000000..cc3e0ac |
44 |
--- /dev/null |
45 |
+++ b/app-text/noweb/files/noweb-2.12-ldflags.patch |
46 |
@@ -0,0 +1,23 @@ |
47 |
+--- a/src/c/Makefile |
48 |
++++ b/src/c/Makefile |
49 |
+@@ -41,19 +41,16 @@ |
50 |
+ all: nt markup mnt finduses nwmktemp |
51 |
+ |
52 |
+ nt: $(TANGLEOBJS) |
53 |
+- $(CC) $(CFLAGS) -o nt $(TANGLEOBJS) |
54 |
++ $(CC) $(CFLAGS) $(LDFLAGS) -o nt $(TANGLEOBJS) |
55 |
+ |
56 |
+ nwmktemp: nwmktemp.o |
57 |
+ $(CC) $(CFLAGS) -o nwmktemp nwmktemp.o |
58 |
+ |
59 |
+ finduses: $(FINDUSESOBJS) |
60 |
+- $(CC) $(CFLAGS) -o finduses $(FINDUSESOBJS) |
61 |
+ |
62 |
+ markup: $(MARKUPOBJS) |
63 |
+- $(CC) $(CFLAGS) -o markup $(MARKUPOBJS) |
64 |
+ |
65 |
+ mnt: $(MNTOBJS) |
66 |
+- $(CC) $(CFLAGS) -o mnt $(MNTOBJS) |
67 |
+ |
68 |
+ source: $(SRCS) |
69 |
+ touch: $(SRCS) |
70 |
|
71 |
diff --git a/app-text/noweb/files/noweb-2.12-recmake.patch b/app-text/noweb/files/noweb-2.12-recmake.patch |
72 |
new file mode 100644 |
73 |
index 0000000..b39f9d1 |
74 |
--- /dev/null |
75 |
+++ b/app-text/noweb/files/noweb-2.12-recmake.patch |
76 |
@@ -0,0 +1,142 @@ |
77 |
+diff -ur a/contrib/norman/Makefile b/contrib/norman/Makefile |
78 |
+--- a/contrib/norman/Makefile 2018-06-28 23:26:32.000000000 +0200 |
79 |
++++ b/contrib/norman/Makefile 2020-02-25 05:26:26.256610626 +0100 |
80 |
+@@ -1,10 +1,10 @@ |
81 |
+ LIB=/dev/null # to be overridden |
82 |
+ DIRS=numarkup |
83 |
+ |
84 |
+-all: ; for i in $(DIRS); do (cd $$i; make ICONC=$(ICONC) ICONT=$(ICONT) all); done |
85 |
+-install: ; for i in $(DIRS); do (cd $$i; make LIB=$(LIB) BIN=$(BIN) install); done |
86 |
+-source: ; for i in $(DIRS); do (cd $$i; make source); done |
87 |
+-clean: ; for i in $(DIRS); do (cd $$i; make clean); done |
88 |
++all: ; for i in $(DIRS); do (cd $$i; $(MAKE) ICONC=$(ICONC) ICONT=$(ICONT) all); done |
89 |
++install: ; for i in $(DIRS); do (cd $$i; $(MAKE) LIB=$(LIB) BIN=$(BIN) install); done |
90 |
++source: ; for i in $(DIRS); do (cd $$i; $(MAKE) source); done |
91 |
++clean: ; for i in $(DIRS); do (cd $$i; $(MAKE) clean); done |
92 |
+ iconlib: # cheap hack for slackmake |
93 |
+ true |
94 |
+ |
95 |
+diff -ur a/contrib/norman/numarkup/Makefile b/contrib/norman/numarkup/Makefile |
96 |
+--- a/contrib/norman/numarkup/Makefile 2018-06-28 23:26:32.000000000 +0200 |
97 |
++++ b/contrib/norman/numarkup/Makefile 2020-02-25 05:32:02.290882144 +0100 |
98 |
+@@ -11,11 +11,11 @@ |
99 |
+ |
100 |
+ all: |
101 |
+ noweb -t numarkup.nw |
102 |
+- make $(TARGET) |
103 |
++ $(MAKE) $(TARGET) |
104 |
+ |
105 |
+ install: |
106 |
+ noweb -t numarkup.nw |
107 |
+- make $(TARGET) |
108 |
++ $(MAKE) $(TARGET) |
109 |
+ strip $(TARGET) |
110 |
+ cp $(TARGET) $(LIB) |
111 |
+ |
112 |
+diff -ur a/Makefile b/Makefile |
113 |
+--- a/Makefile 2018-06-28 23:26:32.000000000 +0200 |
114 |
++++ b/Makefile 2020-02-25 05:24:54.607975694 +0100 |
115 |
+@@ -12,14 +12,14 @@ |
116 |
+ all: |
117 |
+ @echo "You have no business running 'make' here; please look at the README file" |
118 |
+ @exit 1 |
119 |
+-source: ; for i in src; do (cd $$i; make source); done |
120 |
+-www: ; for i in src/xdoc examples; do (cd $$i; make www); done |
121 |
++source: ; for i in src; do (cd $$i; $(MAKE) source); done |
122 |
++www: ; for i in src/xdoc examples; do (cd $$i; $(MAKE) www); done |
123 |
+ |
124 |
+ clean: |
125 |
+- for i in src examples contrib; do (cd $$i; make clean); done |
126 |
++ for i in src examples contrib; do (cd $$i; $(MAKE) clean); done |
127 |
+ rm -f nwsrcfilter *~ */*~ |
128 |
+ clobber: clean |
129 |
+- for i in src examples contrib; do (cd $$i; make clobber); done |
130 |
++ for i in src examples contrib; do (cd $$i; $(MAKE) clobber); done |
131 |
+ |
132 |
+ DATE: |
133 |
+ (./echo -n "Version $(VERSION) of "; date) > DATE |
134 |
+@@ -51,7 +51,7 @@ |
135 |
+ |
136 |
+ ctan: clean source nwsrcfilter DATE emacscheck |
137 |
+ chmod +w src/Makefile |
138 |
+- (cd src; make boot) |
139 |
++ (cd src; $(MAKE) boot) |
140 |
+ rm -f ../noweb-$(VERSION)-ctan.zip |
141 |
+ find ./* ! -type d -not -name FAQ.old -not -name '.git*' -print | ./nwsrcfilter | sed 's@^@noweb/@' | ( ln -s . noweb; zip ../noweb-$(VERSION)-ctan.zip -@; rm -f noweb ) |
142 |
+ chmod -w src/Makefile |
143 |
+@@ -61,6 +61,6 @@ |
144 |
+ diff src/elisp/noweb-mode.el $(HOME)/emacs/noweb-mode.el |
145 |
+ |
146 |
+ checkin: |
147 |
+- (cd src; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin) |
148 |
++ (cd src; $(MAKE) "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin) |
149 |
+ |
150 |
+ |
151 |
+diff -ur a/src/Makefile b/src/Makefile |
152 |
+--- a/src/Makefile 2020-02-25 05:22:55.103146835 +0100 |
153 |
++++ b/src/Makefile 2020-02-25 05:29:26.557836177 +0100 |
154 |
+@@ -41,9 +41,9 @@ |
155 |
+ TEXNAME=$(TEXINPUTS) |
156 |
+ |
157 |
+ all: |
158 |
+- cd c; make "CC=$(CC)" "$(CFLAGS)" all |
159 |
+- for i in shell lib xdoc tex; do (cd $$i; make all); done |
160 |
+- cd $(LIBSRC); make "ICONT=$(ICONT)" "ICONC=$(ICONC)" all |
161 |
++ cd c; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)" all |
162 |
++ for i in shell lib xdoc tex; do (cd $$i; $(MAKE) all); done |
163 |
++ cd $(LIBSRC); $(MAKE) "ICONT=$(ICONT)" "ICONC=$(ICONC)" all |
164 |
+ |
165 |
+ FAQ: FAQ.html |
166 |
+ sleep 1; html2ascii FAQ.html > FAQ |
167 |
+@@ -101,13 +101,13 @@ |
168 |
+ mkdir -p $(BIN) $(LIB) |
169 |
+ true c/nt c/markup c/mnt c/finduses c/nwmktemp |
170 |
+ cp c/nt c/markup c/mnt c/finduses c/nwmktemp $(LIB) |
171 |
+- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install |
172 |
+- cd lib; make LIB=$(LIB) install |
173 |
++ cd $(LIBSRC); $(MAKE) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) install |
174 |
++ cd lib; $(MAKE) LIB=$(LIB) install |
175 |
+ |
176 |
+ uninstall-code: uninstall-shell |
177 |
+ rm -f $(LIB)/nt $(LIB)/markup $(LIB)/mnt $(LIB)/finduses |
178 |
+- cd $(LIBSRC); make ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall |
179 |
+- cd lib; make LIB=$(LIB) uninstall |
180 |
++ cd $(LIBSRC); $(MAKE) ICONT=$(ICONT) ICONC=$(ICONC) LIB=$(LIB) BIN=$(BIN) uninstall |
181 |
++ cd lib; $(MAKE) LIB=$(LIB) uninstall |
182 |
+ install-man: |
183 |
+ mkdir -p $(MAN) $(MANDIR) $(MAN7DIR) |
184 |
+ sed -e "s@|LIBDIR|@$(LIBNAME)@" -e "s@|TEXINPUTS|@$(TEXNAME)@" xdoc/cpif.1 > $(MANDIR)/cpif.$(MANEXT) |
185 |
+@@ -194,26 +194,26 @@ |
186 |
+ uninstall-elisp: |
187 |
+ rm -f $(ELISP)/noweb-mode.el || true |
188 |
+ checkin: |
189 |
+- for i in lib tex xdoc; do (cd $$i; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done |
190 |
++ for i in lib tex xdoc; do (cd $$i; $(MAKE) "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin); done |
191 |
+ for i in c icon awk; do (cd $$i; ci -l $(CINAME) $(CIMSG) *.nw Makefile); done |
192 |
+ (cd elisp; ci -l $(CINAME) $(CIMSG) *.el) |
193 |
+ ci -l $(CINAME) $(CIMSG) Makefile.nw INSTALL INSTALL.DOS README FAQ COPYRIGHT nwmake *.nw |
194 |
+ |
195 |
+ source: FAQ |
196 |
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make CPIF=">" source); done |
197 |
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) CPIF=">" source); done |
198 |
+ sleep 1 |
199 |
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done |
200 |
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) touch); done |
201 |
+ touch: |
202 |
+ touch FAQ |
203 |
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make touch); done |
204 |
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) touch); done |
205 |
+ boot: |
206 |
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make boot); done |
207 |
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) boot); done |
208 |
+ clean: |
209 |
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make clean); done |
210 |
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) clean); done |
211 |
+ rm -f nwsrcfilter *~ */*~ |
212 |
+ |
213 |
+ clobber: clean |
214 |
+- for i in c shell lib xdoc icon awk tex; do (cd $$i; make clobber); done |
215 |
++ for i in c shell lib xdoc icon awk tex; do (cd $$i; $(MAKE) clobber); done |
216 |
+ |
217 |
+ Makefile: Makefile.nw |
218 |
+ chmod +w Makefile |
219 |
|
220 |
diff --git a/app-text/noweb/metadata.xml b/app-text/noweb/metadata.xml |
221 |
new file mode 100644 |
222 |
index 0000000..e2e56fd |
223 |
--- /dev/null |
224 |
+++ b/app-text/noweb/metadata.xml |
225 |
@@ -0,0 +1,17 @@ |
226 |
+<?xml version="1.0" encoding="UTF-8"?> |
227 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
228 |
+<pkgmetadata> |
229 |
+ <maintainer type="person"> |
230 |
+ <email>lssndrbarbieri@×××××.com</email> |
231 |
+ <name>Alessandro Barbieri</name> |
232 |
+ </maintainer> |
233 |
+ <upstream> |
234 |
+ <maintainer> |
235 |
+ <email>nr@××××××××.edu</email> |
236 |
+ <name>Norman Ramsey</name> |
237 |
+ </maintainer> |
238 |
+ <remote-id type="github">nrnrnr/noweb</remote-id> |
239 |
+ </upstream> |
240 |
+ <longdescription lang="en">noweb is designed to meet the needs of literate programmers while remaining as simple as possible. Its primary advantages are simplicity, extensibility, and language-independence—especially noticeable when compared with other literate-programming tools. noweb uses 5 control sequences to WEB's 27. The noweb manual is only 4 pages; an additional page explains how to customize its LaTeX output. noweb works ``out of the box'' with any programming language, and supports TeX, latex, HTML, and troff back ends. A back end to support full hypertext or indexing takes about 250 lines; a simpler one can be written in 40 lines of awk. The primary sacrifice relative to WEB is that code is seldom prettyprinted. |
241 |
+ </longdescription> |
242 |
+</pkgmetadata> |
243 |
|
244 |
diff --git a/app-text/noweb/noweb-2.12.ebuild b/app-text/noweb/noweb-2.12.ebuild |
245 |
new file mode 100644 |
246 |
index 0000000..b361780 |
247 |
--- /dev/null |
248 |
+++ b/app-text/noweb/noweb-2.12.ebuild |
249 |
@@ -0,0 +1,116 @@ |
250 |
+# Copyright 1999-2020 Gentoo Authors |
251 |
+# Distributed under the terms of the GNU General Public License v2 |
252 |
+ |
253 |
+EAPI="7" |
254 |
+ |
255 |
+inherit eutils toolchain-funcs elisp-common |
256 |
+ |
257 |
+MYPV="$(ver_rs 1 _)" |
258 |
+ |
259 |
+DESCRIPTION="a literate programming tool, lighter than web" |
260 |
+HOMEPAGE="http://www.eecs.harvard.edu/~nr/noweb/" |
261 |
+SRC_URI="https://github.com/nrnrnr/${PN}/archive/v${MYPV}.tar.gz -> ${P}.tar.gz" |
262 |
+ |
263 |
+LICENSE=" |
264 |
+ || ( BSD-2 noweb ) |
265 |
+ emacs? ( GPL-2 ) |
266 |
+" |
267 |
+SLOT="0" |
268 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos ~x64-macos ~x86-macos" |
269 |
+IUSE="emacs examples" |
270 |
+ |
271 |
+DEPEND="virtual/tex-base |
272 |
+ dev-lang/icon |
273 |
+ sys-apps/debianutils |
274 |
+ emacs? ( app-editors/emacs:= )" |
275 |
+RDEPEND="${DEPEND}" |
276 |
+ |
277 |
+S="${WORKDIR}/${PN}-${MYPV}" |
278 |
+ |
279 |
+SITEFILE="50${PN}-gentoo.el" |
280 |
+ |
281 |
+src_prepare() { |
282 |
+ # glibc2.10 compat (bug 270757) |
283 |
+# mkdir d && cp -r c/* d/ |
284 |
+ sed "s/getline (/getline_nonlibc (/" -i src/c/getline.{c,h} || die |
285 |
+ sed "s/getline(/getline_nonlibc(/" -i src/c/{notangle.c,getline.c,finduses.c} || die |
286 |
+# diff -u d/ c/ |
287 |
+ |
288 |
+ # dont run texhash... |
289 |
+ sed -i -e "s/texhash/true/" src/Makefile |
290 |
+ # dont strip... |
291 |
+ sed -i -e "s/strip/true/" src/Makefile |
292 |
+ |
293 |
+ sed -i -e "s/CC=gcc -ansi -pedantic -O -Wall -Werror//" src/Makefile |
294 |
+ sed -i -e "s/CFLAGS=//" src/Makefile |
295 |
+ sed -i -e "s/CC=gcc -ansi -pedantic -O -Wall -Werror//" src/c/Makefile |
296 |
+ sed -i -e "s/CFLAGS=//" src/c/Makefile |
297 |
+ |
298 |
+ eapply "${FILESDIR}/${P}-recmake.patch" |
299 |
+ |
300 |
+ sed -i -e "s/CC = cc//" contrib/norman/numarkup/Makefile |
301 |
+ sed -i -e "s/CFLAGS = -O//" contrib/norman/numarkup/Makefile |
302 |
+ |
303 |
+ eapply "${FILESDIR}/${P}-ldflags.patch" |
304 |
+ eapply_user |
305 |
+} |
306 |
+ |
307 |
+src_compile() { |
308 |
+ # noweb tries to use notangle and noweb; see bug #50429 |
309 |
+ cd "${S}/src/c" |
310 |
+ ( emake ICONC="icont" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LIBSRC="icon" ) || die |
311 |
+ export PATH="${PATH}:${T}" |
312 |
+ cd "${S}/src" |
313 |
+ ( emake ICONC="icont" CC="$(tc-getCC)" BIN="${T}" LIB="${T}" LIBSRC="icon" install-code ) \ |
314 |
+ || die "make temporal install failed." |
315 |
+ |
316 |
+ ( emake ICONC="icont" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LIBSRC="icon" ) || die "make failed" |
317 |
+ # Set awk to awk not nawk |
318 |
+ ./awkname awk |
319 |
+ |
320 |
+ if use emacs; then |
321 |
+ elisp-compile elisp/noweb-mode.el || die "elisp-compile failed" |
322 |
+ fi |
323 |
+} |
324 |
+ |
325 |
+src_install () { |
326 |
+ cd "${S}/src" |
327 |
+ |
328 |
+ # It needs the directories to exist first... |
329 |
+ dodir /usr/bin |
330 |
+ dodir "/usr/libexec/${PN}" |
331 |
+ dodir /usr/share/man |
332 |
+ dodir /usr/share/texmf-site/tex/inputs |
333 |
+ emake ICONC="icont" \ |
334 |
+ BIN="${ED}/usr/bin" \ |
335 |
+ LIBSRC="icon" \ |
336 |
+ LIBNAME="${EPREFIX}/usr/libexec/${PN}" \ |
337 |
+ LIB="${ED}/usr/libexec/${PN}" \ |
338 |
+ MAN="${ED}/usr/share/man" \ |
339 |
+ TEXNAME="${EPREFIX}/usr/share/texmf-site/tex/inputs" \ |
340 |
+ TEXINPUTS="${ED}/usr/share/texmf-site/tex/inputs" \ |
341 |
+ install || die "make install failed" |
342 |
+ cd "${S}" |
343 |
+ if use examples; then |
344 |
+ insinto "/usr/share/doc/${PF}/examples" |
345 |
+ doins examples/* |
346 |
+ fi |
347 |
+ dodoc CHANGES README |
348 |
+ |
349 |
+ if use emacs; then |
350 |
+ elisp-install "${PN}" "${S}"/src/elisp/noweb-mode.{el,elc} \ |
351 |
+ || die "elisp-install failed" |
352 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ |
353 |
+ || die "elisp-site-file-install failed" |
354 |
+ fi |
355 |
+} |
356 |
+ |
357 |
+pkg_postinst() { |
358 |
+ use emacs && elisp-site-regen |
359 |
+ einfo "Running texhash to complete installation.." |
360 |
+ texhash |
361 |
+} |
362 |
+ |
363 |
+pkg_postrm() { |
364 |
+ use emacs && elisp-site-regen |
365 |
+} |