[colmap,glew] Avoid GLU (#43695)

This commit is contained in:
Kai Pastor 2025-02-11 23:50:23 +01:00 committed by GitHub
parent e9fb26e469
commit 13388373bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 37 additions and 6 deletions

13
ports/colmap/no-glu.diff Normal file
View File

@ -0,0 +1,13 @@
diff --git a/src/thirdparty/SiftGPU/GlobalUtil.cpp b/src/thirdparty/SiftGPU/GlobalUtil.cpp
index e98ef6b..39435db 100644
--- a/src/thirdparty/SiftGPU/GlobalUtil.cpp
+++ b/src/thirdparty/SiftGPU/GlobalUtil.cpp
@@ -137,7 +137,7 @@ void GlobalUtil::CheckErrorsGL(const char* location)
const char *errstr;
while (errnum = glGetError())
{
- errstr = (const char *)(gluErrorString(errnum));
+ errstr = nullptr; // just print errnum
if(errstr) {
std::cerr << errstr;
}

View File

@ -1,4 +1,5 @@
set(COLMAP_REF "aa087848a8bd09cebf3e3cc8a5732552f30c51ad") # v3.11.1
# Update both, literally.
set(COLMAP_REF 3.11.1 "682ea9ac4020a143047758739259b3ff04dabe8d")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@ -6,6 +7,8 @@ vcpkg_from_github(
REF "${VERSION}"
SHA512 1260db4346cc33c6c35efdee0157450fccef67dbc9de876fdc997c7cb90daec716e5ccec97df0a77e3e8686f43ec79f2c0a1523ea12eca2ee158347cb52dea48
HEAD_REF main
PATCHES
no-glu.diff
)
if (NOT TRIPLET_SYSTEM_ARCH STREQUAL "x64" AND ("cuda" IN_LIST FEATURES OR "cuda-redist" IN_LIST FEATURES))
@ -15,8 +18,10 @@ endif()
# set GIT_COMMIT_ID and GIT_COMMIT_DATE
if(DEFINED VCPKG_HEAD_VERSION)
set(GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}")
elseif(NOT VERSION IN_LIST COLMAP_REF)
message(FATAL_ERROR "Version ${VERSION} missing in COLMAP_REF (${COLMAP_REF})")
else()
set(GIT_COMMIT_ID "${COLMAP_REF}")
list(GET COLMAP_REF 1 GIT_COMMIT_ID)
endif()
string(TIMESTAMP COLMAP_GIT_COMMIT_DATE "%Y-%m-%d")

View File

@ -1,7 +1,7 @@
{
"name": "colmap",
"version": "3.11.1",
"port-version": 1,
"port-version": 2,
"description": "COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with a graphical and command-line interface. It offers a wide range of features for reconstruction of ordered and unordered image collections. The software is licensed under the new BSD license.",
"homepage": "https://colmap.github.io/",
"license": "BSD-3-Clause",

View File

@ -31,6 +31,9 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glew)
# Skip check the required dependency opengl
vcpkg_fixup_pkgconfig(SKIP_CHECK)
# Burn-in CMake build config
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/GL/glew.h" "ifndef GLEW_NO_GLU" "if 0")
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(_targets_cmake_files)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")

View File

@ -1,7 +1,7 @@
{
"name": "glew",
"version": "2.2.0",
"port-version": 4,
"port-version": 5,
"description": "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.",
"homepage": "https://github.com/nigels-com/glew",
"supports": "!android",

View File

@ -1798,7 +1798,7 @@
},
"colmap": {
"baseline": "3.11.1",
"port-version": 1
"port-version": 2
},
"color-console": {
"baseline": "2022-03-20",
@ -3138,7 +3138,7 @@
},
"glew": {
"baseline": "2.2.0",
"port-version": 4
"port-version": 5
},
"glfw3": {
"baseline": "3.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7deee951326bf2685951c8d5ff7cbc3618ec5567",
"version": "3.11.1",
"port-version": 2
},
{
"git-tree": "7f2f32bedf07a0ac7a5bc43b81268b20b41b060e",
"version": "3.11.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "deee148de63ca706630edc3408d1c9a471f8884f",
"version": "2.2.0",
"port-version": 5
},
{
"git-tree": "bf42d73479dcd0f239b71dbed4d0d3af22efb294",
"version": "2.2.0",