summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Solano Gómez <gentoo@sattvik.com>2021-01-18 09:00:21 -0600
committerDaniel Solano Gómez <gentoo@sattvik.com>2021-01-18 09:00:21 -0600
commit170e464fb08a17759f636eca3885b06d59bbc840 (patch)
treea515e76f5fdfcbbb11894656e074072d5c1e0459 /media-libs
parentUpdate prismatik to 5.11.2.27 (diff)
downloadsattvik-170e464fb08a17759f636eca3885b06d59bbc840.tar.gz
sattvik-170e464fb08a17759f636eca3885b06d59bbc840.tar.bz2
sattvik-170e464fb08a17759f636eca3885b06d59bbc840.zip
Add fixed media-libs/qhull
Signed-off-by: Daniel Solano <gentoo@sattvik.com>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/qhull/Manifest5
-rw-r--r--media-libs/qhull/files/qhull-2012.1-64bit.patch32
-rw-r--r--media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch8
-rw-r--r--media-libs/qhull/media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch8
-rw-r--r--media-libs/qhull/metadata.xml24
-rw-r--r--media-libs/qhull/qhull-2020.2-r2.ebuild65
6 files changed, 142 insertions, 0 deletions
diff --git a/media-libs/qhull/Manifest b/media-libs/qhull/Manifest
new file mode 100644
index 0000000..485a50b
--- /dev/null
+++ b/media-libs/qhull/Manifest
@@ -0,0 +1,5 @@
+AUX qhull-2012.1-64bit.patch 1509 BLAKE2B d5f50bfb5229109f13ac88f46eff36d130830339c43265981b00a8e5defaf3229cd50870e379e13a2726312efd8a15e99a2683c3b3a9b1eb9bf1503b7f6b1fbe SHA512 e23c7bb4d6fb64a77647980e045b36df4f596eb64a32b27d7d6462cb2f5f7a35e0fa9985e885ed58222ec1741b2a2d1806bba155f1042bd470dcd5c721ac48c5
+AUX qhull-2020.2-deprecated-pkgconfig.patch 473 BLAKE2B 5fbc2b1b9a4cd5a6c5cff46484b943b36de2f327c051b9badc32c952373b7f250eb751b46c8884e1dcd1c23b4bd2c50e4d5b1af7129ee477e1e75aab55d1f7be SHA512 a688943f6e0210ef170cfe9a8b3f186460bd2654c30cd0b0ca30b71f3245189be76dfa3648fcb9cbfe8daee27e11bec23a7a6016abf0213f0ce418f1fb3c5654
+DIST qhull-2020.2.tar.gz 1307213 BLAKE2B db11d4b83124da3ceed95e1eb81c280ac55c871c83acd4c371f9716b57a1777105891a073282789c7a80b5d74e85164996fbe4f2140c8371bca5926eab4adbc2 SHA512 88f50c2a968f56deec61772490617cc877b0ca2d804954ade08297b9bab826076db6b960d6f1feb21c6851e5328cb11c6dd565666517fa78a3d65b901848ff36
+EBUILD qhull-2020.2-r2.ebuild 1494 BLAKE2B 4b1547348ceeed2e8283d725c71797d55e6a11c13ef136d86ba04b2715e57b2b47b35d440094eaea0b6e40b44f62c38da4d8806ac0b0742af1fcf00421d4b889 SHA512 4fa136b4eb25c3b6405470aa852e760727ca2e428401cb93e150da221cc0ada87f918ee315ba8c788397ba3bf3621468aadca8f1b27ae3e1a25e2770162bdef5
+MISC metadata.xml 1094 BLAKE2B 9667f9f89fc9717129401070888401f0db493c01e4fe73eb8168efae9c1c2d7f1a7aa234fe72f3beea7feb385dc920418a6affe4d99679736cc6a1aef212e4eb SHA512 b1e13904fe69b4535806a871cdda79fadbf294c30654fe119e7e3be0ed481dc926a9dfaffd75c2849e3eb91ebad671a6b7eca293b40a249c8ccbee6264cfdaf9
diff --git a/media-libs/qhull/files/qhull-2012.1-64bit.patch b/media-libs/qhull/files/qhull-2012.1-64bit.patch
new file mode 100644
index 0000000..4c909c2
--- /dev/null
+++ b/media-libs/qhull/files/qhull-2012.1-64bit.patch
@@ -0,0 +1,32 @@
+ src/libqhull/io.c | 4 ++--
+ src/libqhull/stat.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/libqhull/io.c b/src/libqhull/io.c
+index 09a0079..7ad4b35 100644
+--- a/src/libqhull/io.c
++++ b/src/libqhull/io.c
+@@ -68,8 +68,8 @@ void qh_produce_output2(void) {
+ qh_memstatistics(qh ferr);
+ d_1= sizeof(setT) + (qh hull_dim - 1) * SETelemsize;
+ qh_fprintf(qh ferr, 8040, "\
+- size in bytes: merge %d ridge %d vertex %d facet %d\n\
+- normal %d ridge vertices %d facet vertices or neighbors %d\n",
++ size in bytes: merge %zd ridge %zd vertex %zd facet %zd\n\
++ normal %d ridge vertices %d facet vertices or neighbors %zd\n",
+ (int)sizeof(mergeT), (int)sizeof(ridgeT),
+ (int)sizeof(vertexT), (int)sizeof(facetT),
+ qh normal_size, d_1, d_1 + SETelemsize);
+diff --git a/src/libqhull/stat.c b/src/libqhull/stat.c
+index 7dc60b9..5721130 100644
+--- a/src/libqhull/stat.c
++++ b/src/libqhull/stat.c
+@@ -472,7 +472,7 @@ void qh_initstatistics(void) {
+ qh_allstatI();
+ if (qhstat next > (int)sizeof(qhstat id)) {
+ qh_fprintf(qhmem.ferr, 6184, "qhull error (qh_initstatistics): increase size of qhstat.id[].\n\
+- qhstat.next %d should be <= sizeof(qhstat id) %d\n", qhstat next, (int)sizeof(qhstat id));
++ qhstat.next %d should be <= sizeof(qhstat id) %zd\n", qhstat next, (int)sizeof(qhstat id));
+ #if 0 /* for locating error, Znumridges should be duplicated */
+ for(i=0; i < ZEND; i++) {
+ int j;
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 0000000..c83a807
--- /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/media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch b/media-libs/qhull/media-libs/qhull/files/qhull-2020.2-deprecated-pkgconfig.patch
new file mode 100644
index 0000000..c83a807
--- /dev/null
+++ b/media-libs/qhull/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/metadata.xml b/media-libs/qhull/metadata.xml
new file mode 100644
index 0000000..429d803
--- /dev/null
+++ b/media-libs/qhull/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription>
+ Qhull computes the convex hull, Delaunay triangulation, Voronoi
+ diagram, halfspace intersection about a point, furthest-site
+ Delaunay triangulation, and furthest-site Voronoi diagram. The
+ source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull
+ implements the Quickhull algorithm for computing the convex hull. It
+ handles roundoff errors from floating point arithmetic. It computes
+ volumes, surface areas, and approximations to the convex hull.
+ Qhull does not support constrained Delaunay triangulations,
+ triangulation of non-convex surfaces, mesh generation of non-convex
+ objects, or medium-sized inputs in 9-D and higher.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/qhull/qhull/issues</bugs-to>
+ <remote-id type="github">qhull/qhull</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-libs/qhull/qhull-2020.2-r2.ebuild b/media-libs/qhull/qhull-2020.2-r2.ebuild
new file mode 100644
index 0000000..b205840
--- /dev/null
+++ b/media-libs/qhull/qhull-2020.2-r2.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
+}