diff options
author | krion <krion@FreeBSD.org> | 2004-01-23 10:02:47 +0000 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-01-23 10:02:47 +0000 |
commit | 89943ff2fb87ef6f09b41940493b487ce58a50fa (patch) | |
tree | 59903cfccf72443190b50637e7bcb29c1ed538fc /graphics/allegrogl/files | |
parent | 8cde33cfc96ae0ada09ae25b8dea9b71d2ed33bc (diff) | |
download | FreeBSD-ports-89943ff2fb87ef6f09b41940493b487ce58a50fa.zip FreeBSD-ports-89943ff2fb87ef6f09b41940493b487ce58a50fa.tar.gz |
Add allegrogl 0.2.0,
The library mostly provides functions to allow you to use
OpenGL alongside Allegro -- you use OpenGL for your rendering
to the screen, and Allegro for miscellaneous tasks like
gathering input, doing timers, getting cross-platform
portability, loading data, playing samples and drawing your
textures. So this library fills the same hole that things like
GLUT do.
PR: ports/61763
Submitted by: Igor Pokrovsky <tiamat@comset.net>
Diffstat (limited to 'graphics/allegrogl/files')
-rw-r--r-- | graphics/allegrogl/files/makefile.ex | 57 | ||||
-rw-r--r-- | graphics/allegrogl/files/patch-configure.in | 57 | ||||
-rw-r--r-- | graphics/allegrogl/files/patch-include-alleggl.h | 14 | ||||
-rw-r--r-- | graphics/allegrogl/files/patch-include-allegrogl-gl_ext.h | 29 | ||||
-rw-r--r-- | graphics/allegrogl/files/patch-make-makefile.unx | 27 | ||||
-rw-r--r-- | graphics/allegrogl/files/patch-src-glext.c | 60 |
6 files changed, 244 insertions, 0 deletions
diff --git a/graphics/allegrogl/files/makefile.ex b/graphics/allegrogl/files/makefile.ex new file mode 100644 index 0000000..d57b505 --- /dev/null +++ b/graphics/allegrogl/files/makefile.ex @@ -0,0 +1,57 @@ +CC= %%CC%% +RM= %%RM%% +CFLAGS= %%CFLAGS%% -I. -I%%X11BASE%%/include -I%%PREFIX%%/include/ +LDFLAGS= -L%%X11BASE%%/lib -L%%PREFIX%%/lib -lagl -lGL -lGLU + +ALLEGRO_CFLAGS!=%%ALLEGRO_CONFIG%% --cflags +ALLEGRO_LFLAGS!=%%ALLEGRO_CONFIG%% --libs +CFLAGS+= ${ALLEGRO_CFLAGS} +LDFLAGS+= ${ALLEGRO_LFLAGS} + +TARGETS= dialog dumbtest exalleg exalpfnt excamera exext exgui exmasked \ + extext extextur test tex + +all: ${TARGETS} + +dialog: dialog.o + ${CC} $> -o $@ ${LDFLAGS} + +dumbtest: dumbtest.o + ${CC} $> -o $@ ${LDFLAGS} + +exalleg: exalleg.o + ${CC} $> -o $@ ${LDFLAGS} + +exalpfnt: exalpfnt.o + ${CC} $> -o $@ ${LDFLAGS} + +excamera: excamera.o + ${CC} $> -o $@ ${LDFLAGS} + +exext: exext.o + ${CC} $> -o $@ ${LDFLAGS} + +exgui: exgui.o + ${CC} $> -o $@ ${LDFLAGS} + +exmasked: exmasked.o + ${CC} $> -o $@ ${LDFLAGS} + +extext: extext.o + ${CC} $> -o $@ ${LDFLAGS} + +extextur: extextur.o + ${CC} $> -o $@ ${LDFLAGS} + +test: test.o + ${CC} $> -o $@ ${LDFLAGS} + +tex: tex.o + ${CC} $> -o $@ ${LDFLAGS} + + +.c.o: + ${CC} -c ${CFLAGS} $*.c + +clean: + ${RM} -f *.o ${TARGETS} diff --git a/graphics/allegrogl/files/patch-configure.in b/graphics/allegrogl/files/patch-configure.in new file mode 100644 index 0000000..ff11972 --- /dev/null +++ b/graphics/allegrogl/files/patch-configure.in @@ -0,0 +1,57 @@ +--- configure.in.orig Sat Sep 6 21:26:48 2003 ++++ configure.in Thu Jan 22 14:58:15 2004 +@@ -50,7 +50,7 @@ + + dnl Check for pthread support, which GL libs may require (e.g. FreeBSD) + AC_CHECK_HEADER(pthread.h, , dontcare=y) +-AC_CHECK_LIB(pthread, pthread_create, LIBS="-lpthread $LIBS") ++AC_CHECK_LIB(pthread, pthread_create, LIBS="%%PTHREAD_LIBS%% $LIBS") + + + dnl Build Mesa generic driver +@@ -96,14 +96,15 @@ + fi + + ++dnl We don't need this check in FreeBSD + dnl Check if the dynamic loading library (libdl.so) is available +- AH_TEMPLATE([ALLEGROGL_HAVE_DYNAMIC_LINK], [Define if dynamic linking is supported.]) +- AC_CHECK_HEADER(dlfcn.h, +- AC_CHECK_LIB(dl, dlsym, +- LIBS="-ldl $LIBS" ++dnl AH_TEMPLATE([ALLEGROGL_HAVE_DYNAMIC_LINK], [Define if dynamic linking is supported.]) ++dnl AC_CHECK_HEADER(dlfcn.h, ++dnl AC_CHECK_LIB(dl, dlsym, ++dnl LIBS="-ldl $LIBS" + AC_DEFINE(ALLEGROGL_HAVE_DYNAMIC_LINK) +- ) +- ) ++dnl ) ++dnl ) + fi + + +@@ -155,14 +156,14 @@ + dnl the Mesa generic driver and the (hopefully) accelerated one + if test -f makefile; then + echo '# Remove older build' +- make veryclean ++ %%GMAKE%% veryclean + agl_make_depend="yes"; + fi + + + dnl If dependencies are not built yet then do it ! + if (test ! -f make/makefile.dep); then +- echo '# Execute "make depend".' > make/makefile.dep ++ echo '# Execute "%%GMAKE%% depend".' > make/makefile.dep + agl_make_depend="yes"; + fi + +@@ -173,5 +174,5 @@ + + dnl Run "make depend" if necessary + if test -n "$agl_make_depend"; then +- make depend ++ %%GMAKE%% depend + fi diff --git a/graphics/allegrogl/files/patch-include-alleggl.h b/graphics/allegrogl/files/patch-include-alleggl.h new file mode 100644 index 0000000..92bcca8 --- /dev/null +++ b/graphics/allegrogl/files/patch-include-alleggl.h @@ -0,0 +1,14 @@ +--- include/alleggl.h.orig Thu Jan 22 14:12:08 2004 ++++ include/alleggl.h Thu Jan 22 14:12:21 2004 +@@ -48,9 +48,11 @@ + #include "allegrogl/gl_ext.h" + + #ifdef ALLEGRO_WITH_XWINDOWS ++/* + #ifndef HAVE_LIBPTHREAD + # error AllegroGL requires Allegro to have pthread support enabled! + #endif ++*/ + #include <alleggl_config.h> + #endif + diff --git a/graphics/allegrogl/files/patch-include-allegrogl-gl_ext.h b/graphics/allegrogl/files/patch-include-allegrogl-gl_ext.h new file mode 100644 index 0000000..eeb6916 --- /dev/null +++ b/graphics/allegrogl/files/patch-include-allegrogl-gl_ext.h @@ -0,0 +1,29 @@ +--- include/allegrogl/gl_ext.h.orig Sun Dec 14 01:19:34 2003 ++++ include/allegrogl/gl_ext.h Thu Jan 22 14:46:25 2004 +@@ -12,7 +12,7 @@ + #include "allegrogl/GLext/gl_ext_defs.h" + #ifdef ALLEGRO_WINDOWS + #include "allegrogl/GLext/wgl_ext_defs.h" +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + #include "allegrogl/GLext/glx_ext_defs.h" + #endif + +@@ -27,7 +27,7 @@ + # include "allegrogl/GLext/gl_ext_api.h" + #ifdef ALLEGRO_WINDOWS + # include "allegrogl/GLext/wgl_ext_api.h" +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + # include "allegrogl/GLext/glx_ext_api.h" + #endif + #undef AGL_API +@@ -46,7 +46,7 @@ + #define AGL_API(type, name, args) extern AGL_##name##_t wgl##name; + # include "allegrogl/GLext/wgl_ext_api.h" + #undef AGL_API +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + #define AGL_API(type, name, args) extern AGL_##name##_t glX##name; + # include "allegrogl/GLext/glx_ext_api.h" + #undef AGL_API diff --git a/graphics/allegrogl/files/patch-make-makefile.unx b/graphics/allegrogl/files/patch-make-makefile.unx new file mode 100644 index 0000000..d3ba6bb --- /dev/null +++ b/graphics/allegrogl/files/patch-make-makefile.unx @@ -0,0 +1,27 @@ +--- make/makefile.unx.orig Thu Jan 22 14:15:30 2004 ++++ make/makefile.unx Thu Jan 22 14:17:05 2004 +@@ -46,20 +46,20 @@ + # --- Compiler optimizations ---# + + ifdef DEBUGMODE +- CFLAGS = -g -W -Wall -Wno-unused ++ CFLAGS += -g -W -Wall -Wno-unused + CFLAGS += -DDEBUGMODE=$(DEBUGMODE) + ifdef LOGLEVEL + CFLAGS += -DLOGLEVEL=$(LOGLEVEL) + endif + else +- CFLAGS = -O2 -Wall -ffast-math -fomit-frame-pointer ++ CFLAGS += -O2 -Wall -ffast-math -fomit-frame-pointer + SHARED = @SHARED@ + endif + + ifdef DEBUGALLEG +- LDLIBS = -l$(LIB_NAME) `allegro-config --libs debug` $(LIBS) ++ LDLIBS = -l$(LIB_NAME) `%%ALLEGRO_CONFIG%% --libs debug` $(LIBS) + else +- LDLIBS = -l$(LIB_NAME) `allegro-config --libs` $(LIBS) ++ LDLIBS = -l$(LIB_NAME) `%%ALLEGRO_CONFIG%% --libs` $(LIBS) + endif + + ifdef MESABUILD diff --git a/graphics/allegrogl/files/patch-src-glext.c b/graphics/allegrogl/files/patch-src-glext.c new file mode 100644 index 0000000..0010d59 --- /dev/null +++ b/graphics/allegrogl/files/patch-src-glext.c @@ -0,0 +1,60 @@ +--- src/glext.c.orig Thu Jan 8 01:04:04 2004 ++++ src/glext.c Thu Jan 22 16:32:43 2004 +@@ -20,7 +20,7 @@ + # include "allegrogl/GLext/gl_ext_api.h" + #ifdef ALLEGRO_WINDOWS + # include "allegrogl/GLext/wgl_ext_api.h" +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + # include "allegrogl/GLext/glx_ext_api.h" + #endif + } AGL_EXT; +@@ -105,7 +105,7 @@ + #define AGL_API(type, name, args) AGL_##name##_t wgl##name = NULL; + # include "allegrogl/GLext/wgl_ext_api.h" + #undef AGL_API +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + #define AGL_API(type, name, args) AGL_##name##_t glX##name = NULL; + # include "allegrogl/GLext/glx_ext_api.h" + #undef AGL_API +@@ -153,7 +153,7 @@ + if (ext->name) { AGL_LOG(2,"wgl" #name " successfully loaded\n"); } + # include "allegrogl/GLext/wgl_ext_api.h" + # undef AGL_API +-# elif defined ALLEGRO_LINUX ++# elif defined ALLEGRO_LINUX || defined __FreeBSD__ + # define AGL_API(type, name, args) \ + ext->name = (AGL_##name##_t)aglXGetProcAddress("gl" #name); \ + if (ext->name) { AGL_LOG(2,"gl" #name " successfully loaded\n"); } +@@ -197,7 +197,7 @@ + #define AGL_API(type, name, args) wgl##name = ext->name; + # include "allegrogl/GLext/wgl_ext_api.h" + #undef AGL_API +-#elif defined ALLEGRO_LINUX ++#elif defined ALLEGRO_LINUX || defined __FreeBSD__ + #define AGL_API(type, name, args) glX##name = ext->name; + # include "allegrogl/GLext/glx_ext_api.h" + #undef AGL_API +@@ -344,7 +344,7 @@ + * we try to find the symbol into the dynamic libs + * that are already loaded (e.g. in libGL.so) + */ +- symbol = dlsym(0, name); ++ symbol = dlsym(RTLD_NEXT, name); + } + #elif defined ALLEGRO_MACOSX + function = CFStringCreateWithCString(kCFAllocatorDefault, name, +@@ -439,10 +439,10 @@ + + /* Get glXGetProcAddress entry */ + #ifdef ALLEGROGL_HAVE_DYNAMIC_LINK +- aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(0, ++ aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, + "glXGetProcAddressARB"); + if (!aglXGetProcAddress) { +- aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(0, ++ aglXGetProcAddress = (GLXGETPROCADDRESSARBPROC) dlsym(RTLD_NEXT, + "glXGetProcAddress"); + } + TRACE("glXGetProcAddress Extension: %s\n", |