diff --git a/Apps/Graphics/src/TinyGL/.gitignore b/Apps/Graphics/src/TinyGL/.gitignore new file mode 100644 index 0000000..221b0bc --- /dev/null +++ b/Apps/Graphics/src/TinyGL/.gitignore @@ -0,0 +1,3 @@ +/TinyGL-0.4 +/Makefile +/config.sh diff --git a/Apps/Graphics/src/TinyGL/patch-TinyGL_0.4.diff b/Apps/Graphics/src/TinyGL/patch-TinyGL_0.4.diff new file mode 100644 index 0000000..e5f9121 --- /dev/null +++ b/Apps/Graphics/src/TinyGL/patch-TinyGL_0.4.diff @@ -0,0 +1,74 @@ +diff -Naur TinyGL/Makefile TinyGL-0.4/Makefile +--- TinyGL/Makefile 2001-01-07 22:32:56.000000000 +0100 ++++ TinyGL-0.4/Makefile 2019-12-18 06:51:22.103638470 +0100 +@@ -1,14 +1,14 @@ + include config.mk + + all: +- ( for f in $(DIRS); do ( cd $$f ; make all ) || exit 1 ; done ) ++ ( for f in $(DIRS); do ( cd $$f ; $(MAKE) all ) || exit 1 ; done ) + + clean: + rm -f *~ lib/libTinyGL.a include/GL/*~ TAGS +- ( for f in $(DIRS); do ( cd $$f ; make clean ; ) done ) ++ ( for f in $(DIRS); do ( cd $$f ; $(MAKE) clean ; ) done ) + + install: +- ( for f in $(DIRS); do ( cd $$f ; make install ; ) done ) ++ ( for f in $(DIRS); do ( cd $$f ; $(MAKE) install ; ) done ) + + + tar: +diff -Naur TinyGL/config.mk TinyGL-0.4/config.mk +--- TinyGL/config.mk 2002-03-17 13:11:39.000000000 +0100 ++++ TinyGL-0.4/config.mk 2019-12-18 06:54:34.830371335 +0100 +@@ -31,7 +31,8 @@ + + ifdef TINYGL_USE_GLX + # Linux +-UI_LIBS= -L/usr/X11R6/lib -lX11 -lXext ++#UI_LIBS= -L/usr/X11R6/lib -lX11 -lXext ++UI_LIBS= -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -lX11 -lXext + UI_INCLUDES= + # Solaris + #UI_LIBS= -L/usr/X11/lib -lX11 -lXext -lsocket -lnsl +diff -Naur TinyGL/examples/spin.c TinyGL-0.4/examples/spin.c +--- TinyGL/examples/spin.c 2000-10-17 01:29:23.000000000 +0200 ++++ TinyGL-0.4/examples/spin.c 2019-12-20 20:31:00.783787213 +0100 +@@ -9,6 +9,7 @@ + + + #include ++#include + #include + + #include +diff -Naur TinyGL/src/vertex.c TinyGL-0.4/src/vertex.c +--- TinyGL/src/vertex.c 2001-01-07 19:21:40.000000000 +0100 ++++ TinyGL-0.4/src/vertex.c 2019-12-20 20:25:18.367867520 +0100 +@@ -1,3 +1,4 @@ ++#include + #include "zgl.h" + + void glopNormal(GLContext * c, GLParam * p) +diff -Naur TinyGL/src/zbuffer.c TinyGL-0.4/src/zbuffer.c +--- TinyGL/src/zbuffer.c 2001-01-07 22:19:55.000000000 +0100 ++++ TinyGL-0.4/src/zbuffer.c 2019-12-20 20:29:19.945237066 +0100 +@@ -265,7 +265,7 @@ + p += 3; + } while (--n > 0); + +- (char *) p1 += linesize; ++ p1 += linesize; + } + } + +diff -Naur TinyGL/src/zmath.h TinyGL-0.4/src/zmath.h +--- TinyGL/src/zmath.h 2000-10-15 14:46:40.000000000 +0200 ++++ TinyGL-0.4/src/zmath.h 2019-12-20 20:24:39.789294274 +0100 +@@ -50,4 +50,4 @@ + + int gl_Matrix_Inv(float *r,float *m,int n); + +-#endif __ZMATH__ ++#endif /* __ZMATH__ */ diff --git a/Apps/Graphics/src/TinyGL/project.conf b/Apps/Graphics/src/TinyGL/project.conf new file mode 100644 index 0000000..2f4341e --- /dev/null +++ b/Apps/Graphics/src/TinyGL/project.conf @@ -0,0 +1,36 @@ +package=TinyGL +version=0.4 +targets=build,configure,download,extract,patch +dist=Makefile,config.sh,patch-$(PACKAGE)_$(VERSION).diff +config=sh + +[build] +type=script +script=../../../../System/src/script.sh +phony=1 +depends=configure +install= + +[configure] +type=script +script=../../../../System/src/script.sh +phony=1 +depends=patch + +[download] +type=script +script=../../../../System/src/script.sh +flags=-O URL=https://bellard.org/$(PACKAGE)/$(PACKAGE)-$(VERSION).tar.gz +phony=1 + +[extract] +type=script +script=../../../../System/src/script.sh +phony=1 +depends=download + +[patch] +type=script +script=../../../../System/src/script.sh +phony=1 +depends=extract,patch-$(PACKAGE)_$(VERSION).diff diff --git a/Apps/Graphics/src/project.conf b/Apps/Graphics/src/project.conf index d971236..f7fff32 100644 --- a/Apps/Graphics/src/project.conf +++ b/Apps/Graphics/src/project.conf @@ -1,4 +1,4 @@ -subdirs=GServer,GToolkit +subdirs=TinyGL,GServer,GToolkit targets=build,configure,download,extract,patch dist=Makefile diff --git a/build.sh b/build.sh index 9cdd2a3..ff85091 100755 --- a/build.sh +++ b/build.sh @@ -86,7 +86,8 @@ SUBDIRS="System/src/libc Apps/Unix/src/others Apps/Servers/src/inetd Apps/Network/src/VPN - Apps/Devel/src/configure" + Apps/Devel/src/configure + Apps/Graphics/src/TinyGL" #functions