From 79430f619207201730fa457a0dbb8728bdbcf1ca Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 26 Feb 2026 07:14:00 +0100 Subject: [PATCH 1/4] [lib3mf] Drop unneeded patch --- .../fix-dependency-resolution-required.patch | 40 ------------------- ports/lib3mf/portfile.cmake | 3 +- ports/lib3mf/vcpkg.json | 1 + 3 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 ports/lib3mf/fix-dependency-resolution-required.patch diff --git a/ports/lib3mf/fix-dependency-resolution-required.patch b/ports/lib3mf/fix-dependency-resolution-required.patch deleted file mode 100644 index 765d9d000373e3..00000000000000 --- a/ports/lib3mf/fix-dependency-resolution-required.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -267,16 +267,8 @@ - set(_lib3mf_external_link_visibility PUBLIC) - endif() - -- find_package(libzip CONFIG QUIET) -- if (TARGET libzip::zip) -- target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} libzip::zip) -- else() -- find_package(PkgConfig REQUIRED) -- pkg_check_modules(LIBZIP REQUIRED libzip) -- target_include_directories(${PROJECT_NAME} PRIVATE ${LIBZIP_INCLUDE_DIRS}) -- target_link_directories(${PROJECT_NAME} PRIVATE ${LIBZIP_LIBRARY_DIRS}) -- target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} ${LIBZIP_LIBRARIES}) -- endif() -+ find_package(libzip CONFIG REQUIRED) -+ target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} libzip::zip) - - unset(_lib3mf_external_link_visibility) - endif() -@@ -296,16 +288,8 @@ - set(_lib3mf_external_link_visibility PUBLIC) - endif() - -- find_package(ZLIB QUIET) -- if (TARGET ZLIB::ZLIB) -- target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} ZLIB::ZLIB) -- else() -- find_package(PkgConfig REQUIRED) -- pkg_check_modules(ZLIB REQUIRED zlib) -- target_include_directories(${PROJECT_NAME} PRIVATE ${ZLIB_INCLUDE_DIRS}) -- target_link_directories(${PROJECT_NAME} PRIVATE ${ZLIB_LIBRARY_DIRS}) -- target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} ${ZLIB_LIBRARIES}) -- endif() -+ find_package(ZLIB REQUIRED) -+ target_link_libraries(${PROJECT_NAME} ${_lib3mf_external_link_visibility} ZLIB::ZLIB) - - unset(_lib3mf_external_link_visibility) - endif() diff --git a/ports/lib3mf/portfile.cmake b/ports/lib3mf/portfile.cmake index 40aa4bbdd0a8f9..52230d7c082e7b 100644 --- a/ports/lib3mf/portfile.cmake +++ b/ports/lib3mf/portfile.cmake @@ -5,7 +5,6 @@ vcpkg_from_github( SHA512 acfd0e4862248c475c674f7ee7855f809965a854e62ea0cd847008be7a9ca3c5a03ac87cac889f036555229762405094ca9811817dd45dbdaae941b5b41ae356 PATCHES fix-lib3mf-config-root.patch - fix-dependency-resolution-required.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" _lib3mf_build_shared) @@ -14,6 +13,8 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DLIB3MF_BUILD_SHARED=${_lib3mf_build_shared} + -DCMAKE_REQUIRE_FIND_PACKAGE_libzip=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=ON -DUSE_INCLUDED_ZLIB=OFF -DUSE_INCLUDED_LIBZIP=OFF -DUSE_INCLUDED_SSL=OFF diff --git a/ports/lib3mf/vcpkg.json b/ports/lib3mf/vcpkg.json index 2cde0d740917ae..39b341c1eda6b8 100644 --- a/ports/lib3mf/vcpkg.json +++ b/ports/lib3mf/vcpkg.json @@ -1,6 +1,7 @@ { "name": "lib3mf", "version": "2.5.0", + "port-version": 1, "description": "lib3mf is an implementation of the 3D Manufacturing Format file standard", "homepage": "https://github.com/3MFConsortium/lib3mf", "license": "BSD-2-Clause", From b2f8bc0f561a26a49fde86f7717c2e2461e26268 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 26 Feb 2026 07:18:06 +0100 Subject: [PATCH 2/4] [lib3mf] Update documentation --- ports/lib3mf/usage | 5 +++-- ports/lib3mf/vcpkg.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/lib3mf/usage b/ports/lib3mf/usage index bae4461e54ff71..3829012bc8dbe5 100644 --- a/ports/lib3mf/usage +++ b/ports/lib3mf/usage @@ -3,5 +3,6 @@ lib3mf provides CMake targets: find_package(lib3mf CONFIG REQUIRED) target_link_libraries(target_name PRIVATE lib3mf::lib3mf) -For examples and use cases, kindly check -https://github.com/3MFConsortium/lib3mf/tree/develop/SDK/CPackExamples +lib3mf provides pkg-config modules: + + lib3mf diff --git a/ports/lib3mf/vcpkg.json b/ports/lib3mf/vcpkg.json index 39b341c1eda6b8..5bd934d8a2c81a 100644 --- a/ports/lib3mf/vcpkg.json +++ b/ports/lib3mf/vcpkg.json @@ -4,6 +4,7 @@ "port-version": 1, "description": "lib3mf is an implementation of the 3D Manufacturing Format file standard", "homepage": "https://github.com/3MFConsortium/lib3mf", + "documentation": "https://lib3mf.readthedocs.io/", "license": "BSD-2-Clause", "supports": "(windows & (x86 | x64)) | (linux & x64) | (osx & (x64 | arm64))", "dependencies": [ From 43fbae608ea055abfa3d1587a54248e8de6a4226 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 26 Feb 2026 07:29:54 +0100 Subject: [PATCH 3/4] [lib3mf] Revise use of dependencies --- ports/lib3mf/linkage.diff | 12 ++++++++++++ ports/lib3mf/pkgconfig.diff | 12 ++++++++++++ ports/lib3mf/portfile.cmake | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 ports/lib3mf/linkage.diff create mode 100644 ports/lib3mf/pkgconfig.diff diff --git a/ports/lib3mf/linkage.diff b/ports/lib3mf/linkage.diff new file mode 100644 index 00000000000000..f3b9cc8851a5eb --- /dev/null +++ b/ports/lib3mf/linkage.diff @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec1d7dd..c273eff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -293,7 +293,6 @@ if (USE_INCLUDED_ZLIB) + else() + set(_lib3mf_external_link_visibility PRIVATE) + if (NOT LIB3MF_BUILD_SHARED) +- set(_lib3mf_external_link_visibility PUBLIC) + endif() + + find_package(ZLIB QUIET) diff --git a/ports/lib3mf/pkgconfig.diff b/ports/lib3mf/pkgconfig.diff new file mode 100644 index 00000000000000..fce175cb3eccf0 --- /dev/null +++ b/ports/lib3mf/pkgconfig.diff @@ -0,0 +1,12 @@ +diff --git a/lib3mf.pc.in b/lib3mf.pc.in +index bb8030a..0117dd6 100644 +--- a/lib3mf.pc.in ++++ b/lib3mf.pc.in +@@ -8,5 +8,6 @@ Description: @PROJECT_DESCRIPTION@ + Version: @PROJECT_VERSION@ + + Requires: +-Libs: -L${libdir} -l3mf -lzip -lz ++Requires.private: libzip zlib ++Libs: -L${libdir} -l3mf + Cflags: -I${includedir} diff --git a/ports/lib3mf/portfile.cmake b/ports/lib3mf/portfile.cmake index 52230d7c082e7b..828a09fb46f9a4 100644 --- a/ports/lib3mf/portfile.cmake +++ b/ports/lib3mf/portfile.cmake @@ -5,7 +5,10 @@ vcpkg_from_github( SHA512 acfd0e4862248c475c674f7ee7855f809965a854e62ea0cd847008be7a9ca3c5a03ac87cac889f036555229762405094ca9811817dd45dbdaae941b5b41ae356 PATCHES fix-lib3mf-config-root.patch + linkage.diff + pkgconfig.diff ) +file(REMOVE_RECURSE "${SOURCE_PATH}/Libraries") # vendored string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" _lib3mf_build_shared) From 61d9f282bf41773340742ec46242f6fd89d057a0 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 26 Feb 2026 07:30:13 +0100 Subject: [PATCH 4/4] versions --- versions/baseline.json | 2 +- versions/l-/lib3mf.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index cdecd8f67eaccb..2b5da089709c85 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4574,7 +4574,7 @@ }, "lib3mf": { "baseline": "2.5.0", - "port-version": 0 + "port-version": 1 }, "libaaplus": { "baseline": "2.36", diff --git a/versions/l-/lib3mf.json b/versions/l-/lib3mf.json index e23444c405d5a5..dddd1e8963928e 100644 --- a/versions/l-/lib3mf.json +++ b/versions/l-/lib3mf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d6d8ac8b598ef28c1fd4d8cddea87b2807b89570", + "version": "2.5.0", + "port-version": 1 + }, { "git-tree": "91f325050cfa50f0961a1d9c37c04db13c46082c", "version": "2.5.0",