Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/pamix/files/, media-sound/pamix/
Date: Sun, 28 Feb 2021 12:26:44
Message-Id: 1614515173.ed213b992db438a99f8384133b7e183c3b3e2b6a.asturm@gentoo
1 commit: ed213b992db438a99f8384133b7e183c3b3e2b6a
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 26 18:30:14 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 12:26:13 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed213b99
7
8 media-sound/pamix: Various upstream fixes and port 1.6 to EAPI-7
9
10 Disable running git in release version.
11
12 Package-Manager: Portage-3.0.15, Repoman-3.0.2
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/pamix-1.6-fix-ncurses-freezing.patch | 23 +++++++++++
16 .../files/pamix-1.6-fix-output-scrolling.patch | 23 +++++++++++
17 .../pamix/files/pamix-1.6-xdgconfigdir.patch | 45 ++++++++++++++++++++++
18 .../{pamix-9999.ebuild => pamix-1.6-r1.ebuild} | 39 +++++++++++++------
19 media-sound/pamix/pamix-9999.ebuild | 32 +++++++++------
20 5 files changed, 138 insertions(+), 24 deletions(-)
21
22 diff --git a/media-sound/pamix/files/pamix-1.6-fix-ncurses-freezing.patch b/media-sound/pamix/files/pamix-1.6-fix-ncurses-freezing.patch
23 new file mode 100644
24 index 00000000000..61c34f0a420
25 --- /dev/null
26 +++ b/media-sound/pamix/files/pamix-1.6-fix-ncurses-freezing.patch
27 @@ -0,0 +1,23 @@
28 +From 1e45f226ef35b649cb2889e23ad90ad39d0db947 Mon Sep 17 00:00:00 2001
29 +From: Joshua Jensch <jenschjoshua@×××××.com>
30 +Date: Sat, 14 Mar 2020 03:11:58 +0100
31 +Subject: [PATCH] Use 25ms as escdelay
32 +
33 +By default ncurses will use 1000ms, which will cause freezing.
34 +Fixes #44
35 +---
36 + src/pamix.cpp | 1 +
37 + 1 file changed, 1 insertion(+)
38 +
39 +diff --git a/src/pamix.cpp b/src/pamix.cpp
40 +index d5f7ead..368639d 100644
41 +--- a/src/pamix.cpp
42 ++++ b/src/pamix.cpp
43 +@@ -206,6 +206,7 @@ int main(int argc, char **argv) {
44 + initscr();
45 + init_colors();
46 + nodelay(stdscr, true);
47 ++ set_escdelay(25);
48 + curs_set(0);
49 + keypad(stdscr, true);
50 + meta(stdscr, true);
51
52 diff --git a/media-sound/pamix/files/pamix-1.6-fix-output-scrolling.patch b/media-sound/pamix/files/pamix-1.6-fix-output-scrolling.patch
53 new file mode 100644
54 index 00000000000..6e4b94d0566
55 --- /dev/null
56 +++ b/media-sound/pamix/files/pamix-1.6-fix-output-scrolling.patch
57 @@ -0,0 +1,23 @@
58 +From c15831c99bbef1a25710e5a34208809dc9160e86 Mon Sep 17 00:00:00 2001
59 +From: Joshua Jensch <jenschjoshua@×××××.com>
60 +Date: Sun, 1 Dec 2019 16:23:12 +0100
61 +Subject: [PATCH] fix bug preventing entries from being scrolled.
62 +
63 +resolves #41
64 +---
65 + src/pamix_ui.cpp | 2 +-
66 + 1 file changed, 1 insertion(+), 1 deletion(-)
67 +
68 +diff --git a/src/pamix_ui.cpp b/src/pamix_ui.cpp
69 +index 16a2e34..c1acb2b 100644
70 +--- a/src/pamix_ui.cpp
71 ++++ b/src/pamix_ui.cpp
72 +@@ -265,7 +265,7 @@ pamix_entry_iter_t pamix_ui::getSelectedEntryIterator() {
73 + }
74 +
75 + void pamix_ui::adjustDisplayedEntries() {
76 +- if (!m_Entries->empty())
77 ++ if (m_Entries->empty())
78 + return;
79 + if (m_SelectedEntry >= m_NumSkippedEntries && m_SelectedEntry < m_NumSkippedEntries + m_NumDrawnEntries)
80 + return;
81
82 diff --git a/media-sound/pamix/files/pamix-1.6-xdgconfigdir.patch b/media-sound/pamix/files/pamix-1.6-xdgconfigdir.patch
83 new file mode 100644
84 index 00000000000..7de00460316
85 --- /dev/null
86 +++ b/media-sound/pamix/files/pamix-1.6-xdgconfigdir.patch
87 @@ -0,0 +1,45 @@
88 +From 72d8189b942f6e95d8c946fea2faaee9a74f4b35 Mon Sep 17 00:00:00 2001
89 +From: nilninull <nilninull@×××××.com>
90 +Date: Wed, 3 Jan 2018 16:32:27 +0900
91 +Subject: [PATCH] FIX: default XDG_CONFIG_DIRS directory
92 +
93 +---
94 + CMakeLists.txt | 2 +-
95 + 1 file changed, 1 insertion(+), 1 deletion(-)
96 +
97 +diff --git a/CMakeLists.txt b/CMakeLists.txt
98 +index 38605f2..7677e43 100644
99 +--- a/CMakeLists.txt
100 ++++ b/CMakeLists.txt
101 +@@ -25,7 +25,7 @@ ELSE ()
102 + ENDIF ()
103 +
104 + add_executable(pamix ${pamix_SRC})
105 +-install(FILES pamix.conf DESTINATION /etc)
106 ++install(FILES pamix.conf DESTINATION /etc/xdg)
107 + install(TARGETS pamix DESTINATION bin)
108 + install(FILES man/pamix.1 DESTINATION share/man/man1)
109 +
110 +From e3bf53d9a841c3559880863c8c29c2919ab5b425 Mon Sep 17 00:00:00 2001
111 +From: Joshua Jensch <jenschjoshua@×××××.com>
112 +Date: Sat, 6 Jan 2018 07:05:23 +0100
113 +Subject: [PATCH] change default XDG_CONFIG_DIRS value when searching config
114 + file
115 +
116 +---
117 + src/pamix.cpp | 2 +-
118 + 1 file changed, 1 insertion(+), 1 deletion(-)
119 +
120 +diff --git a/src/pamix.cpp b/src/pamix.cpp
121 +index 3ea2730..d5f7ead 100644
122 +--- a/src/pamix.cpp
123 ++++ b/src/pamix.cpp
124 +@@ -130,7 +130,7 @@ void loadConfiguration() {
125 +
126 + char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS");
127 +
128 +- path = xdg_config_dirs ? xdg_config_dirs : "/etc";
129 ++ path = xdg_config_dirs ? xdg_config_dirs : "/etc/xdg";
130 + path += "/pamix.conf";
131 + size_t cpos = path.find(':');
132 + while (cpos != std::string::npos) {
133
134 diff --git a/media-sound/pamix/pamix-9999.ebuild b/media-sound/pamix/pamix-1.6-r1.ebuild
135 similarity index 52%
136 copy from media-sound/pamix/pamix-9999.ebuild
137 copy to media-sound/pamix/pamix-1.6-r1.ebuild
138 index 1e8fad34492..e3fa9ceb8f7 100644
139 --- a/media-sound/pamix/pamix-9999.ebuild
140 +++ b/media-sound/pamix/pamix-1.6-r1.ebuild
141 @@ -1,38 +1,53 @@
142 -# Copyright 1999-2019 Gentoo Authors
143 +# Copyright 1999-2021 Gentoo Authors
144 # Distributed under the terms of the GNU General Public License v2
145
146 EAPI=7
147
148 inherit cmake
149
150 -if [[ "${PV}" == 9999 ]] ; then
151 +if [[ ${PV} == *9999 ]] ; then
152 + EGIT_REPO_URI="https://github.com/patroclos/PAmix.git"
153 inherit git-r3
154 +else
155 + SRC_URI="https://github.com/patroclos/PAmix/archive/v${PV}.tar.gz -> ${P}.tar.gz"
156 + KEYWORDS="~amd64 ~x86"
157 + S="${WORKDIR}/PAmix-${PV}"
158 fi
159
160 DESCRIPTION="A PulseAudio NCurses mixer"
161 HOMEPAGE="https://github.com/patroclos/PAmix"
162 +
163 LICENSE="MIT"
164 SLOT="0"
165 IUSE="+unicode"
166
167 -if [[ ${PV} == 9999 ]] ; then
168 - EGIT_REPO_URI="https://github.com/patroclos/PAmix.git"
169 -else
170 - SRC_URI="https://github.com/patroclos/PAmix/archive/v${PV}.tar.gz -> ${P}.tar.gz"
171 - KEYWORDS="~amd64 ~x86"
172 - S="${WORKDIR}/PAmix-${PV}"
173 -fi
174 -
175 -RDEPEND="media-sound/pulseaudio
176 - sys-libs/ncurses:0=[unicode?]"
177 +RDEPEND="
178 + media-sound/pulseaudio
179 + sys-libs/ncurses:0=[unicode?]
180 +"
181 DEPEND="${RDEPEND}"
182 BDEPEND="
183 virtual/pkgconfig
184 "
185
186 +PATCHES=(
187 + "${FILESDIR}/${P}-ncurses_pkgconfig.patch"
188 + "${FILESDIR}/${P}-xdgconfigdir.patch"
189 + "${FILESDIR}/${P}-fix-output-scrolling.patch"
190 + "${FILESDIR}/${P}-fix-ncurses-freezing.patch"
191 +)
192 +
193 +src_prepare() {
194 + cmake_src_prepare
195 + if [[ ${PV} != 9999 ]] ; then
196 + sed -e "/^include(CMakeGitDefines.cmake)/d" -i CMakeLists.txt || die
197 + fi
198 +}
199 +
200 src_configure() {
201 local mycmakeargs=(
202 -DWITH_UNICODE="$(usex unicode)"
203 )
204 + [[ ${PV} != 9999 ]] && mycmakeargs+=( -DGIT_VERSION=${PV} )
205 cmake_src_configure
206 }
207
208 diff --git a/media-sound/pamix/pamix-9999.ebuild b/media-sound/pamix/pamix-9999.ebuild
209 index 1e8fad34492..aac3dbb67cf 100644
210 --- a/media-sound/pamix/pamix-9999.ebuild
211 +++ b/media-sound/pamix/pamix-9999.ebuild
212 @@ -1,38 +1,46 @@
213 -# Copyright 1999-2019 Gentoo Authors
214 +# Copyright 1999-2021 Gentoo Authors
215 # Distributed under the terms of the GNU General Public License v2
216
217 EAPI=7
218
219 inherit cmake
220
221 -if [[ "${PV}" == 9999 ]] ; then
222 +if [[ ${PV} == *9999 ]] ; then
223 + EGIT_REPO_URI="https://github.com/patroclos/PAmix.git"
224 inherit git-r3
225 +else
226 + SRC_URI="https://github.com/patroclos/PAmix/archive/v${PV}.tar.gz -> ${P}.tar.gz"
227 + KEYWORDS="~amd64 ~x86"
228 + S="${WORKDIR}/PAmix-${PV}"
229 fi
230
231 DESCRIPTION="A PulseAudio NCurses mixer"
232 HOMEPAGE="https://github.com/patroclos/PAmix"
233 +
234 LICENSE="MIT"
235 SLOT="0"
236 IUSE="+unicode"
237
238 -if [[ ${PV} == 9999 ]] ; then
239 - EGIT_REPO_URI="https://github.com/patroclos/PAmix.git"
240 -else
241 - SRC_URI="https://github.com/patroclos/PAmix/archive/v${PV}.tar.gz -> ${P}.tar.gz"
242 - KEYWORDS="~amd64 ~x86"
243 - S="${WORKDIR}/PAmix-${PV}"
244 -fi
245 -
246 -RDEPEND="media-sound/pulseaudio
247 - sys-libs/ncurses:0=[unicode?]"
248 +RDEPEND="
249 + media-sound/pulseaudio
250 + sys-libs/ncurses:0=[unicode?]
251 +"
252 DEPEND="${RDEPEND}"
253 BDEPEND="
254 virtual/pkgconfig
255 "
256
257 +src_prepare() {
258 + cmake_src_prepare
259 + if [[ ${PV} != 9999 ]] ; then
260 + sed -e "/^include(CMakeGitDefines.cmake)/d" -i CMakeLists.txt || die
261 + fi
262 +}
263 +
264 src_configure() {
265 local mycmakeargs=(
266 -DWITH_UNICODE="$(usex unicode)"
267 )
268 + [[ ${PV} != 9999 ]] && mycmakeargs+=( -DGIT_VERSION=${PV} )
269 cmake_src_configure
270 }