diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/graphite2 | |
Diffstat (limited to 'vcpkg/ports/graphite2')
| -rw-r--r-- | vcpkg/ports/graphite2/disable-tests.patch | 48 | ||||
| -rw-r--r-- | vcpkg/ports/graphite2/portfile.cmake | 30 | ||||
| -rw-r--r-- | vcpkg/ports/graphite2/vcpkg.json | 20 |
3 files changed, 98 insertions, 0 deletions
diff --git a/vcpkg/ports/graphite2/disable-tests.patch b/vcpkg/ports/graphite2/disable-tests.patch new file mode 100644 index 0000000..d1c1fd9 --- /dev/null +++ b/vcpkg/ports/graphite2/disable-tests.patch @@ -0,0 +1,48 @@ +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++ $<TARGET_SONAME_FILE:graphite2>)
+- 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++ $<TARGET_SONAME_FILE:graphite2>)
++ if (NOT DISABLE_TESTS)
++ nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
++ endif()
+ set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
+ CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
+ endif()
diff --git a/vcpkg/ports/graphite2/portfile.cmake b/vcpkg/ports/graphite2/portfile.cmake new file mode 100644 index 0000000..7903043 --- /dev/null +++ b/vcpkg/ports/graphite2/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO silnrsi/graphite + REF 92f59dcc52f73ce747f1cdc831579ed2546884aa # 1.3.14 + SHA512 011855576124b2f9ae9d7d3a0dfc5489794cf82b81bebc02c11c9cca350feb9fbb411844558811dff1ebbacac58a24a7cf56a374fc2c27e97a5fb4795a01486e + HEAD_REF master + PATCHES disable-tests.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DDISABLE_TESTS=ON +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup() +vcpkg_fixup_pkgconfig() + +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") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE") + diff --git a/vcpkg/ports/graphite2/vcpkg.json b/vcpkg/ports/graphite2/vcpkg.json new file mode 100644 index 0000000..66f9d6e --- /dev/null +++ b/vcpkg/ports/graphite2/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "graphite2", + "version": "1.3.14", + "port-version": 4, + "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", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |