media-libs/opencolorio: improvements to ebuild and dependencies

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2021-04-02 16:38:39 +03:00
parent 46bf5a6c51
commit 158dd0497e
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
4 changed files with 148 additions and 148 deletions

View File

@ -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
)

View File

@ -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
}

View File

@ -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
}

View File

@ -3,7 +3,9 @@
EAPI=7 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" DESCRIPTION="A color management framework for visual effects and animation"
HOMEPAGE="https://opencolorio.org/" HOMEPAGE="https://opencolorio.org/"
@ -12,72 +14,77 @@ if [[ "${PV}" == "9999" ]]; then
inherit git-r3 inherit git-r3
EGIT_REPO_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO.git" EGIT_REPO_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO.git"
else else
MY_P=$(ver_rs 3 '-')
SRC_URI=" 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" KEYWORDS="~amd64"
S="${WORKDIR}/OpenColorIO-"${MY_P}"" S="${WORKDIR}/OpenColorIO-"${PV}""
fi fi
# TODO #Missing:
# doc, Python and Java bindings # Java bindings
LICENSE="BSD" LICENSE="BSD"
SLOT="0" SLOT="0"
IUSE="cpu_flags_x86_sse2 opengl test" IUSE="cpu_flags_x86_sse2 doc opengl python test"
#REQUIRED_USE=" REQUIRED_USE="
# doc? ( python ) doc? ( python )
# python? ( ${PYTHON_REQUIRED_USE} )" 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}" 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=" BDEPEND="
virtual/pkgconfig 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" CMAKE_BUILD_TYPE="Release"
PATCHES=( src_prepare() {
"${FILESDIR}/opencolorio-2.0.0_libraries_to_lib64_instead_of_lib.patch" sed -i "s/DESTINATION lib/DESTINATION $(get_libdir)/" "${S}"/src/OpenColorIO/CMakeLists.txt || die
) cmake_src_prepare
}
src_configure() { src_configure() {
local mycmakeargs=( local mycmakeargs=(
-DLIB_SUFFIX=""
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
-DOCIO_BUILD_APPS=$(usex opengl) -DOCIO_BUILD_APPS=$(usex opengl)
# -DOCIO_BUILD_DOCS=$(usex doc) -DOCIO_BUILD_DOCS=$(usex doc)
# -DOCIO_BUILD_PYTHON=$(usex python) -DOCIO_BUILD_PYTHON=$(usex python)
-DOCIO_BUILD_JAVA=OFF
-DOCIO_BUILD_TESTS=$(usex test) -DOCIO_BUILD_TESTS=$(usex test)
-DOCIO_BUILD_GPU_TESTS=$(usex test) -DOCIO_BUILD_GPU_TESTS=$(usex test)
-DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2) -DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2)