Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/csound/
Date: Wed, 30 Jun 2021 11:44:45
Message-Id: 1625053466.4f8a47bf1070d8cb44519237084bcca47affaa70.fordfrog@gentoo
1 commit: 4f8a47bf1070d8cb44519237084bcca47affaa70
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 30 11:44:26 2021 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 30 11:44:26 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f8a47bf
7
8 media-sound/csound: bump to 6.16.1
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 media-sound/csound/Manifest | 1 +
14 media-sound/csound/csound-6.16.1.ebuild | 262 ++++++++++++++++++++++++++++++++
15 2 files changed, 263 insertions(+)
16
17 diff --git a/media-sound/csound/Manifest b/media-sound/csound/Manifest
18 index 4503725bdf0..d8a94873890 100644
19 --- a/media-sound/csound/Manifest
20 +++ b/media-sound/csound/Manifest
21 @@ -4,3 +4,4 @@ DIST Csound6.16.0_manual_html.zip 24765630 BLAKE2B 3bf6e2202a42dfa826d39ef41282e
22 DIST Csound6.16.0_manual_pdf.zip 9640644 BLAKE2B 7bb35f806568a80abbd84a4f4988217bea09f3174881d802f6d61505f044c8a26b59036dcb61ead5315e756a4512eb1fb56b2824f27f09899a8fe1664a386754 SHA512 18347ce7080ca7997e98f8addffcc492c7ec5d8e037e71a33bb46fdbc5b58ec26ee42f370689fc228d4150bd9dedc31c7824ec4c19f3243d512977f4380f9490
23 DIST csound-6.15.0-distributable.tar.xz 25156784 BLAKE2B f944385256b423d95da2df8da7dc2bcf164ffc469f55650396827bc9da49ef1778039772e149bcbde77c71a363e8ea253ec3103c753cc3916d63d450f571c2a8 SHA512 a0a65805507ac7afd6bcb0fe988cb1bdba0a95a591ac6837a2c31cf3a7aeef56fee44eed7bca14409ccf600412782098a8c2ffb1aecb5eefd703bc270a0ee308
24 DIST csound-6.16.0-distributable.tar.xz 25129496 BLAKE2B cecfe82e9d584ac9e453659b617d54d2f899efd3e65243ba38770e5174baec6f12b0fa6c06c8ef2154f7c80faee8b9992bbe0957892a4ba86e142066aea85578 SHA512 243b23fc7cde3f0348953e88856117355b5b7185314045aad1b6dac236e227c558afd3fd8a73d9d760f3e5a30ee50d02cc7fe3d8b4b84fb63fa82c64972ca1ca
25 +DIST csound-6.16.1-distributable.tar.xz 25142436 BLAKE2B fe29208afe2cfc9740e68da213f269ca909facd452ffdd595e14a6dc14526bd497e8a2bc1832da28b0bbd6c8b9ac8891f79d819abf64cba0a9e1002c42f8e5dd SHA512 2535f16dab6a682e38b8352cb7bb87a65aedf0550c1705cde8a64b3c0112d7fd97e6c366dad18ef9ef5e1baaf7123f2c0032d9a2ab6979c202692c3a4069117e
26
27 diff --git a/media-sound/csound/csound-6.16.1.ebuild b/media-sound/csound/csound-6.16.1.ebuild
28 new file mode 100644
29 index 00000000000..b8549ffc9aa
30 --- /dev/null
31 +++ b/media-sound/csound/csound-6.16.1.ebuild
32 @@ -0,0 +1,262 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +# As upstream (and we aswell) are not allowed to redistribute scansyn,
37 +# we have to repackage the tarball. For that purpose use `bash files/repackage.sh version`
38 +# Reference: https://github.com/csound/csound/issues/1148
39 +
40 +EAPI=7
41 +
42 +LUA_COMPAT=( lua5-1 luajit )
43 +PYTHON_COMPAT=( python3_{7,8,9} )
44 +
45 +inherit cmake lua-single python-single-r1 toolchain-funcs
46 +
47 +if [[ ${PV} == "9999" ]]; then
48 + EGIT_REPO_URI="https://github.com/csound/csound.git"
49 + inherit git-r3
50 +else
51 + DOC_P="Csound$(ver_cut 1-2).0"
52 + SRC_URI="https://dev.gentoo.org/~fordfrog/distfiles/${P}-distributable.tar.xz
53 + doc? (
54 + https://github.com/csound/csound/releases/download/${PV}/${DOC_P}_manual_pdf.zip
55 + https://github.com/csound/csound/releases/download/${PV}/${DOC_P}_manual_html.zip
56 + )"
57 + KEYWORDS="~amd64 ~x86"
58 +fi
59 +
60 +DESCRIPTION="Sound design and signal processing system for composition and performance"
61 +HOMEPAGE="https://csound.github.io/"
62 +
63 +LICENSE="LGPL-2.1 doc? ( FDL-1.2+ )"
64 +SLOT="0"
65 +IUSE="+alsa beats chua curl +cxx debug doc double-precision dssi examples
66 +fltk +fluidsynth hdf5 jack java keyboard linear lua mp3 nls osc portaudio
67 +portaudio portmidi pulseaudio python samples static-libs stk test +threads +utils
68 +vim-syntax websocket"
69 +
70 +REQUIRED_USE="
71 + alsa? ( threads )
72 + java? ( cxx )
73 + linear? ( double-precision )
74 + lua? ( ${LUA_REQUIRED_USE} cxx )
75 + python? ( ${PYTHON_REQUIRED_USE} cxx )
76 +"
77 +
78 +BDEPEND="
79 + sys-devel/flex
80 + virtual/yacc
81 + chua? ( dev-libs/boost )
82 + lua? ( dev-lang/swig )
83 + python? ( dev-lang/swig )
84 + nls? ( sys-devel/gettext )
85 + test? (
86 + dev-util/cunit
87 + ${PYTHON_DEPS}
88 + )
89 +"
90 +# linear currently works only with sci-mathematics-gmm-5.1
91 +# https://github.com/csound/csound/issues/920
92 +CDEPEND="
93 + dev-cpp/eigen:3
94 + >=media-libs/libsndfile-1.0.16
95 + media-libs/libsamplerate
96 + sys-libs/zlib
97 + alsa? ( media-libs/alsa-lib )
98 + curl? ( net-misc/curl )
99 + dssi? (
100 + media-libs/dssi
101 + media-libs/ladspa-sdk
102 + )
103 + fluidsynth? ( media-sound/fluidsynth:= )
104 + fltk? ( x11-libs/fltk:1[threads?] )
105 + hdf5? ( sci-libs/hdf5 )
106 + jack? ( virtual/jack )
107 + java? ( >=virtual/jdk-1.8:* )
108 + keyboard? ( x11-libs/fltk:1[threads?] )
109 + linear? ( =sci-mathematics/gmm-5.1* )
110 + lua? ( ${LUA_DEPS} )
111 + mp3? ( >=media-sound/lame-3.100-r3 )
112 + osc? ( media-libs/liblo )
113 + portaudio? ( media-libs/portaudio )
114 + portmidi? ( media-libs/portmidi )
115 + pulseaudio? ( media-sound/pulseaudio )
116 + python? ( ${PYTHON_DEPS} )
117 + stk? ( media-libs/stk )
118 + utils? ( !media-sound/snd )
119 + websocket? ( net-libs/libwebsockets:= )
120 +"
121 +RDEPEND="${CDEPEND}"
122 +DEPEND="
123 + ${CDEPEND}
124 + dev-libs/boost
125 +"
126 +
127 +if [[ ${PV} != "9999" ]]; then
128 + DEPEND+="doc? ( app-arch/unzip )"
129 +fi
130 +
131 +# requires specific alsa settings
132 +RESTRICT="test"
133 +
134 +PATCHES=(
135 + "${FILESDIR}/${PN}-6.13.0-xdg-open.patch"
136 + "${FILESDIR}/${PN}-6.15.0-lame.patch"
137 +)
138 +
139 +pkg_setup() {
140 + use lua && lua-single_pkg_setup
141 +
142 + if use python || use test ; then
143 + python-single-r1_pkg_setup
144 + fi
145 +}
146 +
147 +src_prepare() {
148 + cmake_src_prepare
149 +
150 + sed -e '/set(PLUGIN_INSTALL_DIR/s/-${APIVERSION}//' \
151 + -e '/-O3/d' \
152 + -i CMakeLists.txt || die
153 +
154 + if use doc; then
155 + local png="${WORKDIR}/html/images/delayk.png"
156 + pngfix -q --out=${png/.png/fixed.png} ${png} # see pngfix help for exit codes
157 + [[ $? -gt 15 ]] && die "Failed to fix ${png}"
158 + mv -f ${png/.png/fixed.png} ${png} || die
159 + fi
160 +}
161 +
162 +src_configure() {
163 + local mycmakeargs=(
164 + -DBUILD_BELA=OFF
165 + -DBUILD_BUCHLA_OPCODES=ON
166 + -DBUILD_CHUA_OPCODES=$(usex chua)
167 + -DBUILD_COUNTER_OPCODES=ON
168 + -DBUILD_CSBEATS=$(usex beats)
169 + -DBUILD_CUDA_OPCODES=OFF
170 + -DBUILD_CXX_INTERFACE=$(usex cxx)
171 + -DBUILD_DSSI_OPCODES=$(usex dssi)
172 + -DBUILD_EMUGENS_OPCODES=ON
173 + -DBUILD_EXCITER_OPCODES=ON
174 + -DBUILD_FLUID_OPCODES=$(usex fluidsynth)
175 + -DBUILD_FRAMEBUFFER_OPCODES=ON
176 + -DBUILD_HDF5_OPCODES=$(usex hdf5)
177 + -DBUILD_INSTALLER=OFF
178 + -DBUILD_JACK_OPCODES=$(usex jack)
179 + -DBUILD_JAVA_INTERFACE=$(usex java)
180 + -DBUILD_LINEAR_ALGEBRA_OPCODES=$(usex linear)
181 + -DBUILD_LUA_INTERFACE=$(usex lua)
182 + -DBUILD_MP3OUT_OPCODE=$(usex mp3)
183 + -DBUILD_MULTI_CORE=$(usex threads)
184 + -DBUILD_OPENCL_OPCODES=OFF
185 + -DBUILD_OSC_OPCODES=$(usex osc)
186 + -DBUILD_P5GLOVE_OPCODES=OFF
187 + -DBUILD_PADSYNTH_OPCODES=ON
188 + -DBUILD_PLATEREV_OPCODES=ON
189 + -DBUILD_PVSGENDY_OPCODE=OFF
190 + -DBUILD_PYTHON_INTERFACE=$(usex python)
191 + -DBUILD_RELEASE=ON
192 + -DBUILD_SCANSYN_OPCODES=OFF # this is not allowed to be redistributed: https://github.com/csound/csound/issues/1148
193 + -DBUILD_SELECT_OPCODE=ON
194 + -DBUILD_SERIAL_OPCODES=ON
195 + -DBUILD_SHARED_LIBS=ON
196 + -DBUILD_STACK_OPCODES=ON
197 + -DBUILD_STATIC_LIBRARY=$(usex static-libs "ON" $(usex test))
198 + -DBUILD_STK_OPCODES=$(usex stk)
199 + -DBUILD_TESTS=$(usex test)
200 + -DBUILD_UTILITIES=$(usex utils)
201 + -DBUILD_VIRTUAL_KEYBOARD=$(usex keyboard)
202 + -DBUILD_VST4CS_OPCODES=OFF
203 + -DBUILD_WEBSOCKET_OPCODE=$(usex websocket)
204 + -DBUILD_WIIMOTE_OPCODES=OFF
205 + -DBUILD_WINSOUND=OFF
206 +
207 + -DFAIL_MISSING=ON
208 + -DNEW_PARSER_DEBUG=$(usex debug)
209 + -DREQUIRE_PTHREADS=$(usex threads)
210 +
211 + -DUSE_ALSA=$(usex alsa)
212 + -DUSE_ATOMIC_BUILTIN=ON
213 + -DUSE_AUDIOUNIT=OFF # Apple specific
214 + -DUSE_COMPILER_OPTIMIZATIONS=ON
215 + -DUSE_COREMIDI=OFF # Apple specific
216 + -DUSE_CURL=$(usex curl)
217 + -DUSE_DOUBLE=$(usex double-precision)
218 + -DUSE_FLTK=$(usex fltk)
219 + -DUSE_GETTEXT=$(usex nls)
220 + -DUSE_GIT_COMMIT=ON
221 + -DUSE_IPMIDI=ON
222 + -DUSE_JACK=$(usex jack)
223 + -DUSE_LIB64=$([[ $(get_libdir) == "lib64" ]] && echo "ON" || echo "OFF")
224 + -DUSE_LRINT=ON
225 + -DUSE_PORTAUDIO=$(usex portaudio)
226 + -DUSE_PORTMIDI=$(usex portmidi)
227 + -DUSE_PULSEAUDIO=$(usex pulseaudio)
228 +
229 + )
230 +
231 + use java && mycmakeargs+=(
232 + -DJAVA_HOME="$(java-config -g JAVA_HOME)"
233 + )
234 +
235 + use lua && mycmakeargs+=(
236 + -DLUA_H_PATH="$(lua_get_include_dir)"
237 + -DLUA_LIBRARY="$(lua_get_shared_lib)"
238 + # LUA_MODULE_INSTALL_DIR omitted on purpose, csound Lua module links against liblua
239 + # so it must NOT be installed into cmod_dir.
240 + )
241 +
242 + cmake_src_configure
243 +}
244 +
245 +src_install() {
246 + cmake_src_install
247 + dodoc -r Release_Notes/.
248 +
249 + # generate env.d file
250 + cat > "${T}"/62${PN} <<-_EOF_ || die
251 + OPCODEDIR$(usex double-precision 64 '')="${EPREFIX}/usr/$(get_libdir)/${PN}/plugins$(usex double-precision 64 '')"
252 + CSSTRNGS="${EPREFIX}/usr/share/locale"
253 + _EOF_
254 + if use stk ; then
255 + echo RAWWAVE_PATH=\"${EPREFIX}/usr/share/csound/rawwaves\" >> "${T}"/62${PN} || die
256 + fi
257 + doenvd "${T}"/62${PN}
258 +
259 + if use examples ; then
260 + dodoc -r examples
261 + docompress -x /usr/share/doc/${PF}/examples
262 + fi
263 +
264 + use samples && dodoc -r samples
265 +
266 + if use vim-syntax ; then
267 + insinto /usr/share/vim/vimfiles/syntax
268 + doins installer/misc/vim/csound_{csd,orc,sco}.vim
269 + insinto /usr/share/vim/vimfiles/plugin
270 + doins installer/misc/vim/csound.vim
271 + fi
272 +
273 + # rename extract to csound_extract (bug #247394)
274 + mv "${ED}"/usr/bin/{,csound_}extract || die
275 +
276 + use python && python_optimize
277 +
278 + use java && (dosym lib_jcsound6.so usr/lib64/lib_jcsound.so.1 || die "Failed to create java lib symlink")
279 +
280 + # install docs
281 + if [[ ${PV} != "9999" ]] && use doc ; then
282 + dodoc "${WORKDIR}"/*.pdf
283 + dodoc -r "${WORKDIR}"/html
284 + fi
285 +}
286 +
287 +pkg_postinst() {
288 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
289 + elog
290 + elog "The extract tool is now installed as csound_extract"
291 + elog "due to collisions with many other packages (bug #247394)."
292 + elog
293 + fi
294 +}