aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian <sebastian@sebsite.pw>2022-01-27 21:49:33 -0500
committerdispatch <dispatch@listserv.local>2022-01-28 03:00:37 +0000
commit6b82dbde7f4bc6228dd63bd3ae8de1c87e2d0fb7 (patch)
treebb43b6b022f267e6230e619bd46e0da65ca3f4ea
parentece6805ae4eff93723bec739415742a418395e83 (diff)
downloadaports-patches/3914.tar.gz
aports-patches/3914.tar.bz2
aports-patches/3914.tar.xz
community/glew: fix libdir in glew.pcpatches/3914
By default, glew sets the libdir in the pkg-config file to the LIBDIR that it is installed to. We don't want that here, so this commit patches the pkg-config file to always use the system's libdir (/usr/lib). Signed-off-by: Sebastian <sebastian@sebsite.pw>
-rw-r--r--community/glew/APKBUILD11
-rw-r--r--community/glew/glew.patch34
2 files changed, 41 insertions, 4 deletions
diff --git a/community/glew/APKBUILD b/community/glew/APKBUILD
index 4b3fb46f24..8d4ee3ffdf 100644
--- a/community/glew/APKBUILD
+++ b/community/glew/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glew
pkgver=2.2.0
-pkgrel=0
+pkgrel=1
pkgdesc="A cross-platform C/C++ extension loading library"
url="http://glew.sourceforge.net"
arch="all"
@@ -11,12 +11,12 @@ options="!check" # No test suite.
depends_dev="libxmu-dev libxi-dev mesa-dev glu-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev"
-source="https://downloads.sourceforge.net/glew/glew-$pkgver.tgz"
+source="https://downloads.sourceforge.net/glew/glew-$pkgver.tgz
+ glew.patch"
replaces="mesa-dev"
prepare() {
default_prepare
- sed -i 's|lib64|lib|' config/Makefile.linux
}
build() {
@@ -27,4 +27,7 @@ package() {
make GLEW_DEST="$pkgdir/usr" install
}
-sha512sums="57453646635609d54f62fb32a080b82b601fd471fcfd26e109f479b3fef6dfbc24b83f4ba62916d07d62cd06d1409ad7aa19bc1cd7cf3639c103c815b8be31d1 glew-2.2.0.tgz"
+sha512sums="
+57453646635609d54f62fb32a080b82b601fd471fcfd26e109f479b3fef6dfbc24b83f4ba62916d07d62cd06d1409ad7aa19bc1cd7cf3639c103c815b8be31d1 glew-2.2.0.tgz
+8fc5bee31d59f47d6097a77a36325fe5b64b320b786974218f770c0f4046ade59342ad8c48cc5af4306772321c57eefbfbcee54e37389a466f9de37c3ed1ec67 glew.patch
+"
diff --git a/community/glew/glew.patch b/community/glew/glew.patch
new file mode 100644
index 0000000000..4bc21e001a
--- /dev/null
+++ b/community/glew/glew.patch
@@ -0,0 +1,34 @@
+Fixes pkg-config file to have correct system libdir.
+
+diff -aur glew-2.2.0/Makefile glew-2.2.0-alpine/Makefile
+--- glew-2.2.0/Makefile 2020-03-15 11:53:59.000000000 +0000
++++ glew-2.2.0-alpine/Makefile 2022-01-28 02:42:23.773580331 +0000
+@@ -144,7 +144,7 @@
+ glew.pc: glew.pc.in
+ sed \
+ -e "s|@prefix@|$(GLEW_PREFIX)|g" \
+- -e "s|@libdir@|$(LIBDIR)|g" \
++ -e "s|@libdir@|/usr/lib|g" \
+ -e "s|@exec_prefix@|$(BINDIR)|g" \
+ -e "s|@includedir@|$(INCDIR)|g" \
+ -e "s|@version@|$(GLEW_VERSION)|g" \
+
+diff -aur glew-2.2.0/config/Makefile.linux glew-2.2.0-alpine/config/Makefile.linux
+--- glew-2.2.0/config/Makefile.linux 2020-03-15 11:53:59.000000000 +0000
++++ glew-2.2.0-alpine/config/Makefile.linux 2022-01-28 02:43:26.813582486 +0000
+@@ -12,13 +12,8 @@
+ ifeq (e2k,${M_ARCH})
+ ARCH64 = true
+ endif
+-ifeq (${ARCH64},true)
+- LDFLAGS.EXTRA = -L/usr/X11R6/lib64 -L/usr/lib64
+- LIBDIR = $(GLEW_DEST)/lib64
+-else
+- LDFLAGS.EXTRA = -L/usr/X11R6/lib -L/usr/lib
+- LIBDIR = $(GLEW_DEST)/lib
+-endif
++LDFLAGS.EXTRA = -L/usr/X11R6/lib -L/usr/lib
++LIBDIR = $(GLEW_DEST)/usr/lib
+ LDFLAGS.GL = -lGL -lX11
+ LDFLAGS.STATIC = -Wl,-Bstatic
+ LDFLAGS.DYNAMIC = -Wl,-Bdynamic