update to 8.0.2

This commit is contained in:
Tom Callaway 2023-08-10 13:44:59 -04:00
parent e392848552
commit f751286781
4 changed files with 76 additions and 17 deletions

12
qhull-install.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up qhull-8.0.2/CMakeLists.txt.install qhull-8.0.2/CMakeLists.txt
--- qhull-8.0.2/CMakeLists.txt.install 2022-10-04 22:07:47.273041741 -0600
+++ qhull-8.0.2/CMakeLists.txt 2022-10-04 22:17:36.977621187 -0600
@@ -344,7 +344,7 @@ set(qhull_SHAREDP qhull_p) # libqhull a
set(qhull_TARGETS_APPLICATIONS qhull rbox qconvex qdelaunay qvoronoi qhalf)
set(qhull_TARGETS_STATIC ${qhull_CPP} ${qhull_STATIC} ${qhull_STATICR})
-set(qhull_TARGETS_SHARED ${qhull_SHAREDR})
+set(qhull_TARGETS_SHARED ${qhull_SHAREDR} ${qhull_SHARED} ${qhull_SHAREDP})
set(
qhull_TARGETS_TEST # Unused

21
qhull-lib64.patch Normal file
View File

@ -0,0 +1,21 @@
diff -up qhull-8.0.2/CMakeLists.txt.lib64 qhull-8.0.2/CMakeLists.txt
--- qhull-8.0.2/CMakeLists.txt.lib64 2020-09-03 20:33:16.000000000 -0600
+++ qhull-8.0.2/CMakeLists.txt 2022-10-04 21:49:12.708081647 -0600
@@ -709,7 +709,7 @@ configure_file(${PROJECT_SOURCE_DIR}/bui
@ONLY
)
-set(ConfigPackageLocation lib/cmake/Qhull)
+set(ConfigPackageLocation ${LIB_INSTALL_DIR}/cmake/Qhull)
install(EXPORT QhullTargets
FILE
QhullTargets.cmake
@@ -728,7 +728,7 @@ install(
Devel
)
-set(PkgConfigLocation lib/pkgconfig)
+set(PkgConfigLocation ${LIB_INSTALL_DIR}/pkgconfig)
foreach(pkgconfig IN ITEMS "${qhull_SHAREDR};Qhull reentrant shared library"
"${qhull_STATIC};Qhull static library"
"${qhull_STATICR};Qhull reentrant static library"

13
qhull-staticr-pic.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up qhull-8.0.2/CMakeLists.txt.FPIC qhull-8.0.2/CMakeLists.txt
--- qhull-8.0.2/CMakeLists.txt.FPIC 2023-08-10 11:10:20.914574070 -0400
+++ qhull-8.0.2/CMakeLists.txt 2023-08-10 11:10:56.136136910 -0400
@@ -447,7 +447,8 @@ set_target_properties(${qhull_STATIC} PR
add_library(${qhull_STATICR} STATIC ${libqhullr_SOURCES})
set_target_properties(${qhull_STATICR} PROPERTIES
VERSION ${qhull_VERSION}
- OUTPUT_NAME "${qhull_STATICR}$<$<CONFIG:Debug>:d>")
+ OUTPUT_NAME "${qhull_STATICR}$<$<CONFIG:Debug>:d>"
+ POSITION_INDEPENDENT_CODE "TRUE")
if(UNIX)
target_link_libraries(${qhull_STATIC} m)

View File

@ -1,19 +1,21 @@
Summary: General dimension convex hull programs
Name: qhull
Version: 7.2.1
Version: 8.0.2
# Add epoch, because upstream changed their versioning scheme:
# - Older releases used year.month
# - Newer releases use x.y.z
Epoch: 1
Release: 13%{?dist}
Release: 2%{?dist}
License: Qhull
Source0: https://github.com/qhull/qhull/archive/v%{version}.tar.gz#/qhull-%{version}.tar.gz
Patch1: 0001-Link-executables-against-shared-libs.patch
Patch2: 0002-Install-docs-into-subdirs.patch
# Compile libqhullcpp.a with -fPIC
# https://github.com/qhull/qhull/pull/47
Patch3: qhull-pic.patch
# Install cmake and pkgconfig file into proper libdir
# https://github.com/qhull/qhull/pull/123
Patch0: qhull-lib64.patch
# Install extra targets - libqhull and qhull_p
Patch1: qhull-install.patch
# The static_r library needs fPIC
Patch2: qhull-staticr-pic.patch
URL: http://www.qhull.org
@ -53,6 +55,7 @@ Summary: Development files for qhull
Requires: lib%{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: lib%{name}_r%{?_isa} = %{epoch}:%{version}-%{release}
Requires: lib%{name}_p%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description devel
Qhull is a general dimension convex hull program that reads a set
@ -63,15 +66,17 @@ about a point.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch -P0 -p1 -b .lib64
%patch -P1 -p1 -b .install
%patch -P2 -p1 -b .pic
%build
mkdir -p build
cd build
%cmake -S .. -B .
%cmake -S .. -B . -DLINK_APPS_SHARED=ON
make VERBOSE=1 %{?_smp_mflags}
# These items are deprecated as of 8.0.2
make VERBOSE=1 %{?_smp_mflags} libqhull qhull_p
cd ..
%install
@ -85,8 +90,6 @@ chrpath --delete ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.*
%files
%{_pkgdocdir}
%exclude %{_pkgdocdir}/COPYING.txt
%exclude %{_pkgdocdir}/src/libqhull
%exclude %{_pkgdocdir}/src/libqhull_r
%license COPYING.txt
%{_bindir}/*
%{_mandir}/man1/*
@ -110,15 +113,25 @@ chrpath --delete ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.*
%files devel
%{_pkgdocdir}/src/libqhull
%{_pkgdocdir}/src/libqhull_r
%{_libdir}/*.so
%{_includedir}/*
# Easier to include these than to hack them out of the cmake bits
%{_libdir}/libqhullcpp.a
%exclude %{_libdir}/libqhullstatic*.a
%{_libdir}/libqhullstatic*.a
%dir %{_libdir}/cmake/Qhull
%{_libdir}/cmake/Qhull/QhullConfig*.cmake
%{_libdir}/cmake/Qhull/QhullTargets*.cmake
%{_libdir}/pkgconfig/qhull_r.pc
%{_libdir}/pkgconfig/qhullcpp.pc
%{_libdir}/pkgconfig/qhullstatic*.pc
%changelog
* Thu Aug 10 2023 Tom Callaway <spot@fedoraproject.org> - 1:8.0.2-2
- make the static_r library pic
* Thu Aug 3 2023 Tom Callaway <spot@fedoraproject.org> - 1:8.0.2-1
- update to 8.0.2 (thanks to Orion Poplawski)
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.2.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild