git: a24c133df8bb - main - x11/polybar: Update to 3.6.1

From: Alexandre C. Guimarães <rigoletto_at_FreeBSD.org>
Date: Sun, 27 Mar 2022 19:03:42 UTC
The branch main has been updated by rigoletto:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a24c133df8bba72dd02d80cc953e29f5e4f247f3

commit a24c133df8bba72dd02d80cc953e29f5e4f247f3
Author:     Alexandre C. Guimarães <rigoletto@FreeBSD.org>
AuthorDate: 2022-03-27 19:02:18 +0000
Commit:     Alexandre C. Guimarães <rigoletto@FreeBSD.org>
CommitDate: 2022-03-27 19:03:18 +0000

    x11/polybar: Update to 3.6.1
---
 x11/polybar/Makefile                       | 26 +++++++++++++++++++-------
 x11/polybar/distinfo                       |  6 +++---
 x11/polybar/files/patch-CMakeLists.txt     | 11 +++++++++++
 x11/polybar/files/patch-src_utils_file.cpp | 11 +++++++++++
 x11/polybar/pkg-plist                      |  3 ++-
 5 files changed, 46 insertions(+), 11 deletions(-)

diff --git a/x11/polybar/Makefile b/x11/polybar/Makefile
index b788800852a9..5c256ce0cf0a 100644
--- a/x11/polybar/Makefile
+++ b/x11/polybar/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	polybar
-DISTVERSION=	3.5.7
-PORTREVISION=	1
+DISTVERSION=	3.6.1
 CATEGORIES=	x11
 MASTER_SITES=	https://github.com/polybar/polybar/releases/download/${DISTVERSION}/
 
@@ -14,6 +13,7 @@ BUILD_DEPENDS=	xcb-proto>=1.9:x11/xcb-proto
 LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libfreetype.so:print/freetype2 \
 		libinotify.so:devel/libinotify \
+		libuv.so:devel/libuv \
 		libxcb-ewmh.so:x11/xcb-util-wm \
 		libxcb-icccm.so:x11/xcb-util-wm \
 		libxcb-image.so:x11/xcb-util-image \
@@ -28,10 +28,10 @@ USE_GNOME=	cairo
 USE_XORG=	xcb
 
 # Needs libnl to work. Disabling it completely.
-CMAKE_OFF=	ENABLE_NETWORK
+CMAKE_OFF=	ENABLE_NETWORK BUILD_DOC
 
-OPTIONS_DEFINE=		ALSA CURSOR DEBUG GITHUB I3 IPC MPD PULSEAUDIO \
-			TESTS XKEYBOARD
+OPTIONS_DEFINE=		ALSA CURSOR DEBUG GITHUB I3 IPC MPD \
+			PULSEAUDIO TESTS XKEYBOARD
 OPTIONS_DEFAULT=	CURSOR GITHUB I3 IPC MPD PULSEAUDIO XKEYBOARD
 OPTIONS_SUB=		yes
 
@@ -50,11 +50,11 @@ ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
 CURSOR_CMAKE_BOOL=	WITH_XCURSOR
 CURSOR_LIB_DEPENDS=	libxcb-cursor.so:x11/xcb-util-cursor
 
+DEBUG_CMAKE_BOOL=	DEBUG_LOGGER
+
 GITHUB_CMAKE_BOOL=	ENABLE_CURL
 GITHUB_LIB_DEPENDS=	libcurl.so:ftp/curl
 
-DEBUG_CMAKE_BOOL=	DEBUG_LOGGER
-
 I3_BUILD_DEPENDS=	${LOCALBASE}/include/i3/ipc.h:x11-wm/i3
 I3_CMAKE_BOOL=		ENABLE_I3
 I3_LIB_DEPENDS=		libjsoncpp.so:devel/jsoncpp
@@ -75,6 +75,18 @@ TESTS_CMAKE_BOOL=	BUILD_TESTS
 XKEYBOARD_CMAKE_BOOL=	ENABLE_XKEYBOARD
 XKEYBOARD_LIB_DEPENDS=	libxcb-xkb.so:x11/libxcb
 
+ETCFIX =	include/utils/command.hpp \
+		contrib/bash/polybar \
+		contrib/zsh/_polybar \
+		doc/man/polybar.1.rst \
+		doc/man/polybar.5.rst \
+		CHANGELOG.md
+
+post-patch:
+.for f in ${ETCFIX}
+	@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|g' ${WRKSRC}/${f}
+.endfor
+
 do-test-TESTS-on:
 	cd ${TEST_WRKSRC} && ${SETENV} BUILD_TESTS=ON \
 		${SH} ${WRKSRC}/common/travis/tests.sh
diff --git a/x11/polybar/distinfo b/x11/polybar/distinfo
index c398c5e505e7..a9bf7664683c 100644
--- a/x11/polybar/distinfo
+++ b/x11/polybar/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1632255455
-SHA256 (polybar-3.5.7.tar.gz) = 73210e6d74217acb953b253990b4302343b7b6a7870fe1da9a1855daa44123db
-SIZE (polybar-3.5.7.tar.gz) = 411318
+TIMESTAMP = 1646493488
+SHA256 (polybar-3.6.1.tar.gz) = a898ba8c847895be41efe5a31bb1b839da2c10b130b8411d5016982fbaadff7b
+SIZE (polybar-3.6.1.tar.gz) = 437027
diff --git a/x11/polybar/files/patch-CMakeLists.txt b/x11/polybar/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..00a661bf7aad
--- /dev/null
+++ b/x11/polybar/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2022-03-27 18:35:56 UTC
++++ CMakeLists.txt
+@@ -63,7 +63,7 @@ endif()
+ 
+ if(BUILD_CONFIG)
+   install(FILES ${CMAKE_SOURCE_DIR}/doc/config.ini
+-    DESTINATION /etc/${PROJECT_NAME}
++    DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/${PROJECT_NAME}
+     COMPONENT config)
+ endif()
+ 
diff --git a/x11/polybar/files/patch-src_utils_file.cpp b/x11/polybar/files/patch-src_utils_file.cpp
new file mode 100644
index 000000000000..b2a5c05f39ce
--- /dev/null
+++ b/x11/polybar/files/patch-src_utils_file.cpp
@@ -0,0 +1,11 @@
+--- src/utils/file.cpp.orig	2022-03-27 18:43:31 UTC
++++ src/utils/file.cpp
+@@ -322,7 +322,7 @@ namespace file_util {
+       possible_paths.push_back(xdg_config_dir + suffix + ".ini");
+     }
+ 
+-    possible_paths.push_back("/etc" + suffix + ".ini");
++    possible_paths.push_back("${CMAKE_INSTALL_PREFIX}/etc" + suffix + ".ini");
+ 
+     for (const string& p : possible_paths) {
+       if (exists(p)) {
diff --git a/x11/polybar/pkg-plist b/x11/polybar/pkg-plist
index 1cd6ace0a6d6..fae322946d7f 100644
--- a/x11/polybar/pkg-plist
+++ b/x11/polybar/pkg-plist
@@ -1,5 +1,6 @@
 bin/polybar
-%%IPC%%bin/polybar-msg
+bin/polybar-msg
+%%ETCDIR%%/config.ini
 share/bash-completion/completions/polybar
 share/zsh/site-functions/_polybar
 share/zsh/site-functions/_polybar_msg