[vlc-commits] Contribs: add glew

Jean-Baptiste Kempf git at videolan.org
Tue Aug 9 00:07:53 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug  8 23:45:04 2011 +0200| [0180376c3b42e50041f64f5ddf0356fd0c2d9c4f] | committer: Jean-Baptiste Kempf

Contribs: add glew

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0180376c3b42e50041f64f5ddf0356fd0c2d9c4f
---

 contrib/src/glew/SHA512SUMS  |    1 +
 contrib/src/glew/rules.mak   |   19 ++++++++++
 contrib/src/glew/win32.patch |   77 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/contrib/src/glew/SHA512SUMS b/contrib/src/glew/SHA512SUMS
new file mode 100644
index 0000000..3ed3c03
--- /dev/null
+++ b/contrib/src/glew/SHA512SUMS
@@ -0,0 +1 @@
+9107f88aac67788bb0d3ac1c017b37f2cd507b0c8a1f2b4e55cc8364bea9ddab74163e31117e9c6df9926a4cc21c1bb07050e123097b1e0374452d1887e840b5  glew-1.5.1-src.tar.gz
diff --git a/contrib/src/glew/rules.mak b/contrib/src/glew/rules.mak
new file mode 100644
index 0000000..91ff32f
--- /dev/null
+++ b/contrib/src/glew/rules.mak
@@ -0,0 +1,19 @@
+# GLEW
+GLEW_VERSION := 1.5.1
+GLEW_URL := $(SF)/glew/glew/$(GLEW_VERSION)/glew-$(GLEW_VERSION)-src.tgz
+
+$(TARBALLS)/glew-$(GLEW_VERSION)-src.tar.gz:
+	$(call download,$(GLEW_URL))
+
+.sum-glew: glew-$(GLEW_VERSION)-src.tar.gz
+
+glew: glew-$(GLEW_VERSION)-src.tar.gz .sum-glew
+	$(UNPACK)
+	mv glew glew-$(GLEW_VERSION)-src
+	$(APPLY) $(SRC)/glew/win32.patch
+	$(MOVE)
+
+.glew: glew
+	cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DGLEW_STATIC" $(MAKE)
+	cd $< && $(HOSTVARS) GLEW_DEST=$(PREFIX) $(MAKE) install
+	touch $@
diff --git a/contrib/src/glew/win32.patch b/contrib/src/glew/win32.patch
new file mode 100644
index 0000000..86409c1
--- /dev/null
+++ b/contrib/src/glew/win32.patch
@@ -0,0 +1,77 @@
+--- glew/Makefile	2008-11-03 07:25:21.000000000 +0100
++++ glew.new/Makefile	2009-12-03 22:30:47.000000000 +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)
+@@ -48,9 +48,7 @@
+ TARDIR = ../glew-$(GLEW_VERSION)
+ TARBALL = ../glew_$(GLEW_VERSION).tar.gz
+ 
+-AR = ar
+ INSTALL = install
+-STRIP = strip
+ RM = rm -f
+ LN = ln -sf
+ ifeq ($(MAKECMDGOALS), debug)
+@@ -75,7 +73,7 @@
+ VISUALINFO.BIN.OBJS = $(VISUALINFO_BIN.SRCS:.c=.o)
+ 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: lib/$(LIB.SHARED) lib/$(LIB.STATIC)
+ 
+ lib:
+ 	mkdir lib
+@@ -112,27 +110,17 @@
+ 	$(INSTALL) -d -m 0755 $(INCDIR)
+ 	$(INSTALL) -d -m 0755 $(LIBDIR)
+ # runtime
+-ifeq ($(patsubst mingw%,mingw,$(SYSTEM)), mingw)
+-	$(STRIP) -x lib/$(LIB.SHARED)
+-	$(INSTALL) -m 0644 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
+ 	$(INSTALL) -m 0644 include/GL/wglew.h $(INCDIR)/
+ 	$(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)/
+-else
+-	strip -x lib/$(LIB.STATIC)
++	$(STRIP) -x lib/$(LIB.STATIC)
+ 	$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
+ 	$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
+-endif
+ # utilities
+-	$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/
+ 
+ uninstall:
+ 	$(RM) $(INCDIR)/wglew.h
+--- glew/config/Makefile.mingw	2008-11-03 07:25:20.000000000 +0100
++++ glew.new/config/Makefile.mingw	2009-12-03 22:18:32.000000000 +0100
+@@ -1,13 +1,11 @@
+ NAME = glew32
+-CC = gcc
+ # use gcc for linking, with ld it does not work
+-LD = gcc
+ ifneq (undefined, $(origin GLEW_MX))
+ CFLAGS.EXTRA = -DGLEW_MX
+ endif
+-CFLAGS.SO = -DGLEW_BUILD
++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.EXTRA = -L/mingw/lib
+ WARN = -Wall -W



More information about the vlc-commits mailing list