diff options
author | xantares | 2015-06-08 21:36:06 +0200 |
---|---|---|
committer | xantares | 2015-06-08 21:36:06 +0200 |
commit | fe47225de0bc8654414bced70c136a1b2f8a8e4c (patch) | |
tree | 0db5b5d44e04ecf0a20ee86519b6048b726271f7 | |
download | aur-fe47225de0bc8654414bced70c136a1b2f8a8e4c.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 52 |
2 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a7182ea37ff1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = mingw-w64-ilmbase + pkgdesc = Base libraries from ILM for OpenEXR (mingw-w64) + pkgver = 2.2.0 + pkgrel = 1 + url = http://www.openexr.com + arch = any + license = custom + makedepends = mingw-w64-configure + depends = mingw-w64-crt + options = !buildflags + options = !strip + options = staticlibs + source = http://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.0.tar.gz + md5sums = b540db502c5fa42078249f43d18a4652 + +pkgname = mingw-w64-ilmbase + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d3206ff73e4e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +pkgname=mingw-w64-ilmbase +pkgver=2.2.0 +pkgrel=1 +pkgdesc="Base libraries from ILM for OpenEXR (mingw-w64)" +arch=(any) +url="http://www.openexr.com" +license=('custom') +depends=("mingw-w64-crt") +makedepends=("mingw-w64-configure") +options=('!buildflags' '!strip' 'staticlibs') +source=("http://download.savannah.nongnu.org/releases/openexr/ilmbase-$pkgver.tar.gz") +md5sums=('b540db502c5fa42078249f43d18a4652') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare() { + cd "${srcdir}/ilmbase-$pkgver" + sed -i "s|COMMAND eLut >|COMMAND touch|g" Half/CMakeLists.txt + sed -i "s|COMMAND toFloat >|COMMAND touch|g" Half/CMakeLists.txt + + # no clue how to fix this one properly + grep -lr LDBL_EPSILON Imath | xargs sed -i "s|LDBL_EPSILON|1.08420217248550443401e-19L|g" + grep -lr DBL_EPSILON Imath | xargs sed -i "s|DBL_EPSILON|2.2204460492503131E-16|g" + grep -lr FLT_EPSILON Imath | xargs sed -i "s|FLT_EPSILON|1.19209290E-07F|g" +} + +build() { + cd "${srcdir}/ilmbase-$pkgver" + for _arch in ${_architectures}; do + mkdir -p build-${_arch} && pushd build-${_arch} + ${_arch}-cmake -DNAMESPACE_VERSIONING=OFF .. + g++ -o Half/eLut ../Half/eLut.cpp + g++ -o Half/toFloat ../Half/toFloat.cpp + ./Half/eLut > ./Half/eLut.h + ./Half/toFloat > ./Half/toFloat.h + make + popd + done +} + + +package() { + for _arch in ${_architectures}; do + cd "${srcdir}/ilmbase-$pkgver/build-${_arch}" + make DESTDIR="${pkgdir}" install + install -d "$pkgdir"/usr/${_arch}/bin + mv "$pkgdir"/usr/${_arch}/lib/*.dll "$pkgdir"/usr/${_arch}/bin + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + done +} + |