[vlc-devel] [PATCH 2/2] contrib: glew: update to 2.1.0
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jan 25 12:19:33 CET 2019
And build using cmake rather their manually edited makefiles
---
contrib/src/glew/SHA512SUMS | 2 +-
contrib/src/glew/rules.mak | 14 ++---
contrib/src/glew/win32.patch | 110 -----------------------------------
3 files changed, 5 insertions(+), 121 deletions(-)
delete mode 100644 contrib/src/glew/win32.patch
diff --git a/contrib/src/glew/SHA512SUMS b/contrib/src/glew/SHA512SUMS
index d70e7d9fbd..996aa89b03 100644
--- a/contrib/src/glew/SHA512SUMS
+++ b/contrib/src/glew/SHA512SUMS
@@ -1 +1 @@
-03d7a816fde0c445c964280ac9e679a0d2dfca839e87345360adec4fdb2292b4ddfc85538954b052c538ca355e559d8ee3a5ea7ea2a99130687054a92e0df857 glew-1.7.0.tar.gz
+9a9b4d81482ccaac4b476c34ed537585ae754a82ebb51c3efa16d953c25cc3931be46ed2e49e79c730cd8afc6a1b78c97d52cd714044a339c3bc29734cd4d2ab glew-2.1.0.tar.gz
diff --git a/contrib/src/glew/rules.mak b/contrib/src/glew/rules.mak
index 9f3cdc10f9..74c2c3a893 100644
--- a/contrib/src/glew/rules.mak
+++ b/contrib/src/glew/rules.mak
@@ -1,5 +1,5 @@
# GLEW
-GLEW_VERSION := 1.7.0
+GLEW_VERSION := 2.1.0
GLEW_URL := $(SF)/glew/glew/$(GLEW_VERSION)/glew-$(GLEW_VERSION).tgz
ifeq ($(call need_pkg,"glew"),)
@@ -13,15 +13,9 @@ $(TARBALLS)/glew-$(GLEW_VERSION).tar.gz:
glew: glew-$(GLEW_VERSION).tar.gz .sum-glew
$(UNPACK)
-ifdef HAVE_WIN32
- $(APPLY) $(SRC)/glew/win32.patch
-endif
$(MOVE)
-.glew: glew
- cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DGLEW_STATIC" $(MAKE)
- cd $< && $(HOSTVARS) GLEW_DEST=$(PREFIX) $(MAKE) install
-ifdef HAVE_WIN32
- -rm $(PREFIX)/lib/*glew32.dll*
-endif
+.glew: glew toolchain.cmake
+ cd $</build/cmake && $(HOSTVARS_PIC) $(CMAKE) -DBUILD_SHARED_LIBS:BOOL=OFF -DGLEW_USE_STATIC_LIBS:BOOL=ON
+ cd $</build/cmake && $(MAKE) install
touch $@
diff --git a/contrib/src/glew/win32.patch b/contrib/src/glew/win32.patch
deleted file mode 100644
index 49dded7bd8..0000000000
--- a/contrib/src/glew/win32.patch
+++ /dev/null
@@ -1,110 +0,0 @@
---- glew/Makefile 2011-08-25 16:17:55.000000000 +0200
-+++ glew.new/Makefile 2012-02-25 16:47:22.070430867 +0100
-@@ -31,7 +31,7 @@
- include config/version
-
- SHELL = /bin/sh
--SYSTEM ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
-+SYSTEM ?= mingw
- SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
-
- ifeq ($(SYSTEM.SUPPORTED), 1)
-@@ -54,9 +54,7 @@
- DIST_SRC_ZIP = glew-$(GLEW_VERSION).zip
- DIST_SRC_TGZ = glew-$(GLEW_VERSION).tgz
-
--AR = ar
- INSTALL = install
--STRIP = strip
- RM = rm -f
- LN = ln -sf
- ifeq ($(MAKECMDGOALS), debug)
-@@ -84,7 +82,7 @@
- VISUALINFO.BIN.OBJS = $(VISUALINFO.BIN.SRCS:.c=.o)
- BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
-
--all debug: glew.lib glew.lib.mx glew.bin
-+all debug: glew.lib glew.lib.mx
-
- %.o: %.c
- $(CC) -c $(CFLAGS) -o $@ $<
-@@ -180,42 +178,20 @@
- install.lib: glew.lib
- $(INSTALL) -d -m 0755 $(LIBDIR)
- # runtime
--ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
-- $(INSTALL) -d -m 0755 $(BINDIR)
-- $(STRIP) -x lib/$(LIB.SHARED)
-- $(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/
--else
- $(STRIP) -x lib/$(LIB.SHARED)
- $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
- $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
--endif
- # development files
--ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
-- $(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
--else
-- $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
--endif
- $(STRIP) -x lib/$(LIB.STATIC)
- $(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
-
- 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
- $(STRIP) -x lib/$(LIB.STATIC.MX)
- $(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/
-
-diff -ruN glew/config/Makefile.mingw glew.new/config/Makefile.mingw
---- glew/config/Makefile.mingw 2011-08-25 16:17:55.000000000 +0200
-+++ glew.new/config/Makefile.mingw 2017-12-21 21:13:03.115385406 +0000
-@@ -1,8 +1,7 @@
- NAME = glew32
--CC = gcc
- # use gcc for linking, with ld it does not work
--LD = gcc
--CFLAGS.SO = -DGLEW_BUILD
-+LD = $(CC)
-+CFLAGS.SO = -DGLEW_BUILD -DSTATIC
- LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32
- LDFLAGS.EXTRA = -L/mingw/lib
- WARN = -Wall -W
-@@ -12,9 +11,9 @@
- LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
- LIB.SHARED = $(NAME).dll
- 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,--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,--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
- #if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_) && !defined(__MINGW64__)
- # ifdef _WIN64
--typedef __int64 ptrdiff_t;
-+# include <stdint.h>
- # else
- typedef _W64 int ptrdiff_t;
- # endif
--
2.17.1
More information about the vlc-devel
mailing list