aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian <sebastian@sebsite.pw>2022-01-27 22:59:03 -0500
committeralice <alice@ayaya.dev>2022-02-17 00:56:26 +0000
commit2e43b15f3a6a2c197dd548cb4516705226d10a90 (patch)
treea8df6b212aef4f87fc25249b886f8ccdcdab4037
parent0baaeba76d0f9e723b4d7e66e9d239c9fde2d288 (diff)
downloadaports-2e43b15f3a6a2c197dd548cb4516705226d10a90.tar.gz
aports-2e43b15f3a6a2c197dd548cb4516705226d10a90.tar.bz2
aports-2e43b15f3a6a2c197dd548cb4516705226d10a90.tar.xz
community/glew: fix libdir in glew.pc
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/APKBUILD16
-rw-r--r--community/glew/glew.patch34
2 files changed, 42 insertions, 8 deletions
diff --git a/community/glew/APKBUILD b/community/glew/APKBUILD
index 4b3fb46f24..ccf75f81b2 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,14 +11,11 @@ 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() {
make CFLAGS.EXTRA="$CFLAGS -fPIC"
}
@@ -27,4 +24,7 @@ package() {
make GLEW_DEST="$pkgdir/usr" install
}
-sha512sums="57453646635609d54f62fb32a080b82b601fd471fcfd26e109f479b3fef6dfbc24b83f4ba62916d07d62cd06d1409ad7aa19bc1cd7cf3639c103c815b8be31d1 glew-2.2.0.tgz"
+sha512sums="
+57453646635609d54f62fb32a080b82b601fd471fcfd26e109f479b3fef6dfbc24b83f4ba62916d07d62cd06d1409ad7aa19bc1cd7cf3639c103c815b8be31d1 glew-2.2.0.tgz
+ceee2d21ce0f4f6cd4b8d9e524440a30c31cd2aa4fa206f2a8081c49d10db5779979bfb15087218d6f290faed9a4ed01e3d26c6a88768fe3ed66f8b171ae2b34 glew.patch
+"
diff --git a/community/glew/glew.patch b/community/glew/glew.patch
new file mode 100644
index 0000000000..61c4447ba9
--- /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)/lib
+ LDFLAGS.GL = -lGL -lX11
+ LDFLAGS.STATIC = -Wl,-Bstatic
+ LDFLAGS.DYNAMIC = -Wl,-Bdynamic