From 094647cb14cf99b776f7c635068a702e4968902a Mon Sep 17 00:00:00 2001 From: hasufell Date: Wed, 24 Jul 2013 01:41:27 +0200 Subject: [PATCH 1/4] BUILD: respect DESTDIR variable DESTDIR is used for temporary install location in package managers otherwise you have to add the temporary locations to BINDIR and LIBDIR which can cause trouble with the pkg-config file. --- Makefile | 74 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/Makefile b/Makefile index e6f08a7..9fdac23 100644 --- a/Makefile +++ b/Makefile @@ -231,81 +231,81 @@ install: install.include install.lib install.pkgconfig install.mx: install.include install.lib.mx install.pkgconfig.mx install.lib: glew.lib - $(INSTALL) -d -m 0755 $(LIBDIR) + $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)" # runtime ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) - $(INSTALL) -d -m 0755 $(BINDIR) - $(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/ + $(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)" + $(INSTALL) -m 0755 lib/$(LIB.SHARED) "$(DESTDIR)$(BINDIR)/" else - $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/ + $(INSTALL) -m 0644 lib/$(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/" endif ifneq ($(LN),) - $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME) + $(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)" endif # development files ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) - $(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/ + $(INSTALL) -m 0644 lib/$(LIB.DEVLNK) "$(DESTDIR)$(LIBDIR)/" endif ifneq ($(LN),) - $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK) + $(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)" endif - $(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/ + $(INSTALL) -m 0644 lib/$(LIB.STATIC) "$(DESTDIR)$(LIBDIR)/" install.lib.mx: glew.lib.mx - $(INSTALL) -d -m 0755 $(LIBDIR) + $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)" # runtime ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) - $(INSTALL) -d -m 0755 $(BINDIR) - $(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) $(BINDIR)/ + $(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)" + $(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) "$(DESTDIR)$(BINDIR)/" else - $(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) $(LIBDIR)/ + $(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) "$(DESTDIR)$(LIBDIR)/" endif ifneq ($(LN),) - $(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.SONAME.MX) + $(LN) $(LIB.SHARED.MX) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME.MX)" endif # development files ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) - $(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) $(LIBDIR)/ + $(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) "$(DESTDIR)$(LIBDIR)/" endif ifneq ($(LN),) - $(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.DEVLNK.MX) + $(LN) $(LIB.SHARED.MX) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK.MX)" endif - $(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/ + $(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) "$(DESTDIR)$(LIBDIR)/" install.bin: glew.bin - $(INSTALL) -d -m 0755 $(BINDIR) - $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/ + $(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)" + $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/" install.include: - $(INSTALL) -d -m 0755 $(INCDIR) - $(INSTALL) -m 0644 include/GL/wglew.h $(INCDIR)/ - $(INSTALL) -m 0644 include/GL/glew.h $(INCDIR)/ - $(INSTALL) -m 0644 include/GL/glxew.h $(INCDIR)/ + $(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)" + $(INSTALL) -m 0644 include/GL/wglew.h "$(DESTDIR)$(INCDIR)/" + $(INSTALL) -m 0644 include/GL/glew.h "$(DESTDIR)$(INCDIR)/" + $(INSTALL) -m 0644 include/GL/glxew.h "$(DESTDIR)$(INCDIR)/" install.pkgconfig: glew.pc - $(INSTALL) -d -m 0755 $(LIBDIR) - $(INSTALL) -d -m 0755 $(LIBDIR)/pkgconfig - $(INSTALL) -m 0644 glew.pc $(LIBDIR)/pkgconfig/ + $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)" + $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)/pkgconfig" + $(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(LIBDIR)/pkgconfig/" install.pkgconfig.mx: glewmx.pc - $(INSTALL) -d -m 0755 $(LIBDIR) - $(INSTALL) -d -m 0755 $(LIBDIR)/pkgconfig - $(INSTALL) -m 0644 glewmx.pc $(LIBDIR)/pkgconfig/ + $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)" + $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)/pkgconfig" + $(INSTALL) -m 0644 glewmx.pc "$(DESTDIR)$(LIBDIR)/pkgconfig/" uninstall: - $(RM) $(INCDIR)/wglew.h - $(RM) $(INCDIR)/glew.h - $(RM) $(INCDIR)/glxew.h - $(RM) $(LIBDIR)/$(LIB.DEVLNK) $(LIBDIR)/$(LIB.DEVLNK.MX) + $(RM) "$(DESTDIR)$(INCDIR)/wglew.h" + $(RM) "$(DESTDIR)$(INCDIR)/glew.h" + $(RM) "$(DESTDIR)$(INCDIR)/glxew.h" + $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)" "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK.MX)" ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) - $(RM) $(BINDIR)/$(LIB.SHARED) $(BINDIR)/$(LIB.SHARED.MX) + $(RM) "$(DESTDIR)$(BINDIR)/$(LIB.SHARED)" "$(DESTDIR)$(BINDIR)/$(LIB.SHARED.MX)" else - $(RM) $(LIBDIR)/$(LIB.SONAME) $(LIBDIR)/$(LIB.SONAME.MX) - $(RM) $(LIBDIR)/$(LIB.SHARED) $(LIBDIR)/$(LIB.SHARED.MX) + $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)" "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME.MX)" + $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SHARED)" "$(DESTDIR)$(LIBDIR)/$(LIB.SHARED.MX)" endif - $(RM) $(LIBDIR)/$(LIB.STATIC) $(LIBDIR)/$(LIB.STATIC.MX) - $(RM) $(BINDIR)/$(GLEWINFO.BIN) $(BINDIR)/$(VISUALINFO.BIN) + $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.STATIC)" "$(DESTDIR)$(LIBDIR)/$(LIB.STATIC.MX)" + $(RM) "$(DESTDIR)$(BINDIR)/$(GLEWINFO.BIN)" "$(DESTDIR)$(BINDIR)/$(VISUALINFO.BIN)" clean: $(RM) -r tmp/ From 6fe1c906e7867b42189a8096403ccc4cc7998c4c Mon Sep 17 00:00:00 2001 From: Keith Rosenberg Date: Fri, 20 Sep 2013 21:44:05 -0400 Subject: [PATCH 2/4] Update README steps for make Including the other couple of steps to make for others for whom it is not obvious. Generally people find out about GLEW when using it as dependency of another lib, and they may or may not be familiar with the make process. Leaving it vague leads to more people reporting issues, which I'm aiming to avoid here! --- README.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.txt b/README.txt index 1b19c53..a609a15 100644 --- a/README.txt +++ b/README.txt @@ -5,6 +5,12 @@ If you downloaded the tarball from the GLEW website, you just need to: Unix: make + + sudo -s + + make install + + make clean Windows: From 8206b443d1cee323acacb6abe4db6429237c06e2 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 26 Sep 2013 11:52:56 -0500 Subject: [PATCH 3/4] Add GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED for GL 4.4 --- auto/core/gl/GL_VERSION_4_4 | 1 + 1 file changed, 1 insertion(+) diff --git a/auto/core/gl/GL_VERSION_4_4 b/auto/core/gl/GL_VERSION_4_4 index dfa3bf2..e312978 100644 --- a/auto/core/gl/GL_VERSION_4_4 +++ b/auto/core/gl/GL_VERSION_4_4 @@ -2,4 +2,5 @@ GL_VERSION_4_4 http://www.opengl.org/registry/ GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 + GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 From d59a3108e3e84efbedba51755143ceab14fb98f7 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 26 Sep 2013 11:55:35 -0500 Subject: [PATCH 4/4] Add GL_TEXTURE_BUFFER_BINDING for GL 4.4 --- auto/core/gl/GL_VERSION_4_4 | 1 + 1 file changed, 1 insertion(+) diff --git a/auto/core/gl/GL_VERSION_4_4 b/auto/core/gl/GL_VERSION_4_4 index e312978..8cb83ca 100644 --- a/auto/core/gl/GL_VERSION_4_4 +++ b/auto/core/gl/GL_VERSION_4_4 @@ -3,4 +3,5 @@ http://www.opengl.org/registry/ GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 + GL_TEXTURE_BUFFER_BINDING 0x8C2A