diff options
author | xantares | 2015-06-08 23:01:00 +0200 |
---|---|---|
committer | xantares | 2015-06-08 23:01:00 +0200 |
commit | 6236528725ce236dbc4b358da641a90d443ae67d (patch) | |
tree | 3475f20cceadc483084dd27ef50b4e1c1a827122 | |
download | aur-6236528725ce236dbc4b358da641a90d443ae67d.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5d1c0ba7cc0c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = mingw-w64-optpp + pkgdesc = An Object-Oriented Nonlinear Optimization Library (mingw-w64) + pkgver = 2.4 + pkgrel = 3 + url = https://software.sandia.gov/opt++/ + arch = any + license = LGPL2.1 + makedepends = mingw-w64-configure + depends = mingw-w64-blas + options = staticlibs + options = !buildflags + options = !strip + source = https://software.sandia.gov/opt++//downloads/optpp-2.4.tar.gz + sha1sums = 089fb515f2f2e8632d603f2d1306d39aa355e9f0 + +pkgname = mingw-w64-optpp + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..408bbdc0f38e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ + +pkgname=mingw-w64-optpp +pkgver=2.4 +pkgrel=3 +pkgdesc='An Object-Oriented Nonlinear Optimization Library (mingw-w64)' +url='https://software.sandia.gov/opt++/' +arch=('any') +license=('LGPL2.1') +depends=('mingw-w64-blas') +makedepends=('mingw-w64-configure') +options=('staticlibs' '!buildflags' '!strip') +source=("${url}/downloads/optpp-${pkgver}.tar.gz") +sha1sums=('089fb515f2f2e8632d603f2d1306d39aa355e9f0') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "${srcdir}/optpp-${pkgver}" + sed -i "26i@top_builddir@_lib_libnewmat_la_LDFLAGS = -no-undefined" newmat11/Makefile.am + sed -i "22i@top_builddir@_lib_libopt_la_LIBADD = @top_builddir@/lib/libnewmat.la" src/Makefile.am + sed -i "23i@top_builddir@_lib_libopt_la_LDFLAGS = -no-undefined" src/Makefile.am + autoreconf -vfi +} + +build() { + cd "${srcdir}/optpp-${pkgver}" + for _arch in ${_architectures}; do + mkdir -p build-${_arch} && pushd build-${_arch} + ${_arch}-configure --includedir=/usr/${_arch}/include/opt++ + make + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "$srcdir"/optpp-${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 +} |