[73512] trunk/dports/graphics/glew

jmr at macports.org jmr at macports.org
Mon Nov 15 23:42:23 PST 2010


Revision: 73512
          http://trac.macports.org/changeset/73512
Author:   jmr at macports.org
Date:     2010-11-15 23:42:20 -0800 (Mon, 15 Nov 2010)
Log Message:
-----------
glew: update to 1.5.7 (#27337)

Modified Paths:
--------------
    trunk/dports/graphics/glew/Portfile
    trunk/dports/graphics/glew/files/patch-Makefile.diff

Added Paths:
-----------
    trunk/dports/graphics/glew/files/config_Makefile.darwin.patch

Removed Paths:
-------------
    trunk/dports/graphics/glew/files/darwin-glx.patch

Modified: trunk/dports/graphics/glew/Portfile
===================================================================
--- trunk/dports/graphics/glew/Portfile	2010-11-16 07:28:56 UTC (rev 73511)
+++ trunk/dports/graphics/glew/Portfile	2010-11-16 07:42:20 UTC (rev 73512)
@@ -4,8 +4,7 @@
 PortSystem 1.0
 
 name               glew
-version            1.5.1
-revision           2
+version            1.5.7
 categories         graphics devel
 platforms          darwin
 license            GPLv2+/BSD/MIT
@@ -18,31 +17,32 @@
                    platform. OpenGL core and extension functionality is \
                    exposed in a single header file.
 
-homepage           http://glew.sourceforge.net
+homepage           http://glew.sourceforge.net/
 master_sites       sourceforge
-distfiles          ${distname}-src.tgz
-checksums          md5 759a59853dfaae4d007b414a3c1712f2 \
-                   sha1 a94113169d46487ccda1bb2fde68fa1803bdf009 \
-                   rmd160 920fdff559976492a2e6acf93d3b02e8286f6b7b
-worksrcdir         ${name}
+extract.suffix     .tgz
+checksums          md5 f913ce9dbde4cd250b932731b3534ded \
+                   sha1 4adc816afbfb65a4969484d10343a88c117ca989 \
+                   rmd160 9087120f26911cdc09109561fa6876211a6e6fc3
+
+patchfiles         config_Makefile.darwin.patch
+
+post-patch {
+    reinplace "s:/usr/X11R6:${prefix}:g" ${worksrcpath}/config/Makefile.darwin
+}
+
 use_configure      no
 build.env          GLEW_DEST=${prefix}
 build.args         CC=${configure.cc} LD=${configure.cc}
+if {![variant_isset universal] && $build_arch != ""} {
+	build.args-append CFLAGS.ARCH="${configure.cc_archflags}" \
+                      LDFLAGS.ARCH="${configure.ld_archflags}"
+}
 destroot.env       GLEW_DEST=${destroot}${prefix}
 
-patchfiles darwin-glx.patch
-
-pre-patch {
-    # CRLF line endings confuse patch and sh
-    reinplace "s|\r||" ${worksrcpath}/config/config.guess \
-                       ${worksrcpath}/Makefile
-    reinplace "s:/usr/X11R6:${prefix}:g" ${worksrcpath}/config/Makefile.darwin
-}
-
 variant universal {
-    patchfiles patch-Makefile.diff
-    build.args-append CFLAGS.EXTRA="${configure.universal_cflags}" \
-                      LDFLAGS.EXTRA="${configure.universal_ldflags}"
+    patchfiles-append patch-Makefile.diff
+    build.args-append CFLAGS.ARCH="${configure.universal_cflags}" \
+                      LDFLAGS.ARCH="${configure.universal_ldflags}"
 }
 
 variant	x11 description {Build libGLEW for GLX rather than OpenGL.framework} {
@@ -50,3 +50,7 @@
     build.args-append GLEW_APPLE_GLX=1
     destroot.args-append GLEW_APPLE_GLX=1
 }
+
+if {${os.subplatform} != "macosx"} {
+	default_variants +x11
+}

Added: trunk/dports/graphics/glew/files/config_Makefile.darwin.patch
===================================================================
--- trunk/dports/graphics/glew/files/config_Makefile.darwin.patch	                        (rev 0)
+++ trunk/dports/graphics/glew/files/config_Makefile.darwin.patch	2010-11-16 07:42:20 UTC (rev 73512)
@@ -0,0 +1,18 @@
+--- config/Makefile.darwin.orig	2010-11-04 07:55:35.000000000 +1100
++++ config/Makefile.darwin	2010-11-16 18:28:44.000000000 +1100
+@@ -1,13 +1,13 @@
+ NAME = $(GLEW_NAME)
+ CC = cc
+ LD = cc
+-CFLAGS.EXTRA = -no-cpp-precomp -dynamic -fno-common
++CFLAGS.EXTRA = -dynamic -fno-common $(CFLAGS.ARCH)
+ ifneq (undefined, $(origin GLEW_MX))
+ CFLAGS.EXTRA += -DGLEW_MX
+ endif
+ PICFLAG = -fPIC
+ LDFLAGS.SO = -dynamiclib -install_name $(GLEW_DEST)/lib/$(LIB.SHARED)
+-LDFLAGS.EXTRA =
++LDFLAGS.EXTRA = $(LDFLAGS.ARCH)
+ ifneq (undefined, $(origin GLEW_APPLE_GLX))
+ CFLAGS.EXTRA += -I/usr/X11R6/include -D'GLEW_APPLE_GLX'
+ LDFLAGS.GL = -L/usr/X11R6/lib -lXmu -lXi -lGLU -lGL -lXext -lX11

Deleted: trunk/dports/graphics/glew/files/darwin-glx.patch
===================================================================
--- trunk/dports/graphics/glew/files/darwin-glx.patch	2010-11-16 07:28:56 UTC (rev 73511)
+++ trunk/dports/graphics/glew/files/darwin-glx.patch	2010-11-16 07:42:20 UTC (rev 73512)
@@ -1,20 +0,0 @@
---- src/glew.c.orig	2009-05-12 10:28:26.000000000 -0700
-+++ src/glew.c	2009-05-12 10:29:37.000000000 -0700
-@@ -65,7 +65,7 @@
- #  define GLXEW_CONTEXT_ARG_DEF_LIST void
- #endif /* GLEW_MX */
- 
--#if defined(__APPLE__)
-+#if defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
- #include <mach-o/dyld.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -121,7 +121,7 @@ void* dlGetProcAddress (const GLubyte* n
- #if defined(_WIN32)
- #  define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
- #else
--#  if defined(__APPLE__)
-+#  if defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
- #    define glewGetProcAddress(name) NSGLGetProcAddress(name)
- #  else
- #    if defined(__sgi) || defined(__sun)

Modified: trunk/dports/graphics/glew/files/patch-Makefile.diff
===================================================================
--- trunk/dports/graphics/glew/files/patch-Makefile.diff	2010-11-16 07:28:56 UTC (rev 73511)
+++ trunk/dports/graphics/glew/files/patch-Makefile.diff	2010-11-16 07:42:20 UTC (rev 73512)
@@ -1,16 +1,6 @@
---- Makefile.orig	2008-11-03 17:25:21.000000000 +1100
-+++ Makefile	2008-11-11 19:04:13.000000000 +1100
-@@ -127,7 +127,6 @@ endif
- ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
- 	$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
- else
--	strip -x lib/$(LIB.STATIC)
- 	$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
- 	$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
- endif
---- Makefile.orig	2009-04-06 09:37:04.000000000 +0200
-+++ Makefile	2009-04-06 09:53:47.000000000 +0200
-@@ -81,7 +81,7 @@
+--- Makefile.orig	2010-11-04 07:55:35.000000000 +1100
++++ Makefile	2010-11-16 18:00:37.000000000 +1100
+@@ -86,7 +86,7 @@
  	mkdir lib
  
  lib/$(LIB.STATIC): $(LIB.OBJS)
@@ -19,3 +9,11 @@
  
  lib/$(LIB.SHARED): $(LIB.SOBJS)
  	$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
+@@ -143,7 +143,6 @@
+ ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
+ 	$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
+ else
+-	$(STRIP) -x lib/$(LIB.STATIC)
+ 	$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
+ 	$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
+ endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101115/7cb44ff5/attachment.html>


More information about the macports-changes mailing list