summaryrefslogtreecommitdiff
path: root/graphics/allegrogl
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-01-23 10:02:47 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-01-23 10:02:47 +0000
commitbdf202c987d1bd7d6555d86dddec8e636842ae62 (patch)
treec8f0729499c34e293af7c1892f5c8328d958e261 /graphics/allegrogl
parentAdd glbsp 2.05, (diff)
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>
Notes
Notes: svn path=/head/; revision=98873
Diffstat (limited to 'graphics/allegrogl')
-rw-r--r--graphics/allegrogl/Makefile67
-rw-r--r--graphics/allegrogl/distinfo1
-rw-r--r--graphics/allegrogl/files/makefile.ex57
-rw-r--r--graphics/allegrogl/files/patch-configure.in57
-rw-r--r--graphics/allegrogl/files/patch-include-alleggl.h14
-rw-r--r--graphics/allegrogl/files/patch-include-allegrogl-gl_ext.h29
-rw-r--r--graphics/allegrogl/files/patch-make-makefile.unx27
-rw-r--r--graphics/allegrogl/files/patch-src-glext.c60
-rw-r--r--graphics/allegrogl/pkg-descr10
-rw-r--r--graphics/allegrogl/pkg-plist43
10 files changed, 365 insertions, 0 deletions
diff --git a/graphics/allegrogl/Makefile b/graphics/allegrogl/Makefile
new file mode 100644
index 000000000000..9bc7dd94b8fa
--- /dev/null
+++ b/graphics/allegrogl/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: allegrogl
+# Date created: 22 Jan 2004
+# Whom: Igor Pokrovsky <tiamat@comset.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= allegrogl
+PORTVERSION= 0.2.0
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTNAME= alleggl-${PORTVERSION}
+
+MAINTAINER= tiamat@comset.net
+COMMENT= OpenGL inteface for Allegro library
+
+LIB_DEPENDS= alleg.41:${PORTSDIR}/devel/allegro
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_REINPLACE= yes
+USE_GL= yes
+USE_X_PREFIX= yes
+USE_AUTOCONF_VER=253
+GNU_CONFIGURE= yes
+MAKEFILE= makefile
+ALL_TARGET= lib
+
+WRKSRC= ${WRKDIR}/alleggl
+
+ALLEGRO_CONFIG?=${LOCALBASE}/bin/allegro-config
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%GMAKE%%|${GMAKE}|g; \
+ s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \
+ ${WRKSRC}/configure.in
+ @${REINPLACE_CMD} -e 's|%%ALLEGRO_CONFIG%%|${ALLEGRO_CONFIG}|g' \
+ ${WRKSRC}/make/makefile.unx
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/lib/unix/libagl.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/include/alleggl.h ${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/include/alleggl_config.h ${PREFIX}/include
+ @${MKDIR} ${PREFIX}/include/allegrogl
+ ${INSTALL_DATA} ${WRKSRC}/include/allegrogl/*.h \
+ ${PREFIX}/include/allegrogl
+ @${MKDIR} ${PREFIX}/include/allegrogl/GLext
+ ${INSTALL_DATA} ${WRKSRC}/include/allegrogl/GLext/*.h \
+ ${PREFIX}/include/allegrogl/GLext
+
+ @${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/examp/* ${EXAMPLESDIR}
+ @${PERL} -pi -e 's|%%CC%%|${CC}|g; \
+ s|%%RM%%|${RM}|g; \
+ s|%%CFLAGS%%|${CFLAGS}|g; \
+ s|%%PREFIX%%|${PREFIX}|g; \
+ s|%%X11BASE%%|${X11BASE}|g; \
+ s|%%ALLEGRO_CONFIG%%|${ALLEGRO_CONFIG}|g' \
+ <${PATCHDIR}/makefile.ex >${EXAMPLESDIR}/makefile
+
+.ifndef (NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.txt ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/graphics/allegrogl/distinfo b/graphics/allegrogl/distinfo
new file mode 100644
index 000000000000..16f37aea97af
--- /dev/null
+++ b/graphics/allegrogl/distinfo
@@ -0,0 +1 @@
+MD5 (alleggl-0.2.0.tar.bz2) = 54080f3f549bbf25ba04be7c3e8a42a5
diff --git a/graphics/allegrogl/files/makefile.ex b/graphics/allegrogl/files/makefile.ex
new file mode 100644
index 000000000000..d57b505d15ad
--- /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 000000000000..ff1197277843
--- /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 000000000000..92bcca8a5bbc
--- /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 000000000000..eeb691616d61
--- /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 000000000000..d3ba6bb20cb6
--- /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 000000000000..0010d599dad0
--- /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",
diff --git a/graphics/allegrogl/pkg-descr b/graphics/allegrogl/pkg-descr
new file mode 100644
index 000000000000..8ad9f4e7ee86
--- /dev/null
+++ b/graphics/allegrogl/pkg-descr
@@ -0,0 +1,10 @@
+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.
+
+WWW: http://allegrogl.sourceforge.net/
+
+- Igor Pokrovsky
+tiamat@comset.net
diff --git a/graphics/allegrogl/pkg-plist b/graphics/allegrogl/pkg-plist
new file mode 100644
index 000000000000..439dde88a422
--- /dev/null
+++ b/graphics/allegrogl/pkg-plist
@@ -0,0 +1,43 @@
+include/alleggl.h
+include/alleggl_config.h
+include/allegrogl/gl_ext.h
+include/allegrogl/gl_header_detect.h
+include/allegrogl/GLext/gl_ext_api.h
+include/allegrogl/GLext/gl_ext_defs.h
+include/allegrogl/GLext/gl_ext_list.h
+include/allegrogl/GLext/glx_ext_api.h
+include/allegrogl/GLext/glx_ext_defs.h
+include/allegrogl/GLext/glx_ext_list.h
+include/allegrogl/GLext/wgl_ext_api.h
+include/allegrogl/GLext/wgl_ext_defs.h
+include/allegrogl/GLext/wgl_ext_list.h
+@dirrm include/allegrogl/GLext
+@dirrm include/allegrogl
+lib/libagl.a
+%%EXAMPLESDIR%%/demofont.dat
+%%EXAMPLESDIR%%/dialog.c
+%%EXAMPLESDIR%%/dumbtest.c
+%%EXAMPLESDIR%%/exalleg.c
+%%EXAMPLESDIR%%/exalpfnt.c
+%%EXAMPLESDIR%%/excamera.c
+%%EXAMPLESDIR%%/exext.c
+%%EXAMPLESDIR%%/exgui.c
+%%EXAMPLESDIR%%/exmasked.c
+%%EXAMPLESDIR%%/extext.c
+%%EXAMPLESDIR%%/extextur.c
+%%EXAMPLESDIR%%/lucidia.dat
+%%EXAMPLESDIR%%/makefile
+%%EXAMPLESDIR%%/mysha.pcx
+%%EXAMPLESDIR%%/running.dat
+%%EXAMPLESDIR%%/running.h
+%%EXAMPLESDIR%%/test.c
+%%EXAMPLESDIR%%/tex.c
+@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%%%DOCSDIR%%/bugs.txt
+%%PORTDOCS%%%%DOCSDIR%%/extensions.txt
+%%PORTDOCS%%%%DOCSDIR%%/faq.txt
+%%PORTDOCS%%%%DOCSDIR%%/howto.txt
+%%PORTDOCS%%%%DOCSDIR%%/quickstart.txt
+%%PORTDOCS%%%%DOCSDIR%%/readme.txt
+%%PORTDOCS%%%%DOCSDIR%%/todo.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%