Update to version 0.46.2
OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/hyprland?expand=0&rev=104
This commit is contained in:
commit
e0ebb281ee
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
18
_service
Normal file
18
_service
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!-- vim: set ft=xml ts=4 sw=4 noet: -->
|
||||||
|
<services>
|
||||||
|
<service name="obs_scm" mode="manual">
|
||||||
|
<param name="url">https://github.com/hyprwm/Hyprland.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="filename">hyprland</param>
|
||||||
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
|
<param name="versionrewrite-pattern">v(.*)</param>
|
||||||
|
<param name="revision">v0.46.2</param>
|
||||||
|
<param name="submodule">enable</param>
|
||||||
|
</service>
|
||||||
|
<service name="tar" mode="manual" />
|
||||||
|
<service name="recompress" mode="manual">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="manual" />
|
||||||
|
</services>
|
3
hyprland-0.41.2.tar.xz
Normal file
3
hyprland-0.41.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cbf31acef7031076888e8b0891cbcf6093c6a08f9399735aecbbdd45ee3bb0ee
|
||||||
|
size 51587912
|
3
hyprland-0.42.0.tar.xz
Normal file
3
hyprland-0.42.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2ef6a30f5a68cea1171dd69e8bbe84a773c6a83b5d70e101c8318320a758b003
|
||||||
|
size 51160524
|
3
hyprland-0.43.0.tar.xz
Normal file
3
hyprland-0.43.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fa2166f6e8d42f12674eec4698649113294ea3da41d2d9ddebf8a31adc833049
|
||||||
|
size 51317448
|
3
hyprland-0.44.0.tar.xz
Normal file
3
hyprland-0.44.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ab530226b47714558569a550b9ad5be76207a93cef831773d996d3ff8b063620
|
||||||
|
size 51322040
|
3
hyprland-0.44.1.tar.xz
Normal file
3
hyprland-0.44.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1ce5b9e6eddd57cde64fd0626cfd799550df6947883f795f5222d8d2b6725a0f
|
||||||
|
size 51320696
|
3
hyprland-0.45.0.tar.xz
Normal file
3
hyprland-0.45.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:06d2122ef5bcbdde3bac0e2bd03c93c0419a7e4c1fe22bab539e53c46dac0419
|
||||||
|
size 51332744
|
3
hyprland-0.45.2.tar.xz
Normal file
3
hyprland-0.45.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f5ab6c4f06d786f5fea0a41f7abeca0c0bef99749b1d2f5c0e37e7ae3d58ce6a
|
||||||
|
size 51334268
|
3
hyprland-0.46.1.tar.xz
Normal file
3
hyprland-0.46.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1e11c64c674d54f5850e17b035a6443b4bcc9291f5d33e389f85862d7f6adbf1
|
||||||
|
size 51344416
|
3
hyprland-0.46.2.tar.xz
Normal file
3
hyprland-0.46.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3da6226f362dd3ee3513933008806ecf85eb312b55112225e18413219ad17be3
|
||||||
|
size 51341512
|
4510
hyprland.changes
Normal file
4510
hyprland.changes
Normal file
File diff suppressed because it is too large
Load Diff
2
hyprland.rpmlintrc
Normal file
2
hyprland.rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# not a comment
|
||||||
|
addFilter("macro-in-comment")
|
217
hyprland.spec
Normal file
217
hyprland.spec
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
#
|
||||||
|
# spec file for package hyprland
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
# Copyright (c) 2022-24 Florian "sp1rit" <packaging@sp1rit.anonaddy.me>
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%bcond_without devel
|
||||||
|
|
||||||
|
%define shortname hypr
|
||||||
|
|
||||||
|
Name: hyprland
|
||||||
|
Version: 0.46.2
|
||||||
|
Release: 0
|
||||||
|
Summary: Dynamic tiling Wayland compositor
|
||||||
|
License: BSD-3-Clause
|
||||||
|
URL: https://hyprland.org/
|
||||||
|
Source0: %{name}-%{version}.tar.xz
|
||||||
|
Source99: %{name}.rpmlintrc
|
||||||
|
Patch1: meson-missing-wayland-include.patch
|
||||||
|
Patch100: opensuse-hyprpm-use-hyprland-devel-subpkg.patch
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc-c++ >= 14
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: glslang-devel
|
||||||
|
BuildRequires: meson
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: pkgconfig(aquamarine) >= 0.4.5
|
||||||
|
BuildRequires: pkgconfig(cairo)
|
||||||
|
BuildRequires: pkgconfig(egl)
|
||||||
|
BuildRequires: pkgconfig(gbm) >= 17.1.0
|
||||||
|
BuildRequires: pkgconfig(gl)
|
||||||
|
BuildRequires: pkgconfig(glesv2)
|
||||||
|
BuildRequires: pkgconfig(hyprcursor) >= 0.1.9
|
||||||
|
BuildRequires: pkgconfig(hyprgraphics) >= 0.1.1
|
||||||
|
BuildRequires: pkgconfig(hyprlang) >= 0.3.2
|
||||||
|
BuildRequires: pkgconfig(hyprutils) >= 0.2.4
|
||||||
|
BuildRequires: pkgconfig(hyprwayland-scanner) >= 0.3.8
|
||||||
|
BuildRequires: pkgconfig(libdrm) >= 2.4.118
|
||||||
|
BuildRequires: pkgconfig(libinput) >= 1.14.0
|
||||||
|
BuildRequires: pkgconfig(libudev)
|
||||||
|
BuildRequires: pkgconfig(pango)
|
||||||
|
BuildRequires: pkgconfig(pangocairo)
|
||||||
|
BuildRequires: pkgconfig(pixman-1) >= 0.42.0
|
||||||
|
BuildRequires: pkgconfig(re2)
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
BuildRequires: pkgconfig(tomlplusplus)
|
||||||
|
BuildRequires: pkgconfig(uuid)
|
||||||
|
BuildRequires: pkgconfig(vulkan) >= 1.2.182
|
||||||
|
BuildRequires: pkgconfig(wayland-client)
|
||||||
|
BuildRequires: pkgconfig(wayland-protocols) >= 1.26
|
||||||
|
BuildRequires: pkgconfig(wayland-scanner)
|
||||||
|
BuildRequires: pkgconfig(wayland-server) >= 1.22
|
||||||
|
BuildRequires: pkgconfig(xcb)
|
||||||
|
BuildRequires: pkgconfig(xcb-icccm)
|
||||||
|
BuildRequires: pkgconfig(xcb-renderutil)
|
||||||
|
BuildRequires: pkgconfig(xcursor)
|
||||||
|
BuildRequires: pkgconfig(xkbcommon)
|
||||||
|
BuildRequires: pkgconfig(xwayland)
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
BuildRequires: Mesa-libGLESv3-devel
|
||||||
|
%bcond_without xcb_errors
|
||||||
|
%else
|
||||||
|
%bcond_with xcb_errors
|
||||||
|
%endif
|
||||||
|
%if %{with xcb_errors}
|
||||||
|
BuildRequires: pkgconfig(xcb-errors)
|
||||||
|
%endif
|
||||||
|
Recommends: %{name}-wallpapers
|
||||||
|
%if %{with devel}
|
||||||
|
Suggests: %{name}-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
Hyprland is a dynamic tiling Wayland compositor based on wlroots
|
||||||
|
that doesn't sacrifice on its looks.
|
||||||
|
|
||||||
|
It supports multiple layouts, fancy effects, has a very flexible IPC
|
||||||
|
model allowing for a lot of customization, and more.
|
||||||
|
|
||||||
|
%package wallpapers
|
||||||
|
Summary: Hyprland wallpapers
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description wallpapers
|
||||||
|
Additional wallpapers for hyprland.
|
||||||
|
|
||||||
|
%if %{with devel}
|
||||||
|
%package devel
|
||||||
|
Summary: Files required to build Hyprland plugins
|
||||||
|
Requires: %{name}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains the neccessary files that are required to
|
||||||
|
build plugins for hyprland.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package bash-completion
|
||||||
|
Summary: Bash Completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Requires: %{name}
|
||||||
|
Requires: awk
|
||||||
|
Requires: bash-completion
|
||||||
|
Supplements: (%{name} and bash-completion)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description bash-completion
|
||||||
|
The official bash completion script for %{name}.
|
||||||
|
|
||||||
|
%package fish-completion
|
||||||
|
Summary: Fish Completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Requires: %{name}
|
||||||
|
Requires: awk
|
||||||
|
Requires: fish
|
||||||
|
Supplements: (%{name} and fish)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description fish-completion
|
||||||
|
The official fish completion script for %{name}.
|
||||||
|
|
||||||
|
%package zsh-completion
|
||||||
|
Summary: ZSH Completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Requires: %{name}
|
||||||
|
Requires: awk
|
||||||
|
Requires: zsh
|
||||||
|
Supplements: (%{name} and zsh)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description zsh-completion
|
||||||
|
The official zsh completion script for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
# at this point of time we do not have repository information anymore
|
||||||
|
# don't attemt to generate version.h from git, use our own.
|
||||||
|
sed -i '/version_h/d' meson.build
|
||||||
|
cat > src/version.h << EOF
|
||||||
|
#pragma once
|
||||||
|
#define GIT_COMMIT_HASH "0000000000000000000000000000000000000000"
|
||||||
|
#define GIT_BRANCH "openSUSE"
|
||||||
|
#define GIT_COMMIT_MESSAGE "Built for %_host"
|
||||||
|
#define GIT_COMMIT_DATE "Thu Jan 01 00:00:00 1970"
|
||||||
|
#define GIT_DIRTY ""
|
||||||
|
#define GIT_TAG "%{version}"
|
||||||
|
#define GIT_COMMITS "-1"
|
||||||
|
EOF
|
||||||
|
sed -i 's;REPLACE_ME_WITH_PREFIX;%{_prefix};' hyprpm/src/core/DataState.cpp
|
||||||
|
|
||||||
|
%build
|
||||||
|
%meson \
|
||||||
|
-Duwsm=disabled \
|
||||||
|
-Dwlroots-hyprland:xcb-errors=%{?with_xcb_errors:enabled}%{!?with_xcb_errors:disabled}
|
||||||
|
%meson_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%meson_install --tags runtime,man%{?with_devel:,devel}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md
|
||||||
|
%{_bindir}/Hyprland
|
||||||
|
%{_bindir}/hyprctl
|
||||||
|
%{_bindir}/hyprpm
|
||||||
|
%dir %{_datadir}/%{shortname}
|
||||||
|
%{_datadir}/%{shortname}/hyprland.conf
|
||||||
|
%{_datadir}/%{shortname}/lockdead.png
|
||||||
|
%{_datadir}/%{shortname}/lockdead2.png
|
||||||
|
%dir %{_datadir}/wayland-sessions/
|
||||||
|
%{_datadir}/wayland-sessions/%{name}.desktop
|
||||||
|
%dir %{_datadir}/xdg-desktop-portal
|
||||||
|
%{_datadir}/xdg-desktop-portal/%{name}-portals.conf
|
||||||
|
%{_mandir}/man1/Hyprland.*
|
||||||
|
%{_mandir}/man1/hyprctl.*
|
||||||
|
|
||||||
|
%files wallpapers
|
||||||
|
%{_datadir}/%{shortname}/wall*
|
||||||
|
|
||||||
|
%if %{with devel}
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/%{name}
|
||||||
|
%{_datadir}/pkgconfig/%{name}.pc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files bash-completion
|
||||||
|
%dir %{_datadir}/bash-completion/
|
||||||
|
%dir %{_datadir}/bash-completion/completions/
|
||||||
|
%{_datadir}/bash-completion/completions/hyprctl
|
||||||
|
%{_datadir}/bash-completion/completions/hyprpm
|
||||||
|
|
||||||
|
%files fish-completion
|
||||||
|
%dir %{_datadir}/fish/
|
||||||
|
%dir %{_datadir}/fish/vendor_completions.d/
|
||||||
|
%{_datadir}/fish/vendor_completions.d/hyprctl.fish
|
||||||
|
%{_datadir}/fish/vendor_completions.d/hyprpm.fish
|
||||||
|
|
||||||
|
%files zsh-completion
|
||||||
|
%dir %{_datadir}/zsh/
|
||||||
|
%dir %{_datadir}/zsh/site-functions/
|
||||||
|
%{_datadir}/zsh/site-functions/_hyprctl
|
||||||
|
%{_datadir}/zsh/site-functions/_hyprpm
|
||||||
|
|
||||||
|
%changelog
|
36
meson-missing-wayland-include.patch
Normal file
36
meson-missing-wayland-include.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From d037427e96b75d66d73fac73eda659b6fcaf33c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20=22sp1rit=22=E2=80=8B?= <sp1rit@disroot.org>
|
||||||
|
Date: Sun, 6 Oct 2024 14:46:19 +0200
|
||||||
|
Subject: [PATCH] protocols/meson: fix missing wayland header
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Compilation of wlr-foreign-toplevel-management-unstable-v1.cpp fails due
|
||||||
|
to its header including <wayland-server.h>. This change adds the
|
||||||
|
required dependency to the static library.
|
||||||
|
|
||||||
|
Signed-off-by: Florian "sp1rit" <sp1rit@disroot.org>
|
||||||
|
---
|
||||||
|
protocols/meson.build | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/protocols/meson.build b/protocols/meson.build
|
||||||
|
index 6990b5a..d28aefd 100644
|
||||||
|
--- a/protocols/meson.build
|
||||||
|
+++ b/protocols/meson.build
|
||||||
|
@@ -92,9 +92,11 @@ wayland_protocol = custom_target(
|
||||||
|
command: [hyprwayland_scanner, '--wayland-enums', '@INPUT@', '@OUTDIR@'],
|
||||||
|
)
|
||||||
|
|
||||||
|
+wayland_server_dep = dependency('wayland-server', version: '>=1.20.0')
|
||||||
|
lib_server_protos = static_library(
|
||||||
|
'server_protos',
|
||||||
|
wl_protocols + wayland_protocol,
|
||||||
|
+ dependencies: wayland_server_dep.partial_dependency(compile_args: true),
|
||||||
|
)
|
||||||
|
|
||||||
|
server_protos = declare_dependency(
|
||||||
|
--
|
||||||
|
2.46.0
|
||||||
|
|
217
opensuse-hyprpm-use-hyprland-devel-subpkg.patch
Normal file
217
opensuse-hyprpm-use-hyprland-devel-subpkg.patch
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
From 1046bd52a4725819fd0ab00391b29adeb0d1eeef Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20sp1rit=E2=80=8B?= <sp1rit@disroot.org>
|
||||||
|
Date: Fri, 14 Jun 2024 23:43:46 +0200
|
||||||
|
Subject: [PATCH] openSUSE: Use hyprland-devel instead of downloading from
|
||||||
|
upstream
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
The plugin manager needs headers in order to build plugins for hyprland.
|
||||||
|
This patch removes the ability of hyprpm to download another copy of
|
||||||
|
hyprland upstream and instead forces hyprpm to use the headers already
|
||||||
|
installed from the hyprland-devel subpackage.
|
||||||
|
|
||||||
|
It also adds a new check to ensure that the subpackage is instealled.
|
||||||
|
|
||||||
|
Signed-off-by: Florian "sp1rit" <sp1rit@disroot.org>
|
||||||
|
---
|
||||||
|
hyprpm/src/core/DataState.cpp | 2 +-
|
||||||
|
hyprpm/src/core/PluginManager.cpp | 138 ++++--------------------------
|
||||||
|
2 files changed, 20 insertions(+), 120 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/hyprpm/src/core/DataState.cpp b/hyprpm/src/core/DataState.cpp
|
||||||
|
index fb8679d..a1c7026 100644
|
||||||
|
--- a/hyprpm/src/core/DataState.cpp
|
||||||
|
+++ b/hyprpm/src/core/DataState.cpp
|
||||||
|
@@ -21,7 +21,7 @@ std::string DataState::getDataStatePath() {
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DataState::getHeadersPath() {
|
||||||
|
- return getDataStatePath() + "/headersRoot";
|
||||||
|
+ return "REPLACE_ME_WITH_PREFIX/";
|
||||||
|
}
|
||||||
|
|
||||||
|
void DataState::ensureStateStoreExists() {
|
||||||
|
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp
|
||||||
|
index 48b108c..b0f590b 100644
|
||||||
|
--- a/hyprpm/src/core/PluginManager.cpp
|
||||||
|
+++ b/hyprpm/src/core/PluginManager.cpp
|
||||||
|
@@ -17,6 +17,7 @@
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
+#include <sys/wait.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@@ -436,141 +437,27 @@ bool CPluginManager::updateHeaders(bool force) {
|
||||||
|
const auto HLVER = getHyprlandVersion(false);
|
||||||
|
|
||||||
|
if (!hasDeps()) {
|
||||||
|
- std::println("\n{}", failureString("Could not update. Dependencies not satisfied. Hyprpm requires: cmake, meson, cpio, pkg-config"));
|
||||||
|
+ std::println("\n{}", failureString("Could not update. Dependencies not satisfied. Hyprpm requires: hyprland-devel, cmake, meson, cpio, pkg-config"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!std::filesystem::exists(getTempRoot())) {
|
||||||
|
- std::filesystem::create_directory(getTempRoot());
|
||||||
|
- std::filesystem::permissions(getTempRoot(), std::filesystem::perms::owner_all, std::filesystem::perm_options::replace);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (!force && headersValid() == HEADERS_OK) {
|
||||||
|
- std::println("\n{}", successString("Headers up to date."));
|
||||||
|
- return true;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
CProgressBar progress;
|
||||||
|
- progress.m_iMaxSteps = 5;
|
||||||
|
+ progress.m_iMaxSteps = 1;
|
||||||
|
progress.m_iSteps = 0;
|
||||||
|
- progress.m_szCurrentMessage = "Cloning the hyprland repository";
|
||||||
|
- progress.print();
|
||||||
|
-
|
||||||
|
- const std::string USERNAME = getpwuid(getuid())->pw_name;
|
||||||
|
- const auto WORKINGDIR = getTempRoot() + "hyprland-" + USERNAME;
|
||||||
|
-
|
||||||
|
- if (!createSafeDirectory(WORKINGDIR)) {
|
||||||
|
- std::println("\n{}", failureString("Could not prepare working dir for hl"));
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- progress.printMessageAbove(statusString("!", Colors::YELLOW, "Cloning https://github.com/hyprwm/Hyprland, this might take a moment."));
|
||||||
|
-
|
||||||
|
- const bool bShallow = (HLVER.branch == "main") && !m_bNoShallow;
|
||||||
|
-
|
||||||
|
- // let us give a bit of leg-room for shallowing
|
||||||
|
- // due to timezones, etc.
|
||||||
|
- const std::string SHALLOW_DATE = trim(HLVER.date).empty() ? "" : execAndGet("LC_TIME=\"en_US.UTF-8\" date --date='" + HLVER.date + " - 1 weeks' '+%a %b %d %H:%M:%S %Y'");
|
||||||
|
-
|
||||||
|
- if (m_bVerbose && bShallow)
|
||||||
|
- progress.printMessageAbove(verboseString("will shallow since: {}", SHALLOW_DATE));
|
||||||
|
-
|
||||||
|
- std::string ret = execAndGet(std::format("cd {} && git clone --recursive https://github.com/hyprwm/Hyprland hyprland-{}{}", getTempRoot(), USERNAME,
|
||||||
|
- (bShallow ? " --shallow-since='" + SHALLOW_DATE + "'" : "")));
|
||||||
|
-
|
||||||
|
- if (!std::filesystem::exists(WORKINGDIR)) {
|
||||||
|
- progress.printMessageAbove(failureString("Clone failed. Retrying without shallow."));
|
||||||
|
- ret = execAndGet(std::format("cd {} && git clone --recursive https://github.com/hyprwm/hyprland hyprland-{}", getTempRoot(), USERNAME));
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (!std::filesystem::exists(WORKINGDIR + "/.git")) {
|
||||||
|
- std::println(stderr, "\n{}", failureString("Could not clone the Hyprland repository. shell returned:\n{}", ret));
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- progress.printMessageAbove(successString("Hyprland cloned"));
|
||||||
|
- progress.m_iSteps = 2;
|
||||||
|
- progress.m_szCurrentMessage = "Checking out sources";
|
||||||
|
- progress.print();
|
||||||
|
-
|
||||||
|
- if (m_bVerbose)
|
||||||
|
- progress.printMessageAbove(verboseString("will run: cd {} && git checkout {} 2>&1", WORKINGDIR, HLVER.hash));
|
||||||
|
-
|
||||||
|
- ret = execAndGet("cd " + WORKINGDIR + " && git checkout " + HLVER.hash + " 2>&1");
|
||||||
|
-
|
||||||
|
- if (ret.contains("fatal: unable to read tree")) {
|
||||||
|
- std::println(stderr, "\n{}",
|
||||||
|
- failureString("Could not checkout the running Hyprland commit. If you are on -git, try updating.\n"
|
||||||
|
- "You can also try re-running hyprpm update with --no-shallow."));
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (m_bVerbose)
|
||||||
|
- progress.printMessageAbove(verboseString("git returned (co): {}", ret));
|
||||||
|
-
|
||||||
|
- ret = execAndGet("cd " + WORKINGDIR + " ; git rm subprojects/tracy ; git submodule update --init 2>&1 ; git reset --hard --recurse-submodules " + HLVER.hash);
|
||||||
|
-
|
||||||
|
- if (m_bVerbose)
|
||||||
|
- progress.printMessageAbove(verboseString("git returned (rs): {}", ret));
|
||||||
|
-
|
||||||
|
- progress.printMessageAbove(successString("checked out to running ver"));
|
||||||
|
- progress.m_iSteps = 3;
|
||||||
|
- progress.m_szCurrentMessage = "Building Hyprland";
|
||||||
|
- progress.print();
|
||||||
|
-
|
||||||
|
- progress.printMessageAbove(statusString("!", Colors::YELLOW, "configuring Hyprland"));
|
||||||
|
-
|
||||||
|
- if (m_bVerbose)
|
||||||
|
- progress.printMessageAbove(verboseString("setting PREFIX for cmake to {}", DataState::getHeadersPath()));
|
||||||
|
-
|
||||||
|
- ret = execAndGet(std::format("cd {} && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=\"{}\" -S . -B ./build -G Ninja", WORKINGDIR,
|
||||||
|
- DataState::getHeadersPath()));
|
||||||
|
- if (m_bVerbose)
|
||||||
|
- progress.printMessageAbove(verboseString("cmake returned: {}", ret));
|
||||||
|
-
|
||||||
|
- if (ret.contains("CMake Error at")) {
|
||||||
|
- // missing deps, let the user know.
|
||||||
|
- std::string missing = ret.substr(ret.find("CMake Error at"));
|
||||||
|
- missing = ret.substr(ret.find_first_of('\n') + 1);
|
||||||
|
- missing = missing.substr(0, missing.find("-- Configuring incomplete"));
|
||||||
|
- missing = missing.substr(0, missing.find_last_of('\n'));
|
||||||
|
-
|
||||||
|
- std::println(stderr, "\n{}",
|
||||||
|
- failureString("Could not configure the hyprland source, cmake complained:\n{}\n\n"
|
||||||
|
- "This likely means that you are missing the above dependencies or they are out of date.",
|
||||||
|
- missing));
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- progress.printMessageAbove(successString("configured Hyprland"));
|
||||||
|
- progress.m_iSteps = 4;
|
||||||
|
- progress.m_szCurrentMessage = "Installing sources";
|
||||||
|
+ progress.m_szCurrentMessage = "Checking headers";
|
||||||
|
progress.print();
|
||||||
|
|
||||||
|
- const std::string& cmd =
|
||||||
|
- std::format("sed -i -e \"s#PREFIX = /usr/local#PREFIX = {}#\" {}/Makefile && cd {} && make installheaders", DataState::getHeadersPath(), WORKINGDIR, WORKINGDIR);
|
||||||
|
- if (m_bVerbose)
|
||||||
|
- progress.printMessageAbove(verboseString("installation will run: {}", cmd));
|
||||||
|
-
|
||||||
|
- ret = execAndGet(cmd);
|
||||||
|
-
|
||||||
|
- if (m_bVerbose)
|
||||||
|
- std::println("{}", verboseString("installer returned: {}", ret));
|
||||||
|
-
|
||||||
|
- // remove build files
|
||||||
|
- std::filesystem::remove_all(WORKINGDIR);
|
||||||
|
-
|
||||||
|
auto HEADERSVALID = headersValid();
|
||||||
|
if (HEADERSVALID == HEADERS_OK) {
|
||||||
|
progress.printMessageAbove(successString("installed headers"));
|
||||||
|
- progress.m_iSteps = 5;
|
||||||
|
+ progress.m_iSteps = 1;
|
||||||
|
progress.m_szCurrentMessage = "Done!";
|
||||||
|
progress.print();
|
||||||
|
|
||||||
|
std::print("\n");
|
||||||
|
} else {
|
||||||
|
progress.printMessageAbove(failureString("failed to install headers with error code {} ({})", (int)HEADERSVALID, headerErrorShort(HEADERSVALID)));
|
||||||
|
- progress.m_iSteps = 5;
|
||||||
|
+ progress.m_iSteps = 1;
|
||||||
|
progress.m_szCurrentMessage = "Failed";
|
||||||
|
progress.print();
|
||||||
|
|
||||||
|
@@ -953,6 +840,19 @@ std::string CPluginManager::headerErrorShort(const eHeadersErrors err) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CPluginManager::hasDeps() {
|
||||||
|
+ pid_t pid = fork();
|
||||||
|
+ if (pid == 0) {
|
||||||
|
+ close(STDOUT_FILENO);
|
||||||
|
+ execlp("rpm", "rpm", "-q", "hyprland-devel", NULL);
|
||||||
|
+ exit(1);
|
||||||
|
+ }
|
||||||
|
+ int status;
|
||||||
|
+ pid = waitpid(pid, &status, 0);
|
||||||
|
+ if (pid < 0)
|
||||||
|
+ return false;
|
||||||
|
+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
std::vector<std::string> deps = {"meson", "cpio", "cmake", "pkg-config"};
|
||||||
|
for (auto const& d : deps) {
|
||||||
|
if (!execAndGet("command -v " + d).contains("/"))
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user