diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-01-25 10:39:43 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-01-25 10:39:43 +0000 |
commit | 2df42a604c4004f1804fb527c87154d2b9508296 (patch) | |
tree | b46baf4caf38c13096b78ff44d6fc8e9ae5ef64e /graphics/glfw | |
parent | 5642b9773e61ab282406e53670803e84fc3f38ad (diff) |
Notes
Diffstat (limited to 'graphics/glfw')
-rw-r--r-- | graphics/glfw/Makefile | 41 | ||||
-rw-r--r-- | graphics/glfw/distinfo | 1 | ||||
-rw-r--r-- | graphics/glfw/files/patch-compile.sh | 122 | ||||
-rw-r--r-- | graphics/glfw/pkg-descr | 9 | ||||
-rw-r--r-- | graphics/glfw/pkg-plist | 26 |
5 files changed, 199 insertions, 0 deletions
diff --git a/graphics/glfw/Makefile b/graphics/glfw/Makefile new file mode 100644 index 000000000000..3e97b9581817 --- /dev/null +++ b/graphics/glfw/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: glfw +# Date created: 24 Jan 2004 +# Whom: Igor Pokrovsky <tiamat@comset.net> +# +# $FreeBSD$ +# + +PORTNAME= glfw +PORTVERSION= 2.4 +CATEGORIES= graphics +MASTER_SITES= http://hem.passagen.se/opengl/glfw/files/ + +MAINTAINER= tiamat@comset.net +COMMENT= A portable framework for OpenGL development + +USE_X_PREFIX= yes +USE_GL= yes +ALL_TARGET= x11 + +do-configure: + @(cd ${WRKSRC} && \ + ${SETENV} CC="${CC}" \ + CFLAGS="${CFLAGS}" \ + X11BASE="${X11BASE}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" ./compile.sh) + +do-install: + ${INSTALL_DATA} ${WRKSRC}/lib/x11/libglfw.a ${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/include/GL/glfw.h ${PREFIX}/include/GL + + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/Makefile.x11 ${EXAMPLESDIR}/makefile + ${INSTALL_DATA} ${WRKSRC}/examples/*.c ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/*.tga ${EXAMPLESDIR} + +.ifndef (NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/*.pdf ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/graphics/glfw/distinfo b/graphics/glfw/distinfo new file mode 100644 index 000000000000..3a304a58ce6e --- /dev/null +++ b/graphics/glfw/distinfo @@ -0,0 +1 @@ +MD5 (glfw-2.4.tar.gz) = 960cd136f21b2492a36b15f752f390a7 diff --git a/graphics/glfw/files/patch-compile.sh b/graphics/glfw/files/patch-compile.sh new file mode 100644 index 000000000000..3ad8796de369 --- /dev/null +++ b/graphics/glfw/files/patch-compile.sh @@ -0,0 +1,122 @@ +--- compile.sh.orig Wed Jan 8 12:19:48 2003 ++++ compile.sh Sat Jan 24 18:39:15 2004 +@@ -69,10 +69,10 @@ + ########################################################################## + if [ "x$force_gcc" = xyes ]; then + CC=gcc +-else +- CC=${CC-cc} ++#else ++# CC=${CC-cc} + fi +-CFLAGS= ++#CFLAGS= + LFLAGS= + LIBS="-lGL -lX11" + +@@ -88,9 +88,9 @@ + # Check for X11 libs directory + ########################################################################## + echo "Checking for X11 libraries location... " 1>&6 +-if [ -r "/usr/X11R6/lib/libX11.so" ]; then +- LFLAGS="$LFLAGS -L/usr/X11R6/lib" +- echo " X11 libraries location: /usr/X11R6/lib" 1>&6 ++if [ -r "${X11BASE}/lib/libX11.so" ]; then ++ LFLAGS="$LFLAGS -L${X11BASE}/lib" ++ echo " X11 libraries location: ${X11BASE}/lib" 1>&6 + elif [ -r "/usr/X11R5/lib/libX11.so" ]; then + LFLAGS="$LFLAGS -L/usr/X11R5/lib" + echo " X11 libraries location: /usr/X11R5/lib" 1>&6 +@@ -120,9 +120,9 @@ + rm -f conftest* + + echo " Using GNU C: ""$use_gcc" 1>&6 +-if [ "x$use_gcc" = xyes ]; then +- CC=gcc +-fi ++#if [ "x$use_gcc" = xyes ]; then ++# CC=gcc ++#fi + echo " " 1>&6 + + +@@ -139,6 +139,8 @@ + int main() {; return 0;} + EOF + ++CFLAGS="${CFLAGS} -I${X11BASE}/include" ++ + if { (eval echo $config_script: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then + rm -rf conftest* + has_xf86vm=yes +@@ -279,29 +281,29 @@ + ########################################################################## + # Check for sysconf support + ########################################################################## +-echo "Checking for sysconf support... " 1>&6 +-echo "$config_script: Checking for sysconf support" >&5 +-has_sysconf=no ++#echo "Checking for sysconf support... " 1>&6 ++#echo "$config_script: Checking for sysconf support" >&5 ++#has_sysconf=no + +-cat > conftest.c <<EOF ++#cat > conftest.c <<EOF + #include <unistd.h> +-int main() {long x=sysconf(_SC_ARG_MAX); return 0; } +-EOF ++#int main() {long x=sysconf(_SC_ARG_MAX); return 0; } ++#EOF + +-if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then +- rm -rf conftest* +- has_sysconf=yes +-else +- echo "$config_script: failed program was:" >&5 +- cat conftest.c >&5 +-fi +-rm -f conftest* +- +-echo " sysconf support: ""$has_sysconf" 1>&6 +-if [ "x$has_sysconf" = xyes ]; then +- CFLAGS="$CFLAGS -D_GLFW_HAS_SYSCONF" +-fi +-echo " " 1>&6 ++#if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then ++# rm -rf conftest* ++# has_sysconf=yes ++#else ++# echo "$config_script: failed program was:" >&5 ++# cat conftest.c >&5 ++#fi ++#rm -f conftest* ++ ++#echo " sysconf support: ""$has_sysconf" 1>&6 ++#if [ "x$has_sysconf" = xyes ]; then ++# CFLAGS="$CFLAGS -D_GLFW_HAS_SYSCONF" ++#fi ++#echo " " 1>&6 + + + ########################################################################## +@@ -337,7 +339,8 @@ + ########################################################################## + # Post fixups + ########################################################################## +-if [ "x$CC" = xgcc ]; then ++CFLAGS_NO_COMPILE="${CFLAGS}" ++if [ "x$use_gcc" = xyes ]; then + CFLAGS_SPEED="-c -I. -I.. $CFLAGS -O3 -ffast-math -Wall" + CFLAGS="-c -I. -I.. $CFLAGS -Os -Wall" + CFLAGS_LINK="-O3 -ffast-math -Wall" +@@ -346,8 +349,8 @@ + CFLAGS="-c -I. -I.. $CFLAGS -O" + CFLAGS_LINK="-O" + fi +-CFLAGS_LINK="-I../include $CFLAGS_LINK" +-LFLAGS="$LFLAGS -L../lib/x11 -s -lglfw -lGLU $LIBS -lpthread -lm" ++CFLAGS_LINK="-I../include ${CFLAGS_NO_COMPILE} $CFLAGS_LINK" ++LFLAGS="$LFLAGS -L../lib/x11 -s -lglfw -lGLU $LIBS ${PTHREAD_LIBS} -lm" + + + ########################################################################## diff --git a/graphics/glfw/pkg-descr b/graphics/glfw/pkg-descr new file mode 100644 index 000000000000..1c826a4c4202 --- /dev/null +++ b/graphics/glfw/pkg-descr @@ -0,0 +1,9 @@ +GLFW is a free, open source, portable framework for OpenGL application +development. In short, it is a library that constitutes a powerful API +for handling operating system specific tasks, such as opening an OpenGL +window, reading keyboard and mouse input, creating threads, and much more. + +WWW: http://hem.passagen.se/opengl/glfw/ + +- Igor Pokrovsky +tiamat@comset.net diff --git a/graphics/glfw/pkg-plist b/graphics/glfw/pkg-plist new file mode 100644 index 000000000000..89781f5ceb57 --- /dev/null +++ b/graphics/glfw/pkg-plist @@ -0,0 +1,26 @@ +lib/libglfw.a +include/GL/glfw.h +%%EXAMPLESDIR%%/boing.c +%%EXAMPLESDIR%%/gears.c +%%EXAMPLESDIR%%/keytest.c +%%EXAMPLESDIR%%/listmodes.c +%%EXAMPLESDIR%%/mipmaps.c +%%EXAMPLESDIR%%/mtbench.c +%%EXAMPLESDIR%%/mthello.c +%%EXAMPLESDIR%%/particles.c +%%EXAMPLESDIR%%/pong3d.c +%%EXAMPLESDIR%%/splitview.c +%%EXAMPLESDIR%%/triangle.c +%%EXAMPLESDIR%%/wave.c +%%EXAMPLESDIR%%/mipmaps.tga +%%EXAMPLESDIR%%/pong3d_field.tga +%%EXAMPLESDIR%%/pong3d_instr.tga +%%EXAMPLESDIR%%/pong3d_menu.tga +%%EXAMPLESDIR%%/pong3d_title.tga +%%EXAMPLESDIR%%/pong3d_winner1.tga +%%EXAMPLESDIR%%/pong3d_winner2.tga +%%EXAMPLESDIR%%/makefile +@dirrm %%EXAMPLESDIR%% +%%PORTDOCS%%%%DOCSDIR%%/glfwrm14.pdf +%%PORTDOCS%%%%DOCSDIR%%/glfwug14.pdf +%%PORTDOCS%%@dirrm %%DOCSDIR%% |