ports/123532: Upgrade port graphics/glfw to 2.6 [+patch]

Vitaly Magerya vmagerya at gmail.com
Thu May 8 21:50:02 UTC 2008


>Number:         123532
>Category:       ports
>Synopsis:       Upgrade port graphics/glfw to 2.6 [+patch]
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 08 21:50:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Vitaly Magerya
>Release:        6.3-RELEASE
>Organization:
>Environment:
FreeBSD deskbox 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 04:18:52 UTC 2008 root at dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Update graphics/glfw to 2.6. Patch included.

Note: in the patch I haven't included all the changes from current version's files/patch-conpile.sh, so someone should check if anything is wrong (it works fine with my system, but I haven't tested all the functionality).
>How-To-Repeat:

>Fix:
# cd /usr/ports/graphics
# patch -p0 < glfw-2.5.0_2-to-2.6.patch
# rm {glfw/,glfw/files/}*.orig

Patch attached with submission follows:

Files glfw-2.5.0_2/.Makefile.swp and glfw/.Makefile.swp differ
diff -ruN glfw-2.5.0_2/Makefile glfw/Makefile
--- glfw-2.5.0_2/Makefile	2008-04-19 17:50:09.000000000 +0000
+++ glfw/Makefile	2008-05-08 22:47:28.000000000 +0000
@@ -6,8 +6,8 @@
 #
 
 PORTNAME=	glfw
-PORTVERSION=	2.5.0
-PORTREVISION=	2
+PORTVERSION=	2.6
+PORTREVISION=	0
 CATEGORIES=	graphics
 MASTER_SITES=	SF
 
@@ -18,13 +18,13 @@
 USE_XORG=	x11 xxf86vm xext
 USE_GL=		yes
 ALL_TARGET=	x11
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
+WRKSRC=		${WRKDIR}/${PORTNAME}
 
 do-configure:
 	@(cd ${WRKSRC} &&		\
 	${SETENV} CC="${CC}"		\
 		  CFLAGS="${CFLAGS}"	\
-		  PTHREAD_LIBS="${PTHREAD_LIBS}" ./compile.sh)
+		  PTHREAD_LIBS="${PTHREAD_LIBS}" ${SH} compile.sh)
 
 do-install:
 	${INSTALL_DATA} ${WRKSRC}/lib/x11/libglfw.a ${PREFIX}/lib
diff -ruN glfw-2.5.0_2/distinfo glfw/distinfo
--- glfw-2.5.0_2/distinfo	2006-01-22 12:34:51.000000000 +0000
+++ glfw/distinfo	2008-05-08 19:59:21.000000000 +0000
@@ -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 -ruN glfw-2.5.0_2/files/patch-compile.sh glfw/files/patch-compile.sh
--- glfw-2.5.0_2/files/patch-compile.sh	2008-04-19 17:50:09.000000000 +0000
+++ glfw/files/patch-compile.sh	2008-05-08 22:46:06.000000000 +0000
@@ -1,121 +1,56 @@
---- 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 09:46:46.000000000 +0000
++++ compile.sh	2008-05-08 22:45:28.000000000 +0000
+@@ -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;}
- EOF
- 
-+CFLAGS="${CFLAGS} -I${LOCALBASE}/include"
-+
- if { (eval echo $config_script: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then
+@@ -258,7 +258,7 @@
+ 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 @@
- # 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="-c -I. -I.. $CFLAGS -Os -Wall"
--  CFLAGS_LINK="$INCS -O3 -ffast-math -Wall"
-+  CFLAGS_LINK="$INCS -Wall"
- else
-   CFLAGS_SPEED="-c -I. -I.. $CFLAGS -O"
-   CFLAGS="-c -I. -I.. $CFLAGS -O"
+   CFLAGS="$CFLAGS_OLD" 


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list