1 |
commit: aea24fb5e01177cfaf782c0977bbd723a4d00f81 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 3 19:59:30 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 3 20:52:00 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aea24fb5 |
7 |
|
8 |
media-sound/csound: [QA] Various fixes |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
media-sound/csound/csound-6.08.0.ebuild | 60 ++++++++++++++++++--------------- |
13 |
media-sound/csound/csound-9999.ebuild | 50 +++++++++++++-------------- |
14 |
2 files changed, 57 insertions(+), 53 deletions(-) |
15 |
|
16 |
diff --git a/media-sound/csound/csound-6.08.0.ebuild b/media-sound/csound/csound-6.08.0.ebuild |
17 |
index 8cc84ab08b7..02b97f9a43e 100644 |
18 |
--- a/media-sound/csound/csound-6.08.0.ebuild |
19 |
+++ b/media-sound/csound/csound-6.08.0.ebuild |
20 |
@@ -2,16 +2,24 @@ |
21 |
# Distributed under the terms of the GNU General Public License v2 |
22 |
|
23 |
EAPI=6 |
24 |
+ |
25 |
PYTHON_COMPAT=( python2_7 ) |
26 |
-inherit eutils multilib java-pkg-opt-2 cmake-utils toolchain-funcs versionator python-single-r1 |
27 |
|
28 |
-DESCRIPTION="A sound design and signal processing system providing facilities for composition and performance" |
29 |
+inherit eutils java-pkg-opt-2 toolchain-funcs versionator python-single-r1 cmake-utils |
30 |
+ |
31 |
+if [[ ${PV} == *9999 ]]; then |
32 |
+ EGIT_REPO_URI="https://github.com/csound/csound.git" |
33 |
+ inherit git-r3 |
34 |
+else |
35 |
+ SRC_URI="https://github.com/csound/csound/archive/${PV}.tar.gz -> ${P}.tar.gz" |
36 |
+ KEYWORDS="~amd64 ~x86" |
37 |
+fi |
38 |
+ |
39 |
+DESCRIPTION="A sound design and signal processing system for composition and performance" |
40 |
HOMEPAGE="http://csound.github.io/" |
41 |
-SRC_URI="https://github.com/csound/csound/archive/${PV}.tar.gz -> ${P}.tar.gz" |
42 |
|
43 |
LICENSE="LGPL-2.1" |
44 |
SLOT="0" |
45 |
-KEYWORDS="~amd64 ~x86" |
46 |
IUSE="+alsa beats chua csoundac curl +cxx debug double-precision dssi examples |
47 |
fltk +fluidsynth +image jack java keyboard linear lua luajit nls osc openmp |
48 |
portaudio portmidi pulseaudio python samples score static-libs stk tcl test |
49 |
@@ -46,7 +54,7 @@ RDEPEND=" |
50 |
fltk? ( x11-libs/fltk:1[threads?] ) |
51 |
image? ( media-libs/libpng:0= ) |
52 |
jack? ( media-sound/jack-audio-connection-kit ) |
53 |
- java? ( virtual/jdk ) |
54 |
+ java? ( virtual/jdk:* ) |
55 |
keyboard? ( x11-libs/fltk:1[threads?] ) |
56 |
linear? ( sci-mathematics/gmm ) |
57 |
lua? ( |
58 |
@@ -81,6 +89,8 @@ DEPEND="${RDEPEND} |
59 |
# requires specific alsa settings |
60 |
RESTRICT="test" |
61 |
|
62 |
+PATCHES=( "${FILESDIR}"/csound-6.05-python.patch ) |
63 |
+ |
64 |
pkg_pretend() { |
65 |
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
66 |
} |
67 |
@@ -94,28 +104,21 @@ pkg_setup() { |
68 |
} |
69 |
|
70 |
src_prepare() { |
71 |
- local PATCHES=( "${FILESDIR}"/csound-6.05-python.patch ) |
72 |
+ cmake-utils_src_prepare |
73 |
|
74 |
sed -e '/set(PLUGIN_INSTALL_DIR/s/-${APIVERSION}//' \ |
75 |
-e '/-O3/d' \ |
76 |
-i CMakeLists.txt || die |
77 |
|
78 |
+ local lang |
79 |
for lang in ${LANGS} ; do |
80 |
if ! use linguas_${lang} ; then |
81 |
sed -i "/compile_po(${lang}/d" po/CMakeLists.txt || die |
82 |
fi |
83 |
done |
84 |
- |
85 |
- default |
86 |
} |
87 |
|
88 |
src_configure() { |
89 |
- local myconf=() |
90 |
- |
91 |
- use python && myconf+=( "-DPYTHON_MODULE_INSTALL_DIR=$(python_get_sitedir)" ) |
92 |
- |
93 |
- [[ $(get_libdir) == "lib64" ]] && myconf+=( -DUSE_LIB64=ON ) |
94 |
- |
95 |
local mycmakeargs=( |
96 |
-DUSE_ALSA=$(usex alsa) |
97 |
-DBUILD_CSBEATS=$(usex beats) |
98 |
@@ -157,28 +160,31 @@ src_configure() { |
99 |
-DBUILD_WEBSOCKET_OPCODE=$(usex websocket) |
100 |
-DNEED_PORTTIME=OFF |
101 |
-DBUILD_RELEASE=ON |
102 |
- "${myconf[@]}" |
103 |
) |
104 |
|
105 |
- cmake-utils_src_configure |
106 |
-} |
107 |
+ use python && mycmakeargs+=( |
108 |
+ -DPYTHON_MODULE_INSTALL_DIR="$(python_get_sitedir)" |
109 |
+ ) |
110 |
|
111 |
-src_test() { |
112 |
- cmake-utils_src_test |
113 |
+ [[ $(get_libdir) == "lib64" ]] && mycmakeargs+=( |
114 |
+ -DUSE_LIB64=ON |
115 |
+ ) |
116 |
+ |
117 |
+ cmake-utils_src_configure |
118 |
} |
119 |
|
120 |
src_install() { |
121 |
cmake-utils_src_install |
122 |
- dodoc AUTHORS ChangeLog README.md Release_Notes/* |
123 |
+ dodoc -r Release_Notes/. |
124 |
|
125 |
# Generate env.d file |
126 |
- if use double-precision ; then |
127 |
- echo OPCODEDIR64=/usr/$(get_libdir)/${PN}/plugins64 > "${T}"/62${PN} |
128 |
- else |
129 |
- echo OPCODEDIR=/usr/$(get_libdir)/${PN}/plugins > "${T}"/62${PN} |
130 |
+ cat > "${T}"/62${PN} <<-_EOF_ || die |
131 |
+ OPCODEDIR$(usex double-precision 64 '')="${EPREFIX}/usr/$(get_libdir)/${PN}/plugins$(usex double-precision 64 '')" |
132 |
+ CSSTRNGS="${EPREFIX}/usr/share/locale" |
133 |
+ _EOF_ |
134 |
+ if use stk ; then |
135 |
+ echo RAWWAVE_PATH=\"${EPREFIX}/usr/share/csound/rawwaves\" >> "${T}"/62${PN} || die |
136 |
fi |
137 |
- echo "CSSTRNGS=/usr/share/locale" >> "${T}"/62${PN} |
138 |
- use stk && echo "RAWWAVE_PATH=/usr/share/csound/rawwaves" >> "${T}"/62${PN} |
139 |
doenvd "${T}"/62${PN} |
140 |
|
141 |
if use examples ; then |
142 |
@@ -196,7 +202,7 @@ src_install() { |
143 |
fi |
144 |
|
145 |
# rename extract to csound_extract (bug #247394) |
146 |
- mv "${ED}"/usr/bin/{extract,csound_extract} || die |
147 |
+ mv "${ED%/}"/usr/bin/{,csound_}extract || die |
148 |
|
149 |
use python && python_optimize |
150 |
} |
151 |
|
152 |
diff --git a/media-sound/csound/csound-9999.ebuild b/media-sound/csound/csound-9999.ebuild |
153 |
index b67f5ec5779..93c01700dd0 100644 |
154 |
--- a/media-sound/csound/csound-9999.ebuild |
155 |
+++ b/media-sound/csound/csound-9999.ebuild |
156 |
@@ -2,10 +2,12 @@ |
157 |
# Distributed under the terms of the GNU General Public License v2 |
158 |
|
159 |
EAPI=6 |
160 |
+ |
161 |
PYTHON_COMPAT=( python2_7 ) |
162 |
-inherit eutils multilib java-pkg-opt-2 cmake-utils toolchain-funcs versionator python-single-r1 |
163 |
|
164 |
-if [[ ${PV} == "9999" ]] ; then |
165 |
+inherit eutils java-pkg-opt-2 toolchain-funcs versionator python-single-r1 cmake-utils |
166 |
+ |
167 |
+if [[ ${PV} == *9999 ]]; then |
168 |
EGIT_REPO_URI="https://github.com/csound/csound.git" |
169 |
inherit git-r3 |
170 |
else |
171 |
@@ -13,7 +15,7 @@ else |
172 |
KEYWORDS="~amd64 ~x86" |
173 |
fi |
174 |
|
175 |
-DESCRIPTION="A sound design and signal processing system providing facilities for composition and performance" |
176 |
+DESCRIPTION="A sound design and signal processing system for composition and performance" |
177 |
HOMEPAGE="http://csound.github.io/" |
178 |
|
179 |
LICENSE="LGPL-2.1" |
180 |
@@ -52,7 +54,7 @@ RDEPEND=" |
181 |
fltk? ( x11-libs/fltk:1[threads?] ) |
182 |
image? ( media-libs/libpng:0= ) |
183 |
jack? ( media-sound/jack-audio-connection-kit ) |
184 |
- java? ( virtual/jdk ) |
185 |
+ java? ( virtual/jdk:* ) |
186 |
keyboard? ( x11-libs/fltk:1[threads?] ) |
187 |
linear? ( sci-mathematics/gmm ) |
188 |
lua? ( |
189 |
@@ -100,28 +102,21 @@ pkg_setup() { |
190 |
} |
191 |
|
192 |
src_prepare() { |
193 |
- local PATCHES=( "${FILESDIR}"/csound-6.05-python.patch ) |
194 |
+ cmake-utils_src_prepare |
195 |
|
196 |
sed -e '/set(PLUGIN_INSTALL_DIR/s/-${APIVERSION}//' \ |
197 |
-e '/-O3/d' \ |
198 |
-i CMakeLists.txt || die |
199 |
|
200 |
+ local lang |
201 |
for lang in ${LANGS} ; do |
202 |
if ! use linguas_${lang} ; then |
203 |
sed -i "/compile_po(${lang}/d" po/CMakeLists.txt || die |
204 |
fi |
205 |
done |
206 |
- |
207 |
- default |
208 |
} |
209 |
|
210 |
src_configure() { |
211 |
- local myconf=() |
212 |
- |
213 |
- use python && myconf+=( "-DPYTHON_MODULE_INSTALL_DIR=$(python_get_sitedir)" ) |
214 |
- |
215 |
- [[ $(get_libdir) == "lib64" ]] && myconf+=( -DUSE_LIB64=ON ) |
216 |
- |
217 |
local mycmakeargs=( |
218 |
-DUSE_ALSA=$(usex alsa) |
219 |
-DBUILD_CSBEATS=$(usex beats) |
220 |
@@ -163,28 +158,31 @@ src_configure() { |
221 |
-DBUILD_WEBSOCKET_OPCODE=$(usex websocket) |
222 |
-DNEED_PORTTIME=OFF |
223 |
-DBUILD_RELEASE=ON |
224 |
- "${myconf[@]}" |
225 |
) |
226 |
|
227 |
- cmake-utils_src_configure |
228 |
-} |
229 |
+ use python && mycmakeargs+=( |
230 |
+ -DPYTHON_MODULE_INSTALL_DIR="$(python_get_sitedir)" |
231 |
+ ) |
232 |
|
233 |
-src_test() { |
234 |
- cmake-utils_src_test |
235 |
+ [[ $(get_libdir) == "lib64" ]] && mycmakeargs+=( |
236 |
+ -DUSE_LIB64=ON |
237 |
+ ) |
238 |
+ |
239 |
+ cmake-utils_src_configure |
240 |
} |
241 |
|
242 |
src_install() { |
243 |
cmake-utils_src_install |
244 |
- dodoc AUTHORS ChangeLog README.md Release_Notes/* |
245 |
+ dodoc -r Release_Notes/. |
246 |
|
247 |
# Generate env.d file |
248 |
- if use double-precision ; then |
249 |
- echo OPCODEDIR64=/usr/$(get_libdir)/${PN}/plugins64 > "${T}"/62${PN} |
250 |
- else |
251 |
- echo OPCODEDIR=/usr/$(get_libdir)/${PN}/plugins > "${T}"/62${PN} |
252 |
+ cat > "${T}"/62${PN} <<-_EOF_ || die |
253 |
+ OPCODEDIR$(usex double-precision 64 '')="${EPREFIX}/usr/$(get_libdir)/${PN}/plugins$(usex double-precision 64 '')" |
254 |
+ CSSTRNGS="${EPREFIX}/usr/share/locale" |
255 |
+ _EOF_ |
256 |
+ if use stk ; then |
257 |
+ echo RAWWAVE_PATH=\"${EPREFIX}/usr/share/csound/rawwaves\" >> "${T}"/62${PN} || die |
258 |
fi |
259 |
- echo "CSSTRNGS=/usr/share/locale" >> "${T}"/62${PN} |
260 |
- use stk && echo "RAWWAVE_PATH=/usr/share/csound/rawwaves" >> "${T}"/62${PN} |
261 |
doenvd "${T}"/62${PN} |
262 |
|
263 |
if use examples ; then |
264 |
@@ -202,7 +200,7 @@ src_install() { |
265 |
fi |
266 |
|
267 |
# rename extract to csound_extract (bug #247394) |
268 |
- mv "${ED}"/usr/bin/{extract,csound_extract} || die |
269 |
+ mv "${ED%/}"/usr/bin/{,csound_}extract || die |
270 |
|
271 |
use python && python_optimize |
272 |
} |