1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Geometry library"
9 HOMEPAGE="http://www.qhull.org"
10 SRC_URI="https://github.com/qhull/qhull/archive/${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
15 IUSE="doc static-libs"
17 DOCS=( Announce.txt File_id.diz README.txt REGISTER.txt )
20 "${FILESDIR}/${PN}-2020.2-deprecated-pkgconfig.patch"
26 -e '/^install(DIRECTORY html/d' \
27 -e '/^[[:blank:]]*index.htm/d' \
32 -e "s@lib/pkgconfig@$(get_libdir)/pkgconfig@" \
33 -e "s@lib/cmake/Qhull@$(get_libdir)/cmake/Qhull@" \
41 -DBUILD_STATIC_LIBS=$(usex static-libs)
43 -DDOC_INSTALL_DIR="${EPREFIX}/usr/share/doc/${PF}"
44 -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
51 cmake_src_compile all libqhull
56 dolib.so "${BUILD_DIR}"/libqhull{$(get_libname),$(get_libname "*")}
58 # fix double prefix in pc files
59 sed -i "/^libdir/s@/.*@/$(get_libdir)@" "${ED}/usr/$(get_libdir)/pkgconfig/"*.pc || die
61 if ! use static-libs; then
62 rm "${ED}/usr/$(get_libdir)/pkgconfig/qhull"{static,static_r,cpp}.pc || die
63 rm -r "${ED}/usr/include/libqhullcpp" || die