commit:     66309d2ef3eaaea883ffd418e4983d3a11c93890
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 31 05:14:30 2024 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Sat Aug 31 06:47:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66309d2e

x11-misc/polybar: add 3.7.2

Closes: https://bugs.gentoo.org/937526
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 x11-misc/polybar/Manifest                          |  1 +
 .../polybar-3.7.2-gcc15-cstdint-includes.patch     | 97 ++++++++++++++++++++++
 x11-misc/polybar/polybar-3.7.2.ebuild              | 67 +++++++++++++++
 3 files changed, 165 insertions(+)

diff --git a/x11-misc/polybar/Manifest b/x11-misc/polybar/Manifest
index f21487ef23dc..3701a0dc928f 100644
--- a/x11-misc/polybar/Manifest
+++ b/x11-misc/polybar/Manifest
@@ -1 +1,2 @@
 DIST polybar-3.7.1.tar.gz 495162 BLAKE2B 
33ffb3bb3595a41cb82a5ee70c79f5a31f23b6463c156a704546c803f0f006780c59b04fe2d1479f52dd15a44534687f130dfde794ac08218df2b634b34838de
 SHA512 
cb248fd904a89dbd88d2d1ab71aeaf31e2b5781304f126aeb489da1238681e354d5347555076e814751ef5bb6717a3a6742d1726cf4721697e75694c7643bed4
+DIST polybar-3.7.2.tar.gz 494383 BLAKE2B 
dda97c42de5f32a005ae6d4de737651278df0364187c735d7fa8a6d34e644b917ba3f32859cc19bd869c43f5d14f73ca734a4227651eb267724d808e4a766e08
 SHA512 
a0ee701533e101789f7eb95c71717ecf1d389a10b202d19261f9f71fee9d43fb8be17fb63e4a056c5e8bd62d2e669c95ee4d4b8c6bb06b933e1e4b26ab1a0624

diff --git a/x11-misc/polybar/files/polybar-3.7.2-gcc15-cstdint-includes.patch 
b/x11-misc/polybar/files/polybar-3.7.2-gcc15-cstdint-includes.patch
new file mode 100644
index 000000000000..97d9a4c7720b
--- /dev/null
+++ b/x11-misc/polybar/files/polybar-3.7.2-gcc15-cstdint-includes.patch
@@ -0,0 +1,97 @@
+commit e79b671aa7bc4edbae5d8272d523caa092f7548d
+Author: John Helmert III <[email protected]>
+Date:   Fri Aug 30 23:13:23 2024 -0700
+
+    add missing cstdint includes
+    
+    In GCC 15, cstdint is less commonly included in stdlib headers so we
+    need explicit includes: https://gcc.gnu.org/gcc-15/porting_to.html
+    
+    See-Also: https://bugs.gentoo.org/937526
+    Signed-off-by: John Helmert III <[email protected]>
+
+diff --git a/include/ipc/decoder.hpp b/include/ipc/decoder.hpp
+index 9d1afe1c..dcdf9e1a 100644
+--- a/include/ipc/decoder.hpp
++++ b/include/ipc/decoder.hpp
+@@ -5,6 +5,8 @@
+ #include "errors.hpp"
+ #include "ipc/msg.hpp"
+ 
++#include <cstdint>
++
+ POLYBAR_NS
+ 
+ namespace ipc {
+diff --git a/include/ipc/encoder.hpp b/include/ipc/encoder.hpp
+index 1fd36f60..ebb1ea82 100644
+--- a/include/ipc/encoder.hpp
++++ b/include/ipc/encoder.hpp
+@@ -4,6 +4,8 @@
+ #include "errors.hpp"
+ #include "ipc/msg.hpp"
+ 
++#include <cstdint>
++
+ POLYBAR_NS
+ 
+ namespace ipc {
+diff --git a/include/ipc/msg.hpp b/include/ipc/msg.hpp
+index 1b37022d..a423d3bb 100644
+--- a/include/ipc/msg.hpp
++++ b/include/ipc/msg.hpp
+@@ -3,6 +3,7 @@
+ #include "common.hpp"
+ 
+ #include <array>
++#include <cstdint>
+ 
+ POLYBAR_NS
+ 
+diff --git a/include/utils/color.hpp b/include/utils/color.hpp
+index 491d48ee..9d301af7 100644
+--- a/include/utils/color.hpp
++++ b/include/utils/color.hpp
+@@ -1,6 +1,7 @@
+ #pragma once
+ 
+ #include <cstdlib>
++#include <cstdint>
+ 
+ #include "common.hpp"
+ 
+diff --git a/include/utils/string.hpp b/include/utils/string.hpp
+index 45eaec06..27e06f7a 100644
+--- a/include/utils/string.hpp
++++ b/include/utils/string.hpp
+@@ -1,5 +1,6 @@
+ #pragma once
+ 
++#include <cstdint>
+ #include <sstream>
+ 
+ #include "common.hpp"
+diff --git a/src/ipc/encoder.cpp b/src/ipc/encoder.cpp
+index 87cbd915..38da55a1 100644
+--- a/src/ipc/encoder.cpp
++++ b/src/ipc/encoder.cpp
+@@ -2,6 +2,7 @@
+ 
+ #include <cassert>
+ #include <cstring>
++#include <cstdint>
+ 
+ POLYBAR_NS
+ 
+diff --git a/src/utils/color.cpp b/src/utils/color.cpp
+index 59fa59ae..7e47dad5 100644
+--- a/src/utils/color.cpp
++++ b/src/utils/color.cpp
+@@ -1,6 +1,7 @@
+ #include "utils/color.hpp"
+ 
+ #include <algorithm>
++#include <cstdint>
+ 
+ POLYBAR_NS
+ 

diff --git a/x11-misc/polybar/polybar-3.7.2.ebuild 
b/x11-misc/polybar/polybar-3.7.2.ebuild
new file mode 100644
index 000000000000..b4269c54cc78
--- /dev/null
+++ b/x11-misc/polybar/polybar-3.7.2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake python-single-r1
+
+DESCRIPTION="A fast and easy-to-use tool for creating status bars"
+HOMEPAGE="https://github.com/polybar/polybar";
+SRC_URI="https://github.com/polybar/${PN}/releases/download/${PV}/${P}.tar.gz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="alsa curl doc i3wm ipc mpd network pulseaudio"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+       ${PYTHON_DEPS}
+       $(python_gen_cond_dep 'x11-base/xcb-proto[${PYTHON_USEDEP}]')
+       dev-libs/libuv:=
+       media-libs/fontconfig
+       media-libs/freetype
+       x11-base/xorg-proto
+       x11-libs/cairo[X,xcb(+)]
+       x11-libs/libxcb:=
+       x11-libs/xcb-util
+       x11-libs/xcb-util-cursor
+       x11-libs/xcb-util-image
+       x11-libs/xcb-util-wm
+       x11-libs/xcb-util-xrm
+       alsa? ( media-libs/alsa-lib )
+       curl? ( net-misc/curl )
+       doc? ( dev-python/sphinx )
+       i3wm? (
+               dev-libs/jsoncpp:=
+               x11-wm/i3
+       )
+       mpd? ( media-libs/libmpdclient )
+       network? ( dev-libs/libnl:3 )
+       pulseaudio? ( media-libs/libpulse )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-gcc15-cstdint-includes.patch"
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DENABLE_ALSA="$(usex alsa)"
+               -DENABLE_CURL="$(usex curl)"
+               -DBUILD_DOC="$(usex doc)"
+               -DENABLE_I3="$(usex i3wm)"
+               -DBUILD_POLYBAR_MSG="$(usex ipc)"
+               -DENABLE_MPD="$(usex mpd)"
+               -DENABLE_NETWORK="$(usex network)"
+               -DENABLE_PULSEAUDIO="$(usex pulseaudio)"
+               # Bug 767949
+               -DENABLE_CCACHE="OFF"
+               -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc/"
+       )
+
+       cmake_src_configure
+}

Reply via email to