Compile libqhullcpp with -fPIC

This commit is contained in:
Orion Poplawski 2022-10-02 12:57:01 -06:00
parent 0ecd711103
commit deda2eefd6
2 changed files with 20 additions and 1 deletions

12
qhull-pic.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up qhull-7.2.1/CMakeLists.txt.pic qhull-7.2.1/CMakeLists.txt
--- qhull-7.2.1/CMakeLists.txt.pic 2022-01-23 13:36:23.307550832 -0700
+++ qhull-7.2.1/CMakeLists.txt 2022-01-23 13:45:35.447166635 -0700
@@ -461,7 +461,7 @@ endif(UNIX)
add_library(${qhull_CPP} STATIC ${libqhullcpp_SOURCES})
set_target_properties(${qhull_CPP} PROPERTIES
- VERSION ${qhull_VERSION})
+ VERSION ${qhull_VERSION} POSITION_INDEPENDENT_CODE ON)
# ---------------------------------------
# Define qhull executables linked to qhullstatic library

View File

@ -5,12 +5,15 @@ Version: 7.2.1
# - Older releases used year.month
# - Newer releases use x.y.z
Epoch: 1
Release: 10%{?dist}
Release: 11%{?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
URL: http://www.qhull.org
@ -62,6 +65,7 @@ about a point.
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
mkdir -p build
@ -115,6 +119,9 @@ chrpath --delete ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.*
%changelog
* Sun Oct 02 2022 Orion Poplawski <orion@nwra.com> - 1:7.2.1-11
- Compile libqhullcpp with -fPIC
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:7.2.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild