From 02bc620cff189e56e3363a93d22a729e23387720 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Fri, 8 Jan 2021 15:55:59 -0500 Subject: media-libs/qhull: re-add static-libs + various fixes CMakeLists.txt claims some libraries are intended to be static-only and so weren't installed. Shared: - libqhull.so (deprecated, but needed by matplotlib) - libqhull_r.so Static-only: - libqhullcpp.a (needed by at least prusaslicer) - libqhullstatic.a - libqhullstatic_r.a Also: - install missing deprecated qhull.pc - install cmake/pc files in right libdir - fix double prefix in pc files Bug: https://bugs.gentoo.org/764338 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Ionen Wolkens Signed-off-by: Sam James --- .../files/qhull-2020.2-deprecated-pkgconfig.patch | 8 +++ media-libs/qhull/qhull-2020.2-r2.ebuild | 49 ---------------- media-libs/qhull/qhull-2020.2-r3.ebuild | 65 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 49 deletions(-) create mode 100644 media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch delete mode 100644 media-libs/qhull/qhull-2020.2-r2.ebuild create mode 100644 media-libs/qhull/qhull-2020.2-r3.ebuild (limited to 'media-libs/qhull') diff --git a/media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch b/media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch new file mode 100644 index 000000000000..c83a807e2888 --- /dev/null +++ b/media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch @@ -0,0 +1,8 @@ +--- a/CMakeLists.txt 2020-09-03 22:33:16.000000000 -0400 ++++ b/CMakeLists.txt 2021-01-08 14:38:26.299273173 -0500 +@@ -731,4 +731,5 @@ + set(PkgConfigLocation lib/pkgconfig) + foreach(pkgconfig IN ITEMS "${qhull_SHAREDR};Qhull reentrant shared library" ++ "${qhull_SHARED};Qhull deprecated shared library" + "${qhull_STATIC};Qhull static library" + "${qhull_STATICR};Qhull reentrant static library" diff --git a/media-libs/qhull/qhull-2020.2-r2.ebuild b/media-libs/qhull/qhull-2020.2-r2.ebuild deleted file mode 100644 index 1c60a003a251..000000000000 --- a/media-libs/qhull/qhull-2020.2-r2.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="Geometry library" -HOMEPAGE="http://www.qhull.org" -SRC_URI="https://github.com/qhull/qhull/archive/${PV}.tar.gz -> ${P}.tar.gz" - -SLOT="0/8" -LICENSE="BSD" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" -IUSE="doc" - -DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt ) - -src_prepare() { - if ! use doc ; then - sed -i \ - -e '/^install(DIRECTORY html/d' \ - -e '/^[[:blank:]]*index.htm/d' \ - CMakeLists.txt || die - fi - - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( - -DBUILD_STATIC_LIBS=OFF - -DLINK_APPS_SHARED=ON - -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF} - -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" - ) - - cmake_src_configure -} - -src_compile() { - cmake_src_compile - cmake_src_compile libqhull -} - -src_install() { - cmake_src_install - dolib.so "${BUILD_DIR}"/libqhull.so* -} diff --git a/media-libs/qhull/qhull-2020.2-r3.ebuild b/media-libs/qhull/qhull-2020.2-r3.ebuild new file mode 100644 index 000000000000..59f96d53709c --- /dev/null +++ b/media-libs/qhull/qhull-2020.2-r3.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Geometry library" +HOMEPAGE="http://www.qhull.org" +SRC_URI="https://github.com/qhull/qhull/archive/${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0/8" +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="doc static-libs" + +DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt ) + +PATCHES=( + "${FILESDIR}/${PN}-2020.2-deprecated-pkgconfig.patch" +) + +src_prepare() { + if ! use doc ; then + sed -i \ + -e '/^install(DIRECTORY html/d' \ + -e '/^[[:blank:]]*index.htm/d' \ + CMakeLists.txt || die + fi + + sed -i \ + -e "s@lib/pkgconfig@$(get_libdir)/pkgconfig@" \ + -e "s@lib/cmake/Qhull@$(get_libdir)/cmake/Qhull@" \ + CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_STATIC_LIBS=$(usex static-libs) + -DLINK_APPS_SHARED=ON + -DDOC_INSTALL_DIR="${EPREFIX}/usr/share/doc/${PF}" + -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile all libqhull +} + +src_install() { + cmake_src_install + dolib.so "${BUILD_DIR}"/libqhull.so* + + # fix double prefix in pc files + sed -i "/^libdir/s@/.*@/$(get_libdir)@" "${ED}/usr/$(get_libdir)/pkgconfig/"*.pc || die + + if ! use static-libs; then + rm "${ED}/usr/$(get_libdir)/pkgconfig/qhull"{static,static_r,cpp}.pc || die + rm -r "${ED}/usr/include/libqhullcpp" || die + fi +} -- cgit v1.2.3-65-gdbad