From 935b1a47f5586b82fae173fa5a4b8e96268b9271 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sun, 16 Mar 2025 12:19:01 +0800 Subject: [PATCH 1/3] [libaribcaption] Add new port --- ports/libaribcaption/portfile.cmake | 39 +++++++++++++++++ ports/libaribcaption/vcpkg.json | 65 +++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 ports/libaribcaption/portfile.cmake create mode 100644 ports/libaribcaption/vcpkg.json diff --git a/ports/libaribcaption/portfile.cmake b/ports/libaribcaption/portfile.cmake new file mode 100644 index 00000000000000..db5608e446c8ca --- /dev/null +++ b/ports/libaribcaption/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xqq/libaribcaption + REF "v${VERSION}" + SHA512 3f3c802ae68734126d9b4a0525b3353af4c1a3807cd21bfa04b89f2092fe565cb2413bcdd0b762313d40b7e0ab75c7e8066bf4a1879c16637f35ee164f6ef6a4 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + directwrite ARIBCC_USE_DIRECTWRITE + gdi ARIBCC_USE_GDI_FONT + INVERTED_FEATURES + renderer ARIBCC_NO_RENDERER +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ARIBCC_SHARED_LIBRARY) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DARIBCC_BUILD_TESTS=OFF + -DARIBCC_SHARED_LIBRARY=${ARIBCC_SHARED_LIBRARY} + -DARIBCC_USE_EMBEDDED_FREETYPE=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME aribcaption CONFIG_PATH "lib/cmake/aribcaption") + +vcpkg_copy_pdbs() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/libaribcaption/vcpkg.json b/ports/libaribcaption/vcpkg.json new file mode 100644 index 00000000000000..b905811b62e734 --- /dev/null +++ b/ports/libaribcaption/vcpkg.json @@ -0,0 +1,65 @@ +{ + "name": "libaribcaption", + "version": "1.1.1", + "description": "Portable ARIB STD-B24 caption decoder/renderer", + "homepage": "https://github.com/xqq/libaribcaption", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + { + "name": "directwrite", + "platform": "windows" + }, + "renderer" + ], + "features": { + "directwrite": { + "description": "Enable DirectWrite text rendering backend", + "supports": "windows", + "dependencies": [ + { + "name": "libaribcaption", + "default-features": false, + "features": [ + "renderer" + ] + } + ] + }, + "gdi": { + "description": "Enable Win32 GDI font provider", + "supports": "windows", + "dependencies": [ + { + "name": "libaribcaption", + "default-features": false, + "features": [ + "renderer" + ] + } + ] + }, + "renderer": { + "description": "Build with renderer enabled", + "dependencies": [ + { + "name": "fontconfig", + "platform": "linux" + }, + { + "name": "freetype", + "platform": "android | linux" + } + ] + } + } +} From 681f62ef6e6f16c2e9122eb9ceabf44bb539ed47 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sun, 16 Mar 2025 12:21:45 +0800 Subject: [PATCH 2/3] [libaribcaption] DirectWrite should always be enabled --- ports/libaribcaption/portfile.cmake | 5 ++--- ports/libaribcaption/vcpkg.json | 17 ----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/ports/libaribcaption/portfile.cmake b/ports/libaribcaption/portfile.cmake index db5608e446c8ca..20f48263239a24 100644 --- a/ports/libaribcaption/portfile.cmake +++ b/ports/libaribcaption/portfile.cmake @@ -9,10 +9,9 @@ vcpkg_from_github( vcpkg_check_features( OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - directwrite ARIBCC_USE_DIRECTWRITE - gdi ARIBCC_USE_GDI_FONT + gdi ARIBCC_USE_GDI_FONT INVERTED_FEATURES - renderer ARIBCC_NO_RENDERER + renderer ARIBCC_NO_RENDERER ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ARIBCC_SHARED_LIBRARY) diff --git a/ports/libaribcaption/vcpkg.json b/ports/libaribcaption/vcpkg.json index b905811b62e734..c697d732bd6605 100644 --- a/ports/libaribcaption/vcpkg.json +++ b/ports/libaribcaption/vcpkg.json @@ -15,26 +15,9 @@ } ], "default-features": [ - { - "name": "directwrite", - "platform": "windows" - }, "renderer" ], "features": { - "directwrite": { - "description": "Enable DirectWrite text rendering backend", - "supports": "windows", - "dependencies": [ - { - "name": "libaribcaption", - "default-features": false, - "features": [ - "renderer" - ] - } - ] - }, "gdi": { "description": "Enable Win32 GDI font provider", "supports": "windows", From d4dc4e4339c7a49d6eeeb61b098b7a55f2222a94 Mon Sep 17 00:00:00 2001 From: myd7349 Date: Sun, 16 Mar 2025 12:27:46 +0800 Subject: [PATCH 3/3] [libaribcaption] Version stuffs --- versions/baseline.json | 4 ++++ versions/l-/libaribcaption.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/l-/libaribcaption.json diff --git a/versions/baseline.json b/versions/baseline.json index 60c6e5a2a55a16..0c0c5265c8d085 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4360,6 +4360,10 @@ "baseline": "3.7.7", "port-version": 2 }, + "libaribcaption": { + "baseline": "1.1.1", + "port-version": 0 + }, "libass": { "baseline": "0.17.3", "port-version": 0 diff --git a/versions/l-/libaribcaption.json b/versions/l-/libaribcaption.json new file mode 100644 index 00000000000000..2b8e478e283dbc --- /dev/null +++ b/versions/l-/libaribcaption.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "c44a8a2ac2a3f58b566211007b9dc435850c2a57", + "version": "1.1.1", + "port-version": 0 + } + ] +}