aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2008-06-16 04:17:03 +0800
committerthierry <thierry@FreeBSD.org>2008-06-16 04:17:03 +0800
commit92ecdd4624d1c6fa824d85e91cece9baaa8b96e5 (patch)
tree7faec176f767c72790e3c2c95932f2f7d7e31caa /graphics
parente564f32bb1d092087466167dda1d0c886af0f9e8 (diff)
downloadfreebsd-ports-gnome-92ecdd4624d1c6fa824d85e91cece9baaa8b96e5.tar.gz
freebsd-ports-gnome-92ecdd4624d1c6fa824d85e91cece9baaa8b96e5.tar.zst
freebsd-ports-gnome-92ecdd4624d1c6fa824d85e91cece9baaa8b96e5.zip
Upgrade to 2.6, with some cleaning.
PR: ports/123532 Submitted by: Vitaly Magerya <vmagerya (at) gmail.com>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/glfw/Makefile24
-rw-r--r--graphics/glfw/distinfo6
-rw-r--r--graphics/glfw/files/patch-compile.sh132
-rw-r--r--graphics/glfw/files/patch-lib_x11_Makefile.x11.in13
-rw-r--r--graphics/glfw/pkg-plist47
5 files changed, 97 insertions, 125 deletions
diff --git a/graphics/glfw/Makefile b/graphics/glfw/Makefile
index ee0e810f0eac..b1ca92ce124c 100644
--- a/graphics/glfw/Makefile
+++ b/graphics/glfw/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= glfw
-PORTVERSION= 2.5.0
-PORTREVISION= 2
+PORTVERSION= 2.6
CATEGORIES= graphics
MASTER_SITES= SF
@@ -15,26 +14,31 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= A portable framework for OpenGL development
USE_BZIP2= yes
-USE_XORG= x11 xxf86vm xext
+USE_XORG= x11 xxf86vm xext xrandr
USE_GL= yes
+USE_LDCONFIG= yes
ALL_TARGET= x11
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
+INSTALL_TARGET= x11-install
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+pre-configure:
+ ${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|' ${WRKSRC}/compile.sh
do-configure:
@(cd ${WRKSRC} && \
${SETENV} CC="${CC}" \
CFLAGS="${CFLAGS}" \
- 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
+ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}" ${SH} compile.sh)
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/lib/x11/libglfw.so ${PREFIX}/lib/libglfw.so.0
+ ${LN} -sf ${PREFIX}/lib/libglfw.so.0 ${PREFIX}/lib/libglfw.so
+.ifndef (NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/Makefile.x11 ${EXAMPLESDIR}/makefile
${INSTALL_DATA} ${WRKSRC}/examples/*.c ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/*.tga ${EXAMPLESDIR}
-
+.endif
.ifndef (NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/*.pdf ${DOCSDIR}
diff --git a/graphics/glfw/distinfo b/graphics/glfw/distinfo
index bd1192eb8b50..9b4fceaffd3a 100644
--- a/graphics/glfw/distinfo
+++ b/graphics/glfw/distinfo
@@ -1,3 +1,3 @@
-MD5 (glfw-2.5.0.tar.bz2) = c6dffefbfbe4415c915851b09e76edd9
-SHA256 (glfw-2.5.0.tar.bz2) = cbf1164baebb00cc27039a406c873794e2b70caa0af0ae3348ed5062ecc26816
-SIZE (glfw-2.5.0.tar.bz2) = 645993
+MD5 (glfw-2.6.tar.bz2) = 0d9b93e6194c3805be9e1c855a985a24
+SHA256 (glfw-2.6.tar.bz2) = 1b86ca8c5678fbf6999a0bfbe50de121f8aec9c07bf2383306819caebe3edfca
+SIZE (glfw-2.6.tar.bz2) = 886843
diff --git a/graphics/glfw/files/patch-compile.sh b/graphics/glfw/files/patch-compile.sh
index 6428fd309850..4c0c77bad002 100644
--- a/graphics/glfw/files/patch-compile.sh
+++ b/graphics/glfw/files/patch-compile.sh
@@ -1,121 +1,73 @@
---- compile.sh.orig 2004-07-25 00:36:46.000000000 +0400
-+++ compile.sh 2008-03-20 05:20:39.000000000 +0300
-@@ -72,10 +72,10 @@
- ##########################################################################
- if [ "x$force_gcc" = xyes ]; then
- CC=gcc
--else
-- CC=${CC-cc}
-+#else
-+# CC=${CC-cc}
+--- compile.sh.orig 2007-07-01 11:46:46.000000000 +0200
++++ compile.sh 2008-06-14 23:22:27.000000000 +0200
+@@ -63,7 +63,7 @@
+ CC=cc
fi
+
-CFLAGS=
+#CFLAGS=
LFLAGS=
+ LDFLAGS=
INCS=
- LIBS="-lGL -lX11"
-@@ -99,10 +99,10 @@
- INCS="-I/usr/X11/include"
- echo " X11 libraries location: /usr/X11/lib" 1>&6
- # X11R6 in /usr/X11R6/lib ?
--elif [ -r "/usr/X11R6/lib" ]; then
-- LFLAGS="$LFLAGS -L/usr/X11R6/lib"
-- INCS="-I/usr/X11R6/include"
-- echo " X11 libraries location: /usr/X11R6/lib" 1>&6
-+elif [ -r "${LOCALBASE}/lib" ]; then
-+ LFLAGS="$LFLAGS -L${LOCALBASE}/lib"
-+ INCS="-I${LOCALBASE}/include"
-+ echo " X11 libraries location: ${LOCALBASE}/lib" 1>&6
- # X11R5 in /usr/X11R5/lib ?
- elif [ -r "/usr/X11R5/lib" ]; then
- LFLAGS="$LFLAGS -L/usr/X11R5/lib"
-@@ -145,9 +145,9 @@
+@@ -164,10 +164,10 @@
+ fi
rm -f conftest*
- echo " Using GNU C: ""$use_gcc" 1>&6
+-echo " Using GNU C: ""$use_gcc" 1>&6
-if [ "x$use_gcc" = xyes ]; then
- CC=gcc
-fi
++#echo " Using GNU C: ""$use_gcc" 1>&6
+#if [ "x$use_gcc" = xyes ]; then
+# CC=gcc
+#fi
echo " " 1>&6
-@@ -169,6 +169,8 @@
- int main() {; return 0;}
+@@ -254,11 +254,11 @@
EOF
-+CFLAGS="${CFLAGS} -I${LOCALBASE}/include"
-+
- if { (eval echo $config_script: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then
+ # Try -pthread (most systems)
+-CFLAGS_THREAD="-pthread"
++CFLAGS_THREAD="$PTHREAD_CFLAGS"
+ CFLAGS_OLD="$CFLAGS"
+ CFLAGS="$CFLAGS $CFLAGS_THREAD"
+ LIBS_OLD="$LIBS"
+-LIBS="$LIBS -pthread"
++LIBS="$LIBS ${PTHREAD_LIBS}"
+ if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then
rm -rf conftest*
- has_xf86vm=yes
-@@ -200,18 +202,10 @@
+ has_pthread=yes
+@@ -267,20 +267,6 @@
+ cat conftest.c >&5
+ fi
- # Try -lpthread (most systems)
- LIBS_OLD="$LIBS"
--LIBS="$LIBS -lpthread"
--if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then
-- rm -rf conftest*
-- has_pthread=yes
--else
-- echo "$config_script: failed program was:" >&5
-- cat conftest.c >&5
+-# Try -lpthread
+-if [ "x$has_pthread" = xno ]; then
+- CFLAGS_THREAD="-D_REENTRANT"
+- CFLAGS="$CFLAGS_OLD $CFLAGS_THREAD"
+- LIBS="$LIBS_OLD -lpthread"
+- if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then
+- rm -rf conftest*
+- has_pthread=yes
+- else
+- echo "$config_script: failed program was:" >&5
+- cat conftest.c >&5
+- fi
-fi
-
- # Try -pthread (e.g. FreeBSD)
+-
+ # Try -lsocket (e.g. QNX)
if [ "x$has_pthread" = xno ]; then
-- LIBS="$LIBS_OLD -pthread"
-+ LIBS="$LIBS_OLD ${PTHREAD_LIBS}"
- if { (eval echo $config_script: \"$link\") 1>&5; (eval $link) 2>&5; }; then
- rm -rf conftest*
- has_pthread=yes
-@@ -369,24 +363,24 @@
- echo "$config_script: Checking for sysconf support" >&5
- has_sysconf=no
-
--cat > conftest.c <<EOF
-+#cat > conftest.c <<EOF
- #include <unistd.h>
- #ifndef _SC_NPROCESSORS_ONLN
- #ifndef _SC_NPROC_ONLN
- #error Neither _SC_NPROCESSORS_ONLN nor _SC_NPROC_ONLN available
- #endif
- #endif
--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*
-+#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
-@@ -429,9 +423,9 @@
+ CFLAGS="$CFLAGS_OLD"
+@@ -534,9 +520,9 @@
# Post fixups
##########################################################################
if [ "x$use_gcc" = xyes ]; then
- CFLAGS_SPEED="-c -I. -I.. $CFLAGS -O3 -ffast-math -Wall"
-+ CFLAGS_SPEED="-c -I. -I.. $CFLAGS -Wall"
++ CFLAGS_SPEED="-c -I. -I.. $CFLAGS -ffast-math -Wall"
CFLAGS="-c -I. -I.. $CFLAGS -Os -Wall"
- CFLAGS_LINK="$INCS -O3 -ffast-math -Wall"
-+ CFLAGS_LINK="$INCS -Wall"
++ CFLAGS_LINK="$INCS -ffast-math -Wall"
else
CFLAGS_SPEED="-c -I. -I.. $CFLAGS -O"
CFLAGS="-c -I. -I.. $CFLAGS -O"
diff --git a/graphics/glfw/files/patch-lib_x11_Makefile.x11.in b/graphics/glfw/files/patch-lib_x11_Makefile.x11.in
new file mode 100644
index 000000000000..7fb9b6a23cb3
--- /dev/null
+++ b/graphics/glfw/files/patch-lib_x11_Makefile.x11.in
@@ -0,0 +1,13 @@
+--- lib/x11/Makefile.x11.in.orig 2007-07-01 11:46:46.000000000 +0200
++++ lib/x11/Makefile.x11.in 2008-06-15 00:35:56.000000000 +0200
+@@ -29,8 +29,8 @@
+ $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a
+ $(INSTALL) -d $(PREFIX)/include/GL
+ $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h
+- $(INSTALL) -d $(PREFIX)/lib/pkgconfig
+- $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc
++ $(INSTALL) -d $(PREFIX)/libdata/pkgconfig
++ $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/libdata/pkgconfig/libglfw.pc
+
+
+ ##########################################################################
diff --git a/graphics/glfw/pkg-plist b/graphics/glfw/pkg-plist
index c0deb6d01d83..5b883cc190fc 100644
--- a/graphics/glfw/pkg-plist
+++ b/graphics/glfw/pkg-plist
@@ -1,26 +1,29 @@
-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%%
+lib/libglfw.a
+lib/libglfw.so
+lib/libglfw.so.0
+libdata/pkgconfig/libglfw.pc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/boing.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gears.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/keytest.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/listmodes.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mipmaps.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mtbench.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mthello.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/particles.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pong3d.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/splitview.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/triangle.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/wave.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mipmaps.tga
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pong3d_field.tga
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pong3d_instr.tga
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pong3d_menu.tga
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pong3d_title.tga
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pong3d_winner1.tga
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pong3d_winner2.tga
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/makefile
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%%%DOCSDIR%%/Reference.pdf
%%PORTDOCS%%%%DOCSDIR%%/UsersGuide.pdf
%%PORTDOCS%%@dirrm %%DOCSDIR%%