diff options
author | Michel Zou | 2018-02-22 22:22:31 +0100 |
---|---|---|
committer | Michel Zou | 2018-02-22 22:22:31 +0100 |
commit | a759edc085bfdeb6be1dcca157784222de91d2b3 (patch) | |
tree | 9fced4fbfc4272903d927b31929afbd533c2a536 | |
download | aur-a759edc085bfdeb6be1dcca157784222de91d2b3.tar.gz |
wip
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 39 |
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a612d4f136ef --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +# Generated by mksrcinfo v8 +# Thu Feb 22 21:22:31 UTC 2018 +pkgbase = mingw-w64-mesa + pkgdesc = an open-source implementation of the OpenGL specification (mingw-w64) (WIP) + pkgver = 17.3.5 + pkgrel = 1 + url = https://www.mesa3d.org/ + arch = any + license = custom + makedepends = mingw-w64-configure + makedepends = mingw-w64-llvm + depends = mingw-w64-crt + options = staticlibs + options = !strip + options = !buildflags + source = https://mesa.freedesktop.org/archive/mesa-17.3.5.tar.xz + sha256sums = eb9228fc8aaa71e0205c1481c5b157752ebaec9b646b030d27478e25a6d7936a + +pkgname = mingw-w64-mesa + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f7063fa101cf --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +pkgname=mingw-w64-mesa +pkgver=17.3.5 +pkgrel=1 +pkgdesc="an open-source implementation of the OpenGL specification (mingw-w64) (WIP) " +arch=('any') +url="https://www.mesa3d.org/" +license=("custom") +makedepends=('mingw-w64-configure' 'mingw-w64-llvm') +depends=('mingw-w64-crt') +options=('staticlibs' '!strip' '!buildflags') +source=("https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz") +sha256sums=('eb9228fc8aaa71e0205c1481c5b157752ebaec9b646b030d27478e25a6d7936a') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +# https://wiki.qt.io/Cross_compiling_Mesa_for_Windows +# https://www.mesa3d.org/install.html + +build() { + cd "${srcdir}"/mesa-${pkgver} + for _arch in ${_architectures}; do + export LLVM=/usr + cp -r "${srcdir}"/mesa-${pkgver} "${srcdir}"/build-${_arch} && pushd "${srcdir}"/build-${_arch} +# mkdir -p build-${_arch} && pushd build-${_arch} + LDFLAGS="-static -s" CC=/usr/bin/${_arch}-clang scons build=release platform=windows toolchain=crossmingw llvm=yes machine=x86 libgl-gdi + make + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "${srcdir}/build-${_arch}" + make DESTDIR="$pkgdir" install + rm -r "$pkgdir/usr/${_arch}/share" + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + done +} |