[geogram] update to 1.8.3 (#30362)

* update geogram

* update version

* update patch

* update version

* update portfile.cmake

* update version

---------

Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
MonicaLiu 2023-03-25 13:59:15 +08:00 committed by GitHub
parent 631de847c4
commit fc2263ea36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 100 additions and 56 deletions

View File

@ -1,17 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8713b2f..0e034fa 100644
index 1fd796c..05bd735 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,7 @@ set(VORPALINE_VERSION_MINOR 7)
set(VORPALINE_VERSION_PATCH 6)
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})
@@ -53,7 +53,7 @@ endif()
include(cmake/geogram.cmake)
-set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})
+set(VORPALINE_INCLUDE_SUBPATH ./)
# Determine the current Build-OS (Build-platform without the compiler info)
string(REGEX REPLACE "-[^-]+$" "" VORPALINE_OS ${VORPALINE_PLATFORM})
@@ -116,6 +116,7 @@ endif()
@@ -115,6 +115,7 @@ endif()
add_subdirectory(src/lib/third_party)
if(GEOGRAM_WITH_GRAPHICS)
@ -19,7 +19,7 @@ index 8713b2f..0e034fa 100644
add_subdirectory(src/lib/geogram_gfx)
endif()
@@ -146,7 +147,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt)
@@ -145,7 +146,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt)
# FindGeogram.cmake
@ -66,10 +66,19 @@ index 8713b2f..0e034fa 100644
# Configure CPack
diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt
index 49cb2ba..8985137 100644
index ed2dca0..30f87b7 100644
--- a/src/lib/geogram/CMakeLists.txt
+++ b/src/lib/geogram/CMakeLists.txt
@@ -61,8 +61,19 @@ if(WIN32)
@@ -45,7 +45,7 @@ target_include_directories(geogram PRIVATE
# path for targets that depend on geogram.
# See: https://cmake.org/cmake/help/v3.3/command/target_include_directories.html
# https://stackoverflow.com/questions/26243169/cmake-target-include-directories-meaning-of-scope
-target_include_directories(geogram PUBLIC ${PROJECT_SOURCE_DIR}/src/lib)
+target_include_directories(geogram PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib>)
if(ANDROID)
target_include_directories(geogram PRIVATE
@@ -72,8 +72,19 @@ if(WIN32)
target_link_libraries(geogram psapi)
endif()
@ -91,10 +100,10 @@ index 49cb2ba..8985137 100644
# Install include files for the standard devkit
install(
diff --git a/src/lib/geogram_gfx/CMakeLists.txt b/src/lib/geogram_gfx/CMakeLists.txt
index b155975..ad66440 100644
index a6f8372..195b1e2 100644
--- a/src/lib/geogram_gfx/CMakeLists.txt
+++ b/src/lib/geogram_gfx/CMakeLists.txt
@@ -47,14 +47,21 @@ if(VORPALINE_BUILD_DYNAMIC)
@@ -52,14 +52,21 @@ if(VORPALINE_BUILD_DYNAMIC)
endif()
# Install the library
@ -118,7 +127,7 @@ index b155975..ad66440 100644
)
# Install include files for the full devkit
@@ -62,7 +69,7 @@ install(
@@ -67,7 +74,7 @@ install(
DIRECTORY .
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
COMPONENT devkit-full
@ -128,38 +137,36 @@ index b155975..ad66440 100644
install(
diff --git a/src/lib/third_party/numerics/CMakeLists.txt b/src/lib/third_party/numerics/CMakeLists.txt
index 8fd39b0..46d5cc6 100644
index 5faf2fa..33c9bdd 100644
--- a/src/lib/third_party/numerics/CMakeLists.txt
+++ b/src/lib/third_party/numerics/CMakeLists.txt
@@ -10,17 +10,19 @@ endif()
@@ -14,10 +14,11 @@ endif()
include_directories(${GEOGRAM_SOURCE_DIR}/src/lib/third_party/numerics/INCLUDE)
-aux_source_directories(SOURCES "Source Files" .)
+set(LAPACK_lapack_WORKS TRUE)
+find_package(BLAS REQUIRED)
+find_package(LAPACK REQUIRED)
+ aux_source_directories(SOURCES "Source Files" .)
aux_source_directories(SOURCES "Source Files" .)
aux_source_directories(SOURCES "Source Files\\LIBF2C" LIBF2C)
-aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS)
-aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK)
aux_source_directories(SOURCES "Source Files\\SUPERLU" SUPERLU)
aux_source_directories(SOURCES "Source Files\\ARPACK" ARPACK)
aux_source_directories(SOURCES "Source Files\\ARPACK_UTIL" ARPACK_UTIL)
@@ -28,6 +29,7 @@ list(REMOVE_ITEM SOURCES "LIBF2C/system_.c")
add_library(geogram_num_3rdparty ${SOURCES})
-if(UNIX)
+target_link_libraries(geogram_num_3rdparty ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
+ if(UNIX)
if(UNIX)
target_link_libraries(geogram_num_3rdparty m)
endif()
diff --git a/src/lib/third_party/numerics/LIBF2C/getarg_.c b/src/lib/third_party/numerics/LIBF2C/getarg_.c
index 2b69a1e..a504538 100644
--- a/src/lib/third_party/numerics/LIBF2C/getarg_.c
+++ b/src/lib/third_party/numerics/LIBF2C/getarg_.c
@@ -17,20 +17,20 @@ VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls;
diff --git a/src/lib/third_party/numerics/LIBF2C/libf2c_getarg_.c b/src/lib/third_party/numerics/LIBF2C/libf2c_getarg_.c
index 2b69a1e..a4b4c55 100644
--- a/src/lib/third_party/numerics/LIBF2C/libf2c_getarg_.c
+++ b/src/lib/third_party/numerics/LIBF2C/libf2c_getarg_.c
@@ -17,20 +17,21 @@ VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls;
void getarg_(ftnint *n, char *s, ftnlen ls)
#endif
{
@ -189,14 +196,15 @@ index 2b69a1e..a504538 100644
+ // *s++ = *t++;
+ // for( ; i<ls ; ++i)
+ // *s++ = ' ';
+ // }
+}
#ifdef __cplusplus
}
#endif
diff --git a/src/lib/third_party/numerics/LIBF2C/iargc_.c b/src/lib/third_party/numerics/LIBF2C/iargc_.c
diff --git a/src/lib/third_party/numerics/LIBF2C/libf2c_iargc_.c b/src/lib/third_party/numerics/LIBF2C/libf2c_iargc_.c
index 2f29da0..48dfd9f 100644
--- a/src/lib/third_party/numerics/LIBF2C/iargc_.c
+++ b/src/lib/third_party/numerics/LIBF2C/iargc_.c
--- a/src/lib/third_party/numerics/LIBF2C/libf2c_iargc_.c
+++ b/src/lib/third_party/numerics/LIBF2C/libf2c_iargc_.c
@@ -9,8 +9,9 @@ ftnint iargc_()
ftnint iargc_(void)
#endif

View File

@ -1,13 +1,43 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO alicevision/geogram
REF 8b2ae6148c7ab1564fa2700673b4275296ce80d3 #1.7.6
SHA512 0ec0deded92c8d5d100b6e77f8cfbbbaf7b744c230e10abd0b86861960cda9713ff65209575fdc09034afcb0e9137428a20c00d399c09fd58ce541fed2105a2d
REPO BrunoLevy/geogram
REF "v${VERSION}"
SHA512 ae3d95be1c5061ace92921b3fcfb0027d23c595b131b0d31f1788adbe0d8f92367bef71736d6c936504bd37eba5fcdae658369f03734e233bf3eab14bca6f9e5
PATCHES
fix-vcpkg-install.patch
use-arm64-intrinsics.patch
)
#third_party: amgcl
vcpkg_from_github(
OUT_SOURCE_PATH AMGCL_SOURCE_PATH
REPO ddemidov/amgcl
REF 8083b23fbe69c43cee0d4bc17e4334572e292c93
SHA512 1b29871ace68c53b46711012921261929f8bd612f93b47d2c59523cd3d68366956fe1c9ec81a94b3aaab63357001799c9e34af79376b940fa6b7a53cdf136897
)
#third_party: libMeshb
vcpkg_from_github(
OUT_SOURCE_PATH LIBMESHB_SOURCE_PATH
REPO LoicMarechal/libMeshb
REF b4a91513317119ff71a1186906a052da0e535913
SHA512 bff30a233c2746a454d552be66f5654bf4af995d6f1eb00a4d21ed10c86234a5be4d6f31282645858e0a829b10fd98cad7188c69be65cdabbd18478fc26bad1f
)
#third_party: rply
vcpkg_from_github(
OUT_SOURCE_PATH RPLY_SOURCE_PATH
REPO diegonehab/rply
REF 4296cc91b5c8c26d4e7d7aac0cee2b194ffc5800
SHA512 b236279d3f0e6e1062703555415236183da31a9e40c49d478954586725f8dc6c0582aef0db7b605cb7967c3bd4a96d2fe8e6601cc56b8a1d53129a25efa7d1f2
)
file(REMOVE_RECURSE "${SOURCE_PATH}/src/lib/geogram/third_party/amgcl"
"${SOURCE_PATH}/src/lib/geogram/third_party/libMeshb"
"${SOURCE_PATH}/src/lib/geogram/third_party/rply")
file(RENAME "${AMGCL_SOURCE_PATH}" "${SOURCE_PATH}/src/lib/geogram/third_party/amgcl")
file(RENAME "${LIBMESHB_SOURCE_PATH}" "${SOURCE_PATH}/src/lib/geogram/third_party/libMeshb")
file(RENAME "${RPLY_SOURCE_PATH}" "${SOURCE_PATH}/src/lib/geogram/third_party/rply")
file(COPY "${CURRENT_PORT_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}/cmake")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -70,6 +100,24 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/doc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Remove all empty directories.
function(auto_clean dir)
file(GLOB entries "${dir}/*")
file(GLOB files LIST_DIRECTORIES false "${dir}/*")
foreach(entry IN LISTS entries)
if(entry IN_LIST files)
continue()
endif()
file(GLOB_RECURSE children "${entry}/*")
if(children)
auto_clean("${entry}")
else()
file(REMOVE_RECURSE "${entry}")
endif()
endforeach()
endfunction()
auto_clean("${CURRENT_PACKAGES_DIR}/include")
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/share/geogram/GeogramTargets.cmake"
[[INTERFACE_INCLUDE_DIRECTORIES "/src/lib;${_IMPORT_PREFIX}/include"]]
@ -77,6 +125,6 @@ vcpkg_replace_string(
)
# Handle copyright
file(INSTALL "${SOURCE_PATH}/doc/devkit/license.dox" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/doc/devkit/license.dox")
vcpkg_fixup_pkgconfig()

View File

@ -1,16 +0,0 @@
diff --git a/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp b/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp
index 352ea76..34e73e2 100644
--- a/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp
+++ b/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp
@@ -122,7 +122,11 @@ namespace {
#if defined(GEO_COMPILER_GCC_FAMILY)
return GEO::index_t(Numeric::uint32(__builtin_popcount(x)));
#elif defined(GEO_COMPILER_MSVC)
+ #if defined(_M_ARM64)
+ return GEO::index_t(_CountOneBits(x));
+ #else
return GEO::index_t(__popcnt(x));
+ #endif
#else
int result = 0;
for(int b=0; b<32; ++b) {

View File

@ -1,9 +1,8 @@
{
"name": "geogram",
"version": "1.7.6",
"port-version": 4,
"version": "1.8.3",
"description": "Geogram is a programming library of geometric algorithms.",
"homepage": "https://gforge.inria.fr/projects/geogram/",
"homepage": "https://github.com/BrunoLevy/geogram",
"license": "BSD-3-Clause",
"supports": "!uwp & !(osx & arm64)",
"dependencies": [

View File

@ -2697,8 +2697,8 @@
"port-version": 1
},
"geogram": {
"baseline": "1.7.6",
"port-version": 4
"baseline": "1.8.3",
"port-version": 0
},
"geographiclib": {
"baseline": "2.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "86346ad187bf9f8b54be1e50b3bb52dd4c69171d",
"version": "1.8.3",
"port-version": 0
},
{
"git-tree": "902027c917fa8e2047dd0655721a753305432010",
"version": "1.7.6",