aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/kf5i18n
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/kf5i18n
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/kf5i18n')
-rw-r--r--vcpkg/ports/kf5i18n/fix_static_builds.patch30
-rw-r--r--vcpkg/ports/kf5i18n/portfile.cmake51
-rw-r--r--vcpkg/ports/kf5i18n/vcpkg.json29
3 files changed, 110 insertions, 0 deletions
diff --git a/vcpkg/ports/kf5i18n/fix_static_builds.patch b/vcpkg/ports/kf5i18n/fix_static_builds.patch
new file mode 100644
index 0000000..a289175
--- /dev/null
+++ b/vcpkg/ports/kf5i18n/fix_static_builds.patch
@@ -0,0 +1,30 @@
+diff --git a/KF5I18nConfig.cmake.in b/KF5I18nConfig.cmake.in
+index 364cc43..af7cd3b 100644
+--- a/KF5I18nConfig.cmake.in
++++ b/KF5I18nConfig.cmake.in
+@@ -8,3 +8,4 @@ include("${CMAKE_CURRENT_LIST_DIR}/KF5I18nTargets.cmake")
+ @PACKAGE_INCLUDE_QCHTARGETS@
+ include("${CMAKE_CURRENT_LIST_DIR}/KF5I18nMacros.cmake")
+
++find_dependency(Iconv)
+diff --git a/src/i18n/CMakeLists.txt b/src/i18n/CMakeLists.txt
+index c6b510c..0a25eca 100644
+--- a/src/i18n/CMakeLists.txt
++++ b/src/i18n/CMakeLists.txt
+@@ -40,12 +40,16 @@ ecm_generate_export_header(KF5I18n
+ EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
+ )
+
++find_package(Iconv REQUIRED)
++
+ target_include_directories(KF5I18n INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KI18n>")
+ target_include_directories(KF5I18n PRIVATE ${LibIntl_INCLUDE_DIRS})
++target_include_directories(KF5I18n PRIVATE ${Iconv_INCLUDE_DIRS})
+
+ target_link_libraries(KF5I18n PUBLIC Qt${QT_MAJOR_VERSION}::Core)
+ # This is only required for platforms which don't use glibc (with glibc LibIntl_LIBRARIES will be empty)
+ target_link_libraries(KF5I18n PRIVATE ${LibIntl_LIBRARIES})
++target_link_libraries(KF5I18n PRIVATE ${Iconv_LIBRARIES})
+ if (ANDROID)
+ if (QT_MAJOR_VERSION EQUAL "5")
+ target_link_libraries(KF5I18n PRIVATE Qt5::AndroidExtras)
diff --git a/vcpkg/ports/kf5i18n/portfile.cmake b/vcpkg/ports/kf5i18n/portfile.cmake
new file mode 100644
index 0000000..f4de6df
--- /dev/null
+++ b/vcpkg/ports/kf5i18n/portfile.cmake
@@ -0,0 +1,51 @@
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ list(APPEND PATCHES fix_static_builds.patch)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO KDE/ki18n
+ REF v5.98.0
+ SHA512 5bb2c216825448d207dbcaa521503ddb78f77ba52668992447c792bcc4f48f8a0d6de7d3f564dc917a14765ae7f0ad7e43dd0ce8f368e97eb8dfe077fa8b4c46
+ PATCHES ${PATCHES}
+)
+
+vcpkg_find_acquire_program(PYTHON3)
+
+# Prevent KDEClangFormat from writing to source effectively blocking parallel configure
+file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTING=OFF
+ -DKDE_INSTALL_PLUGINDIR=plugins
+ -DKDE_INSTALL_QMLDIR=qml
+ -DPYTHON_EXECUTABLE=${PYTHON3}
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(PACKAGE_NAME KF5I18n CONFIG_PATH lib/cmake/KF5I18n)
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*")
+vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES})
+
+# The following pattern has an absolute path, but is still ultimately relocatable, so skip absolute paths check:
+# share\KF5I18n\KF5I18nMacros.cmake
+# # The Python executable used for building ki18n will be used as a fallback
+# # solution if it cannot be found in $PATH when building applications.
+# set(_KI18N_PYTHON_EXECUTABLE "C:/Dev/vcpkg-downloads/tools/python/python-3.10.7-x64/python.exe")
+#
+# find_program(KI18N_PYTHON_EXECUTABLE NAMES python3 python2 python)
+# if(NOT KI18N_PYTHON_EXECUTABLE)
+# set(KI18N_PYTHON_EXECUTABLE "${_KI18N_PYTHON_EXECUTABLE}")
+# endif()
+set(VCPKG_POLICY_SKIP_ABSOLUTE_PATHS_CHECK enabled)
diff --git a/vcpkg/ports/kf5i18n/vcpkg.json b/vcpkg/ports/kf5i18n/vcpkg.json
new file mode 100644
index 0000000..3f447ef
--- /dev/null
+++ b/vcpkg/ports/kf5i18n/vcpkg.json
@@ -0,0 +1,29 @@
+{
+ "name": "kf5i18n",
+ "version": "5.98.0",
+ "port-version": 1,
+ "description": "Advanced internationalization framework",
+ "homepage": "https://api.kde.org/frameworks/ki18n/html/index.html",
+ "dependencies": [
+ "ecm",
+ "gettext",
+ {
+ "name": "gettext",
+ "host": true,
+ "features": [
+ "tools"
+ ]
+ },
+ "libiconv",
+ "qt5-declarative",
+ "qt5-tools",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}