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

[thorvg] create a new port #27525

Merged
merged 7 commits into from
Nov 1, 2022
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
22 changes: 22 additions & 0 deletions ports/thorvg/install-tools.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/bin/svg2png/meson.build b/src/bin/svg2png/meson.build
index 8011410..40cf3f9 100644
--- a/src/bin/svg2png/meson.build
+++ b/src/bin/svg2png/meson.build
@@ -3,4 +3,5 @@ svg2png_src = files('svg2png.cpp', 'lodepng.cpp')
executable('svg2png',
svg2png_src,
include_directories : headers,
- link_with : thorvg_lib)
+ link_with : thorvg_lib,
+ install : true, install_dir : get_option('bindir'))
diff --git a/src/bin/svg2tvg/meson.build b/src/bin/svg2tvg/meson.build
index 2df9fac..ffd5a20 100644
--- a/src/bin/svg2tvg/meson.build
+++ b/src/bin/svg2tvg/meson.build
@@ -3,4 +3,5 @@ svg2tvg_src = files('svg2tvg.cpp')
executable('svg2tvg',
svg2tvg_src,
include_directories : headers,
- link_with : thorvg_lib)
+ link_with : thorvg_lib,
+ install : true, install_dir : get_option('bindir'))
51 changes: 51 additions & 0 deletions ports/thorvg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Samsung/thorvg
REF v0.8.2
SHA512 f59e227f776fed2e0489fe33ff64008a728adf1795c58107f17ed92caa809f6f5fd0604fde91d0c1735ea82b0b9e91da36d325e492e4a9802647469b06ebafd2
HEAD_REF master
PATCHES
install-tools.patch
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(APPEND BUILD_OPTIONS -Dstatic=true)
else()
list(APPEND BUILD_OPTIONS -Dstatic=false)
endif()

if ("tools" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "This feature doesn't support Windows platform")
endif()
list(APPEND BUILD_OPTIONS -Dtools=all)
endif()

vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${BUILD_OPTIONS}
# see ${SOURCE_PATH}/meson_options.txt
-Dengines=sw
-Dloaders=all
-Dsavers=tvg
-Dvector=true
-Dbindings=capi
-Dtests=false
-Dexamples=false
OPTIONS_DEBUG
-Dlog=true
-Dbindir=${CURRENT_PACKAGES_DIR}/debug/bin
OPTIONS_RELEASE
-Dbindir=${CURRENT_PACKAGES_DIR}/bin
)
vcpkg_install_meson()
vcpkg_fixup_pkgconfig()

if ("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES svg2tvg svg2png AUTO_CLEAN)
endif()

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

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
19 changes: 19 additions & 0 deletions ports/thorvg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "thorvg",
"version": "0.8.2",
"description": "ThorVG is a platform-independent portable library for drawing vector-based scenes and animations",
"homepage": "https://www.thorvg.org",
"license": "MIT",
"supports": "!(arm & uwp)",
"dependencies": [
{
"name": "vcpkg-tool-meson",
"host": true
}
],
"features": {
"tools": {
"description": "Build tools"
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7256,6 +7256,10 @@
"baseline": "2.0",
"port-version": 6
},
"thorvg": {
"baseline": "0.8.2",
"port-version": 0
},
"threadpool": {
"baseline": "0.2.5",
"port-version": 2
Expand Down
9 changes: 9 additions & 0 deletions versions/t-/thorvg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "8b58170314a2c17cfe233745f8a8e6c27d3b6e38",
"version": "0.8.2",
"port-version": 0
}
]
}