summaryrefslogtreecommitdiff
path: root/media-sound/pnmixer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
commitd99093fb4bb5652015c06274d64083daa2439e4f (patch)
treecf61513204d97974179580065e85df5c8009087c /media-sound/pnmixer
parent463397cf1e064185110fe57c568d73f99a06f5d1 (diff)
gentoo resync : 03.03.2021
Diffstat (limited to 'media-sound/pnmixer')
-rw-r--r--media-sound/pnmixer/Manifest5
-rw-r--r--media-sound/pnmixer/files/pnmixer-0.7.2-fix-assert-if-volume-gt-100.patch37
-rw-r--r--media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-garbage-value.patch38
-rw-r--r--media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-memleak.patch21
-rw-r--r--media-sound/pnmixer/pnmixer-0.7.2-r1.ebuild59
-rw-r--r--media-sound/pnmixer/pnmixer-9999.ebuild43
6 files changed, 159 insertions, 44 deletions
diff --git a/media-sound/pnmixer/Manifest b/media-sound/pnmixer/Manifest
index 0e908e045e4d..21991dccc51b 100644
--- a/media-sound/pnmixer/Manifest
+++ b/media-sound/pnmixer/Manifest
@@ -1,4 +1,7 @@
+AUX pnmixer-0.7.2-fix-assert-if-volume-gt-100.patch 925 BLAKE2B 81012218ae38650ed01f53ed26846bb7f93ccf2e3ba9bc5b53e77dbf93a82fb16a5fe333f9ae0fa4af255c6c5dea00b3d078b83f97df0b789d28381495c05d3f SHA512 8f74969fd81d2e3bdb592abe77ff2f710b4a3a41acbfc5b050198c3a287049bc511259f1e94c6c1cb9f421b532ba016b4af4d0aee6a43c3e472e9e0904d344f1
+AUX pnmixer-0.7.2-fix-possible-garbage-value.patch 1173 BLAKE2B e4a874f9ffcaaa6d5586eac4f6ffb8d291703fd83f92546a2d06503060e6f2698470e67922487253c141796eb3baef70e10aaeee8b7457d72c05287b0386050b SHA512 bc5262610fdaca06c0c8fc4a767d2f2f6b50877f03699d30838ab60b018a061cc41853598d5b438dd5a343dda5e66b973a087e1773463757d550132cc62f9d2b
+AUX pnmixer-0.7.2-fix-possible-memleak.patch 620 BLAKE2B 1eb39431bdb5d7597575687c03175b8b0b41a4a64a2fd9fc704775154f048f6400ce7a38e7611484314d643caf2422660442bb0e38a631e8689c1816ba46900d SHA512 df1b824a5219d299ab69c83064156d425ee257594f49d632c745647be4497d70f071d3ba7ac5256749461d5f04a82d1a5faff32e9198e5e2246f35bf537f91f9
DIST pnmixer-v0.7.2.tar.gz 237972 BLAKE2B 368d149d9e803b52c7b0edac9ba8996312da7122f10f536095cffcdf31d319159494fa3aab0005e6dedb4e7e0b46d58bc73dd89285c7bddca4750d29539fa489 SHA512 9f43a56d17f4c16465113d4355a546ba71ca4d208e384812cf84625a51bd9bb6fa0e93f3e40fd0a2d157c4ee2b27f64082a47bbd4135c168a95b3fcbeebf6186
+EBUILD pnmixer-0.7.2-r1.ebuild 1152 BLAKE2B 50469e88f8e4851b6f47c17eedd0620a2d0f9e91cd4fe0deea92d9ef18792d9dde160887b141dee78e81a75ae5eb92b33d5dc389048660c1981cdc789e423967 SHA512 b9dac5065a4c566c682dc6c082006bb5844a393b1889b76ccdef00dfcb15091e1ea87c47742f05365100b80c35feac571146b011b66d2c9dcf89ccdf9758ab0e
EBUILD pnmixer-0.7.2.ebuild 1010 BLAKE2B 38e73b4665b30b1401f44b5f8257b2b37dc6ba39c401e45f26558f5943718574efb90f470c26a3fdd550b3d5246bf1cc986829e0c94c4360b9c5ca33ce3259a8 SHA512 762319ccacd5e8e08921603bfa85cd147c2455cd53c8739be709bbad966f580d41ae307f353b04ac8d8b37b9f7c5ddb0bc9b4d69c976331afb539c157cc7e34d
-EBUILD pnmixer-9999.ebuild 819 BLAKE2B f11e945d77d82fd0d22b3c8f62f67bc563f7d5672528c71c1ad04d778d35cef8516a372e5586387afa1b5caca2ffe0c70a97af176b058d87a871df4da80c86c6 SHA512 126ae9a4c6e539fc34dec05d9210ceffe01fd1279958e4e89df7295c8cc4e6dcb95c81cef9f8c0839190ed826b0b143f38538310190d0e8fa16372d0c7094189
MISC metadata.xml 2311 BLAKE2B 15ea04569ba81121b6f5965c2214a3b165f0f82ad9410b91fdcdafa03477fb5429abe4dd8e2f93dd78acb0f4d725d62c7927b74b1112bcda5a7e1699675ee68f SHA512 e2b368365561ca414b44a7228dcdab0bb4cd31d26aaa9ea24ec87bce012edabe701c77e6930b7ffc11710e5372e817fb0f5a46accc2318218e10677f9a710a5e
diff --git a/media-sound/pnmixer/files/pnmixer-0.7.2-fix-assert-if-volume-gt-100.patch b/media-sound/pnmixer/files/pnmixer-0.7.2-fix-assert-if-volume-gt-100.patch
new file mode 100644
index 000000000000..6fd28572f90e
--- /dev/null
+++ b/media-sound/pnmixer/files/pnmixer-0.7.2-fix-assert-if-volume-gt-100.patch
@@ -0,0 +1,37 @@
+From 7eed10b2bd4650dadbc2c98f435d2bb10de7f75e Mon Sep 17 00:00:00 2001
+From: Arnaud Rebillout <elboulangero@gmail.com>
+Date: Mon, 19 Jun 2017 20:02:01 +0700
+Subject: [PATCH] Clip volume between 0 and 100 (thx to yunake) #162
+
+---
+ src/audio.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/audio.c b/src/audio.c
+index 750f20f..06b245c 100644
+--- a/src/audio.c
++++ b/src/audio.c
+@@ -437,11 +437,22 @@ gdouble
+ audio_get_volume(Audio *audio)
+ {
+ AlsaCard *soundcard = audio->soundcard;
++ gdouble volume;
+
+ if (!soundcard)
+ return 0;
+
+- return alsa_card_get_volume(soundcard);
++ volume = alsa_card_get_volume(soundcard);
++
++ /* With PulseAudio, it is perfectly possible for the volume to go above 100%.
++ * Since we don't really expect or handle that, let's clip it right now.
++ */
++ if (volume < 0)
++ volume = 0;
++ if (volume > 100)
++ volume = 100;
++
++ return volume;
+ }
+
+ /**
diff --git a/media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-garbage-value.patch b/media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-garbage-value.patch
new file mode 100644
index 000000000000..e85dcedd2337
--- /dev/null
+++ b/media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-garbage-value.patch
@@ -0,0 +1,38 @@
+From c8577027aa4597c8f194a84a73982aa0ce7f2dd0 Mon Sep 17 00:00:00 2001
+From: Julian Ospald <hasufell@posteo.de>
+Date: Mon, 19 Feb 2018 20:06:26 +0100
+Subject: [PATCH] MEM: fix possible garbage value wrt #174
+
+Not sure if the clang static analyzer has trouble
+with g_memdup() or if there is something more serious
+going on. Good old g_malloc() works too though.
+---
+ src/ui-tray-icon.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/ui-tray-icon.c b/src/ui-tray-icon.c
+index 27b35f3..23ba947 100644
+--- a/src/ui-tray-icon.c
++++ b/src/ui-tray-icon.c
+@@ -166,9 +166,11 @@ pixbuf_array_free(GdkPixbuf **pixbufs)
+ static GdkPixbuf **
+ pixbuf_array_new(int size)
+ {
+- GdkPixbuf *pixbufs[N_VOLUME_PIXBUFS];
++ GdkPixbuf **pixbufs;
+ gboolean system_theme;
+
++ pixbufs = g_new0(GdkPixbuf *, N_VOLUME_PIXBUFS);
++
+ DEBUG("Building pixbuf array (requesting size %d)", size);
+
+ system_theme = prefs_get_boolean("SystemTheme", FALSE);
+@@ -202,7 +204,7 @@ pixbuf_array_new(int size)
+ pixbufs[VOLUME_HIGH] = pixbuf_new_from_file("pnmixer-high.png");
+ }
+
+- return g_memdup(pixbufs, sizeof pixbufs);
++ return pixbufs;
+ }
+
+ /* Tray icon volume meter */
diff --git a/media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-memleak.patch b/media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-memleak.patch
new file mode 100644
index 000000000000..a88013b9d4b8
--- /dev/null
+++ b/media-sound/pnmixer/files/pnmixer-0.7.2-fix-possible-memleak.patch
@@ -0,0 +1,21 @@
+From 84c66c389cd7a8a47aa5f543726683a19dcca5ff Mon Sep 17 00:00:00 2001
+From: Julian Ospald <hasufell@posteo.de>
+Date: Mon, 19 Feb 2018 20:06:45 +0100
+Subject: [PATCH] MEM: fix possible memory leak wrt #174
+
+---
+ src/alsa.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/alsa.c b/src/alsa.c
+index c46d4d8..d91c79f 100644
+--- a/src/alsa.c
++++ b/src/alsa.c
+@@ -336,6 +336,7 @@ mixer_get_poll_descriptors(const char *hctl, snd_mixer_t *mixer)
+ err = snd_mixer_poll_descriptors(mixer, fds, count);
+ if (err < 0) {
+ ALSA_CARD_ERR(hctl, err, "Couldn't get poll descriptors");
++ g_free(fds);
+ return NULL;
+ }
+
diff --git a/media-sound/pnmixer/pnmixer-0.7.2-r1.ebuild b/media-sound/pnmixer/pnmixer-0.7.2-r1.ebuild
new file mode 100644
index 000000000000..4930d96eb601
--- /dev/null
+++ b/media-sound/pnmixer/pnmixer-0.7.2-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="${PN}-v${PV}"
+inherit cmake xdg-utils
+
+DESCRIPTION="Volume mixer for the system tray"
+HOMEPAGE="https://github.com/nicklan/pnmixer"
+SRC_URI="https://github.com/nicklan/${PN}/releases/download/v${PV}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc libnotify nls"
+
+RDEPEND="
+ dev-libs/glib:2
+ media-libs/alsa-lib
+ x11-libs/gtk+:3
+ x11-libs/libX11
+ libnotify? ( x11-libs/libnotify )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-assert-if-volume-gt-100.patch"
+ "${FILESDIR}/${P}-fix-possible-garbage-value.patch"
+ "${FILESDIR}/${P}-fix-possible-memleak.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DOCUMENTATION="$(usex doc)"
+ -DWITH_LIBNOTIFY="$(usex libnotify)"
+ -DENABLE_NLS="$(usex nls)"
+ -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
+ )
+ cmake_src_configure
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/media-sound/pnmixer/pnmixer-9999.ebuild b/media-sound/pnmixer/pnmixer-9999.ebuild
deleted file mode 100644
index 69801bb9225a..000000000000
--- a/media-sound/pnmixer/pnmixer-9999.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-WANT_LIBTOOL=none
-inherit cmake-utils gnome2-utils git-r3
-
-DESCRIPTION="Volume mixer for the system tray"
-HOMEPAGE="https://github.com/nicklan/pnmixer"
-EGIT_REPO_URI="git@github.com:nicklan/pnmixer.git
- https://github.com/nicklan/pnmixer.git"
-EGIT_BRANCH="master"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS=""
-IUSE="libnotify"
-
-RDEPEND="dev-libs/glib:2
- media-libs/alsa-lib
- >=x11-libs/gtk+-3.12:3
- x11-libs/libX11
- libnotify? ( x11-libs/libnotify )"
-DEPEND="${RDEPEND}
- sys-devel/gettext
- virtual/pkgconfig"
-
-src_configure() {
- local mycmakeargs=(
- -DWITH_LIBNOTIFY="$(usex libnotify)"
- )
-
- cmake-utils_src_configure
-}
-
-pkg_postinst() {
- gnome2_icon_cache_update
-}
-
-pkg_postrm() {
- gnome2_icon_cache_update
-}