Package: tachyon / 0.99~b6+dsx-10

debianization-documentation.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
Description: debianization -- documentation
 Address Debian Policy requirements for documentation;
 and silence the composition machinery.
 This is a Debian centric patch.
Origin: vendor, Debian
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2014-11-06

--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,32 +4,39 @@
 
 TOPSRCDIR?=..
 PKGDOCDIR?=/usr/share/doc/tachyon
+PKGEXAMPLESDIR?=$(PKGDOCDIR)/examples
 
-LATEX=latex
-DVIPS=dvips
 LATEX2HTML=latex2html
-PDFLATEX=pdflatex
-MAKEINDEX=makeindex
+PDFLATEX=pdflatex -no-shell-escape -interaction=batchmode
+MAKEINDEX=makeindex -q
 
 default:
 	@echo "Select documentation to build:"
 	@echo "------------------------------"
 	@echo " all - All supported file formats"
 	@echo "html - HTML"
-	@echo "  ps - Adobe PostScript"
 	@echo " pdf - Adobe PDF "
 
-all: html ps pdf
-
-ps: tachyon.ps
+all: html pdf
 
 pdf: tachyon.pdf
 
 html: tachyon/tachyon.html
 
-tachyon/tachyon.html :
+listof_demo_SOURCES = \
+		glwin.h glwin.c \
+	mainanim.c \
+	animspheres.c \
+	animspheres2.c \
+	hypertex.c \
+	fire.c \
+	animskull.c \
+	tgatoyuv.c
+
+tachyon/tachyon.html : tachyon.pdf
 	rm -rf tachyon
 	$(LATEX2HTML) \
+		-verbosity 2 \
 		-local_icons \
 		-split 5 \
 		-toc_depth 4 \
@@ -38,19 +45,8 @@
 		-address "john.stone@gmail.com" \
 		-up_url "http://www.photonlimited.com/" \
 		-up_title "photonlimited.com, home of Tachyon" \
-		tachyon
-
-tachyon.ps : tachyon.dvi
-	$(DVIPS) tachyon.dvi -o tachyon.ps
-
-tachyon.dvi :
-	$(LATEX) tachyon
-	$(MAKEINDEX) tachyon
-	$(LATEX) tachyon
-	$(MAKEINDEX) tachyon
-	$(LATEX) tachyon
-	$(MAKEINDEX) tachyon
-	$(LATEX) tachyon
+		-info 0 \
+		tachyon 1> tachyon.html.log 2>&1
 
 tachyon.pdf :
 	$(PDFLATEX) tachyon
@@ -62,11 +58,10 @@
 	$(PDFLATEX) tachyon
 
 clean :
-	-rm -f *.aux *.dvi *.idx *.lof *.log *.lot *.pdf *.ps *.toc *.ilg *.ind
+	-rm -f *.aux *.idx *.lof *.log *.lot *.pdf *.toc *.ilg *.ind
+	-rm tachyon.html.log
 
 distclean: clean
-	-rm tachyon.dvi
-	-rm tachyon.ps
 	-rm tachyon.pdf
 	-rm -rf tachyon
 
@@ -75,5 +70,17 @@
 install: all
 	mkdir -p $(DESTDIR)$(PKGDOCDIR)
 	mkdir -p $(DESTDIR)$(PKGDOCDIR)/html
-	cp -t $(DESTDIR)$(PKGDOCDIR) tachyon.dvi tachyon.ps tachyon.pdf
-	cp -t $(DESTDIR)$(PKGDOCDIR)/html tachyon/tachyon.css tachyon/*.html tachyon/*.png
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)/scenes
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)/demosrc
+	cp -p $(TOPSRCDIR)/unix/README $(DESTDIR)$(PKGDOCDIR)/README.unix
+	cp -p -t $(DESTDIR)$(PKGDOCDIR) tachyon.pdf
+	cp -p -t $(DESTDIR)$(PKGDOCDIR)/html tachyon/tachyon.css tachyon/*.html tachyon/*.png
+	cp -pr -t $(DESTDIR)$(PKGEXAMPLESDIR)/scenes $(TOPSRCDIR)/scenes/*
+	cp -p -t $(DESTDIR)$(PKGEXAMPLESDIR)/demosrc $(addprefix $(TOPSRCDIR)/demosrc/, $(listof_demo_SOURCES))
+	cp -p -t $(DESTDIR)$(PKGEXAMPLESDIR)/scenes $(TOPSRCDIR)/debian/adhoc/scenes/action.sh
+	cp -p -t $(DESTDIR)$(PKGEXAMPLESDIR)/demosrc $(TOPSRCDIR)/debian/adhoc/demosrc/Makefile
+	rdfind -outputname /dev/null -removeidentinode false -makesymlinks true $(DESTDIR)$(PKGDOCDIR)/html
+	symlinks -r -c -s -v $(DESTDIR)$(PKGDOCDIR)/html
+	rdfind -outputname /dev/null -removeidentinode false -makesymlinks true $(DESTDIR)$(PKGEXAMPLESDIR)/scenes
+	symlinks -r -c -s -v $(DESTDIR)$(PKGEXAMPLESDIR)/scenes
--- /dev/null
+++ b/pkgextra/volpack/data/Makefile
@@ -0,0 +1,35 @@
+TOPSRCDIR?=../../..
+PKGDOCDIR?=/usr/share/doc/tachyon
+PKGEXAMPLESDIR?=$(PKGDOCDIR)/examples
+
+CFLAGS += -Wall -Wno-unused-result
+
+listof_DATA = \
+	engine/engine.den \
+	brain/brain.den
+
+default:
+
+den2raw: den2raw.c denfile.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^
+
+clean:
+
+distclean: clean
+	rm -f den2raw
+	rm -f $(listof_DATA)
+
+check:
+
+install: den2raw $(listof_DATA)
+	mkdir -p $(DESTDIR)$(PKGDOCDIR)
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)/scenes
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)/scenes/vol
+	for d in $(listof_DATA); do \
+		r=$${d##*/} ; r=$${r%.den}.XXX ; \
+		./den2raw $$d $(DESTDIR)$(PKGEXAMPLESDIR)/scenes/vol/$$r ; \
+	done
+
+% : %.Z
+	gzip --decompress --to-stdout $< > $@
--- a/pkgextra/volpack/data/denfile.c
+++ b/pkgextra/volpack/data/denfile.c
@@ -5,6 +5,9 @@
  * See the file dencopy.c for sample usage.
  */
 
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
 #include <stdio.h>
 
 #ifndef MIN
@@ -17,6 +20,11 @@
 
 #define MAX_READ_SIZE	8192	/* maximum # of bytes per read(2) call */
 
+int read_bytes();
+int read_shorts();
+int read_words();
+int write_bytes();
+
 /*
  * read_den
  *
@@ -200,6 +208,40 @@
 }
 
 /*
+ * write_raw
+ *
+ * Write an array of volume data to a .raw file.  Return 1 on success,
+ * 0 on failure.
+ */
+
+int
+write_raw(filename, data, xlen, ylen, zlen)
+char *filename;		/* name of file to create */
+unsigned char *data;	/* volume data */
+int xlen, ylen, zlen;	/* volume dimensions */
+{
+    int fd;			/* file descriptor */
+    int map_length;		/* Total number of densities in map          */
+				/*   (= product of lens)                     */
+
+    /* open file */
+    if ((fd = creat(filename, 0644)) < 0) {
+	fprintf(stderr, "cannot open file %s\n", filename);
+	return(0);
+    }
+
+    /* write the header */
+    map_length = xlen * ylen * zlen;
+    if (!write_bytes(fd, (char *)data, map_length)) {
+	close(fd);
+	fprintf(stderr, "cannot write to file %s\n", filename);
+	return(0);
+    }
+    close(fd);
+    return(1);
+}
+
+/*
  * read_bytes
  *
  * Read data from a file.  The data is assumed to be a sequence of bytes,
@@ -210,6 +252,7 @@
  * error or the full number of bytes could not be read.
  */
 
+int
 read_bytes(fd, buf, bytecount)
 int fd;		/* file descriptor to read from */
 char *buf;	/* memory in which to store data */
@@ -238,6 +281,7 @@
  * error or the full number of shorts could not be read.
  */
 
+int
 read_shorts(fd, sbuf, shortcount, swap)
 int fd;		/* file descriptor to read from */
 short *sbuf;	/* memory in which to store data */
@@ -286,6 +330,7 @@
  * error or the full number of words could not be read.
  */
 
+int
 read_words(fd, wbuf, wordcount, swap)
 int fd;		/* file descriptor to read from */
 int *wbuf;	/* memory in which to store data */
@@ -334,6 +379,7 @@
  * Return value is 1 if the write was succesful or 0 if there was an error.
  */
 
+int
 write_bytes(fd, buf, bytecount)
 int fd;		/* file descriptor to write to */
 char *buf;	/* memory containing data */
--- /dev/null
+++ b/pkgextra/volpack/data/den2raw.c
@@ -0,0 +1,43 @@
+/*
+ * den2raw.c
+ *
+ * Convert a density file to a raw file. The destination file is in the native byte ordering,
+ * even if the source file is not.
+ *
+ * Usage: den2raw src.den dst.raw
+ * Compilation: cc -o den2raw den2raw.c denfile.c
+ */
+
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+int main(int argc, char *argv[]) {
+	unsigned char *data, *read_den(), write_raw();
+	int xlen, ylen, zlen;
+	char *rawfilename;
+	size_t rawfilenamelen;
+
+	if (argc != 3) {
+		fprintf(stderr, "Usage: dencopy src.den dst.raw\n");
+		exit(1);
+    }
+	if ((data = read_den(argv[1], &xlen, &ylen, &zlen)) == NULL) {
+		fprintf(stderr, "den2raw: read failed\n");
+		exit(1);
+		}
+	rawfilenamelen=strlen(argv[2]);
+	if ((3 < rawfilenamelen) && !(strcasecmp(argv[2]+rawfilenamelen-4, ".XXX"))) {
+		asprintf(&rawfilename,"%sXXXXXXXXXXXXXXXXXXXXxXXXXXXXXXXXXXXXXXXXXxXXXXXXXXXXXXXXXXXXXX", argv[2]);
+		sprintf(rawfilename+rawfilenamelen-3, "%dx%dx%d", xlen, ylen, zlen);
+		}
+	else {
+		asprintf(&rawfilename,"%s", argv[2]);
+		}
+	if (!write_raw(rawfilename, data, xlen, ylen, zlen)) {
+		fprintf(stderr, "den2raw: write failed\n");
+		exit(1);
+		}
+	free(rawfilename);
+	return(0); }
--- /dev/null
+++ b/pkgextra/virtual-reality/graphics/Makefile
@@ -0,0 +1,28 @@
+TOPSRCDIR?=../../..
+PKGDOCDIR?=/usr/share/doc/tachyon
+PKGEXAMPLESDIR?=$(PKGDOCDIR)/examples
+
+listof_DATA_Z = \
+	$(wildcard objects/tpoly/*.tpoly.Z)
+
+listof_DATA = \
+	$(patsubst %.Z,%, $(listof_DATA_Z))
+
+default:
+
+clean:
+
+distclean: clean
+	rm -f $(listof_DATA)
+
+check:
+
+install: $(listof_DATA)
+	mkdir -p $(DESTDIR)$(PKGDOCDIR)
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)/scenes
+	mkdir -p $(DESTDIR)$(PKGEXAMPLESDIR)/scenes/tpoly
+	cp -p -t $(DESTDIR)$(PKGEXAMPLESDIR)/scenes/tpoly $(listof_DATA)
+
+% : %.Z
+	gzip --decompress --to-stdout $< > $@