Skip to content

Instantly share code, notes, and snippets.

@ant32
Created July 18, 2013 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ant32/6031186 to your computer and use it in GitHub Desktop.
Save ant32/6031186 to your computer and use it in GitHub Desktop.
mingw-w64-lapack PKGBUILD fix
# Maintainer: Julien Schueller <julien.schueller@gmail.com>
pkgbase=lapack
pkgname=mingw-w64-lapack
pkgver=3.4.2
pkgrel=1
arch=(any)
pkgdesc="Linear Algebra PACKage (mingw-w64)"
depends=('mingw-w64-crt')
makedepends=('mingw-w64-gcc' 'cmake')
options=('!buildflags' '!strip')
license=('LGPL')
url="http://www.netlib.org/lapack"
source=("http://www.netlib.org/${pkgbase}/${pkgbase}-${pkgver}.tgz")
sha1sums=('93a6e4e6639aaf00571d53a580ddc415416e868b')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
build()
{
cd ${srcdir}/lapack-${pkgver}
for _arch in ${_architectures}; do
unset LDFLAGS CPPFLAGS
mkdir "build-${_arch}" && pushd "build-${_arch}"
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/${_arch} \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_Fortran_COMPILER=${_arch}-gfortran \
-DCMAKE_RC_COMPILER=/usr/bin/${_arch}-windres \
-DBUILD_SHARED_LIBS=ON \
..
make
popd
done
}
package()
{
for _arch in ${_architectures}; do
cd ${srcdir}/lapack-${pkgver}/build-${_arch}
make install DESTDIR=${pkgdir}
${_arch}-strip -x -g $pkgdir/usr/${_arch}/bin/*.dll
${_arch}-strip -g $pkgdir/usr/${_arch}/lib/*.a
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment