Skip to content

Commit e74653e

Browse files
committed
[kf6config] New port
1 parent 67f167b commit e74653e

File tree

5 files changed

+157
-0
lines changed

5 files changed

+157
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
diff --git a/src/kconfig_compiler/CMakeLists.txt b/src/kconfig_compiler/CMakeLists.txt
2+
--- a/src/kconfig_compiler/CMakeLists.txt
3+
+++ b/src/kconfig_compiler/CMakeLists.txt
4+
@@ -23,6 +23,10 @@
5+
6+
target_link_libraries(kconfig_compiler Qt6::Xml)
7+
8+
+if(MSVC AND NOT BUILD_SHARED_LIBS)
9+
+ target_link_options(kconfig_compiler PRIVATE /FORCE:MULTIPLE)
10+
+endif()
11+
+
12+
ecm_mark_nongui_executable(kconfig_compiler)
13+
14+
install(TARGETS kconfig_compiler EXPORT KF6ConfigCompilerTargets DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF})
15+
diff --git a/src/kconf_update/CMakeLists.txt b/src/kconf_update/CMakeLists.txt
16+
--- a/src/kconf_update/CMakeLists.txt
17+
+++ b/src/kconf_update/CMakeLists.txt
18+
@@ -12,6 +12,9 @@
19+
)
20+
21+
target_link_libraries(kconf_update Qt6::Core KF6::ConfigCore)
22+
+if(MSVC AND NOT BUILD_SHARED_LIBS)
23+
+ target_link_options(kconf_update PRIVATE /FORCE:MULTIPLE)
24+
+endif()
25+
include(ECMMarkNonGuiExecutable)
26+
ecm_mark_nongui_executable(kconf_update)
27+
28+
diff --git a/src/kreadconfig/CMakeLists.txt b/src/kreadconfig/CMakeLists.txt
29+
--- a/src/kreadconfig/CMakeLists.txt
30+
+++ b/src/kreadconfig/CMakeLists.txt
31+
@@ -2,6 +2,9 @@
32+
ecm_mark_nongui_executable(kreadconfig6)
33+
34+
target_link_libraries(kreadconfig6 KF6::ConfigCore)
35+
+if(MSVC AND NOT BUILD_SHARED_LIBS)
36+
+ target_link_options(kreadconfig6 PRIVATE /FORCE:MULTIPLE)
37+
+endif()
38+
39+
install(TARGETS kreadconfig6 ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
40+
41+
@@ -11,5 +14,8 @@
42+
ecm_mark_nongui_executable(kwriteconfig6)
43+
44+
target_link_libraries(kwriteconfig6 KF6::ConfigCore)
45+
+if(MSVC AND NOT BUILD_SHARED_LIBS)
46+
+ target_link_options(kwriteconfig6 PRIVATE /FORCE:MULTIPLE)
47+
+endif()
48+
49+
install(TARGETS kwriteconfig6 ${KF_INSTALL_TARGETS_DEFAULT_ARGS})

ports/kf6config/portfile.cmake

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
vcpkg_from_github(
2+
OUT_SOURCE_PATH SOURCE_PATH
3+
REPO KDE/kconfig
4+
REF "v${VERSION}"
5+
SHA512 1b58cc91f56b593b23eb280ddd7ba44429a8f5ea5363936175af329aef11eb60f646c0ad6d70bcc8b3b2e7e2f29b3368d90093edb022cc4702d29a7d29e29b59
6+
HEAD_REF master
7+
PATCHES
8+
001_fix_lnk2005_windows_static.patch
9+
)
10+
11+
# Prevent KDEClangFormat from writing to source effectively blocking parallel configure
12+
file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n")
13+
14+
vcpkg_check_features(
15+
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
16+
FEATURES
17+
qml KCONFIG_USE_QML
18+
INVERTED_FEATURES
19+
translations KF_SKIP_PO_PROCESSING
20+
)
21+
22+
vcpkg_cmake_configure(
23+
SOURCE_PATH "${SOURCE_PATH}"
24+
OPTIONS
25+
-DBUILD_TESTING=OFF
26+
-DKDE_INSTALL_QMLDIR=qml
27+
${FEATURE_OPTIONS}
28+
)
29+
30+
vcpkg_cmake_install()
31+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF6Config)
32+
vcpkg_copy_pdbs()
33+
34+
vcpkg_copy_tools(
35+
TOOL_NAMES kreadconfig6 kwriteconfig6
36+
AUTO_CLEAN
37+
)
38+
39+
vcpkg_copy_tools(
40+
TOOL_NAMES kconf_update kconfig_compiler_kf6
41+
AUTO_CLEAN
42+
)
43+
44+
file(APPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf" "Data = ../../share")
45+
46+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
47+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
48+
49+
file(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*")
50+
vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES})

ports/kf6config/vcpkg.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "kf6config",
3+
"version": "6.23.0",
4+
"description": "Configuration system",
5+
"homepage": "https://invent.kde.org/frameworks/kconfig",
6+
"documentation": "https://api.kde.org/kconfig-index.html ",
7+
"dependencies": [
8+
"ecm",
9+
{
10+
"name": "qtbase",
11+
"default-features": false
12+
},
13+
{
14+
"name": "vcpkg-cmake",
15+
"host": true
16+
},
17+
{
18+
"name": "vcpkg-cmake-config",
19+
"host": true
20+
}
21+
],
22+
"features": {
23+
"qml": {
24+
"description": "Build QML bindings",
25+
"dependencies": [
26+
{
27+
"name": "qtdeclarative",
28+
"default-features": false
29+
}
30+
]
31+
},
32+
"translations": {
33+
"description": "Install translations",
34+
"dependencies": [
35+
{
36+
"name": "qttools",
37+
"host": true,
38+
"features": [
39+
"linguist"
40+
]
41+
}
42+
]
43+
}
44+
}
45+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4424,6 +4424,10 @@
44244424
"baseline": "6.22.0",
44254425
"port-version": 0
44264426
},
4427+
"kf6config": {
4428+
"baseline": "6.23.0",
4429+
"port-version": 0
4430+
},
44274431
"kfr": {
44284432
"baseline": "6.3.1",
44294433
"port-version": 0

versions/k-/kf6config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "7931cc0c8c6c6188f434e6fa5274875a796b1d73",
5+
"version": "6.23.0",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)