diff --git a/0001-Link-executables-against-shared-libs.patch b/0001-Link-executables-against-shared-libs.patch new file mode 100644 index 0000000..2af21ab --- /dev/null +++ b/0001-Link-executables-against-shared-libs.patch @@ -0,0 +1,45 @@ +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 new file mode 100644 index 0000000..dd9385a --- /dev/null +++ b/0002-Install-docs-into-subdirs.patch @@ -0,0 +1,33 @@ +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 new file mode 100644 index 0000000..9aa4a89 Binary files /dev/null and b/qhull-2015-src-7.2.0.tgz differ diff --git a/qhull.spec b/qhull.spec new file mode 100644 index 0000000..e1245df --- /dev/null +++ b/qhull.spec @@ -0,0 +1,76 @@ +Name: qhull +Version: 2015.2 +Release: 7 +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 + +#Link executables against shared libs +Patch0001: 0001-Link-executables-against-shared-libs.patch +#Install docks into subdirs +Patch0002: 0002-Install-docs-into-subdirs.patch + +BuildRequires: gcc gcc-c++ cmake chrpath +Provides: libqhull = %{version}-%{release} libqhull_r = %{version}-%{release} libqhull_p = %{version}-%{release} +Obsoletes: libqhull < %{version}-%{release} libqhull_r < %{version}-%{release} libqhull_p < %{version}-%{release} + +%description +Qhull is a general dimension convex hull program that reads a set +of points from stdin, and outputs the smallest convex set that contains +the points to stdout. It also generates Delaunay triangulations, Voronoi +diagrams, furthest-site Voronoi diagrams, and halfspace intersections +about a point. + +%package devel +Summary: Development files for qhull +Requires: %{name} = %{version}-%{release} + +%description devel +Qhull is a general dimension convex hull program that reads a set +of points from stdin, and outputs the smallest convex set that contains +the points to stdout. It also generates Delaunay triangulations, Voronoi +diagrams, furthest-site Voronoi diagrams, and halfspace intersections +about a point. + +%package help +Summary: Help package for qhull + +%description help +This package provides man files and docs for qhull. + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +%cmake +%make_build VERBOSE=1 + +%install +%make_install VERBOSE=1 +chrpath --delete ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.* + +%files +%license COPYING.txt +%{_bindir}/* +%{_libdir}/libqhull.so.* +%{_libdir}/libqhull_r.so.* +%{_libdir}/libqhull_p.so.* + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files devel +%{_libdir}/*.so +%{_includedir}/* +%{_libdir}/libqhullcpp.a +%exclude %{_libdir}/libqhullstatic*.a + +%files help +%{_pkgdocdir} +%{_mandir}/man1/* + +%changelog +* Fri Mar 6 2020 lingsheng - 2015.2-7 +- Package init