summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Northon2020-09-10 06:45:49 -0400
committerPatrick Northon2020-09-10 06:45:49 -0400
commit8f76e1af8806e6936b5a5ab94d5be5575adfac54 (patch)
tree0315a8ec5bc2e76661f7fa60946443b970dfadbe
parentfcdc868cd468879c5346cfd5fc85c35479003347 (diff)
downloadaur-8f76e1af8806e6936b5a5ab94d5be5575adfac54.tar.gz
Fix linking to OpenCV when linking to OpenImageIO imported target.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--mingw-dependency-fix.patch13
3 files changed, 20 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2a177824e633..f9bdf3e114b3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mingw-w64-openimageio
pkgdesc = A library for reading and writing images (mingw-w64)
pkgver = 2.2.6.1
- pkgrel = 4
+ pkgrel = 5
url = http://www.openimageio.org/
arch = any
license = BSD-3-Clause
@@ -29,8 +29,10 @@ pkgbase = mingw-w64-openimageio
options = staticlibs
source = https://github.com/OpenImageIO/oiio/archive/Release-2.2.6.1.tar.gz
source = mingw-compile-fix.patch
+ source = mingw-dependency-fix.patch
sha256sums = adc245c9b2fa2bce1dd2decbdd1d03974e1e9818219d267d1da3dd1bd91216df
sha256sums = 87e13ccaf0359ad86713721448f14073d9e4b8904fb1353b259c351482c326a7
+ sha256sums = 9afbed7e3f989dba04a8bb784af24dda26b362f13d4b5933c56bed68289ee352
pkgname = mingw-w64-openimageio
diff --git a/PKGBUILD b/PKGBUILD
index 30fc13bacf63..c7972c295cfb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=mingw-w64-openimageio
pkgver=2.2.6.1
-pkgrel=4
+pkgrel=5
pkgdesc="A library for reading and writing images (mingw-w64)"
url="http://www.openimageio.org/"
license=("BSD-3-Clause")
@@ -33,10 +33,12 @@ optdepends=()
sha256sums=(
"adc245c9b2fa2bce1dd2decbdd1d03974e1e9818219d267d1da3dd1bd91216df"
"87e13ccaf0359ad86713721448f14073d9e4b8904fb1353b259c351482c326a7"
+ "9afbed7e3f989dba04a8bb784af24dda26b362f13d4b5933c56bed68289ee352"
)
source=(
"https://github.com/OpenImageIO/oiio/archive/Release-${pkgver}.tar.gz"
"mingw-compile-fix.patch"
+ "mingw-dependency-fix.patch"
)
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@@ -44,6 +46,7 @@ _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "oiio-Release-${pkgver}"
patch -uNp1 < "../mingw-compile-fix.patch"
+ patch -uNp1 < "../mingw-dependency-fix.patch"
rm -f src/cmake/modules/FindOpenCV.cmake
sed -i -r 's/set \(REQUIED_DEPS/set \(REQUIRED_DEPS/' "src/cmake/externalpackages.cmake"
sed -i -r 's/target_link_libraries \(OpenImageIO PRIVATE \$\{PUGIXML_LIBRARIES\}\)/target_link_libraries \(OpenImageIO PRIVATE pugixml\)/' "src/libOpenImageIO/CMakeLists.txt"
diff --git a/mingw-dependency-fix.patch b/mingw-dependency-fix.patch
new file mode 100644
index 000000000000..4a95f915659a
--- /dev/null
+++ b/mingw-dependency-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
+index c578a1b3..2d0281b6 100644
+--- a/src/cmake/Config.cmake.in
++++ b/src/cmake/Config.cmake.in
+@@ -6,6 +6,8 @@ include(CMakeFindDependencyMacro)
+ # e.g. if switching to Boost::Boost instead of using ${Boost_LIBRARY_DIRS} the add:
+ # find_dependency(Boost @Boost_VERSION@)
+
++find_dependency(OpenCV)
++
+ set_and_check (@PROJECT_NAME@_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
+ set_and_check (@PROJECT_NAME@_INCLUDES "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
+ set_and_check (@PROJECT_NAME@_LIB_DIR "@CMAKE_INSTALL_FULL_LIBDIR@")