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

[sdl3-ttf] new port #43874

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
37 changes: 37 additions & 0 deletions ports/sdl3-ttf/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libsdl-org/SDL_ttf
REF "preview-${VERSION}"
SHA512 c6a2002d4a1227747a2986c257f3888ce4fc84b1c1d862142df5e2e7cbd9c9490c9c9b375dd16f8f0ecfc5313681d8cb5e267b907c0d52bd738a4c63695fd485
HEAD_REF main
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
harfbuzz SDLTTF_HARFBUZZ
svg SDLTTF_PLUTOSVG
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSDLTTF_VENDORED=OFF
-DSDLTTF_SAMPLES=OFF
${FEATURE_OPTIONS}
)

vcpkg_cmake_install()
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
vcpkg_cmake_config_fixup(PACKAGE_NAME sdl3_ttf CONFIG_PATH cmake)
else()
vcpkg_cmake_config_fixup(PACKAGE_NAME sdl3_ttf CONFIG_PATH lib/cmake/SDL3_ttf)
endif()

vcpkg_fixup_pkgconfig()

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

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
4 changes: 4 additions & 0 deletions ports/sdl3-ttf/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sdl3-ttf provides CMake targets:

find_package(SDL3_ttf CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:SDL3_ttf::SDL3_ttf>,SDL3_ttf::SDL3_ttf,SDL3_ttf::SDL3_ttf-static>)
39 changes: 39 additions & 0 deletions ports/sdl3-ttf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "sdl3-ttf",
"version": "3.1.0",
"description": "A library for rendering TrueType fonts with SDL",
"homepage": "https://www.libsdl.org/projects/SDL_ttf/",
"license": "Zlib",
"dependencies": [
{
"name": "freetype",
"default-features": false
},
{
"name": "sdl3",
"default-features": false
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"harfbuzz": {
"description": "Enable HarfBuzz support",
"dependencies": [
"harfbuzz"
]
},
"svg": {
"description": "Enable plutosvg for color emoji support",
"dependencies": [
"plutosvg"
]
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8320,6 +8320,10 @@
"baseline": "3.2.0",
"port-version": 0
},
"sdl3-ttf": {
"baseline": "3.1.0",
"port-version": 0
},
"seacas": {
"baseline": "2022-11-22",
"port-version": 8
Expand Down
9 changes: 9 additions & 0 deletions versions/s-/sdl3-ttf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "580095b6cdeb525fe480869f54f801b064fbccd7",
"version": "3.1.0",
"port-version": 0
}
]
}