From c74ca9371d1062b320f58e303d059eb27e1ff70d Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sat, 18 Sep 2021 20:43:10 +0200
Subject: [PATCH] community/polybar: fix --version

---
 community/polybar/APKBUILD          |  4 +++-
 community/polybar/fix-version.patch | 11 +++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 community/polybar/fix-version.patch

diff --git a/community/polybar/APKBUILD b/community/polybar/APKBUILD
index a44a6e056580..74deebbefd88 100644
--- a/community/polybar/APKBUILD
+++ b/community/polybar/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Taner Tas <taner76@gmail.com>
 pkgname=polybar
 pkgver=3.5.6
-pkgrel=1
+pkgrel=2
 pkgdesc="fast and easy-to-use tool for creating status bars"
 url="https://polybar.github.io/"
 arch="all"
@@ -40,6 +40,7 @@ source="
 	$pkgname-$pkgver.tar.gz::https://github.com/polybar/polybar/archive/$pkgver.tar.gz
 	xpp-$_xppver.tar.gz::https://github.com/polybar/xpp/archive/$_xppver.tar.gz
 	i3ipcpp-$_i3ipcppver.tar.gz::https://github.com/polybar/i3ipcpp/archive/$_i3ipcppver.tar.gz
+	fix-version.patch
 	"
 options="!check" # No test suite
 
@@ -72,4 +73,5 @@ sha512sums="
 5022f7876489cc28805a52894c8ea42c2afc0600c84f6ce27f1a7c738fcc48fbf5f5d5537472378eae4f3d5ca36fc2fc8b069b379e35b1047d12a3b294e1857f  polybar-3.5.6.tar.gz
 d83eaadb31f3cf044e446bc92ad8bf3c627554f012cf2f1b62eb9dab1ae8a0ab2f338e264377c157444c3f742a9ca45b9a4184a29f6b7eabaa0554067e957cd0  xpp-c1a0f59cf262f88eccb276c9bcd5bcee8c410971.tar.gz
 27a90d80f2de45743c2347be5ec5c88db58c4f3bb2aa44093c2a1e3178bfd5761ec806bdec9c6b6a4de6d1e67d5f14d4518e99611bf7e2984cfc880898357133  i3ipcpp-cb008b30fc5f3febfe467884cb0211ee3c16386b.tar.gz
+02186474284b1fc9c3054f7ea92645e20269d067326b035791bc6e50df2fc928fa287723ca249386bec557e36de2e71c9978c2bbf0cb8b2e3b5ecdcdf0e6fcd4  fix-version.patch
 "
diff --git a/community/polybar/fix-version.patch b/community/polybar/fix-version.patch
new file mode 100644
index 000000000000..1548ce310ffa
--- /dev/null
+++ b/community/polybar/fix-version.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,7 +33,7 @@
+   OUTPUT_VARIABLE git_describe
+   OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+ 
+-if(git_result EQUAL "0")
++if(0)
+   set(APP_VERSION "${git_describe}")
+ else()
+   message(STATUS "Could not detect version with git, falling back to built-in version information.")
-- 
GitLab