Skip to content

Commit

Permalink
media-libs/opencolorio: Bump v.2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
geaaru committed Dec 9, 2023
1 parent cfddf77 commit 36906c5
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/atoms/base-kde6/media-libs/opencolorio/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
prelude:
- >-
cp -vf opencolorio-2.3.0.ebuild /var/git/meta-repo/kits/media-kit/media-libs/opencolorio/ &&
cp -vf files/* /var/git/meta-repo/kits/media-kit/media-libs/opencolorio/files/ &&
cd /var/git/meta-repo/kits/media-kit/media-libs/opencolorio/ &&
ebuild opencolorio-2.3.0.ebuild digest &&
cd -
- |-
export FEATURES="-sandbox -usersandbox -ipc-sandbox -pid-sandbox -network-sandbox" && \
export JOBS={{ ( index .Values.labels "jobs" ) | default "3" }} && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: opencolorio
version: 2.1.2+1
version: 2.3.0
category: media-libs
use_flags:
- -doc
Expand Down Expand Up @@ -73,4 +73,4 @@ labels:
kit: media-kit
original.package.name: media-libs/opencolorio
original.package.slot: "0"
original.package.version: 2.1.2
original.package.version: 2.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
From 5ca483b67404a9ba2230f2f03ff3255eceb3d2bc Mon Sep 17 00:00:00 2001
From: Bernd Waibel <waebbl-gentoo@posteo.net>
Date: Sun, 19 Feb 2023 23:14:44 +0100
Subject: [PATCH] [Gentoo-specific] adjust python installation

Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
--- a/src/bindings/python/CMakeLists.txt
+++ b/src/bindings/python/CMakeLists.txt
@@ -230,7 +230,7 @@ target_compile_definitions(PyOpenColorIO
if(WIN32)
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")
+ set(_Python_VARIANT_PATH "${CMAKE_INSTALL_PREFIX}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
endif()

# Create an internal global variable to access it in another scope but not publicly visible
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From d69edd3ef411853cd780b75cf260295a39a8a49f Mon Sep 17 00:00:00 2001
From: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Date: Wed, 20 Sep 2023 15:10:46 -0400
Subject: [PATCH] Correctly reset CMAKE_CXX_FLAGS.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
---
share/cmake/utils/CheckSupportSSE2.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/cmake/utils/CheckSupportSSE2.cmake b/share/cmake/utils/CheckSupportSSE2.cmake
index 8c929c7e9..6a07155de 100644
--- a/share/cmake/utils/CheckSupportSSE2.cmake
+++ b/share/cmake/utils/CheckSupportSSE2.cmake
@@ -59,7 +59,7 @@ else()
message(STATUS "Performing Test COMPILER_SUPPORTS_SSE2 - Failed")
endif()

-set(CMAKE_REQUIRED_FLAGS "${_cmake_cxx_flags_orig}")
+set(CMAKE_CXX_FLAGS "${_cmake_cxx_flags_orig}")
unset(_cmake_cxx_flags_orig)

if(__universal_build)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From: Bernd Feige <Bernd.Feige@gmx.net>
https://bugs.gentoo.org/914716#c12

Index: OpenColorIO-2.3.0/share/cmake/modules/Findyaml-cpp.cmake
===================================================================
--- OpenColorIO-2.3.0.orig/share/cmake/modules/Findyaml-cpp.cmake
+++ OpenColorIO-2.3.0/share/cmake/modules/Findyaml-cpp.cmake
@@ -50,7 +50,12 @@ if(NOT OCIO_INSTALL_EXT_PACKAGES STREQUA
endif()

if(yaml-cpp_FOUND)
- get_target_property(yaml-cpp_LIBRARY yaml-cpp LOCATION)
+ if(TARGET yaml-cpp::yaml-cpp)
+ # yaml-cpp >= 0.8
+ get_target_property(yaml-cpp::yaml-cpp_LIBRARY yaml-cpp::yaml-cpp LOCATION)
+ else()
+ get_target_property(yaml-cpp_LIBRARY yaml-cpp LOCATION)
+ endif()
else()

# As yaml-cpp-config.cmake search fails, search an installed library
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3+ )
CMAKE_BUILD_TYPE=Release

inherit cmake python-single-r1 virtualx

DESCRIPTION="Color management framework for visual effects and animation"
HOMEPAGE="https://opencolorio.org https://github.com/AcademySoftwareFoundation/OpenColorIO"
SRC_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/OpenColorIO-${PV}"

LICENSE="BSD"
SLOT="0/$(ver_cut 1-2)"
# minizip-ng: ~arm ~arm64 ~ppc64 ~riscv
# osl: ~riscv
KEYWORDS="*"
CPU_USE=(
x86_{avx,avx2,avx512f,f16c,sse2,sse3,sse4_1,sse4_2,ssse3}
# requires https://github.com/DLTcollab/sse2neon
# arm_neon
)
IUSE="apps ${CPU_USE[@]/#/cpu_flags_} doc opengl python test"
# TODO: drop opengl? It does nothing without building either the apps or the testsuite
REQUIRED_USE="
apps? ( opengl )
doc? ( python )
python? ( ${PYTHON_REQUIRED_USE} )
test? ( opengl )
"

RDEPEND="
dev-cpp/pystring
>=dev-cpp/yaml-cpp-0.7.0:=
dev-libs/expat
>=dev-libs/imath-3.1.5:=
sys-libs/minizip-ng
sys-libs/zlib
apps? (
media-libs/lcms:2
>=media-libs/openexr-3.1.5:=
)
opengl? (
media-libs/freeglut
media-libs/glew:=
media-libs/libglvnd
)
python? (
${PYTHON_DEPS}
$(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
)
"
DEPEND="${RDEPEND}"
# TODO: OSL tests would need OIIO, leading to a circular dependency. If OIIO
# isn't found this test will be skipped (automagic if found?)
BDEPEND="
virtual/pkgconfig
doc? (
app-doc/doxygen
$(python_gen_cond_dep '
dev-python/breathe[${PYTHON_USEDEP}]
dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-press-theme[${PYTHON_USEDEP}]
dev-python/sphinx-tabs[${PYTHON_USEDEP}]
dev-python/testresources[${PYTHON_USEDEP}]
')
)
opengl? (
media-libs/freeglut
media-libs/glew:=
media-libs/libglvnd
)
"
# test? (
# >=media-libs/openimageio-2.2.14
# >=media-libs/osl-1.11
# )
# "

# Restricting tests, bugs #439790 and #447908
RESTRICT="!test? ( test )"

PATCHES=(
"${FILESDIR}/${PN}-2.2.1-adjust-python-installation.patch"
"${FILESDIR}/${PN}-2.3.0-support-yaml-cpp-0.8.0.patch"
"${FILESDIR}/${PN}-2.3.0-fix-cxxflags.patch"
)

pkg_setup() {
use python && python-single-r1_pkg_setup
}

src_prepare() {
cmake_src_prepare

# Avoid automagic test dependency on OSL, bug #833933
# Can cause problems during e.g. OpenEXR unsplitting migration
cmake_run_in tests cmake_comment_add_subdirectory osl
}

src_configure() {
# Missing features:
# - Truelight and Nuke are not in portage for now, so their support are disabled
# - Java bindings was not tested, so disabled
# Notes:
# - OpenImageIO or OpenEXR (default) is required for building ociodisplay and
# ocioconvert (USE opengl)
# - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
local mycmakeargs=(
"-DOCIO_BUILD_APPS=$(usex apps)"
"-DOCIO_BUILD_DOCS=$(usex doc)"
"-DOCIO_BUILD_FROZEN_DOCS=$(usex doc)"
"-DOCIO_BUILD_GPU_TESTS=$(usex test)"
"-DOCIO_BUILD_JAVA=OFF"
"-DOCIO_BUILD_PYTHON=$(usex python)"
"-DOCIO_BUILD_TESTS=$(usex test)"
"-DOCIO_INSTALL_EXT_PACKAGES=NONE"
# allow the user to tell OCIO to display more information when searching and building the dependencies.
# "-DOCIO_VERBOSE=YES"

"-DOCIO_USE_SIMD=ON"
)

if use amd64 || use x86 ; then
mycmakeargs+=(
"-DOCIO_USE_SSE2=$(usex cpu_flags_x86_sse2)"
"-DOCIO_USE_SSE3=$(usex cpu_flags_x86_sse3)"
"-DOCIO_USE_SSSE3=$(usex cpu_flags_x86_ssse3)"
"-DOCIO_USE_SSE4=$(usex cpu_flags_x86_sse4_1)"
"-DOCIO_USE_SSE42=$(usex cpu_flags_x86_sse4_2)"
"-DOCIO_USE_AVX=$(usex cpu_flags_x86_avx)"
"-DOCIO_USE_AVX2=$(usex cpu_flags_x86_avx2)"
"-DOCIO_USE_AVX512=$(usex cpu_flags_x86_avx512f)"
"-DOCIO_USE_F16C=$(usex cpu_flags_x86_f16c)"
)
fi

# requires https://github.com/DLTcollab/sse2neon
# if use arm || use arm64 ; then
# mycmakeargs+=(
# "-DOCIO_USE_SSE2NEON=$(usex cpu_flags_arm_neon)"
# )
# fi

use python && mycmakeargs+=(
"-DOCIO_PYTHON_VERSION=${EPYTHON/python/}"
"-DPython_EXECUTABLE=${PYTHON}"
"-DPYTHON_VARIANT_PATH=$(python_get_sitedir)"
)

cmake_src_configure
}

src_install() {
cmake_src_install

if use doc; then
# there are already files in ${ED}/usr/share/doc/${PF}
mv "${ED}/usr/share/doc/OpenColorIO/"* "${ED}/usr/share/doc/${PF}" || die
rmdir "${ED}/usr/share/doc/OpenColorIO" || die
fi
}

src_test() {
virtx cmake_src_test
}

0 comments on commit 36906c5

Please sign in to comment.