35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
Description: Find global headers
|
|
Have hyprpm find global headers installed with the package instead of requiring
|
|
a separate clone.
|
|
Author: Constantin Piber <cp.piber@gmail.com>
|
|
Origin: https://github.com/cpiber/hyprland-ppa/blob/0dcd5f3101f7ced40879d0f34f337b1a2cdd79ae/hyprland/debian/patches/99-hyprpm-global-headers
|
|
Forwarded: no
|
|
Index: hyprland/hyprpm/src/core/PluginManager.cpp
|
|
===================================================================
|
|
--- hyprland.orig/hyprpm/src/core/PluginManager.cpp 2025-09-11 12:44:39.102889783 +0800
|
|
+++ hyprland/hyprpm/src/core/PluginManager.cpp 2025-09-11 12:44:39.097266413 +0800
|
|
@@ -391,6 +391,9 @@
|
|
eHeadersErrors CPluginManager::headersValid() {
|
|
const auto HLVER = getHyprlandVersion(false);
|
|
|
|
+ if (std::filesystem::exists("/usr/share/pkgconfig/hyprland.pc"))
|
|
+ return HEADERS_OK;
|
|
+
|
|
if (!std::filesystem::exists(DataState::getHeadersPath() + "/share/pkgconfig/hyprland.pc"))
|
|
return HEADERS_MISSING;
|
|
|
|
@@ -463,6 +466,13 @@
|
|
std::filesystem::permissions(getTempRoot(), std::filesystem::perms::owner_all, std::filesystem::perm_options::replace);
|
|
}
|
|
|
|
+ if (headersValid() != HEADERS_OK) {
|
|
+ std::println("\n{}", failureString("Could not find headers. File a bug to your distribution's hyprland package."));
|
|
+ return false;
|
|
+ }
|
|
+ std::println("\n{}", successString("Headers up to date."));
|
|
+ return true;
|
|
+
|
|
if (!force && headersValid() == HEADERS_OK) {
|
|
std::println("\n{}", successString("Headers up to date."));
|
|
return true;
|