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 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
|
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: 2025-09-21
--- 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 fd, char *buf, int bytecount);
+int read_shorts(int fd, short *sbuf, int shortcount, int swap);
+int read_words(int fd, int *wbuf, int wordcount, int swap);
+int write_bytes(int fd, char *buf, int bytecount);
+
/*
* read_den
*
@@ -25,9 +33,9 @@
*/
unsigned char *
-read_den(filename, xptr, yptr, zptr)
-char *filename; /* name of file containing data */
-int *xptr, *yptr, *zptr;/* volume dimensions (output parameters) */
+read_den(char *filename, int *xptr, int *yptr, int *zptr)
+/* char *filename: name of file containing data */
+/* int *xptr, *yptr, *zptr: volume dimensions (output parameters) */
{
int fd; /* file descriptor */
unsigned char *data; /* data array */
@@ -120,10 +128,10 @@
*/
int
-write_den(filename, data, xlen, ylen, zlen)
-char *filename; /* name of file to create */
-unsigned char *data; /* volume data */
-int xlen, ylen, zlen; /* volume dimensions */
+write_den(char *filename, unsigned char *data, int xlen, int ylen, int zlen)
+/* char *filename: name of file to create */
+/* unsigned char *data: volume data */
+/* int xlen, ylen, zlen: volume dimensions */
{
int fd; /* file descriptor */
short map_version; /* Version of this .den file */
@@ -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(char *filename, unsigned char *data, int xlen, int ylen, int 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,10 +252,11 @@
* error or the full number of bytes could not be read.
*/
-read_bytes(fd, buf, bytecount)
-int fd; /* file descriptor to read from */
-char *buf; /* memory in which to store data */
-int bytecount; /* number of bytes to read */
+int
+read_bytes(int fd, char *buf, int bytecount)
+/* int fd: file descriptor to read from */
+/* char *buf: memory in which to store data */
+/* int bytecount: number of bytes to read */
{
int n;
@@ -238,11 +281,12 @@
* error or the full number of shorts could not be read.
*/
-read_shorts(fd, sbuf, shortcount, swap)
-int fd; /* file descriptor to read from */
-short *sbuf; /* memory in which to store data */
-int shortcount; /* number of shorts to read */
-int swap; /* if nonzero then swap bytes */
+int
+read_shorts(int fd, short *sbuf, int shortcount, int swap)
+/* int fd: file descriptor to read from */
+/* short *sbuf: memory in which to store data */
+/* int shortcount: number of shorts to read */
+/* int swap: if nonzero then swap bytes */
{
int n, c;
int bytecount = shortcount * 2;
@@ -286,11 +330,12 @@
* error or the full number of words could not be read.
*/
-read_words(fd, wbuf, wordcount, swap)
-int fd; /* file descriptor to read from */
-int *wbuf; /* memory in which to store data */
-int wordcount; /* number of words to read */
-int swap; /* if nonzero then swap bytes */
+int
+read_words(int fd, int *wbuf, int wordcount, int swap)
+/* int fd: file descriptor to read from */
+/* int *wbuf: memory in which to store data */
+/* int wordcount: number of words to read */
+/* int swap: if nonzero then swap bytes */
{
int n, c;
int bytecount = wordcount * 4;
@@ -334,10 +379,11 @@
* Return value is 1 if the write was succesful or 0 if there was an error.
*/
-write_bytes(fd, buf, bytecount)
-int fd; /* file descriptor to write to */
-char *buf; /* memory containing data */
-int bytecount; /* number of bytes to write */
+int
+write_bytes(int fd, char *buf, int bytecount)
+/* int fd: file descriptor to write to */
+/* char *buf: memory containing data */
+/* int bytecount: number of bytes to write */
{
int n;
--- /dev/null
+++ b/pkgextra/volpack/data/den2raw.c
@@ -0,0 +1,46 @@
+/*
+ * 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>
+
+unsigned char * read_den(char *filename, int *xptr, int *yptr, int *zptr);
+int write_raw(char *filename, unsigned char *data, int xlen, int ylen, int zlen);
+
+int main(int argc, char *argv[]) {
+ unsigned char *data;
+ 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 $< > $@
|