Skip to content
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
36 changes: 36 additions & 0 deletions ports/kf5solid/fix_config_cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From c1e261d57383533a008f0c02689dd0292d4dc75a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com>
Date: Tue, 31 Aug 2021 02:18:42 +0200
Subject: [PATCH] Add support for static builds

---
KF5SolidConfig.cmake.in | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/KF5SolidConfig.cmake.in b/KF5SolidConfig.cmake.in
index b597b3a..0a23f44 100644
--- a/KF5SolidConfig.cmake.in
+++ b/KF5SolidConfig.cmake.in
@@ -19,6 +19,19 @@ set(SOLID_DBUS_INTERFACES_DIR "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@")
include(CMakeFindDependencyMacro)
find_dependency(Qt5Core @REQUIRED_QT_VERSION@)

+if (NOT @BUILD_SHARED_LIBS@)
+ find_dependency(Qt5Xml @REQUIRED_QT_VERSION@)
+ find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
+
+ if (@Qt5DBus_FOUND@)
+ find_dependency(Qt5DBus @REQUIRED_QT_VERSION@)
+ endif()
+
+ if (@UDev_FOUND@)
+ find_dependency(UDev)
+ endif()
+endif()
+
include("${CMAKE_CURRENT_LIST_DIR}/KF5SolidTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@

--
GitLab

41 changes: 22 additions & 19 deletions ports/kf5solid/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ vcpkg_from_github(
REF v5.84.0
SHA512 b6452e56c6029289450850c1fcfff96da0005f8dfa03f1817754910945e3ccadd8502e330a4484a5c5e9a8d5525838c8090268bb083639062dfca7176852c159
HEAD_REF master
PATCHES
fix_config_cmake.patch # https://invent.kde.org/frameworks/solid/-/merge_requests/53
)

if(VCPKG_TARGET_IS_OSX)
# In Darwin platform, there can be an old version of `bison`,
# Which can't be used for `gst-build`. It requires 2.4+
vcpkg_find_acquire_program(BISON)
execute_process(
COMMAND ${BISON} --version
OUTPUT_VARIABLE BISON_OUTPUT
)
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" BISON_VERSION "${BISON_OUTPUT}")
set(BISON_MAJOR ${CMAKE_MATCH_1})
set(BISON_MINOR ${CMAKE_MATCH_2})
message(STATUS "Using bison: ${BISON_MAJOR}.${BISON_MINOR}.${CMAKE_MATCH_3}")
if(NOT (BISON_MAJOR GREATER_EQUAL 2 AND BISON_MINOR GREATER_EQUAL 4))
message(WARNING "${PORT} requires bison version greater than one provided by macOS, please use \`brew install bison\` to install a newer bison.")
endif()
# On Darwin platform, the bundled version of 'bison' may be too old (< 3.0).
vcpkg_find_acquire_program(BISON)
execute_process(
COMMAND ${BISON} --version
OUTPUT_VARIABLE BISON_OUTPUT
)
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" BISON_VERSION "${BISON_OUTPUT}")
set(BISON_MAJOR ${CMAKE_MATCH_1})
set(BISON_MINOR ${CMAKE_MATCH_2})
message(STATUS "Using bison: ${BISON_MAJOR}.${BISON_MINOR}.${CMAKE_MATCH_3}")
if(NOT (BISON_MAJOR GREATER_EQUAL 3 AND BISON_MINOR GREATER_EQUAL 0))
message(WARNING "${PORT} requires bison version greater than one provided by macOS, please use \`brew install bison\` to install a newer bison.")
endif()
endif()

vcpkg_find_acquire_program(BISON)
Expand All @@ -40,19 +41,21 @@ vcpkg_cmake_configure(
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5Solid)
vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Solid CONFIG_PATH lib/cmake/KF5Solid)
vcpkg_copy_pdbs()

vcpkg_copy_tools(
TOOL_NAMES solid-hardware5
AUTO_CLEAN
)

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/etc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
# solid-hardware and solid-power are a non-dev tools allowing to list hardware and power managament status of one's system. No need to keep them.
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/solid-hardware5${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/debug/bin/solid-hardware5${VCPKG_HOST_EXECUTABLE_SUFFIX}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/solid-power${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/debug/bin/solid-power${VCPKG_HOST_EXECUTABLE_SUFFIX}")

file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/qml" "${CURRENT_PACKAGES_DIR}/debug/qml")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/qml" "${CURRENT_PACKAGES_DIR}/qml")

Expand Down
1 change: 1 addition & 0 deletions ports/kf5solid/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5solid",
"version-semver": "5.84.0",
"port-version": 1,
"description": "Desktop hardware abstraction",
"homepage": "https://api.kde.org/frameworks/solid/html/index.html",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,7 @@
},
"kf5solid": {
"baseline": "5.84.0",
"port-version": 0
"port-version": 1
},
"kf5sonnet": {
"baseline": "5.84.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/k-/kf5solid.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1f726a86d2961fd90661f27469d1e77b2b75c612",
"version-semver": "5.84.0",
"port-version": 1
},
{
"git-tree": "4ddc168b71ca68e8c765edca7a018753871b84e6",
"version-semver": "5.84.0",
Expand Down