summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Ancona2023-04-16 13:13:04 -0600
committerBruno Ancona2023-04-16 13:13:04 -0600
commit1ec549866eba42ae47920da6be4519d06962ca1c (patch)
tree9c6c20164888706ba18f835bdaed7e6d199db178
parent4925ae968448d8a43c112db9ab8baa9554588d7c (diff)
downloadaur-1ec549866eba42ae47920da6be4519d06962ca1c.tar.gz
Fix cava not found error
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD28
-rw-r--r--cava.patch21
-rw-r--r--hyprctl.patch14
4 files changed, 65 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b1f82798641f..6587e03b9550 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = waybar-hyprland-git
pkgdesc = Highly customizable Wayland bar for Sway and Wlroots based compositors, with workspaces support for Hyprland (git version)
- pkgver = 0.9.17.r66.gea38eec2
+ pkgver = 0.9.17.r134.g8aafe817
pkgrel = 1
url = https://github.com/Alexays/Waybar/
arch = x86_64
@@ -12,6 +12,7 @@ pkgbase = waybar-hyprland-git
makedepends = meson
makedepends = scdoc
makedepends = wayland-protocols
+ makedepends = curl
depends = gtkmm3
depends = libjsoncpp.so
depends = libsigc++
@@ -36,11 +37,16 @@ pkgbase = waybar-hyprland-git
depends = wireplumber
depends = playerctl
optdepends = otf-font-awesome: Icons in the default configuration
+ optdepends = cava: Cava plugin support
provides = waybar
conflicts = waybar
backup = etc/xdg/waybar/config
backup = etc/xdg/waybar/style.css
source = waybar-hyprland-git::git+https://github.com/Alexays/Waybar
- sha1sums = SKIP
+ source = hyprctl.patch
+ source = cava.patch
+ sha256sums = SKIP
+ sha256sums = b4819ed456b27c355f24c460bcf3ff2fec6dade8c210263b64361c6744a9147c
+ sha256sums = 51fbf6cf8767cebf66e26b8f393e696859ef02c70ad7c88fe55025534e2515ab
pkgname = waybar-hyprland-git
diff --git a/PKGBUILD b/PKGBUILD
index 4ae5bd850918..f3bc1f2cbd8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Bruno Ancona <bruno at powerball253 dot com>
pkgname=waybar-hyprland-git
-pkgver=0.9.17.r66.gea38eec2
+pkgver=0.9.17.r134.g8aafe817
pkgrel=1
pkgdesc='Highly customizable Wayland bar for Sway and Wlroots based compositors, with workspaces support for Hyprland (git version)'
arch=('x86_64' 'aarch64')
@@ -40,6 +40,7 @@ makedepends=(
'meson'
'scdoc'
'wayland-protocols'
+ 'curl'
)
backup=(
etc/xdg/waybar/config
@@ -47,27 +48,42 @@ backup=(
)
optdepends=(
'otf-font-awesome: Icons in the default configuration'
+ 'cava: Cava plugin support'
)
-source=("${pkgname}::git+https://github.com/Alexays/Waybar")
-sha1sums=('SKIP')
+source=("${pkgname}::git+https://github.com/Alexays/Waybar"
+ hyprctl.patch
+ cava.patch)
+sha256sums=('SKIP'
+ 'b4819ed456b27c355f24c460bcf3ff2fec6dade8c210263b64361c6744a9147c'
+ '51fbf6cf8767cebf66e26b8f393e696859ef02c70ad7c88fe55025534e2515ab')
pkgver() {
cd "${srcdir}/${pkgname}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ cd "${srcdir}/${pkgname}"
+
+ git apply ../hyprctl.patch # use hyprctl to switch workspaces
+ git apply ../cava.patch # fix cava dependency not found
+
+ mkdir "subprojects/packagecache"
+ filename=$(grep source_filename subprojects/cava.wrap | rev | cut -d' ' -f1 | rev)
+ url=$(grep source_url subprojects/cava.wrap | rev | cut -d' ' -f1 | rev)
+ curl -Lo "subprojects/packagecache/${filename}" "$url" # pre=download cava dependency
+}
+
build() {
cd "${srcdir}/${pkgname}"
rm -rf "${srcdir}/build"
- sed -i 's/zext_workspace_handle_v1_activate(workspace_handle_);/const std::string command = "hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());/g' src/modules/wlr/workspace_manager.cpp # use hyprctl to switch workspaces
-
meson --prefix=/usr \
--buildtype=plain \
--auto-features=enabled \
--wrap-mode=nodownload \
+ -Dexperimental=true \
"${srcdir}/build"
- meson configure -Dexperimental=true "${srcdir}/build" # enable experimental features
ninja -C "${srcdir}/build"
}
diff --git a/cava.patch b/cava.patch
new file mode 100644
index 000000000000..3baf93e41787
--- /dev/null
+++ b/cava.patch
@@ -0,0 +1,21 @@
+diff --git a/meson.build b/meson.build
+index f2515bf8..16528a79 100644
+--- a/meson.build
++++ b/meson.build
+@@ -336,13 +336,9 @@ if get_option('experimental')
+ add_project_arguments('-DUSE_EXPERIMENTAL', language: 'cpp')
+ endif
+
+-cava = compiler.find_library('cava',
+- required: get_option('cava'))
+-if not cava.found() and not get_option('cava').disabled()
+- cava = dependency('cava',
+- required: false,
+- fallback: [ 'cava', 'cava_dep' ])
+-endif
++cava = dependency('cava',
++ required: false,
++ fallback: [ 'cava', 'cava_dep' ])
+
+ if cava.found()
+ add_project_arguments('-DHAVE_LIBCAVA', language: 'cpp')
diff --git a/hyprctl.patch b/hyprctl.patch
new file mode 100644
index 000000000000..29218e57e8d6
--- /dev/null
+++ b/hyprctl.patch
@@ -0,0 +1,14 @@
+diff --git a/src/modules/wlr/workspace_manager.cpp b/src/modules/wlr/workspace_manager.cpp
+index c1b68c84..db619970 100644
+--- a/src/modules/wlr/workspace_manager.cpp
++++ b/src/modules/wlr/workspace_manager.cpp
+@@ -467,7 +467,8 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
+ if (action.empty())
+ return true;
+ else if (action == "activate") {
+- zext_workspace_handle_v1_activate(workspace_handle_);
++ const std::string command = "hyprctl dispatch workspace " + name_;
++ system(command.c_str());
+ } else if (action == "close") {
+ zext_workspace_handle_v1_remove(workspace_handle_);
+ } else {