blob: 030394d59c65372d3ff4ecb582b4ffe06e41e7eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
pkgname=mingw-w64-nlopt
pkgver=2.9.0
pkgrel=1
pkgdesc="nonlinear optimization library (mingw-w64)"
arch=(any)
url="http://ab-initio.mit.edu/wiki/index.php/NLopt"
license=('LGPL')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-cmake')
options=('staticlibs' '!buildflags' '!strip')
source=("https://github.com/stevengj/nlopt/archive/v${pkgver}.tar.gz")
sha256sums=('6e899e297485e457ec1bf84844de29921aeef674f9d5caf60277df45dca6ff76')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
build() {
cd "$srcdir/nlopt-$pkgver"
for _arch in ${_architectures}; do
${_arch}-cmake -DNLOPT_GUILE=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_PYTHON=OFF -DCMAKE_UNITY_BUILD=ON -B build-${_arch} .
make -C build-${_arch}
done
}
package() {
for _arch in ${_architectures}; do
cd "$srcdir"/nlopt-${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
}
|