Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lunasvg] Update to 3.1.1 [plutosvg,plutovg] New ports #43567

Merged
merged 7 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ports/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ if(IMGUI_FREETYPE)
target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE)
endif()

if(IMGUI_FREETYPE_LUNASVG)
find_package(unofficial-lunasvg CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC unofficial::lunasvg::lunasvg)
target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE_LUNASVG)
if(IMGUI_FREETYPE_SVG)
find_package(plutosvg CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC plutosvg::plutosvg)
target_compile_definitions(${PROJECT_NAME} PUBLIC IMGUI_ENABLE_FREETYPE_PLUTOSVG)
endif()

if(IMGUI_USE_WCHAR32)
Expand Down
4 changes: 2 additions & 2 deletions ports/imgui/imgui-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ if (@IMGUI_FREETYPE@)
find_dependency(freetype CONFIG)
endif()

if (@IMGUI_FREETYPE_LUNASVG@)
find_dependency(unofficial-lunasvg CONFIG)
if (@IMGUI_FREETYPE_SVG@)
find_dependency(plutosvg CONFIG)
endif()

if (@IMGUI_BUILD_ALLEGRO5_BINDING@)
Expand Down
2 changes: 1 addition & 1 deletion ports/imgui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
vulkan-binding IMGUI_BUILD_VULKAN_BINDING
win32-binding IMGUI_BUILD_WIN32_BINDING
freetype IMGUI_FREETYPE
freetype-lunasvg IMGUI_FREETYPE_LUNASVG
freetype-svg IMGUI_FREETYPE_SVG
wchar32 IMGUI_USE_WCHAR32
test-engine IMGUI_TEST_ENGINE
)
Expand Down
7 changes: 4 additions & 3 deletions ports/imgui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "imgui",
"version": "1.91.8",
"port-version": 1,
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
"homepage": "https://github.com/ocornut/imgui",
"license": "MIT",
Expand Down Expand Up @@ -50,16 +51,16 @@
"freetype"
]
},
"freetype-lunasvg": {
"description": "Add support to render OpenType SVG fonts using LunaSVG",
"freetype-svg": {
"description": "Add support to render OpenType SVG fonts",
"dependencies": [
{
"name": "imgui",
"features": [
"freetype"
]
},
"lunasvg"
"plutosvg"
]
},
"glfw-binding": {
Expand Down
28 changes: 0 additions & 28 deletions ports/lunasvg/fix-cmake.patch

This file was deleted.

11 changes: 4 additions & 7 deletions ports/lunasvg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,25 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sammycage/lunasvg
REF "v${VERSION}"
SHA512 4c771c292d73d4a1c1498011fe8969b9f04a58853d2977c3ce4895d5ad6c1a282c8bfba5e4f1d045e56e0820e57a3a21d3cc0d178efe6ad73c82121aa75b1cdf
SHA512 d79c7e35164df971a29145427316adca778416866635a97050f090ffdea1c313cba11255d9993ba7e4cbb3c7faa5b6ff0767e8c7739a680d34be377e6b9c5091
HEAD_REF master
PATCHES
fix-cmake.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCMAKE_REQUIRE_FIND_PACKAGE_plutovg=1
-DLUNASVG_BUILD_EXAMPLES=OFF
-DBUILD_SHARED_LIBS=OFF
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-lunasvg)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/lunasvg)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lunasvg.h" "defined(LUNASVG_BUILD_STATIC)" "1")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lunasvg/lunasvg.h" "defined(LUNASVG_BUILD_STATIC)" "1")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
3 changes: 2 additions & 1 deletion ports/lunasvg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "lunasvg",
"version": "2.4.1",
"version": "3.1.1",
"description": "lunasvg is a standalone SVG rendering library in C++",
"homepage": "https://github.com/sammycage/lunasvg",
"license": "MIT",
"dependencies": [
"plutovg",
{
"name": "vcpkg-cmake",
"host": true
Expand Down
13 changes: 13 additions & 0 deletions ports/plutosvg/find-package-plutovg.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c83a15d..8abc9be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ FetchContent_Declare(plutovg
FIND_PACKAGE_ARGS 0.0.3
)

-FetchContent_MakeAvailable(plutovg)
+find_package(plutovg REQUIRED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The port plutovg provides usage find_package(plutovg CONFIG REQUIRED)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what? No change needed.


set(plutosvg_sources source/plutosvg.c)
set(plutosvg_headers source/plutosvg.h)
26 changes: 26 additions & 0 deletions ports/plutosvg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sammycage/plutosvg
REF "v${VERSION}"
SHA512 31f989aef2329ac41c19f8c4852f5a1d5c37dc7726192d230ba2a74262bdc6356facf3295b4d8a05f2be79ba313bcc3f01bd52e4024382c9ce09e259a5421440
HEAD_REF master
PATCHES
find-package-plutovg.diff
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPLUTOSVG_BUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/plutosvg)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/plutosvg/plutosvg.h" "defined(PLUTOSVG_BUILD_STATIC)" "1")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
18 changes: 18 additions & 0 deletions ports/plutosvg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "plutosvg",
"version": "0.0.4",
"description": "Tiny SVG rendering library in C",
"homepage": "https://github.com/sammycage/plutosvg",
"license": "MIT",
"dependencies": [
"plutovg",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
24 changes: 24 additions & 0 deletions ports/plutovg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sammycage/plutovg
REF "v${VERSION}"
SHA512 e68e6c186d7577bd17e5c46c3109fbeaba0bd0698599c401d195430c3375170d5d5ed45379fdc2c6f1fea817e1ae01cddaf6b3de9130f5896b8adc9f2bab105b
HEAD_REF master
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPLUTOVG_BUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/plutovg)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/plutovg/plutovg.h" "defined(PLUTOVG_BUILD_STATIC)" "1")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
17 changes: 17 additions & 0 deletions ports/plutovg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "plutovg",
"version": "0.0.12",
"description": " Tiny 2D vector graphics library in C",
"homepage": "https://github.com/sammycage/plutovg",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
12 changes: 10 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3686,7 +3686,7 @@
},
"imgui": {
"baseline": "1.91.8",
"port-version": 0
"port-version": 1
},
"imgui-node-editor": {
"baseline": "0.9.3",
Expand Down Expand Up @@ -5697,7 +5697,7 @@
"port-version": 0
},
"lunasvg": {
"baseline": "2.4.1",
"baseline": "3.1.1",
"port-version": 0
},
"luv": {
Expand Down Expand Up @@ -7112,6 +7112,14 @@
"baseline": "0.4.0",
"port-version": 4
},
"plutosvg": {
"baseline": "0.0.4",
"port-version": 0
},
"plutovg": {
"baseline": "0.0.12",
"port-version": 0
},
"pmdk": {
"baseline": "1.12.0",
"port-version": 2
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/imgui.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0acf8f3c1aefea0176cdb6e5a610bbeaf2d610f6",
"version": "1.91.8",
"port-version": 1
},
{
"git-tree": "7da1879e3d83f8699c2be2dfb1553db32e033d42",
"version": "1.91.8",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/lunasvg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c87cb314b0be4857b9e658c6e9a22bc28be5c089",
"version": "3.1.1",
"port-version": 0
},
{
"git-tree": "666a55527b76f4e912f24bf671c4f81893f197fc",
"version": "2.4.1",
Expand Down
9 changes: 9 additions & 0 deletions versions/p-/plutosvg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "4c6ae6d002c88567fb9e7e4d88fd586e18b33660",
"version": "0.0.4",
"port-version": 0
}
]
}
9 changes: 9 additions & 0 deletions versions/p-/plutovg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "ccdaf45cf0cc6c8c2a8763e0f442979fce2605bf",
"version": "0.0.12",
"port-version": 0
}
]
}