1 |
commit: ed3d458a0390ff32516bed6606d9ff7482b03959 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 13 23:17:54 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 13 23:17:54 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed3d458a |
7 |
|
8 |
media-sound/qsynth: 0.9.0 version bump, switch to cmake |
9 |
|
10 |
CMake does not rely on shaky guesswork of Qt binary names and locations. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/764944 |
13 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
media-sound/qsynth/Manifest | 1 + |
17 |
.../files/qsynth-0.9.0-cmake-no-git-version.patch | 37 ++++++++++++++++++++++ |
18 |
.../{qsynth-9999.ebuild => qsynth-0.9.0.ebuild} | 35 ++++++++++++-------- |
19 |
media-sound/qsynth/qsynth-9999.ebuild | 35 ++++++++++++-------- |
20 |
4 files changed, 80 insertions(+), 28 deletions(-) |
21 |
|
22 |
diff --git a/media-sound/qsynth/Manifest b/media-sound/qsynth/Manifest |
23 |
index aded7a7e5b5..b6fb37b4356 100644 |
24 |
--- a/media-sound/qsynth/Manifest |
25 |
+++ b/media-sound/qsynth/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST qsynth-0.6.3.tar.gz 382990 BLAKE2B 37565c86b077602cd681b92aaea20d4aa07db1c4cf51d391562b5226ddde70dad0a3f641f0fcf54f35c6bb1a9e487a779c22237b0c8087666b7a2c1dea8a511e SHA512 7320a355b5fbb347b04b46fdfe86c13ab18b264cff09f2ed133e2b065febac27e58bd709eea284b4d0f98034059647ad6e9b97638fdd75edb1524fd3cf9f07a2 |
28 |
+DIST qsynth-0.9.0.tar.gz 383118 BLAKE2B d9464a2f122d7281ff69171c431fff72d05886ec130d20aae8d8f122e1cefd1180b8bcdc157f324c5cdbc7e2c524c82a9cc7f481efc8b69912ce61912e73ed58 SHA512 5cc0e099cd05f3639ded81642bde80205c8921b65d22dcb32d40ac874107043edeb672e69d7e4734e0fd37a498be2e5b787f0b8c1707be45e39cfab616fd522c |
29 |
|
30 |
diff --git a/media-sound/qsynth/files/qsynth-0.9.0-cmake-no-git-version.patch b/media-sound/qsynth/files/qsynth-0.9.0-cmake-no-git-version.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..11091ba1166 |
33 |
--- /dev/null |
34 |
+++ b/media-sound/qsynth/files/qsynth-0.9.0-cmake-no-git-version.patch |
35 |
@@ -0,0 +1,37 @@ |
36 |
+From 7ddf562dfc92174f47e3da95a1e18e5b1af83bfc Mon Sep 17 00:00:00 2001 |
37 |
+From: Christoph Karl <pampelmuse@×××.at> |
38 |
+Date: Dec 31 2020 15:42:42 +0000 |
39 |
+Subject: Fix version number in about dialog |
40 |
+ |
41 |
+ |
42 |
+--- |
43 |
+ |
44 |
+diff -rupN a/CMakeLists.txt b/CMakeLists.txt |
45 |
+--- a/CMakeLists.txt 2020-12-31 16:31:19.395906813 +0100 |
46 |
++++ b/CMakeLists.txt 2020-12-31 16:37:42.293523588 +0100 |
47 |
+@@ -5,25 +5,6 @@ cmake_minimum_required(VERSION 3.1) |
48 |
+ set (VERSION "0.9.0") |
49 |
+ |
50 |
+ set (CONFIG_VERSION ${VERSION}) |
51 |
+-execute_process ( |
52 |
+- COMMAND git describe --tags --dirty --abbrev=6 |
53 |
+- OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT |
54 |
+- RESULT_VARIABLE GIT_DESCRIBE_RESULT |
55 |
+- OUTPUT_STRIP_TRAILING_WHITESPACE) |
56 |
+-if (GIT_DESCRIBE_RESULT EQUAL 0) |
57 |
+- set (VERSION "${GIT_DESCRIBE_OUTPUT}") |
58 |
+- string (REGEX REPLACE "^[^0-9]+" "" VERSION "${VERSION}") |
59 |
+- string (REGEX REPLACE "-g" "git." VERSION "${VERSION}") |
60 |
+- string (REGEX REPLACE "[_|-]+" "." VERSION "${VERSION}") |
61 |
+- execute_process ( |
62 |
+- COMMAND git rev-parse --abbrev-ref HEAD |
63 |
+- OUTPUT_VARIABLE GIT_REVPARSE_OUTPUT |
64 |
+- RESULT_VARIABLE GIT_REVPARSE_RESULT |
65 |
+- OUTPUT_STRIP_TRAILING_WHITESPACE) |
66 |
+- if (GIT_REVPARSE_RESULT EQUAL 0 AND NOT GIT_REVPARSE_OUTPUT STREQUAL "master") |
67 |
+- set (VERSION "${VERSION} [${GIT_REVPARSE_OUTPUT}]") |
68 |
+- endif () |
69 |
+-endif () |
70 |
+ |
71 |
+ set (PACKAGE_NAME "Qsynth") |
72 |
+ set (PACKAGE_VERSION "${VERSION}") |
73 |
|
74 |
diff --git a/media-sound/qsynth/qsynth-9999.ebuild b/media-sound/qsynth/qsynth-0.9.0.ebuild |
75 |
similarity index 65% |
76 |
copy from media-sound/qsynth/qsynth-9999.ebuild |
77 |
copy to media-sound/qsynth/qsynth-0.9.0.ebuild |
78 |
index 7866d934551..70d95bac46a 100644 |
79 |
--- a/media-sound/qsynth/qsynth-9999.ebuild |
80 |
+++ b/media-sound/qsynth/qsynth-0.9.0.ebuild |
81 |
@@ -1,18 +1,26 @@ |
82 |
-# Copyright 1999-2020 Gentoo Authors |
83 |
+# Copyright 1999-2021 Gentoo Authors |
84 |
# Distributed under the terms of the GNU General Public License v2 |
85 |
|
86 |
EAPI=7 |
87 |
|
88 |
-inherit desktop qmake-utils xdg-utils git-r3 autotools |
89 |
+inherit cmake desktop qmake-utils xdg-utils |
90 |
|
91 |
DESCRIPTION="Qt application to control FluidSynth" |
92 |
HOMEPAGE="https://qsynth.sourceforge.io/" |
93 |
-EGIT_REPO_URI="https://git.code.sf.net/p/qsynth/code" |
94 |
+ |
95 |
+if [[ ${PV} == *9999* ]]; then |
96 |
+ EGIT_REPO_URI="https://git.code.sf.net/p/qsynth/code" |
97 |
+ inherit git-r3 |
98 |
+else |
99 |
+ SRC_URI="mirror://sourceforge/qsynth/${P}.tar.gz" |
100 |
+ KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
101 |
+fi |
102 |
|
103 |
LICENSE="GPL-2" |
104 |
SLOT="0" |
105 |
IUSE="+alsa debug jack pulseaudio" |
106 |
-KEYWORDS="" |
107 |
+ |
108 |
+REQUIRED_USE="|| ( alsa jack pulseaudio )" |
109 |
|
110 |
BDEPEND=" |
111 |
dev-qt/linguist-tools:5 |
112 |
@@ -26,24 +34,23 @@ DEPEND=" |
113 |
" |
114 |
RDEPEND="${DEPEND}" |
115 |
|
116 |
-REQUIRED_USE="|| ( alsa jack pulseaudio )" |
117 |
+PATCHES=( "${FILESDIR}/${P}-cmake-no-git-version.patch" ) |
118 |
|
119 |
src_prepare() { |
120 |
- default |
121 |
- eautoreconf |
122 |
+ cmake_src_prepare |
123 |
+ |
124 |
+ sed -e "/^find_package.*QT/s/Qt6 //" -i CMakeLists.txt || die |
125 |
} |
126 |
|
127 |
src_configure() { |
128 |
- sed -e "/@gzip.*mandir)\/man1/d" -i Makefile.in || die |
129 |
- econf \ |
130 |
- $(use_enable debug) |
131 |
- |
132 |
- eqmake5 ${PN}.pro -o ${PN}.mak |
133 |
+ local mycmakeargs=( |
134 |
+ -DCONFIG_DEBUG=$(usex debug 1 0) |
135 |
+ ) |
136 |
+ cmake_src_configure |
137 |
} |
138 |
|
139 |
src_install() { |
140 |
- emake DESTDIR="${D}" INSTALL_ROOT="${D}" install |
141 |
- einstalldocs |
142 |
+ cmake_src_install |
143 |
|
144 |
# The desktop file is invalid, and we also change the command |
145 |
# depending on useflags |
146 |
|
147 |
diff --git a/media-sound/qsynth/qsynth-9999.ebuild b/media-sound/qsynth/qsynth-9999.ebuild |
148 |
index 7866d934551..70d95bac46a 100644 |
149 |
--- a/media-sound/qsynth/qsynth-9999.ebuild |
150 |
+++ b/media-sound/qsynth/qsynth-9999.ebuild |
151 |
@@ -1,18 +1,26 @@ |
152 |
-# Copyright 1999-2020 Gentoo Authors |
153 |
+# Copyright 1999-2021 Gentoo Authors |
154 |
# Distributed under the terms of the GNU General Public License v2 |
155 |
|
156 |
EAPI=7 |
157 |
|
158 |
-inherit desktop qmake-utils xdg-utils git-r3 autotools |
159 |
+inherit cmake desktop qmake-utils xdg-utils |
160 |
|
161 |
DESCRIPTION="Qt application to control FluidSynth" |
162 |
HOMEPAGE="https://qsynth.sourceforge.io/" |
163 |
-EGIT_REPO_URI="https://git.code.sf.net/p/qsynth/code" |
164 |
+ |
165 |
+if [[ ${PV} == *9999* ]]; then |
166 |
+ EGIT_REPO_URI="https://git.code.sf.net/p/qsynth/code" |
167 |
+ inherit git-r3 |
168 |
+else |
169 |
+ SRC_URI="mirror://sourceforge/qsynth/${P}.tar.gz" |
170 |
+ KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
171 |
+fi |
172 |
|
173 |
LICENSE="GPL-2" |
174 |
SLOT="0" |
175 |
IUSE="+alsa debug jack pulseaudio" |
176 |
-KEYWORDS="" |
177 |
+ |
178 |
+REQUIRED_USE="|| ( alsa jack pulseaudio )" |
179 |
|
180 |
BDEPEND=" |
181 |
dev-qt/linguist-tools:5 |
182 |
@@ -26,24 +34,23 @@ DEPEND=" |
183 |
" |
184 |
RDEPEND="${DEPEND}" |
185 |
|
186 |
-REQUIRED_USE="|| ( alsa jack pulseaudio )" |
187 |
+PATCHES=( "${FILESDIR}/${P}-cmake-no-git-version.patch" ) |
188 |
|
189 |
src_prepare() { |
190 |
- default |
191 |
- eautoreconf |
192 |
+ cmake_src_prepare |
193 |
+ |
194 |
+ sed -e "/^find_package.*QT/s/Qt6 //" -i CMakeLists.txt || die |
195 |
} |
196 |
|
197 |
src_configure() { |
198 |
- sed -e "/@gzip.*mandir)\/man1/d" -i Makefile.in || die |
199 |
- econf \ |
200 |
- $(use_enable debug) |
201 |
- |
202 |
- eqmake5 ${PN}.pro -o ${PN}.mak |
203 |
+ local mycmakeargs=( |
204 |
+ -DCONFIG_DEBUG=$(usex debug 1 0) |
205 |
+ ) |
206 |
+ cmake_src_configure |
207 |
} |
208 |
|
209 |
src_install() { |
210 |
- emake DESTDIR="${D}" INSTALL_ROOT="${D}" install |
211 |
- einstalldocs |
212 |
+ cmake_src_install |
213 |
|
214 |
# The desktop file is invalid, and we also change the command |
215 |
# depending on useflags |