[arch-commits] Commit in glew/trunk (PKGBUILD glew-install.patch)

Andreas Radke andyrtr at archlinux.org
Fri Apr 17 11:23:24 UTC 2020


    Date: Friday, April 17, 2020 @ 11:23:23
  Author: andyrtr
Revision: 380454

prepare new release

Added:
  glew/trunk/glew-install.patch
Modified:
  glew/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   28 +++++++++++--------
 glew-install.patch |   73 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-17 07:40:16 UTC (rev 380453)
+++ PKGBUILD	2020-04-17 11:23:23 UTC (rev 380454)
@@ -3,28 +3,34 @@
 # Contributor: SleepyDog
 
 pkgname=glew
-pkgver=2.1.0
+pkgver=2.2.0
 pkgrel=1
 pkgdesc="The OpenGL Extension Wrangler Library"
 arch=('x86_64')
-url="http://glew.sourceforge.net" # no https available
+url="https://github.com/nigels-com/glew"
 license=('BSD' 'MIT' 'GPL')
 depends=('libxmu' 'libxi' 'glu')
-source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz)
-sha1sums=('18eca05460d0b61709fc115e632b6fe320718b44')
+# https://sourceforge.net/projects/glew/files/glew/
+source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz
+        glew-install.patch)
+sha1sums=('22d6e9b9e691080eb6313407dbf51cfebc3345ea'
+          'e1bfa1e6ae3c7a553920978111092ea9d3a33c95')
 
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -Np1 -i ../glew-install.patch
+}
+
 build() {
   cd ${pkgname}-${pkgver}
-  
-  sed -i 's|lib64|lib|' config/Makefile.linux
-  sed -i '/^.PHONY: .*\.pc$/d' Makefile
-  make
+  make \
+   STRIP= \
+   LIBDIR=/usr/lib
 }
 
 package() {
   cd ${pkgname}-${pkgver}
-  make GLEW_DEST="${pkgdir}/usr" install.all
+  make install.all DESTDIR="$pkgdir" \
+    LIBDIR=/usr/lib
   install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
-#  chmod 0755 "${pkgdir}"/usr/lib/libGLEW*.so.${pkgver}
 }

Added: glew-install.patch
===================================================================
--- glew-install.patch	                        (rev 0)
+++ glew-install.patch	2020-04-17 11:23:23 UTC (rev 380454)
@@ -0,0 +1,73 @@
+--- glew-2.2.0/Makefile	2020-03-15 12:53:59.000000000 +0100
++++ glew-2.2.0/Makefile	2020-04-17 11:51:25.568482195 +0200
+@@ -120,7 +120,7 @@
+ endif
+ 
+ $(LIB.SHARED.DIR)/$(LIB.SHARED): $(LIB.SOBJS)
+-	$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
++	$(LD) $(LDFLAGS.SO) $(LDFLAGS) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
+ ifneq ($(LN),)
+ 	$(LN) $(LIB.SHARED) $(LIB.SHARED.DIR)/$(LIB.SONAME)
+ 	$(LN) $(LIB.SHARED) $(LIB.SHARED.DIR)/$(LIB.DEVLNK)
+@@ -131,11 +131,11 @@
+ 
+ tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+ 	@mkdir -p $(dir $@)
+-	$(CC) -DGLEW_NO_GLU -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
++	$(CC) -DGLEW_NO_GLU -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) $(LDFLAGS) -o $@ -c $<
+ 
+ tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+ 	@mkdir -p $(dir $@)
+-	$(CC) -DGLEW_NO_GLU -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
++	$(CC) -DGLEW_NO_GLU -DGLEW_BUILD $(CFLAGS) $(CFLAGS.SO) $(LDFLAGS) -o $@ -c $<
+ 
+ # Force re-write of glew.pc, GLEW_DEST can vary
+ 
+@@ -180,13 +180,13 @@
+ 	mkdir bin
+ 
+ bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
+-	$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
+ ifneq ($(STRIP),)
+ 	$(STRIP) -x $@
+ endif
+ 
+ bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
+-	$(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.OBJ) $(BIN.LIBS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(VISUALINFO.BIN.OBJ) $(BIN.LIBS)
+ ifneq ($(STRIP),)
+ 	$(STRIP) -x $@
+ endif
+@@ -193,11 +193,11 @@
+ 
+ $(GLEWINFO.BIN.OBJ): $(GLEWINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+ 	@mkdir -p $(dir $@)
+-	$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
++	$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) $(LDFLAGS) -o $@ -c $<
+ 
+ $(VISUALINFO.BIN.OBJ): $(VISUALINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+ 	@mkdir -p $(dir $@)
+-	$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
++	$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) $(LDFLAGS) -o $@ -c $<
+ 
+ # Install targets
+ 
+--- glew-2.1.0/Makefile.install	2018-08-15 13:51:45.220637107 +0200
++++ glew-2.1.0/Makefile	2018-08-15 13:52:02.168740876 +0200
+@@ -231,6 +231,7 @@ install.bin: glew.bin
+ 
+ install.include:
+ 	$(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
++	$(INSTALL) -m 0644 include/GL/eglew.h "$(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)/"
+@@ -241,6 +242,7 @@ install.pkgconfig: glew.pc
+ 	$(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(PKGDIR)/"
+ 
+ uninstall:
++	$(RM) "$(DESTDIR)$(INCDIR)/eglew.h"
+ 	$(RM) "$(DESTDIR)$(INCDIR)/wglew.h"
+ 	$(RM) "$(DESTDIR)$(INCDIR)/glew.h"
+ 	$(RM) "$(DESTDIR)$(INCDIR)/glxew.h"



More information about the arch-commits mailing list