diff options
author | Paul Zander <negril.nx+gentoo@gmail.com> | 2024-06-03 15:22:16 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-04 08:12:37 +0100 |
commit | 19e9e0755e2f8e0a17ba98b3b14eaf27cdb0e3f5 (patch) | |
tree | b1a41713a4c79d4d0b92d8675475ed2364fc3d03 /dev-libs/imath | |
parent | net-firewall/ufw: add missing dependency for setuptools (diff) | |
download | gentoo-19e9e0755e2f8e0a17ba98b3b14eaf27cdb0e3f5.tar.gz gentoo-19e9e0755e2f8e0a17ba98b3b14eaf27cdb0e3f5.tar.bz2 gentoo-19e9e0755e2f8e0a17ba98b3b14eaf27cdb0e3f5.zip |
dev-libs/imath: add 3.11.1-r1 fix cmake files
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/imath')
3 files changed, 125 insertions, 0 deletions
diff --git a/dev-libs/imath/files/imath-3.1.11-fix_cmake_module_export.patch b/dev-libs/imath/files/imath-3.1.11-fix_cmake_module_export.patch new file mode 100644 index 000000000000..3e5c4d59946c --- /dev/null +++ b/dev-libs/imath/files/imath-3.1.11-fix_cmake_module_export.patch @@ -0,0 +1,22 @@ +From 0f7f9f9f32ea178d474325ec1b2576a790e336a1 Mon Sep 17 00:00:00 2001 +From: Lucas Miller <lmiller@imageworks.com> +Date: Wed, 1 May 2024 13:51:30 -0700 +Subject: [PATCH] Address Issue #395 where packages that need to link against + PyImath can no longer find it. + +--- + src/python/config/ModuleDefine.cmake | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/python/config/ModuleDefine.cmake b/src/python/config/ModuleDefine.cmake +index adee61c8..b4063623 100644 +--- a/src/python/config/ModuleDefine.cmake ++++ b/src/python/config/ModuleDefine.cmake +@@ -55,6 +55,7 @@ function(PYIMATH_ADD_LIBRARY_PRIV libname) + add_library(${PROJECT_NAME}::${libname} ALIAS ${libname}) + + install(TARGETS ${libname} ++ EXPORT ${PROJECT_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/dev-libs/imath/files/imath-3.1.11-use-correct-boost_python_version.patch b/dev-libs/imath/files/imath-3.1.11-use-correct-boost_python_version.patch new file mode 100644 index 000000000000..fedd1005f6b6 --- /dev/null +++ b/dev-libs/imath/files/imath-3.1.11-use-correct-boost_python_version.patch @@ -0,0 +1,17 @@ +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: 2024-06-03 +Subject: [PATCH] only try to find versioned boost::python + +diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt +index 1bc1e54..c71ce42 100644 +--- a/src/python/CMakeLists.txt ++++ b/src/python/CMakeLists.txt +@@ -139,8 +139,6 @@ if(Boost_NO_BOOST_CMAKE) + endif() + + find_package(Boost OPTIONAL_COMPONENTS +- python +- python${Python_VERSION_MAJOR} + ${PYIMATH_BOOST_PY_COMPONENT}) + set(_pyimath_have_perver_boost) + if(PYIMATH_BOOST_PY_COMPONENT) diff --git a/dev-libs/imath/imath-3.1.11-r1.ebuild b/dev-libs/imath/imath-3.1.11-r1.ebuild new file mode 100644 index 000000000000..8d3a484e5f00 --- /dev/null +++ b/dev-libs/imath/imath-3.1.11-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake python-single-r1 + +MY_PN=${PN^} + +DESCRIPTION="Imath basic math package" +HOMEPAGE="https://imath.readthedocs.io" +SRC_URI="https://github.com/AcademySoftwareFoundation/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="BSD" +SLOT="3/29" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc large-stack python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-libs/boost:=[python,${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + ') + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + doc? ( + app-text/doxygen + $(python_gen_cond_dep ' + dev-python/breathe[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-press-theme[${PYTHON_USEDEP}] + ') + ) + python? ( ${PYTHON_DEPS} ) +" + +DOCS=( CHANGES.md CONTRIBUTORS.md README.md SECURITY.md ) + +PATCHES=( + "${FILESDIR}/${PN}-3.1.11-fix_cmake_module_export.patch" + "${FILESDIR}/${PN}-3.1.11-use-correct-boost_python_version.patch" +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DBUILD_WEBSITE="$(usex doc)" + -DIMATH_ENABLE_LARGE_STACK="$(usex large-stack)" + # the following options are at their default value + -DIMATH_HALF_USE_LOOKUP_TABLE=ON + -DIMATH_INSTALL_PKG_CONFIG=ON + -DIMATH_USE_CLANG_TIDY=OFF + -DIMATH_USE_DEFAULT_VISIBILITY=OFF + -DIMATH_USE_NOEXCEPT=ON + ) + if use python; then + mycmakeargs+=( + -DBoost_NO_BOOST_CMAKE=OFF + -DPYTHON=ON + -DPython3_EXECUTABLE="${PYTHON}" + -DPython3_INCLUDE_DIR="$(python_get_includedir)" + -DPython3_LIBRARY="$(python_get_library_path)" + ) + fi + + cmake_src_configure +} + +src_install() { + use doc && HTML_DOCS=( "${BUILD_DIR}/website/sphinx/." ) + cmake_src_install +} |