# # spec file for package qhull # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define libname libqhull_r8_0 %define srcyear 2020 %define srcver 8.0.2 Name: qhull Version: 2020.2 Release: 6.2 Summary: Computing convex hulls, Delaunay triangulations and Voronoi diagrams License: Qhull Group: Development/Libraries/C and C++ URL: http://www.qhull.org Source0: http://www.qhull.org/download/qhull-%{srcyear}-src-%{srcver}.tgz # PATCH-FIX-OPENSUSE Patch1: 0002-Remove-tools-from-CMake-exported-targets.patch # PATCH-FIX-OPENSUSE Patch2: 0001-Use-separate-CMake-EXPORT-sets-for-independent-targe.patch BuildRequires: cmake BuildRequires: gcc-c++ %description 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 2D 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. %package -n %{libname} Summary: Computing convex hulls, Delaunay triangulations and Voronoi diagrams Group: System/Libraries %description -n %{libname} 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 2D 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. %package -n qhull_r-devel Summary: Development and documentation files for qhull Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} Provides: qhull-devel = %{version} Obsoletes: qhull-devel < %{version} %description -n qhull_r-devel Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. This package contains the header files for the Qhull libraries. %package -n qhullcpp-devel-static Summary: Development and documentation files for qhull - C++ interface Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} %description -n qhullcpp-devel-static Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. This package contains the header files and static lib for Qhull's C++ interface. %prep %autosetup -p1 %build # Needed for static lib libqhullcpp.a export CXXFLAGS+=" -ffat-lto-objects" # Don't assume LIB_INSTALL_DIR is relative sed -i 's#@LIB_INSTALL_DIR@#%{_lib}#' build/qhull.pc.in # Neither is INCLUDE_INSTALL_DIR sed -i 's#@INCLUDE_INSTALL_DIR@#include#' build/qhull.pc.in # Neither is INCLUDE_INSTALL_DIR sed -i 's#@INCLUDE_INSTALL_DIR@#include#' build/qhull.pc.in # Fix CMake/Pkgconfig directories sed -i '/Location/ s@lib/@${LIB_INSTALL_DIR}/@' CMakeLists.txt %cmake \ -DDOC_INSTALL_DIR="%{_docdir}/%{name}" \ -DINCLUDE_INSTALL_DIR="%{_includedir}" \ -DLIB_INSTALL_DIR="%{_libdir}" \ -DBIN_INSTALL_DIR="%{_bindir}" \ -DMAN_INSTALL_DIR="%{_mandir}/man1/" \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_QHULLCPP=ON \ -DLINK_APPS_SHARED=ON %cmake_build %install %cmake_install rm %{buildroot}%{_docdir}/%{name}/COPYING.txt # We don't install static libs for qhull, so don't install the corresponding pkgconfig files either rm %{buildroot}%{_libdir}/pkgconfig/qhullstatic*.pc # Fix rpmlint warning: E: double-slash-in-pkgconfig-path sed -i 's#//#/#' %{buildroot}%{_libdir}/pkgconfig/*.pc # Remove deprecated qhull headers rm -r %{buildroot}%{_includedir}/libqhull %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files %license COPYING.txt %{_docdir}/%{name}/ %{_bindir}/qconvex %{_bindir}/qdelaunay %{_bindir}/qhalf %{_bindir}/qhull %{_bindir}/qvoronoi %{_bindir}/rbox %{_mandir}/man1/* %files -n %{libname} %license COPYING.txt %{_libdir}/libqhull_r.so.* %files -n qhull_r-devel %{_includedir}/libqhull_r/ %{_libdir}/libqhull_r.so %dir %{_libdir}/cmake/Qhull %{_libdir}/cmake/Qhull/QhullConfig*.cmake %{_libdir}/cmake/Qhull/QhullTargetsShared*.cmake %{_libdir}/pkgconfig/qhull_r.pc %files -n qhullcpp-devel-static %{_includedir}/libqhullcpp/ %{_libdir}/libqhullcpp.a %{_libdir}/pkgconfig/qhullcpp.pc %{_libdir}/cmake/Qhull/QhullTargetsCpp*.cmake %changelog * Sat Jan 25 2025 Stefan Brüns - Fix broken CMake configuration, move static qhullcpp library to separate export set. Otherwise, the regular reentrant library will reference a non-existing library file, and dependent packages will fail. * 0001-Use-separate-CMake-EXPORT-sets-for-independent-targe.patch * Sat Jan 4 2025 Andreas Schneider - Let cmake install qhullcpp * Tue Feb 20 2024 Dominique Leuenberger - Use %%autosetup macro. Allows to eliminate the usage of deprecated %%patchN * Tue May 24 2022 Christophe Giboudeaux - Fix rpmlint errors: * E: double-slash-in-pkgconfig-path * E: binary-or-shlib-defines-rpath (boo#1199059) - Fix incorrect includedir path in qhull.pc * Mon Mar 29 2021 Atri Bhattacharya - Drop deprecated (non-reentrant) qhull headers since we don't provide the corresponding shared lib. - Move the qhull_r libs, headers, related files into new shared lib libqhull_r and qhull_r-devel packages as appropriate; have qhull_r-devel provide qhull-devel. - Move qhullcpp library, headers, and pkgconfig file into separate qhullcpp-devel-static package. - qhullcpp is only supported as static library and needs to be built with "-ffat-lto-objects"; add this to CXXFLAGS. - Delete unnecessary pkgconfig files corresponding to static libs that are not built/installed. * Fri Oct 23 2020 Stefan Brüns - updated to 2020.2 (8.0.2): * Qhull 202.2 updates Qhull's builds and Qhull's C++ interface. See https://github.com/qhull/qhull/wiki for details. - updated to 2020.1 (8.0.2): * Qhull 2020.1 enhances the C++ interface with QhullUser and support for Voronoi diagrams. See user_eg3 for C++ examples. * Qhull builds support pkg-config, SONAME, DESTDIR for staged installs, PREFIX, QhullExport, and CMAKE_CURRENT_SOURCE_DIR. - Drop 0001-Allow-disabling-of-static-or-shared-library-builds.patch - Rebase 0002-Remove-tools-from-CMake-exported-targets.patch * Wed Jul 8 2020 Stefan Brüns - Fix static library references in CMake files, replace 0001-Link-tools-to-shared-library.patch with upstream 0001-Allow-disabling-of-static-or-shared-library-builds.patch - Also remove references to tools in CMake files, add 0002-Remove-tools-from-CMake-exported-targets.patch * Sun Feb 16 2020 Stefan Brüns - Add missing dependency from devel package to shared library. - Use shared linking for qhull tools. 0001-Link-tools-to-shared-library.patch * Thu Jan 30 2020 Stefan Brüns - Correct name of the library package according to SLPP - the current and older versions both packaged libqhull.so.7, but due to the full version in the package name (libqhull7-7_3_2) it was not considered an update of the old one (libqhull7-7_2_0). * Fri Nov 29 2019 Stefan Brüns - updated to 2019.1 (7.3.2): * A large number of changes, please see included Changes.txt - General spec-file cleanups * Wed Jul 12 2017 jengelh@inai.de - RPM group fix - Compact description a bit * Mon Jul 10 2017 toddrme2178@gmail.com - updated to 2015.2 (7.2.0): * A large number of changes, please see: https://github.com/qhull/qhull/blob/5a79a0009454c86e9848646b3c296009125231bf/src/Changes.txt - Update to more recent macros - General spec-file cleanups * Mon Sep 1 2014 hrvoje.senjan@gmail.com - Change license to Qhull - it is now recognized by spdx.org * Mon Aug 5 2013 hrvoje.senjan@gmail.com - enable CMAKE_SKIP_INSTALL_RPATH option so RPATH is ommited from install tree * Thu Mar 8 2012 cfarrell@suse.com - license update: SUSE-Qhull Use SUSE- proprietary prefix until Qhull (incidentially, also the Fedora designation for the license) is accepted upstream at spdx.org * Thu Feb 23 2012 saschpe@suse.de - Add some detail about the version update to 2012.1 * Wed Feb 22 2012 pgajdos@suse.com - updated to 2012.1.2 (6_3_1_1494) - upstreamed liblibname.patch * Tue Feb 21 2012 pgajdos@suse.com - updated to 2012.1.1 (6_3_1_1490): - Require option 'Qz' for Delaunay triangulation/Voronoi diagram of cocircular/cospherical points [D. Sheehy] - qh_errexit: Do not call qh_printsummary or qh_printstats on qh_ERRinput - Change error QH6227 (all degenerate) from qh_ERRinput to qh_ERRprec - Change error QH6159 (ID overflow) from qh_ERRinput to qh_ERRqhull - eg/q_eg, q_egtest, q_test: Run if qconvex is in $PATH [M. Atzeri] * Mon Jan 30 2012 pgajdos@suse.com - updated to 2012.1: - Add config to distribution - Add testqset to config build - config/bootstrap.sh copies program files into src/libqhull * Mon Nov 28 2011 idoenmez@suse.de - Fix duplicate files * Mon Sep 19 2011 pgajdos@suse.com - updated to 2011.1: * Remove deprecated libqhull/qhull.h. Use libqhull/libqhull.h instead. * QhullFacet: Added isSimplicial, isTopOrient, isTriCoplanar, isUpperDelaunay * Added Qhull::defineVertexFacetNeighbors() for facetNeighbors of vertices. Automatically called for facet merging and Voronoi diagrams Do not print QhullVertex::facetNeighbors is !facetNeighborsDefined() * Add Fixup identifiers * QhullError: Add copy constructor, assignment operator, and destructor * Add throw() specifiers to RoadError and QhullError * Renamed RoadError::defined() to RoadError::isDefined() * Add #error to Qhull.h if qh_QHpointer is not defined * etc. see Changes.txt * Tue Jul 20 2010 johannesobermayr@gmx.de - initial package * next branch of git://gitorious.org/qhull/qhull.git - susepatches.diff * fix build breakage caused by serious compiler warnings