From 158dd0497e8183770bf8f4e905f5c8b3d3d7ee0e Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Fri, 2 Apr 2021 16:38:39 +0300 Subject: [PATCH] media-libs/opencolorio: improvements to ebuild and dependencies Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Alfred Wingate --- ....0_libraries_to_lib64_instead_of_lib.patch | 14 --- .../opencolorio/opencolorio-2.0.0-r1.ebuild | 95 ++++++++++++++++++ .../opencolorio/opencolorio-2.0.0.ebuild | 88 ----------------- .../opencolorio/opencolorio-9999.ebuild | 99 ++++++++++--------- 4 files changed, 148 insertions(+), 148 deletions(-) delete mode 100644 media-libs/opencolorio/files/opencolorio-2.0.0_libraries_to_lib64_instead_of_lib.patch create mode 100644 media-libs/opencolorio/opencolorio-2.0.0-r1.ebuild delete mode 100644 media-libs/opencolorio/opencolorio-2.0.0.ebuild diff --git a/media-libs/opencolorio/files/opencolorio-2.0.0_libraries_to_lib64_instead_of_lib.patch b/media-libs/opencolorio/files/opencolorio-2.0.0_libraries_to_lib64_instead_of_lib.patch deleted file mode 100644 index 3a527a0..0000000 --- a/media-libs/opencolorio/files/opencolorio-2.0.0_libraries_to_lib64_instead_of_lib.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt -index 107e494e..e014ac31 100755 ---- a/src/OpenColorIO/CMakeLists.txt -+++ b/src/OpenColorIO/CMakeLists.txt -@@ -287,7 +287,7 @@ if(MSVC AND BUILD_SHARED_LIBS) - endif() - - install(TARGETS OpenColorIO -- LIBRARY DESTINATION lib -+ LIBRARY DESTINATION lib64 - RUNTIME DESTINATION bin -- ARCHIVE DESTINATION lib -+ ARCHIVE DESTINATION lib64 - ) diff --git a/media-libs/opencolorio/opencolorio-2.0.0-r1.ebuild b/media-libs/opencolorio/opencolorio-2.0.0-r1.ebuild new file mode 100644 index 0000000..1003cd0 --- /dev/null +++ b/media-libs/opencolorio/opencolorio-2.0.0-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit python-single-r1 multilib cmake + +DESCRIPTION="A color management framework for visual effects and animation" +HOMEPAGE="https://opencolorio.org/" + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO.git" +else + SRC_URI=" + https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v"${PV}".tar.gz -> "${P}".tar.gz + " + KEYWORDS="~amd64" + S="${WORKDIR}/OpenColorIO-"${PV}"" +fi + +#Missing: +# Java bindings + +LICENSE="BSD" +SLOT="0" +IUSE="cpu_flags_x86_sse2 doc opengl python test" +REQUIRED_USE=" + doc? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + >=dev-cpp/pystring-1.1.3 + >=dev-cpp/yaml-cpp-0.6.3 + >=dev-libs/expat-2.2.5 + >=media-libs/ilmbase-2.3.0 + opengl? ( + >=media-libs/lcms-2.2 + >=media-libs/openimageio-2.1.9:= + ) + python? ( + $(python_gen_cond_dep ' + >=dev-python/pybind11-2.4.3[${PYTHON_USEDEP}] + ') + ) +" +DEPEND="${RDEPEND} + doc? ( + app-doc/doxygen + $(python_gen_cond_dep ' + dev-python/six[${PYTHON_USEDEP}] + dev-python/testresources[${PYTHON_USEDEP}] + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_press_theme[${PYTHON_USEDEP}] + dev-python/sphinx-tabs[${PYTHON_USEDEP}] + dev-python/breathe[${PYTHON_USEDEP}] + ') + ) + test? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ') + ) +" +BDEPEND=" + virtual/pkgconfig +" + +CMAKE_BUILD_TYPE="Release" + +src_prepare() { + sed -i "s/DESTINATION lib/DESTINATION $(get_libdir)/" "${S}"/src/OpenColorIO/CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DLIB_SUFFIX="" + -DBUILD_SHARED_LIBS=ON + -DOCIO_BUILD_APPS=$(usex opengl) + -DOCIO_BUILD_DOCS=$(usex doc) + -DOCIO_BUILD_PYTHON=$(usex python) + -DOCIO_BUILD_JAVA=OFF + -DOCIO_BUILD_TESTS=$(usex test) + -DOCIO_BUILD_GPU_TESTS=$(usex test) + -DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2) + -DOCIO_INSTALL_EXT_PACKAGES=NONE + + ) + cmake_src_configure +} diff --git a/media-libs/opencolorio/opencolorio-2.0.0.ebuild b/media-libs/opencolorio/opencolorio-2.0.0.ebuild deleted file mode 100644 index 3df3e00..0000000 --- a/media-libs/opencolorio/opencolorio-2.0.0.ebuild +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="A color management framework for visual effects and animation" -HOMEPAGE="https://opencolorio.org/" - -if [[ "${PV}" == "9999" ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO.git" -else -# MY_P=$(ver_rs 3 '-') - SRC_URI=" - https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v"${PV}".tar.gz -> "${P}".tar.gz - " - KEYWORDS="~amd64" - S="${WORKDIR}/OpenColorIO-"${PV}"" -fi - -# TODO -# doc, Python and Java bindings - -LICENSE="BSD" -SLOT="0" -IUSE="cpu_flags_x86_sse2 opengl test" -#REQUIRED_USE=" -# doc? ( python ) -# python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - dev-cpp/pystring - >=dev-cpp/yaml-cpp-0.5 - dev-libs/tinyxml - dev-python/pybind11 - opengl? ( - media-libs/lcms:2 - media-libs/openimageio - media-libs/glew:= - media-libs/freeglut - virtual/opengl - ) - media-libs/ilmbase -" - -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig -" - -# No doc for now, as sphinx-tabs isnt in the main repo but in guru and due sphinx-press-theme not being done yet. -# + python bindings not working properly so they are omited for now -# doc? ( -# app-doc/doxygen -# $(python_gen_cond_dep ' -# dev-python/six[${PYTHON_USEDEP}] -# dev-python/testresources[${PYTHON_USEDEP}] -# dev-python/recommonmark[${PYTHON_USEDEP}] -# dev-python/sphinx[${PYTHON_USEDEP}] -# dev-python/sphinx-press-theme[${PYTHON_USEDEP}] -# dev-python/sphinx-tabs[${PYTHON_USEDEP}] -# dev-python/breathe[${PYTHON_USEDEP}] -# ') -# ) -#" - -CMAKE_BUILD_TYPE="Release" - -PATCHES=( - "${FILESDIR}/opencolorio-2.0.0_libraries_to_lib64_instead_of_lib.patch" -) - -src_configure() { - local mycmakeargs=( - -DBUILD_SHARED_LIBS=ON - -DOCIO_BUILD_APPS=$(usex opengl) -# -DOCIO_BUILD_DOCS=$(usex doc) -# -DOCIO_BUILD_PYTHON=$(usex python) - -DOCIO_BUILD_TESTS=$(usex test) - -DOCIO_BUILD_GPU_TESTS=$(usex test) - -DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2) - -DOCIO_INSTALL_EXT_PACKAGES=NONE - - ) - cmake_src_configure -} diff --git a/media-libs/opencolorio/opencolorio-9999.ebuild b/media-libs/opencolorio/opencolorio-9999.ebuild index fc133a3..1003cd0 100644 --- a/media-libs/opencolorio/opencolorio-9999.ebuild +++ b/media-libs/opencolorio/opencolorio-9999.ebuild @@ -3,7 +3,9 @@ EAPI=7 -inherit cmake +PYTHON_COMPAT=( python3_{7..9} ) + +inherit python-single-r1 multilib cmake DESCRIPTION="A color management framework for visual effects and animation" HOMEPAGE="https://opencolorio.org/" @@ -12,72 +14,77 @@ if [[ "${PV}" == "9999" ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO.git" else - MY_P=$(ver_rs 3 '-') SRC_URI=" - https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v"${MY_P}".tar.gz -> "${P}".tar.gz + https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v"${PV}".tar.gz -> "${P}".tar.gz " KEYWORDS="~amd64" - S="${WORKDIR}/OpenColorIO-"${MY_P}"" + S="${WORKDIR}/OpenColorIO-"${PV}"" fi -# TODO -# doc, Python and Java bindings +#Missing: +# Java bindings LICENSE="BSD" SLOT="0" -IUSE="cpu_flags_x86_sse2 opengl test" -#REQUIRED_USE=" -# doc? ( python ) -# python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - dev-cpp/pystring - >=dev-cpp/yaml-cpp-0.5 - dev-libs/tinyxml - dev-python/pybind11 - opengl? ( - media-libs/lcms:2 - media-libs/openimageio - media-libs/glew:= - media-libs/freeglut - virtual/opengl - ) - media-libs/ilmbase +IUSE="cpu_flags_x86_sse2 doc opengl python test" +REQUIRED_USE=" + doc? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) " -DEPEND="${RDEPEND}" +RDEPEND=" + >=dev-cpp/pystring-1.1.3 + >=dev-cpp/yaml-cpp-0.6.3 + >=dev-libs/expat-2.2.5 + >=media-libs/ilmbase-2.3.0 + opengl? ( + >=media-libs/lcms-2.2 + >=media-libs/openimageio-2.1.9:= + ) + python? ( + $(python_gen_cond_dep ' + >=dev-python/pybind11-2.4.3[${PYTHON_USEDEP}] + ') + ) +" +DEPEND="${RDEPEND} + doc? ( + app-doc/doxygen + $(python_gen_cond_dep ' + dev-python/six[${PYTHON_USEDEP}] + dev-python/testresources[${PYTHON_USEDEP}] + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_press_theme[${PYTHON_USEDEP}] + dev-python/sphinx-tabs[${PYTHON_USEDEP}] + dev-python/breathe[${PYTHON_USEDEP}] + ') + ) + test? ( + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ') + ) +" BDEPEND=" virtual/pkgconfig " -# No doc for now, as sphinx-tabs isnt in the main repo but in guru and due sphinx-press-theme not being done yet. -# + python bindings not working properly so they are omited for now -# doc? ( -# app-doc/doxygen -# $(python_gen_cond_dep ' -# dev-python/six[${PYTHON_USEDEP}] -# dev-python/testresources[${PYTHON_USEDEP}] -# dev-python/recommonmark[${PYTHON_USEDEP}] -# dev-python/sphinx[${PYTHON_USEDEP}] -# dev-python/sphinx-press-theme[${PYTHON_USEDEP}] -# dev-python/sphinx-tabs[${PYTHON_USEDEP}] -# dev-python/breathe[${PYTHON_USEDEP}] -# ') -# ) -#" - CMAKE_BUILD_TYPE="Release" -PATCHES=( - "${FILESDIR}/opencolorio-2.0.0_libraries_to_lib64_instead_of_lib.patch" -) +src_prepare() { + sed -i "s/DESTINATION lib/DESTINATION $(get_libdir)/" "${S}"/src/OpenColorIO/CMakeLists.txt || die + cmake_src_prepare +} src_configure() { local mycmakeargs=( + -DLIB_SUFFIX="" -DBUILD_SHARED_LIBS=ON -DOCIO_BUILD_APPS=$(usex opengl) -# -DOCIO_BUILD_DOCS=$(usex doc) -# -DOCIO_BUILD_PYTHON=$(usex python) + -DOCIO_BUILD_DOCS=$(usex doc) + -DOCIO_BUILD_PYTHON=$(usex python) + -DOCIO_BUILD_JAVA=OFF -DOCIO_BUILD_TESTS=$(usex test) -DOCIO_BUILD_GPU_TESTS=$(usex test) -DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2)