summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxantares2015-06-08 21:35:11 +0200
committerxantares2015-06-08 21:35:11 +0200
commit98d2fe845d8f1dd20a6a50ad277a7d629f5f557f (patch)
treea417ebf15d90d541ac81b5b9a44fd0feba1f4090
downloadaur-98d2fe845d8f1dd20a6a50ad277a7d629f5f557f.tar.gz
Initial import
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD50
-rw-r--r--openexr-2.1.0_aligned-malloc.patch13
-rw-r--r--openexr-2.1.0_cast.patch12
4 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..58fc7a4fa2f5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = mingw-w64-openexr
+ pkgdesc = An high dynamic-range image file format library (mingw-w64)
+ pkgver = 2.2.0
+ pkgrel = 1
+ url = http://www.openexr.com/
+ arch = any
+ license = BSD
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-crt
+ depends = mingw-w64-zlib
+ depends = mingw-w64-ilmbase
+ options = staticlibs
+ options = !buildflags
+ options = !strip
+ source = http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz
+ source = openexr-2.1.0_aligned-malloc.patch
+ source = openexr-2.1.0_cast.patch
+ md5sums = b64e931c82aa3790329c21418373db4e
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = mingw-w64-openexr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..30c5738b5ee0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+
+pkgname=mingw-w64-openexr
+pkgver=2.2.0
+pkgrel=1
+pkgdesc="An high dynamic-range image file format library (mingw-w64)"
+url="http://www.openexr.com/"
+arch=(any)
+license=('BSD')
+depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-ilmbase')
+makedepends=('mingw-w64-configure')
+options=('staticlibs' '!buildflags' '!strip')
+source=("http://download.savannah.nongnu.org/releases/openexr/openexr-${pkgver}.tar.gz" openexr-2.1.0_aligned-malloc.patch openexr-2.1.0_cast.patch)
+md5sums=('b64e931c82aa3790329c21418373db4e' SKIP SKIP)
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}/openexr-${pkgver}"
+ # fedora patches
+ patch -p1 -i "${srcdir}"/openexr-2.1.0_aligned-malloc.patch
+ patch -p1 -i "${srcdir}"/openexr-2.1.0_cast.patch
+
+ # https://github.com/openexr/openexr/pull/159
+ sed -i "s|COMMAND \${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_CFG_INTDIR}/b44ExpLogTable >|COMMAND wine \${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_CFG_INTDIR}/b44ExpLogTable.exe >|g" IlmImf/CMakeLists.txt
+ sed -i "s|COMMAND \${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_CFG_INTDIR}/dwaLookups >|COMMAND wine \${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_CFG_INTDIR}/dwaLookups.exe >|g" IlmImf/CMakeLists.txt
+}
+
+build() {
+ cd "${srcdir}/openexr-${pkgver}"
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-cmake -DNAMESPACE_VERSIONING=OFF -DILMBASE_PACKAGE_PREFIX=/usr/${_arch} ..
+ cp /usr/${_arch}/bin/*.dll IlmImf
+ make VERBOSE=1
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/openexr-${pkgver}/build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ install -d "$pkgdir"/usr/${_arch}/bin
+ mv "$pkgdir"/usr/${_arch}/lib/*.dll "$pkgdir"/usr/${_arch}/bin
+ rm -r "$pkgdir"/usr/${_arch}/share
+ rm "$pkgdir"/usr/${_arch}/bin/*.exe
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
diff --git a/openexr-2.1.0_aligned-malloc.patch b/openexr-2.1.0_aligned-malloc.patch
new file mode 100644
index 000000000000..6dd66f6d5ad7
--- /dev/null
+++ b/openexr-2.1.0_aligned-malloc.patch
@@ -0,0 +1,13 @@
+diff -rupN openexr-2.1.0/IlmImf/ImfSystemSpecific.h openexr-2.1.0-new/IlmImf/ImfSystemSpecific.h
+--- openexr-2.1.0/IlmImf/ImfSystemSpecific.h 2013-10-21 21:02:22.000000000 +0200
++++ openexr-2.1.0-new/IlmImf/ImfSystemSpecific.h 2013-12-27 01:57:30.936052388 +0100
+@@ -60,8 +60,7 @@ static bool GLOBAL_SYSTEM_LITTLE_ENDIAN
+
+ static void* EXRAllocAligned(size_t size, size_t alignment)
+ {
+- void* ptr = 0;
+- posix_memalign(&ptr, alignment, size);
++ void* ptr = _aligned_malloc(alignment, size);
+ return ptr;
+ }
+
diff --git a/openexr-2.1.0_cast.patch b/openexr-2.1.0_cast.patch
new file mode 100644
index 000000000000..f68f93150d9d
--- /dev/null
+++ b/openexr-2.1.0_cast.patch
@@ -0,0 +1,12 @@
+diff -rupN openexr-2.1.0/IlmImf/ImfOptimizedPixelReading.h openexr-2.1.0-new/IlmImf/ImfOptimizedPixelReading.h
+--- openexr-2.1.0/IlmImf/ImfOptimizedPixelReading.h 2013-07-29 19:58:48.000000000 +0200
++++ openexr-2.1.0-new/IlmImf/ImfOptimizedPixelReading.h 2013-12-27 02:04:23.286563455 +0100
+@@ -84,7 +84,7 @@ EXR_FORCEINLINE
+ bool
+ isPointerSSEAligned (const void* EXR_RESTRICT pPointer)
+ {
+- unsigned long trailingBits = ((unsigned long)pPointer) & 15;
++ intptr_t trailingBits = ((intptr_t)pPointer) & 15;
+ return trailingBits == 0;
+ }
+