Commit 81866512 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Update GLEW to 1.7.0

(cherry picked from commit 1966f8932b0f4f30bfbbb2abf7e89f0fdda058cb)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8e354a8c
9107f88aac67788bb0d3ac1c017b37f2cd507b0c8a1f2b4e55cc8364bea9ddab74163e31117e9c6df9926a4cc21c1bb07050e123097b1e0374452d1887e840b5 glew-1.5.1-src.tar.gz 03d7a816fde0c445c964280ac9e679a0d2dfca839e87345360adec4fdb2292b4ddfc85538954b052c538ca355e559d8ee3a5ea7ea2a99130687054a92e0df857 glew-1.7.0.tar.gz
# GLEW # GLEW
GLEW_VERSION := 1.5.1 GLEW_VERSION := 1.7.0
GLEW_URL := $(SF)/glew/glew/$(GLEW_VERSION)/glew-$(GLEW_VERSION)-src.tgz GLEW_URL := $(SF)/glew/glew/$(GLEW_VERSION)/glew-$(GLEW_VERSION).tgz
$(TARBALLS)/glew-$(GLEW_VERSION)-src.tar.gz: $(TARBALLS)/glew-$(GLEW_VERSION).tar.gz:
$(call download,$(GLEW_URL)) $(call download,$(GLEW_URL))
.sum-glew: glew-$(GLEW_VERSION)-src.tar.gz .sum-glew: glew-$(GLEW_VERSION).tar.gz
glew: glew-$(GLEW_VERSION)-src.tar.gz .sum-glew glew: glew-$(GLEW_VERSION).tar.gz .sum-glew
$(UNPACK) $(UNPACK)
mv glew glew-$(GLEW_VERSION)-src
ifdef HAVE_WIN32 ifdef HAVE_WIN32
$(APPLY) $(SRC)/glew/win32.patch $(APPLY) $(SRC)/glew/win32.patch
endif endif
$(MOVE) $(MOVE)
cd $@ && sed -e 's/.$$//' -iorig config/config.guess
.glew: glew .glew: glew
cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DGLEW_STATIC" $(MAKE) cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DGLEW_STATIC" $(MAKE)
cd $< && $(HOSTVARS) GLEW_DEST=$(PREFIX) $(MAKE) install cd $< && $(HOSTVARS) GLEW_DEST=$(PREFIX) $(MAKE) install
ifdef HAVE_WIN32 ifdef HAVE_WIN32
-rm $(PREFIX)/lib/libglew32.dll* -rm $(PREFIX)/lib/*glew32.dll*
endif endif
touch $@ touch $@
--- glew/Makefile 2008-11-03 07:25:21.000000000 +0100 --- glew/Makefile 2011-08-25 16:17:55.000000000 +0200
+++ glew.new/Makefile 2009-12-03 22:30:47.000000000 +0100 +++ glew.new/Makefile 2012-02-25 16:47:22.070430867 +0100
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
include config/version include config/version
SHELL = /bin/sh SHELL = /bin/sh
-SYSTEM = $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;') -SYSTEM ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
+SYSTEM = mingw +SYSTEM ?= mingw
SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1) SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
ifeq ($(SYSTEM.SUPPORTED), 1) ifeq ($(SYSTEM.SUPPORTED), 1)
@@ -48,9 +48,7 @@ @@ -54,9 +54,7 @@
TARDIR = ../glew-$(GLEW_VERSION) DIST_SRC_ZIP = glew-$(GLEW_VERSION).zip
TARBALL = ../glew_$(GLEW_VERSION).tar.gz DIST_SRC_TGZ = glew-$(GLEW_VERSION).tgz
-AR = ar -AR = ar
INSTALL = install INSTALL = install
...@@ -19,71 +19,91 @@ ...@@ -19,71 +19,91 @@
RM = rm -f RM = rm -f
LN = ln -sf LN = ln -sf
ifeq ($(MAKECMDGOALS), debug) ifeq ($(MAKECMDGOALS), debug)
@@ -75,7 +73,7 @@ @@ -84,7 +82,7 @@
VISUALINFO.BIN.OBJS = $(VISUALINFO_BIN.SRCS:.c=.o) VISUALINFO.BIN.OBJS = $(VISUALINFO.BIN.SRCS:.c=.o)
BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL) BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
-all debug: lib/$(LIB.SHARED) lib/$(LIB.STATIC) bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) -all debug: glew.lib glew.lib.mx glew.bin
+all debug: lib/$(LIB.SHARED) lib/$(LIB.STATIC) +all debug: glew.lib glew.lib.mx
lib: %.o: %.c
mkdir lib $(CC) -c $(CFLAGS) -o $@ $<
@@ -112,27 +110,17 @@ @@ -180,42 +178,20 @@
$(INSTALL) -d -m 0755 $(INCDIR) install.lib: glew.lib
$(INSTALL) -d -m 0755 $(LIBDIR) $(INSTALL) -d -m 0755 $(LIBDIR)
# runtime # runtime
-ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw) -ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
- $(INSTALL) -d -m 0755 $(BINDIR)
- $(STRIP) -x lib/$(LIB.SHARED) - $(STRIP) -x lib/$(LIB.SHARED)
- $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(BINDIR)/ - $(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/
-else -else
$(STRIP) -x lib/$(LIB.SHARED) $(STRIP) -x lib/$(LIB.SHARED)
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME) $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
-endif -endif
# development files # development files
$(INSTALL) -m 0644 include/GL/wglew.h $(INCDIR)/ -ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -m 0644 include/GL/glew.h $(INCDIR)/
$(INSTALL) -m 0644 include/GL/glxew.h $(INCDIR)/
-ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
- $(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/ - $(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
-else -else
- strip -x lib/$(LIB.STATIC) - $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
+ $(STRIP) -x lib/$(LIB.STATIC) -endif
$(STRIP) -x lib/$(LIB.STATIC)
$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
install.lib.mx: glew.lib.mx
$(INSTALL) -d -m 0755 $(LIBDIR)
# runtime
-ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
- $(INSTALL) -d -m 0755 $(BINDIR)
- $(STRIP) -x lib/$(LIB.SHARED.MX)
- $(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) $(BINDIR)/
-else
$(STRIP) -x lib/$(LIB.SHARED.MX)
$(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) $(LIBDIR)/
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.SONAME.MX)
-endif
# development files
-ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
- $(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) $(LIBDIR)/
-else
- $(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.DEVLNK.MX)
-endif -endif
# utilities $(STRIP) -x lib/$(LIB.STATIC.MX)
- $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/ $(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/
uninstall: diff -ruN glew/config/Makefile.mingw glew.new/config/Makefile.mingw
$(RM) $(INCDIR)/wglew.h --- glew/config/Makefile.mingw 2011-08-25 16:17:55.000000000 +0200
--- glew/config/Makefile.mingw 2008-11-03 07:25:20.000000000 +0100 +++ glew.new/config/Makefile.mingw 2012-02-25 16:42:36.603751173 +0100
+++ glew.new/config/Makefile.mingw 2009-12-03 22:18:32.000000000 +0100 @@ -1,8 +1,6 @@
@@ -1,13 +1,11 @@
NAME = glew32 NAME = glew32
-CC = gcc -CC = gcc
# use gcc for linking, with ld it does not work # use gcc for linking, with ld it does not work
-LD = gcc -LD = gcc
ifneq (undefined, $(origin GLEW_MX))
CFLAGS.EXTRA = -DGLEW_MX
endif
-CFLAGS.SO = -DGLEW_BUILD -CFLAGS.SO = -DGLEW_BUILD
+CFLAGS.SO = -DGLEW_BUILD -DSTATIC +CFLAGS.SO = -DGLEW_BUILD -DSTATIC
#LDFLAGS.SO = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK)
-LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
+#LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
LDFLAGS.EXTRA = -L/mingw/lib LDFLAGS.EXTRA = -L/mingw/lib
WARN = -Wall -W WARN = -Wall -W
diff -ur glew.orig//include/GL/glew.h glew/include/GL/glew.h @@ -12,9 +10,9 @@
--- glew.orig//include/GL/glew.h 2011-09-23 01:38:28.524786958 -0400 LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
+++ glew/include/GL/glew.h 2011-09-23 01:45:16.405385194 -0400 LIB.SHARED = $(NAME).dll
@@ -150,7 +150,7 @@ LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO)
-LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
+#LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK)
LIB.SONAME.MX = lib$(NAME)mx.dll
LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib
LIB.SHARED.MX = $(NAME)mx.dll
LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO)
-LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX)
+#LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX)
--- glew/include/GL/glew.h 2011-08-25 16:17:55.000000000 +0200
+++ glew.new/include/GL/glew.h 2012-02-25 16:39:44.970410007 +0100
@@ -151,7 +151,7 @@
#endif #endif
#if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_) #if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_) && !defined(__MINGW64__)
# ifdef _WIN64 # ifdef _WIN64
-typedef __int64 ptrdiff_t; -typedef __int64 ptrdiff_t;
+#include <stdint.h> +# include <stdint.h>
# else # else
typedef _W64 int ptrdiff_t; typedef _W64 int ptrdiff_t;
# endif # endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment