diff --git a/0001-Link-executables-against-shared-libs.patch b/0001-Link-executables-against-shared-libs.patch deleted file mode 100644 index 2af21ab..0000000 --- a/0001-Link-executables-against-shared-libs.patch +++ /dev/null @@ -1,45 +0,0 @@ -From eae8b33bc3a828b74422fb3bd41d52ba6f0b0048 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= -Date: Wed, 27 Apr 2016 08:05:53 +0200 -Subject: [PATCH 1/2] Link executables against shared libs. - ---- - CMakeLists.txt | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 59dff41..df26bd0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -477,22 +477,22 @@ set(qvoronoi_SOURCES src/qvoronoi/qvoronoi.c) - set(qhalf_SOURCES src/qhalf/qhalf.c) - - add_executable(qhull ${qhull_SOURCES}) --target_link_libraries(qhull ${qhull_STATICR}) -+target_link_libraries(qhull ${qhull_SHAREDR}) - - add_executable(rbox ${rbox_SOURCES}) --target_link_libraries(rbox ${qhull_STATIC}) -+target_link_libraries(rbox ${qhull_SHARED}) - - add_executable(qconvex ${qconvex_SOURCES}) --target_link_libraries(qconvex ${qhull_STATIC}) -+target_link_libraries(qconvex ${qhull_SHARED}) - - add_executable(qdelaunay ${qdelaunay_SOURCES}) --target_link_libraries(qdelaunay ${qhull_STATIC}) -+target_link_libraries(qdelaunay ${qhull_SHARED}) - - add_executable(qvoronoi ${qvoronoi_SOURCES}) --target_link_libraries(qvoronoi ${qhull_STATIC}) -+target_link_libraries(qvoronoi ${qhull_SHARED}) - - add_executable(qhalf ${qhalf_SOURCES}) --target_link_libraries(qhalf ${qhull_STATIC}) -+target_link_libraries(qhalf ${qhull_SHARED}) - - # --------------------------------------- - # Define options for linking to qhull_SHAREDR or qhull_SHARED --- -2.5.5 - diff --git a/0002-Install-docs-into-subdirs.patch b/0002-Install-docs-into-subdirs.patch deleted file mode 100644 index dd9385a..0000000 --- a/0002-Install-docs-into-subdirs.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ce134bdbddf2fbb28d799792332423dd91faa470 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= -Date: Wed, 27 Apr 2016 08:59:21 +0200 -Subject: [PATCH 2/2] Install docs into subdirs. - ---- - CMakeLists.txt | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index df26bd0..ee647c5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -616,11 +616,12 @@ install(TARGETS ${qhull_TARGETS_INSTALL} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) - - install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) --install(FILES ${libqhull_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) --install(FILES ${libqhullr_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) --install(FILES ${libqhullr_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) -+install(FILES ${libqhull_DOC} DESTINATION ${DOC_INSTALL_DIR}/src/libqhull) -+install(FILES ${libqhullr_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) -+install(FILES ${libqhullr_DOC} DESTINATION ${DOC_INSTALL_DIR}/src/libqhull_r) - install(FILES ${libqhullcpp_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhullcpp) - install(FILES html/qhull.man DESTINATION ${MAN_INSTALL_DIR} RENAME qhull.1) - install(FILES html/rbox.man DESTINATION ${MAN_INSTALL_DIR} RENAME rbox.1) - install(FILES ${doc_FILES} DESTINATION ${DOC_INSTALL_DIR}) --install(DIRECTORY html/ DESTINATION ${DOC_INSTALL_DIR}) -+install(DIRECTORY html/ DESTINATION ${DOC_INSTALL_DIR}/html) -+install(FILES src/Changes.txt DESTINATION ${DOC_INSTALL_DIR}/src) --- -2.5.5 - diff --git a/qhull-2015-src-7.2.0.tgz b/qhull-2015-src-7.2.0.tgz deleted file mode 100644 index 9aa4a89..0000000 Binary files a/qhull-2015-src-7.2.0.tgz and /dev/null differ diff --git a/qhull-2020-src-8.0.2.tgz b/qhull-2020-src-8.0.2.tgz new file mode 100644 index 0000000..9743a97 Binary files /dev/null and b/qhull-2020-src-8.0.2.tgz differ diff --git a/qhull-install.patch b/qhull-install.patch new file mode 100644 index 0000000..f40a106 --- /dev/null +++ b/qhull-install.patch @@ -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 diff --git a/qhull-lib64.patch b/qhull-lib64.patch new file mode 100644 index 0000000..2e72162 --- /dev/null +++ b/qhull-lib64.patch @@ -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" diff --git a/qhull-staticr-pic.patch b/qhull-staticr-pic.patch new file mode 100644 index 0000000..cf5601a --- /dev/null +++ b/qhull-staticr-pic.patch @@ -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}$<$:d>") ++ OUTPUT_NAME "${qhull_STATICR}$<$:d>" ++ POSITION_INDEPENDENT_CODE "TRUE") + + if(UNIX) + target_link_libraries(${qhull_STATIC} m) diff --git a/qhull.spec b/qhull.spec index e1245df..1181ffb 100644 --- a/qhull.spec +++ b/qhull.spec @@ -1,15 +1,14 @@ Name: qhull -Version: 2015.2 -Release: 7 +Version: 2020.2 +Release: 1 Summary: General dimension convex hull programs License: Qhull URL: http://www.qhull.org -Source0: http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz +Source0: http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz -#Link executables against shared libs -Patch0001: 0001-Link-executables-against-shared-libs.patch -#Install docks into subdirs -Patch0002: 0002-Install-docs-into-subdirs.patch +Patch0: qhull-lib64.patch +Patch1: qhull-install.patch +Patch2: qhull-staticr-pic.patch BuildRequires: gcc gcc-c++ cmake chrpath Provides: libqhull = %{version}-%{release} libqhull_r = %{version}-%{release} libqhull_p = %{version}-%{release} @@ -43,8 +42,10 @@ This package provides man files and docs for qhull. %autosetup -n %{name}-%{version} -p1 %build -%cmake -%make_build VERBOSE=1 +%cmake -DLINK_APPS_SHARED=ON +make VERBOSE=1 %{?_smp_mflags} +make VERBOSE=1 %{?_smp_mflags} libqhull qhull_p +cd .. %install %make_install VERBOSE=1 @@ -65,12 +66,21 @@ chrpath --delete ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.* %{_libdir}/*.so %{_includedir}/* %{_libdir}/libqhullcpp.a -%exclude %{_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 +%{_libdir}/libqhullstatic*.a %files help %{_pkgdocdir} %{_mandir}/man1/* %changelog +* Tue Oct 24 2023 xu_ping <707078654@qq.com> - 2020.2-1 +- Upgrade version to 2020.2 + * Fri Mar 6 2020 lingsheng - 2015.2-7 - Package init