summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2019-05-24 11:38:44 +0200
committerMichel Zou2019-05-24 11:38:44 +0200
commitfdafc11b02be64fff6cfdd53373f4d97f67b40fc (patch)
tree682aefd33bf0aa06498cec19f38b75f081551a5d
parentb83ecca9881c9b104038618750deafcf1835dd87 (diff)
downloadaur-fdafc11b02be64fff6cfdd53373f4d97f67b40fc.tar.gz
use cmake
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD40
2 files changed, 13 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e8c53864d1b..4e31c950c8b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,11 @@
pkgbase = mingw-w64-glew
pkgdesc = GLEW, The OpenGL Extension Wrangler Library (mingw-w64)
pkgver = 2.1.0
- pkgrel = 3
+ pkgrel = 4
url = http://glew.sourceforge.net/
arch = any
license = Modified BSD/MIT/GPL
- makedepends = mingw-w64-gcc
+ makedepends = mingw-w64-cmake
depends = mingw-w64-crt
options = !strip
options = !buildflags
diff --git a/PKGBUILD b/PKGBUILD
index 97e56a1361f..a327ab7d541 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,52 +1,34 @@
pkgname=mingw-w64-glew
pkgver=2.1.0
-pkgrel=3
+pkgrel=4
pkgdesc="GLEW, The OpenGL Extension Wrangler Library (mingw-w64)"
arch=('any')
url="http://glew.sourceforge.net/"
license=('Modified BSD/MIT/GPL')
depends=('mingw-w64-crt')
-makedepends=('mingw-w64-gcc')
+makedepends=('mingw-w64-cmake')
options=('!strip' '!buildflags' 'staticlibs')
source=("https://github.com/nigels-com/glew/releases/download/glew-${pkgver}/glew-${pkgver}.tgz")
sha256sums=('04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
-#Config file to use included in ${srcdir}/glew-${pkgver}/config
-_config="mingw"
-
-prepare () {
- cd ${srcdir}/glew-${pkgver}
- # multiple definition of `DllMainCRTStartup@12'
- sed -i "20882,20892d" src/glew.c
-}
build() {
+ cd ${srcdir}/glew-${pkgver}
for _arch in ${_architectures}; do
- cp -R ${srcdir}/glew-${pkgver} ${srcdir}/glew-${pkgver}-${_arch}
- cd ${srcdir}/glew-${pkgver}-${_arch}
- make SYSTEM=${_config} \
- CC=${_arch}-gcc \
- AR="${_arch}-ar" \
- ARFLAGS=crs \
- RANLIB="${_arch}-ranlib" \
- STRIP="${_arch}-strip" \
- LD="${_arch}-gcc" \
- LDFLAGS.GL="-lopengl32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32" \
- LDFLAGS.EXTRA="" \
- CFLAGS.EXTRA="-D_FORTIFY_SOURCE=2 -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4" \
- all
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-cmake ../build/cmake/
+ make
+ popd
done
}
package() {
for _arch in ${_architectures}; do
- cd ${srcdir}/glew-${pkgver}-${_arch}
- make SYSTEM=${_config} \
- GLEW_DEST="/usr/${_arch}" \
- GLEW_PREFIX="/usr/${_arch}" \
- DESTDIR="${pkgdir}" \
- install
+ cd "$srcdir/glew-${pkgver}/build-${_arch}"
+ make install DESTDIR="$pkgdir"
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
done
}