Date: Sat, 24 Jan 2004 20:39:39 +0300 (MSK) From: Igor Pokrovsky <tiamat@comset.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/61861: New port: graphics/glfw A portable framework for OpenGL development Message-ID: <200401241739.i0OHdd8j033301@doom.homeunix.org> Resent-Message-ID: <200401250330.i0P3UG6h090424@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 61861 >Category: ports >Synopsis: New port: graphics/glfw A portable framework for OpenGL development >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jan 24 19:30:16 PST 2004 >Closed-Date: >Last-Modified: >Originator: Igor Pokrovsky >Release: FreeBSD 4.9-STABLE i386 >Organization: >Environment: System: FreeBSD doom.homeunix.org 4.9-STABLE FreeBSD 4.9-STABLE #0: Thu Jan 22 19:08:56 MSK 2004 root@doom.homeunix.org:/usr/obj/usr/src/sys/KERNEL i386 >Description: 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. >How-To-Repeat: >Fix: --- glfw.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # glfw # glfw/pkg-plist # glfw/pkg-descr # glfw/distinfo # glfw/Makefile # glfw/files # glfw/files/patch-compile.sh # echo c - glfw mkdir -p glfw > /dev/null 2>&1 echo x - glfw/pkg-plist sed 's/^X//' >glfw/pkg-plist << 'END-of-glfw/pkg-plist' Xlib/libglfw.a Xinclude/GL/glfw.h X%%EXAMPLESDIR%%/boing.c X%%EXAMPLESDIR%%/gears.c X%%EXAMPLESDIR%%/keytest.c X%%EXAMPLESDIR%%/listmodes.c X%%EXAMPLESDIR%%/mipmaps.c X%%EXAMPLESDIR%%/mtbench.c X%%EXAMPLESDIR%%/mthello.c X%%EXAMPLESDIR%%/particles.c X%%EXAMPLESDIR%%/pong3d.c X%%EXAMPLESDIR%%/splitview.c X%%EXAMPLESDIR%%/triangle.c X%%EXAMPLESDIR%%/wave.c X%%EXAMPLESDIR%%/mipmaps.tga X%%EXAMPLESDIR%%/pong3d_field.tga X%%EXAMPLESDIR%%/pong3d_instr.tga X%%EXAMPLESDIR%%/pong3d_menu.tga X%%EXAMPLESDIR%%/pong3d_title.tga X%%EXAMPLESDIR%%/pong3d_winner1.tga X%%EXAMPLESDIR%%/pong3d_winner2.tga X%%EXAMPLESDIR%%/makefile X@dirrm %%EXAMPLESDIR%% X%%PORTDOCS%%%%DOCSDIR%%/glfwrm14.pdf X%%PORTDOCS%%%%DOCSDIR%%/glfwug14.pdf X%%PORTDOCS%%@dirrm %%DOCSDIR%% END-of-glfw/pkg-plist echo x - glfw/pkg-descr sed 's/^X//' >glfw/pkg-descr << 'END-of-glfw/pkg-descr' XGLFW is a free, open source, portable framework for OpenGL application Xdevelopment. In short, it is a library that constitutes a powerful API Xfor handling operating system specific tasks, such as opening an OpenGL Xwindow, reading keyboard and mouse input, creating threads, and much more. X XWWW: http://hem.passagen.se/opengl/glfw/ X X- Igor Pokrovsky Xtiamat@comset.net END-of-glfw/pkg-descr echo x - glfw/distinfo sed 's/^X//' >glfw/distinfo << 'END-of-glfw/distinfo' XMD5 (glfw-2.4.tar.gz) = 960cd136f21b2492a36b15f752f390a7 END-of-glfw/distinfo echo x - glfw/Makefile sed 's/^X//' >glfw/Makefile << 'END-of-glfw/Makefile' X# New ports collection makefile for: glfw X# Date created: 24 Jan 2004 X# Whom: Igor Pokrovsky <tiamat@comset.net> X# X# $FreeBSD$ X# X XPORTNAME= glfw XPORTVERSION= 2.4 XCATEGORIES= graphics XMASTER_SITES= http://hem.passagen.se/opengl/glfw/files/ X XMAINTAINER= tiamat@comset.net XCOMMENT= A portable framework for OpenGL development X XUSE_X_PREFIX= yes XUSE_GL= yes XALL_TARGET= x11 X Xdo-configure: X @(cd ${WRKSRC} && \ X ${SETENV} CC="${CC}" \ X CFLAGS="${CFLAGS}" \ X X11BASE="${X11BASE}" \ X PTHREAD_LIBS="${PTHREAD_LIBS}" ./compile.sh) X Xdo-install: X ${INSTALL_DATA} ${WRKSRC}/lib/x11/libglfw.a ${PREFIX}/lib X ${INSTALL_DATA} ${WRKSRC}/include/GL/glfw.h ${PREFIX}/include/GL X X @${MKDIR} ${EXAMPLESDIR} X ${INSTALL_DATA} ${WRKSRC}/examples/Makefile.x11 ${EXAMPLESDIR}/makefile X ${INSTALL_DATA} ${WRKSRC}/examples/*.c ${EXAMPLESDIR} X ${INSTALL_DATA} ${WRKSRC}/examples/*.tga ${EXAMPLESDIR} X X.ifndef (NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X ${INSTALL_DATA} ${WRKSRC}/docs/*.pdf ${DOCSDIR} X.endif X X.include <bsd.port.mk> END-of-glfw/Makefile echo c - glfw/files mkdir -p glfw/files > /dev/null 2>&1 echo x - glfw/files/patch-compile.sh sed 's/^X//' >glfw/files/patch-compile.sh << 'END-of-glfw/files/patch-compile.sh' X--- compile.sh.orig Wed Jan 8 12:19:48 2003 X+++ compile.sh Sat Jan 24 18:39:15 2004 X@@ -69,10 +69,10 @@ X ########################################################################## X if [ "x$force_gcc" = xyes ]; then X CC=gcc X-else X- CC=${CC-cc} X+#else X+# CC=${CC-cc} X fi X-CFLAGS= X+#CFLAGS= X LFLAGS= X LIBS="-lGL -lX11" X X@@ -88,9 +88,9 @@ X # Check for X11 libs directory X ########################################################################## X echo "Checking for X11 libraries location... " 1>&6 X-if [ -r "/usr/X11R6/lib/libX11.so" ]; then X- LFLAGS="$LFLAGS -L/usr/X11R6/lib" X- echo " X11 libraries location: /usr/X11R6/lib" 1>&6 X+if [ -r "${X11BASE}/lib/libX11.so" ]; then X+ LFLAGS="$LFLAGS -L${X11BASE}/lib" X+ echo " X11 libraries location: ${X11BASE}/lib" 1>&6 X elif [ -r "/usr/X11R5/lib/libX11.so" ]; then X LFLAGS="$LFLAGS -L/usr/X11R5/lib" X echo " X11 libraries location: /usr/X11R5/lib" 1>&6 X@@ -120,9 +120,9 @@ X rm -f conftest* X X echo " Using GNU C: ""$use_gcc" 1>&6 X-if [ "x$use_gcc" = xyes ]; then X- CC=gcc X-fi X+#if [ "x$use_gcc" = xyes ]; then X+# CC=gcc X+#fi X echo " " 1>&6 X X X@@ -139,6 +139,8 @@ X int main() {; return 0;} X EOF X X+CFLAGS="${CFLAGS} -I${X11BASE}/include" X+ X if { (eval echo $config_script: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then X rm -rf conftest* X has_xf86vm=yes X@@ -279,29 +281,29 @@ X ########################################################################## X # Check for sysconf support X ########################################################################## X-echo "Checking for sysconf support... " 1>&6 X-echo "$config_script: Checking for sysconf support" >&5 X-has_sysconf=no X+#echo "Checking for sysconf support... " 1>&6 X+#echo "$config_script: Checking for sysconf support" >&5 X+#has_sysconf=no X X-cat > conftest.c <<EOF X+#cat > conftest.c <<EOF X #include <unistd.h> X-int main() {long x=sysconf(_SC_ARG_MAX); return 0; } X-EOF X+#int main() {long x=sysconf(_SC_ARG_MAX); return 0; } X+#EOF X X-if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then X- rm -rf conftest* X- has_sysconf=yes X-else X- echo "$config_script: failed program was:" >&5 X- cat conftest.c >&5 X-fi X-rm -f conftest* X- X-echo " sysconf support: ""$has_sysconf" 1>&6 X-if [ "x$has_sysconf" = xyes ]; then X- CFLAGS="$CFLAGS -D_GLFW_HAS_SYSCONF" X-fi X-echo " " 1>&6 X+#if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then X+# rm -rf conftest* X+# has_sysconf=yes X+#else X+# echo "$config_script: failed program was:" >&5 X+# cat conftest.c >&5 X+#fi X+#rm -f conftest* X+ X+#echo " sysconf support: ""$has_sysconf" 1>&6 X+#if [ "x$has_sysconf" = xyes ]; then X+# CFLAGS="$CFLAGS -D_GLFW_HAS_SYSCONF" X+#fi X+#echo " " 1>&6 X X X ########################################################################## X@@ -337,7 +339,8 @@ X ########################################################################## X # Post fixups X ########################################################################## X-if [ "x$CC" = xgcc ]; then X+CFLAGS_NO_COMPILE="${CFLAGS}" X+if [ "x$use_gcc" = xyes ]; then X CFLAGS_SPEED="-c -I. -I.. $CFLAGS -O3 -ffast-math -Wall" X CFLAGS="-c -I. -I.. $CFLAGS -Os -Wall" X CFLAGS_LINK="-O3 -ffast-math -Wall" X@@ -346,8 +349,8 @@ X CFLAGS="-c -I. -I.. $CFLAGS -O" X CFLAGS_LINK="-O" X fi X-CFLAGS_LINK="-I../include $CFLAGS_LINK" X-LFLAGS="$LFLAGS -L../lib/x11 -s -lglfw -lGLU $LIBS -lpthread -lm" X+CFLAGS_LINK="-I../include ${CFLAGS_NO_COMPILE} $CFLAGS_LINK" X+LFLAGS="$LFLAGS -L../lib/x11 -s -lglfw -lGLU $LIBS ${PTHREAD_LIBS} -lm" X X X ########################################################################## END-of-glfw/files/patch-compile.sh exit --- glfw.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401241739.i0OHdd8j033301>