summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2018-09-23 19:55:36 +0200
committerMichel Zou2018-09-23 19:55:36 +0200
commit7a274fbba2f79d3ff76a5edfaa501c903fbda114 (patch)
tree9371600f5d435cafbda154abf1edcb40bae32cd2
parent2da8c42043b65f0f6d7424e888600fcdb2f68315 (diff)
downloadaur-7a274fbba2f79d3ff76a5edfaa501c903fbda114.tar.gz
crt6
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD24
2 files changed, 13 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d76110ba874..a54b4444877 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Tue Sep 26 16:43:14 UTC 2017
pkgbase = mingw-w64-glew
pkgdesc = GLEW, The OpenGL Extension Wrangler Library (mingw-w64)
pkgver = 2.1.0
- pkgrel = 1
+ pkgrel = 2
url = http://glew.sourceforge.net/
arch = any
license = Modified BSD/MIT/GPL
diff --git a/PKGBUILD b/PKGBUILD
index 4de252b6c63..646d9c13aeb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=mingw-w64-glew
pkgver=2.1.0
-pkgrel=1
+pkgrel=2
pkgdesc="GLEW, The OpenGL Extension Wrangler Library (mingw-w64)"
arch=('any')
url="http://glew.sourceforge.net/"
@@ -15,17 +15,16 @@ _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
#Config file to use included in ${srcdir}/glew-${pkgver}/config
_config="mingw"
-build() {
+prepare () {
cd ${srcdir}/glew-${pkgver}
- #Patch the makefile (Stolen from original pkgbuild, not sure if required)
- sed -i "s/\<cr\>/crs/g" Makefile
+ # multiple definition of `DllMainCRTStartup@12'
+ sed -i "20882,20892d" src/glew.c
+}
+
+build() {
for _arch in ${_architectures}; do
cp -R ${srcdir}/glew-${pkgver} ${srcdir}/glew-${pkgver}-${_arch}
cd ${srcdir}/glew-${pkgver}-${_arch}
- #Patch the config file, required because putting LD as an env var doesn't work for whatever reason.
- sed -i "/^\<LD\>/d" config/Makefile.${_config}
- #gcc replaces ld because ld doesn't work.
- echo "LD := ${_arch}-gcc" >> config/Makefile.${_config}
make SYSTEM=${_config} \
CC=${_arch}-gcc \
AR="${_arch}-ar" \
@@ -33,8 +32,8 @@ build() {
RANLIB="${_arch}-ranlib" \
STRIP="${_arch}-strip" \
LD="${_arch}-gcc" \
- LDFLAGS.GL="-lopengl32 -lgdi32 -luser32 -lkernel32 -lmingw32 -lmsvcrt" \
- GLEW_DEST="${pkgdir}/usr/${_arch}" \
+ LDFLAGS.GL="-lopengl32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32" \
+ LDFLAGS.EXTRA="" \
CFLAGS.EXTRA="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" \
all
done
@@ -44,9 +43,10 @@ package() {
for _arch in ${_architectures}; do
cd ${srcdir}/glew-${pkgver}-${_arch}
make SYSTEM=${_config} \
- GLEW_DEST="${pkgdir}/usr/${_arch}" \
+ GLEW_DEST="/usr/${_arch}" \
+ GLEW_PREFIX="/usr/${_arch}" \
+ DESTDIR="${pkgdir}" \
install
- sed -i "s|${pkgdir}||g" "${pkgdir}"/usr/${_arch}/lib/pkgconfig/glew.pc
done
}