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] Add usage #30196

Merged
merged 24 commits into from
Jul 14, 2023
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
31 changes: 31 additions & 0 deletions ports/lunasvg/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea4b2d2..f622d45 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,10 @@ install(FILES
)

install(TARGETS lunasvg
- LIBRARY DESTINATION ${LUNASVG_LIBDIR}
- ARCHIVE DESTINATION ${LUNASVG_LIBDIR}
- INCLUDES DESTINATION ${LUNASVG_INCDIR}
-)
+ EXPORT unofficial-lunasvg-config
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ PUBLIC_HEADER DESTINATION include)
+
+install(EXPORT unofficial-lunasvg-config NAMESPACE unofficial::lunasvg:: DESTINATION share/unofficial-lunasvg)
\ No newline at end of file
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index de58954..74149dc 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -1,4 +1,5 @@
target_include_directories(lunasvg
PUBLIC
- "${CMAKE_CURRENT_LIST_DIR}"
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
+ $<INSTALL_INTERFACE:include>
)
26 changes: 0 additions & 26 deletions ports/lunasvg/fix-install.patch

This file was deleted.

6 changes: 4 additions & 2 deletions ports/lunasvg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vcpkg_from_github(
SHA512 368f76ae3c04fbcb08406d9e7793af37b5e28ab90ffe0978fae8783620a45af3270fcd4e895c553e3e651f0ba07e37355acffd9f0aab1bf9ef822f465de21073
HEAD_REF master
PATCHES
fix-install.patch
fix-cmake.patch
)

vcpkg_cmake_configure(
Expand All @@ -17,8 +17,10 @@ vcpkg_cmake_configure(

vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-lunasvg)

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

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
1 change: 1 addition & 0 deletions ports/lunasvg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "lunasvg",
"version": "2.3.8",
"port-version": 1,
"description": "lunasvg is a standalone SVG rendering library in C++",
"homepage": "https://github.com/sammycage/lunasvg",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5082,7 +5082,7 @@
},
"lunasvg": {
"baseline": "2.3.8",
"port-version": 0
"port-version": 1
},
"luv": {
"baseline": "1.44.2",
Expand Down
10 changes: 10 additions & 0 deletions versions/l-/lunasvg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"versions": [
{
"git-tree": "27a82fac0168f7e17be4e9b8981833ed381197dc",
"version": "2.3.8",
"port-version": 1
},
{
"git-tree": "064296e0fbadcd3113e5ee2a65202614c9125acc",
"version": "2.3.8",
"port-version": 0
},
{
"git-tree": "bf20380ca537151f7d1e02a6ca5b19c302db18c7",
"version": "2.3.1",
"port-version": 0
Comment on lines +12 to +16
Copy link
Member Author

Choose a reason for hiding this comment

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

PR #32510 Deleted the historical "git-tree" when updating lunasvg, I restore it here.

Copy link
Member

Choose a reason for hiding this comment

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

Oops 😳. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

My mistake, thanks for the fix!

}
]
}