From 069341ac32d80739bf577704f68170993bd44274 Mon Sep 17 00:00:00 2001 From: SunBlack Date: Fri, 10 Jul 2026 02:22:15 +0200 Subject: [PATCH] [graphite2] Update to 1.3.15 (#52717) --- ports/graphite2/disable-tests.patch | 48 ------------------- ports/graphite2/disable_features.patch | 15 ++++++ ports/graphite2/portfile.cmake | 18 ++++--- ports/graphite2/vcpkg.json | 4 +- .../vcpkg-ci-graphite2/portfile.cmake | 4 ++ .../vcpkg-ci-graphite2/project/CMakeLists.txt | 9 ++++ .../vcpkg-ci-graphite2/project/main.cpp | 11 +++++ .../test_ports/vcpkg-ci-graphite2/vcpkg.json | 12 +++++ versions/baseline.json | 4 +- versions/g-/graphite2.json | 5 ++ 10 files changed, 71 insertions(+), 59 deletions(-) delete mode 100644 ports/graphite2/disable-tests.patch create mode 100644 ports/graphite2/disable_features.patch create mode 100644 scripts/test_ports/vcpkg-ci-graphite2/portfile.cmake create mode 100644 scripts/test_ports/vcpkg-ci-graphite2/project/CMakeLists.txt create mode 100644 scripts/test_ports/vcpkg-ci-graphite2/project/main.cpp create mode 100644 scripts/test_ports/vcpkg-ci-graphite2/vcpkg.json diff --git a/ports/graphite2/disable-tests.patch b/ports/graphite2/disable-tests.patch deleted file mode 100644 index d1c1fd9718..0000000000 --- a/ports/graphite2/disable-tests.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 496712d..3df05c7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -82,10 +82,12 @@ if (BUILD_SHARED_LIBS) - endif() - - add_subdirectory(src) --add_subdirectory(tests) --add_subdirectory(doc) --if (NOT GRAPHITE2_NFILEFACE) -- add_subdirectory(gr2fonttest) -+if(NOT DISABLE_TESTS) -+ add_subdirectory(tests) -+ add_subdirectory(doc) -+ if (NOT GRAPHITE2_NFILEFACE) -+ add_subdirectory(gr2fonttest) -+ endif() - endif() - - set(version 3.0.1) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index b6ac26b..851a97f 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -127,9 +127,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - endif () - endif() - include(Graphite) -- if (BUILD_SHARED_LIBS) -+ if (NOT DISABLE_TESTS) - nolib_test(stdc++ $) -- endif () -+ endif() - set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") - CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") - endif() -@@ -144,7 +144,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - endif() - target_link_libraries(graphite2 c) - include(Graphite) -- nolib_test(stdc++ $) -+ if (NOT DISABLE_TESTS) -+ nolib_test(stdc++ $) -+ endif() - set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") - CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") - endif() diff --git a/ports/graphite2/disable_features.patch b/ports/graphite2/disable_features.patch new file mode 100644 index 0000000000..6be6797ac7 --- /dev/null +++ b/ports/graphite2/disable_features.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bbbc3005..051ce80b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,10 +86,6 @@ add_subdirectory(src) + if (BUILD_TESTING) + add_subdirectory(tests) + endif() +-add_subdirectory(doc) +-if (NOT GRAPHITE2_NFILEFACE) +- add_subdirectory(gr2fonttest) +-endif() + + get_property(version DIRECTORY src PROPERTY lib_so_version) + set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) diff --git a/ports/graphite2/portfile.cmake b/ports/graphite2/portfile.cmake index 7903043627..4c699b3212 100644 --- a/ports/graphite2/portfile.cmake +++ b/ports/graphite2/portfile.cmake @@ -1,16 +1,17 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO silnrsi/graphite - REF 92f59dcc52f73ce747f1cdc831579ed2546884aa # 1.3.14 - SHA512 011855576124b2f9ae9d7d3a0dfc5489794cf82b81bebc02c11c9cca350feb9fbb411844558811dff1ebbacac58a24a7cf56a374fc2c27e97a5fb4795a01486e + REF "${VERSION}" + SHA512 eb1f1772bfc4457d9aa68e99236b8cd6a01c7d93e97ac97f4d93d26db363bc785d71bb780dfdbced28e6e10d3e24eb281e0ff2b678bf57eca722a61f08020dfb HEAD_REF master - PATCHES disable-tests.patch + PATCHES + disable_features.patch ) vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DDISABLE_TESTS=ON + -DBUILD_TESTING=OFF ) vcpkg_cmake_install() @@ -22,9 +23,12 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/graphite2/Types.h" "defined GRAPHITE2_STATIC" "1") endif() -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libgraphite2.la" "${CURRENT_PACKAGES_DIR}/debug/lib/libgraphite2.la") +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/lib/libgraphite2.la" + "${CURRENT_PACKAGES_DIR}/debug/lib/libgraphite2.la" +) vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE") diff --git a/ports/graphite2/vcpkg.json b/ports/graphite2/vcpkg.json index 66f9d6e61d..2166227f3b 100644 --- a/ports/graphite2/vcpkg.json +++ b/ports/graphite2/vcpkg.json @@ -1,12 +1,12 @@ { "name": "graphite2", - "version": "1.3.14", - "port-version": 4, + "version": "1.3.15", "description": [ "Graphite is a \"smart font\" system developed specifically to handle the complexities of lesser-known languages of the world.", "Graphite2 is a rework of the original Graphite engine that is faster, smaller, and uses an API that is better suited to the layout architecture of most text-processing applications." ], "homepage": "https://github.com/silnrsi/graphite", + "license": "MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/scripts/test_ports/vcpkg-ci-graphite2/portfile.cmake b/scripts/test_ports/vcpkg-ci-graphite2/portfile.cmake new file mode 100644 index 0000000000..bc785962c8 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-graphite2/portfile.cmake @@ -0,0 +1,4 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project") +vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-graphite2/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-graphite2/project/CMakeLists.txt new file mode 100644 index 0000000000..f34e6b53e9 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-graphite2/project/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.16) +project(graphite2-test) + +find_path(GRAPHITE2_INCLUDE_DIR NAMES graphite2/Font.h REQUIRED) +find_library(GRAPHITE2_LIBRARY NAMES graphite2 REQUIRED) + +add_executable(main main.cpp) +target_include_directories(main PRIVATE "${GRAPHITE2_INCLUDE_DIR}") +target_link_libraries(main PRIVATE "${GRAPHITE2_LIBRARY}") diff --git a/scripts/test_ports/vcpkg-ci-graphite2/project/main.cpp b/scripts/test_ports/vcpkg-ci-graphite2/project/main.cpp new file mode 100644 index 0000000000..240b73d23e --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-graphite2/project/main.cpp @@ -0,0 +1,11 @@ +#include + +int main(void) +{ + gr_face* face = gr_make_file_face("does-not-exist.ttf", gr_face_default); + if (face) { + gr_face_destroy(face); + } + + return 0; +} diff --git a/scripts/test_ports/vcpkg-ci-graphite2/vcpkg.json b/scripts/test_ports/vcpkg-ci-graphite2/vcpkg.json new file mode 100644 index 0000000000..4d68ddffc8 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-graphite2/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "vcpkg-ci-graphite2", + "version-string": "ci", + "description": "Validates graphite2", + "dependencies": [ + "graphite2", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index dcae1d6b6e..02c6d77cb2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3585,8 +3585,8 @@ "port-version": 1 }, "graphite2": { - "baseline": "1.3.14", - "port-version": 4 + "baseline": "1.3.15", + "port-version": 0 }, "graphviz": { "baseline": "15.0.0", diff --git a/versions/g-/graphite2.json b/versions/g-/graphite2.json index afaf3248b2..a0ee7bcce8 100644 --- a/versions/g-/graphite2.json +++ b/versions/g-/graphite2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "412465df8ab105ebd7942aa8f6e74975813581bd", + "version": "1.3.15", + "port-version": 0 + }, { "git-tree": "7d9a7404bf9dece906b2f6d8d8a70d7139d5e998", "version": "1.3.14",