Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qhull: add version 8.0.2 #15428

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions recipes/qhull/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"8.0.2":
url: "https://github.com/qhull/qhull/archive/v8.0.2.tar.gz"
sha256: "8774e9a12c70b0180b95d6b0b563c5aa4bea8d5960c15e18ae3b6d2521d64f8b"
"8.0.1":
url: "https://github.com/qhull/qhull/archive/v8.0.1.tar.gz"
sha256: "33c442518b033862978089776a3ec29cd771ebb535c2b4a6d604fcef043c4264"
Expand All @@ -9,19 +12,33 @@ sources:
url: "https://github.com/qhull/qhull/archive/v7.3.2.tar.gz"
sha256: "619c8a954880d545194bc03359404ef36a1abd2dde03678089459757fd790cb0"
patches:
"8.0.2":
- patch_file: "patches/0002-fix-cmake-minimum-required-location-8.0.2.patch"
patch_description: "Fix cmake_minimum_required() position"
patch_type: "backport"
patch_source: "https://github.com/qhull/qhull/pull/120"
- patch_file: "patches/0003-fix-cmake-8.0.2.patch"
patch_description: "build static, shared library separately"
patch_type: "conan"
"8.0.1":
- patch_file: "patches/0002-fix-cmake-minimum-required-location-8.0.1.patch"
patch_description: "Fix cmake_minimum_required() position"
patch_type: "backport"
patch_source: "https://github.com/qhull/qhull/pull/120"
- patch_file: "patches/0003-fix-cmake-8.0.x.patch"
- patch_file: "patches/0003-fix-cmake-8.0.0.patch"
patch_description: "build static, shared library separately"
patch_type: "conan"
"8.0.0":
- patch_file: "patches/0002-fix-cmake-minimum-required-location-8.0.0.patch"
patch_description: "Fix cmake_minimum_required() position"
patch_type: "backport"
patch_source: "https://github.com/qhull/qhull/pull/120"
- patch_file: "patches/0003-fix-cmake-8.0.x.patch"
- patch_file: "patches/0003-fix-cmake-8.0.0.patch"
patch_description: "build static, shared library separately"
patch_type: "conan"
- patch_file: "patches/0004-no-cpp11.patch"
patch_description: "fix compilation error on C++11"
patch_type: "portability"
"7.3.2":
- patch_file: "patches/0001-fix-cmake-conflict-exec-dir.patch"
patch_description: "Fix build failure on macOS due to conflict between an exec & dir name"
Expand All @@ -32,3 +49,5 @@ patches:
patch_type: "backport"
patch_source: "https://github.com/qhull/qhull/pull/120"
- patch_file: "patches/0003-fix-cmake-7.3.2.patch"
patch_description: "build static, shared library separately"
patch_type: "conan"
23 changes: 10 additions & 13 deletions recipes/qhull/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, get, rmdir
from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get, rmdir
from conan.tools.microsoft import is_msvc
from conan.tools.scm import Version
import os

required_conan_version = ">=1.47.0"
required_conan_version = ">=1.53.0"


class QhullConan(ConanFile):
Expand All @@ -31,24 +32,17 @@ class QhullConan(ConanFile):
}

def export_sources(self):
for p in self.conan_data.get("patches", {}).get(self.version, []):
copy(self, p["patch_file"], self.recipe_folder, self.export_sources_folder)
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

def configure(self):
if self.options.shared:
del self.options.fPIC
try:
del self.settings.compiler.libcxx
except Exception:
pass
try:
del self.settings.compiler.cppstd
except Exception:
pass
self.options.rm_safe("fPIC")
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")

def package_id(self):
del self.info.options.reentrant
Expand All @@ -62,6 +56,9 @@ def source(self):

def generate(self):
tc = CMakeToolchain(self)
if Version(self.version) >= "0.8.2":
tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared
tc.variables["BUILD_SHARED_LIBS"] = self.options.shared
tc.generate()

def build(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f50b187..2a25615 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,8 +67,8 @@
# $Id: //main/2019/qhull/CMakeLists.txt#21 $$Change: 3039 $
# $DateTime: 2020/09/03 21:26:22 $$Author: bbarber $

-project(qhull)
cmake_minimum_required(VERSION 3.0)
+project(qhull)

# Define qhull_VERSION in README.txt, Announce.txt, qh-get.htm, CMakeLists.txt
# qhull-zip.sh (twice), qhull-wiki.md, qhull-news.htm, File_id.diz, index.htm
54 changes: 54 additions & 0 deletions recipes/qhull/all/patches/0003-fix-cmake-8.0.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a25615..74505c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -369,7 +369,7 @@ set_target_properties(${qhull_SHAREDR} PROPERTIES

if(UNIX)
target_link_libraries(${qhull_SHAREDR} m)
- if(APPLE)
+ if(0)
set_target_properties(${qhull_SHAREDR} PROPERTIES
INSTALL_NAME_DIR "${LIB_INSTALL_DIR}")
else()
@@ -396,7 +396,7 @@ set_target_properties(${qhull_SHARED} PROPERTIES

if(UNIX)
target_link_libraries(${qhull_SHARED} m)
- if(APPLE)
+ if(0)
set_target_properties(${qhull_SHARED} PROPERTIES
INSTALL_NAME_DIR "${LIB_INSTALL_DIR}")
else()
@@ -424,7 +424,7 @@ set_target_properties(${qhull_SHAREDP} PROPERTIES

if(UNIX)
target_link_libraries(${qhull_SHAREDP} m)
- if(APPLE)
+ if(0)
set_target_properties(${qhull_SHAREDP} PROPERTIES
INSTALL_NAME_DIR "${LIB_INSTALL_DIR}")
else()
@@ -687,6 +687,7 @@ endif()

install(TARGETS ${qhull_TARGETS_INSTALL} EXPORT QhullTargets
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ BUNDLE DESTINATION ${BIN_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
INCLUDES DESTINATION include)
@@ -747,14 +748,8 @@ foreach(pkgconfig IN ITEMS "${qhull_SHAREDR};Qhull reentrant shared library"
endforeach()

install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
-install(FILES src/libqhull/DEPRECATED.txt DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
install(FILES ${libqhullr_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/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}/html)
-install(FILES src/Changes.txt DESTINATION ${DOC_INSTALL_DIR}/src)

add_custom_target(uninstall
COMMENT "uninstall Qhull by deleting files in install_manifest.txt"
2 changes: 2 additions & 0 deletions recipes/qhull/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"8.0.2":
folder: all
"8.0.1":
folder: all
"8.0.0":
Expand Down