summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Northon2020-05-21 12:28:23 -0400
committerPatrick Northon2020-05-21 12:28:23 -0400
commit082a77ad91b6a7e1e07e0b9bdf1674fcf7ce55a3 (patch)
treee64d09b96ff1e49d2ff534d1f4d9c371ce2be03b
downloadaur-082a77ad91b6a7e1e07e0b9bdf1674fcf7ce55a3.tar.gz
Initial commit.
-rw-r--r--.SRCINFO32
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD64
-rw-r--r--mingw-compile-fix.patch33
4 files changed, 130 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4285ded5e9ef
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = mingw-w64-openimageio
+ pkgdesc = A library for reading and writing images.
+ pkgver = 2.1.15.0
+ pkgrel = 1
+ url = https://github.com/OpenImageIO/oiio/
+ arch = any
+ license = BSD-3-Clause
+ depends = mingw-w64-boost
+ depends = mingw-w64-openexr
+ depends = mingw-w64-libtiff
+ optdepends = mingw-w64-libjpeg-turbo
+ optdepends = mingw-w64-bzip2
+ optdepends = mingw-w64-libpng
+ optdepends = mingw-w64-zlib
+ optdepends = mingw-w64-intel-tbb
+ optdepends = mingw-w64-giflib
+ optdepends = mingw-w64-libwebp
+ optdepends = mingw-w64-freetype2: install mingw-w64-freetype2-bootstrap and mingw-w64-cairo-bootstrap first.
+ optdepends = mingw-w64-opencolorio
+ optdepends = mingw-w64-opencv
+ optdepends = mingw-w64-ffmpeg
+ optdepends = mingw-w64-libsquish
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = https://github.com/OpenImageIO/oiio/archive/Release-2.1.15.0.tar.gz
+ source = mingw-compile-fix.patch
+ sha256sums = 95b90ba22b73765cbcbd9e11891769c2e78696ad24d4af77ef3f3c8674422401
+ sha256sums = 87e13ccaf0359ad86713721448f14073d9e4b8904fb1353b259c351482c326a7
+
+pkgname = mingw-w64-openimageio
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..72e8ffc0db8a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..132df0e7671a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>
+
+pkgname=mingw-w64-openimageio
+pkgver=2.1.15.0
+pkgrel=1
+pkgdesc="A library for reading and writing images."
+url="https://github.com/OpenImageIO/oiio/"
+license=("BSD-3-Clause")
+depends=(
+ "mingw-w64-boost"
+ "mingw-w64-openexr"
+ "mingw-w64-libtiff"
+)
+builddepends=("mingw-w64-cmake")
+arch=("any")
+options=(!strip !buildflags staticlibs)
+optdepends=(
+ "mingw-w64-libjpeg-turbo"
+ "mingw-w64-bzip2"
+ "mingw-w64-libpng"
+ "mingw-w64-zlib"
+ "mingw-w64-intel-tbb"
+ "mingw-w64-giflib"
+ "mingw-w64-libwebp"
+ "mingw-w64-freetype2: install mingw-w64-freetype2-bootstrap and mingw-w64-cairo-bootstrap first."
+ "mingw-w64-opencolorio"
+ "mingw-w64-opencv"
+ "mingw-w64-ffmpeg"
+ "mingw-w64-libsquish"
+)
+sha256sums=(
+ "95b90ba22b73765cbcbd9e11891769c2e78696ad24d4af77ef3f3c8674422401"
+ "87e13ccaf0359ad86713721448f14073d9e4b8904fb1353b259c351482c326a7"
+)
+source=(
+ "https://github.com/OpenImageIO/oiio/archive/Release-${pkgver}.tar.gz"
+ "mingw-compile-fix.patch"
+)
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "oiio-Release-${pkgver}"
+ patch -uNp1 < "../mingw-compile-fix.patch"
+}
+
+build() {
+ for _arch in ${_architectures}; do
+ ${_arch}-cmake -S "oiio-Release-${pkgver}" -B "build-${_arch}" -DBUILD_DOCS=OFF -DBUILD_MISSING_FMT=ON \
+ -DBUILD_MISSING_ROBINMAP=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 \
+ -DINSTALL_DOCS=OFF -DOIIO_BUILD_TESTS=OFF -DOIIO_BUILD_TOOLS=OFF -DUSE_PYTHON=OFF -DUSE_QT=OFF \
+ -DUSE_CCACHE=OFF -DUSE_SIMD=sse4.2 -DEMBEDPLUGINS=ON -DSTOP_ON_WARNING=OFF \
+ -DCMAKE_CXX_FLAGS="-fpermissive"
+ make -C "build-${_arch}"
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ make DESTDIR="${pkgdir}" -C "build-${_arch}" install
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
diff --git a/mingw-compile-fix.patch b/mingw-compile-fix.patch
new file mode 100644
index 000000000000..660e43483dd4
--- /dev/null
+++ b/mingw-compile-fix.patch
@@ -0,0 +1,33 @@
+diff -ruN orig/src/include/OpenImageIO/fstream_mingw.h new/src/include/OpenImageIO/fstream_mingw.h
+--- orig/src/include/OpenImageIO/fstream_mingw.h 2020-05-10 23:43:52.000000000 -0400
++++ new/src/include/OpenImageIO/fstream_mingw.h 2020-05-20 09:41:53.992747647 -0400
+@@ -18,7 +18,7 @@
+ #include <ostream>
+
+ #if defined(_WIN32) && defined(__GLIBCXX__)
+-# include <Share.h>
++# include <share.h>
+ # include <ext/stdio_filebuf.h> // __gnu_cxx::stdio_filebuf
+ # include <fcntl.h>
+ # include <sys/stat.h>
+diff -ruN orig/src/libutil/sysutil.cpp new/src/libutil/sysutil.cpp
+--- orig/src/libutil/sysutil.cpp 2020-05-10 23:43:52.000000000 -0400
++++ new/src/libutil/sysutil.cpp 2020-05-20 09:41:54.029414435 -0400
+@@ -41,7 +41,7 @@
+ #ifdef _WIN32
+ # define WIN32_LEAN_AND_MEAN
+ # define DEFINE_CONSOLEV2_PROPERTIES
+-# include <Psapi.h>
++# include <psapi.h>
+ # include <cstdio>
+ # include <io.h>
+ # include <malloc.h>
+@@ -207,7 +207,7 @@
+ void
+ Sysutil::get_local_time(const time_t* time, struct tm* converted_time)
+ {
+-#ifdef _MSC_VER
++#ifdef _WIN32
+ localtime_s(converted_time, time);
+ #else
+ localtime_r(time, converted_time);