From 51bf8db55fcc2110bf5b6453889cdb05aa5b90ff Mon Sep 17 00:00:00 2001 From: shixiong2333 <50489744+shixiong2333@users.noreply.github.com> Date: Wed, 9 Jul 2025 17:46:16 +0800 Subject: [PATCH] [superglu] add new port (#46340) --- ports/superglu/change-output-name.patch | 11 ++++++++++ ports/superglu/portfile.cmake | 29 +++++++++++++++++++++++++ ports/superglu/usage | 4 ++++ ports/superglu/vcpkg.json | 19 ++++++++++++++++ versions/baseline.json | 4 ++++ versions/s-/superglu.json | 9 ++++++++ 6 files changed, 76 insertions(+) create mode 100644 ports/superglu/change-output-name.patch create mode 100644 ports/superglu/portfile.cmake create mode 100644 ports/superglu/usage create mode 100644 ports/superglu/vcpkg.json create mode 100644 versions/s-/superglu.json diff --git a/ports/superglu/change-output-name.patch b/ports/superglu/change-output-name.patch new file mode 100644 index 0000000000..49993c282d --- /dev/null +++ b/ports/superglu/change-output-name.patch @@ -0,0 +1,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,6 +124,7 @@ + endif() + + set_target_properties(GLU PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${SUPERGLU_SO_VERSION}) ++set_target_properties(GLU PROPERTIES OUTPUT_NAME "superglu") + + target_compile_definitions(GLU PRIVATE HAVE_CONFIG_H LIBRARYBUILD GLU_INTERNAL GLU_DEBUG=$) + diff --git a/ports/superglu/portfile.cmake b/ports/superglu/portfile.cmake new file mode 100644 index 0000000000..f3378a4762 --- /dev/null +++ b/ports/superglu/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin3d/superglu + REF "v${VERSION}" + SHA512 ff1edb95192b4593e99106bf5d7fe30aabd8e42b21a6a02b2dcb2431b1388d87e7c1186a2291047f8a10897e872329e8dd993e89414e4d88f2e9e95c6a74fd52 + HEAD_REF master + PATCHES + change-output-name.patch +) + +vcpkg_find_acquire_program(PERL) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DSUPERGLU_BUILD_SHARED_LIBS=OFF + "-DPERL_EXECUTABLE=${PERL}" +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/superglu-${VERSION}) +vcpkg_fixup_pkgconfig() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") \ No newline at end of file diff --git a/ports/superglu/usage b/ports/superglu/usage new file mode 100644 index 0000000000..09e57ee0d5 --- /dev/null +++ b/ports/superglu/usage @@ -0,0 +1,4 @@ +The package superglu provides CMake targets: + + find_package(superglu CONFIG REQUIRED) + target_link_libraries(main PRIVATE superglu::GLU) diff --git a/ports/superglu/vcpkg.json b/ports/superglu/vcpkg.json new file mode 100644 index 0000000000..a469ff554e --- /dev/null +++ b/ports/superglu/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "superglu", + "version": "1.3.3", + "description": "SGI GLU with miscellaneous fixes", + "homepage": "https://github.com/coin3d/superglu", + "license": "SGI-B-1.1", + "supports": "windows & !uwp", + "dependencies": [ + "opengl-registry", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 001b0b72f8..95389689d7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9272,6 +9272,10 @@ "baseline": "7.1.1", "port-version": 0 }, + "superglu": { + "baseline": "1.3.3", + "port-version": 0 + }, "superlu": { "baseline": "7.0.0", "port-version": 0 diff --git a/versions/s-/superglu.json b/versions/s-/superglu.json new file mode 100644 index 0000000000..fe22f15093 --- /dev/null +++ b/versions/s-/superglu.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "b0cf2170a9c932e1c20c93d2556ef1d25fb3d991", + "version": "1.3.3", + "port-version": 0 + } + ] +}