ocio: fix python module install path

This commit is contained in:
Miloš Komarčević
2022-11-10 14:21:51 +01:00
committed by مهدي شينون (Mehdi Chinoune)
parent f37ea849c0
commit e37547b2fe
2 changed files with 25 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
--- OpenColorIO-2.2.0/src/bindings/python/CMakeLists.txt.orig 2022-10-31 23:27:35.000000000 +0100
+++ OpenColorIO-2.2.0/src/bindings/python/CMakeLists.txt 2022-11-10 14:15:28.555728000 +0100
@@ -227,7 +227,7 @@
PY_VERSION_PATCH=${Python_VERSION_PATCH}
)
-if(WIN32)
+if(WIN32 AND NOT MINGW)
set(_Python_VARIANT_PATH "${CMAKE_INSTALL_LIBDIR}/site-packages")
else()
set(_Python_VARIANT_PATH "${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")

View File

@@ -6,33 +6,37 @@ pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
pkgver=2.2.0
pkgrel=1
pkgrel=2
pkgdesc="A color management framework for visual effects and animation (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://opencolorio.org/"
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-expat"
depends=("${MINGW_PACKAGE_PREFIX}-expat"
"${MINGW_PACKAGE_PREFIX}-freeglut"
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-glew"
"${MINGW_PACKAGE_PREFIX}-imath"
"${MINGW_PACKAGE_PREFIX}-libwinpthread-git"
"${MINGW_PACKAGE_PREFIX}-lcms2"
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-openexr"
"${MINGW_PACKAGE_PREFIX}-yaml-cpp")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-pkg-config"
"${MINGW_PACKAGE_PREFIX}-pybind11"
"${MINGW_PACKAGE_PREFIX}-pystring"
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-openimageio"
"${MINGW_PACKAGE_PREFIX}-openshadinglanguage"
"${MINGW_PACKAGE_PREFIX}-zlib")
optdepends=("${MINGW_PACKAGE_PREFIX}-python: Python bindings")
source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenColorIO/archive/v${pkgver}.tar.gz
0002-install-pc.patch)
0002-install-pc.patch
0003-fix-python-sitearch.patch)
sha256sums=('81e3b6e0e432d20347b6396c376f9fbeceac31c2cbefe2882d83112a5b0a8123'
'ba79929436bfffb0710335e43197b7c730089e2d9213f60c22416584dbcf2a4a')
'ba79929436bfffb0710335e43197b7c730089e2d9213f60c22416584dbcf2a4a'
'73660c114f5adfd6c089d0e91ae776601734e8b1ad4f6e773867d7eee4a1a5fb')
apply_patch_with_msg() {
for _patch in "$@"
@@ -45,7 +49,8 @@ apply_patch_with_msg() {
prepare() {
cd ${_realname}-${pkgver}
apply_patch_with_msg \
0002-install-pc.patch
0002-install-pc.patch \
0003-fix-python-sitearch.patch
}
build() {
@@ -67,6 +72,7 @@ build() {
-DCMAKE_CXX_STANDARD=14 \
-DOCIO_BUILD_TESTS=OFF \
-DOCIO_BUILD_GPU_TESTS=OFF \
-DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
../${_realname}-${pkgver}
"${MINGW_PREFIX}"/bin/cmake.exe --build .