1 |
commit: 3cc380b02a1d945c459bc7b8e619643728a15f59 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 22 17:29:15 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 22 17:32:21 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cc380b0 |
7 |
|
8 |
media-sound/csound: migrate to lua-single.eclass |
9 |
|
10 |
Compatibility + implementation selections as per the unmigrated ebuilds. |
11 |
Single-impl because the compiled Lua module this package installs links |
12 |
against liblua. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/752762 |
15 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
16 |
|
17 |
...sound-9999.ebuild => csound-6.15.0-r100.ebuild} | 40 ++++++++-------------- |
18 |
media-sound/csound/csound-9999.ebuild | 40 ++++++++-------------- |
19 |
profiles/package.mask | 1 + |
20 |
3 files changed, 31 insertions(+), 50 deletions(-) |
21 |
|
22 |
diff --git a/media-sound/csound/csound-9999.ebuild b/media-sound/csound/csound-6.15.0-r100.ebuild |
23 |
similarity index 91% |
24 |
copy from media-sound/csound/csound-9999.ebuild |
25 |
copy to media-sound/csound/csound-6.15.0-r100.ebuild |
26 |
index b52669444ab..93b965bc730 100644 |
27 |
--- a/media-sound/csound/csound-9999.ebuild |
28 |
+++ b/media-sound/csound/csound-6.15.0-r100.ebuild |
29 |
@@ -7,8 +7,10 @@ |
30 |
|
31 |
EAPI=7 |
32 |
|
33 |
+LUA_COMPAT=( lua5-1 luajit ) |
34 |
PYTHON_COMPAT=( python3_{6,7,8,9} ) |
35 |
-inherit cmake python-single-r1 toolchain-funcs |
36 |
+ |
37 |
+inherit cmake lua-single python-single-r1 toolchain-funcs |
38 |
|
39 |
if [[ ${PV} == "9999" ]]; then |
40 |
EGIT_REPO_URI="https://github.com/csound/csound.git" |
41 |
@@ -30,13 +32,13 @@ LICENSE="LGPL-2.1 doc? ( FDL-1.2+ )" |
42 |
SLOT="0" |
43 |
# java doesn't work atm as it needs to have some variables specified to work, see src_configure |
44 |
IUSE="+alsa beats chua curl +cxx debug doc double-precision dssi examples |
45 |
-fltk +fluidsynth hdf5 +image jack keyboard linear lua luajit mp3 nls osc portaudio |
46 |
+fltk +fluidsynth hdf5 +image jack keyboard linear lua mp3 nls osc portaudio |
47 |
portaudio portmidi pulseaudio python samples static-libs stk test +threads +utils |
48 |
vim-syntax websocket" |
49 |
|
50 |
REQUIRED_USE=" |
51 |
linear? ( double-precision ) |
52 |
- lua? ( cxx ) |
53 |
+ lua? ( ${LUA_REQUIRED_USE} cxx ) |
54 |
python? ( ${PYTHON_REQUIRED_USE} cxx ) |
55 |
" |
56 |
# java? ( cxx ) |
57 |
@@ -45,6 +47,7 @@ BDEPEND=" |
58 |
sys-devel/flex |
59 |
virtual/yacc |
60 |
chua? ( dev-libs/boost ) |
61 |
+ lua? ( dev-lang/swig ) |
62 |
python? ( dev-lang/swig ) |
63 |
nls? ( sys-devel/gettext ) |
64 |
test? ( |
65 |
@@ -74,10 +77,7 @@ CDEPEND=" |
66 |
jack? ( virtual/jack ) |
67 |
keyboard? ( x11-libs/fltk:1[threads?] ) |
68 |
linear? ( =sci-mathematics/gmm-5.1* ) |
69 |
- lua? ( |
70 |
- luajit? ( dev-lang/luajit:2 ) |
71 |
- !luajit? ( dev-lang/lua:0 ) |
72 |
- ) |
73 |
+ lua? ( ${LUA_DEPS} ) |
74 |
mp3? ( >=media-sound/lame-3.100-r3 ) |
75 |
osc? ( media-libs/liblo ) |
76 |
portaudio? ( media-libs/portaudio ) |
77 |
@@ -107,6 +107,8 @@ PATCHES=( |
78 |
) |
79 |
|
80 |
pkg_setup() { |
81 |
+ use lua && lua-single_pkg_setup |
82 |
+ |
83 |
if use python || use test ; then |
84 |
python-single-r1_pkg_setup |
85 |
fi |
86 |
@@ -200,24 +202,12 @@ src_configure() { |
87 |
#-DJAVA_AWT_INCLUDE_PATH="?" |
88 |
#) |
89 |
|
90 |
- # set the library that we want to use |
91 |
- if use lua ; then |
92 |
- local libdir |
93 |
- local libname |
94 |
- |
95 |
- if use luajit ; then |
96 |
- libdir=$(pkg-config --variable=libdir luajit) |
97 |
- libname=$(pkg-config --variable=libname luajit) |
98 |
- else |
99 |
- libdir=$(pkg-config --variable=libdir lua) |
100 |
- libname=$(pkg-config --variable=libname lua) |
101 |
- [[ -z "${libname}" ]] && libname="lua" |
102 |
- fi |
103 |
- |
104 |
- mycmakeargs+=( |
105 |
- -DLUA_LIBRARY="${libdir}/lib${libname}.so" |
106 |
- ) |
107 |
- fi |
108 |
+ use lua && mycmakeargs+=( |
109 |
+ -DLUA_H_PATH="$(lua_get_include_dir)" |
110 |
+ -DLUA_LIBRARY="$(lua_get_shared_lib)" |
111 |
+ # LUA_MODULE_INSTALL_DIR omitted on purpose, csound Lua module links against liblua |
112 |
+ # so it must NOT be installed into cmod_dir. |
113 |
+ ) |
114 |
|
115 |
use python && mycmakeargs+=( |
116 |
-DPYTHON_MODULE_INSTALL_DIR="$(python_get_sitedir)" |
117 |
|
118 |
diff --git a/media-sound/csound/csound-9999.ebuild b/media-sound/csound/csound-9999.ebuild |
119 |
index b52669444ab..93b965bc730 100644 |
120 |
--- a/media-sound/csound/csound-9999.ebuild |
121 |
+++ b/media-sound/csound/csound-9999.ebuild |
122 |
@@ -7,8 +7,10 @@ |
123 |
|
124 |
EAPI=7 |
125 |
|
126 |
+LUA_COMPAT=( lua5-1 luajit ) |
127 |
PYTHON_COMPAT=( python3_{6,7,8,9} ) |
128 |
-inherit cmake python-single-r1 toolchain-funcs |
129 |
+ |
130 |
+inherit cmake lua-single python-single-r1 toolchain-funcs |
131 |
|
132 |
if [[ ${PV} == "9999" ]]; then |
133 |
EGIT_REPO_URI="https://github.com/csound/csound.git" |
134 |
@@ -30,13 +32,13 @@ LICENSE="LGPL-2.1 doc? ( FDL-1.2+ )" |
135 |
SLOT="0" |
136 |
# java doesn't work atm as it needs to have some variables specified to work, see src_configure |
137 |
IUSE="+alsa beats chua curl +cxx debug doc double-precision dssi examples |
138 |
-fltk +fluidsynth hdf5 +image jack keyboard linear lua luajit mp3 nls osc portaudio |
139 |
+fltk +fluidsynth hdf5 +image jack keyboard linear lua mp3 nls osc portaudio |
140 |
portaudio portmidi pulseaudio python samples static-libs stk test +threads +utils |
141 |
vim-syntax websocket" |
142 |
|
143 |
REQUIRED_USE=" |
144 |
linear? ( double-precision ) |
145 |
- lua? ( cxx ) |
146 |
+ lua? ( ${LUA_REQUIRED_USE} cxx ) |
147 |
python? ( ${PYTHON_REQUIRED_USE} cxx ) |
148 |
" |
149 |
# java? ( cxx ) |
150 |
@@ -45,6 +47,7 @@ BDEPEND=" |
151 |
sys-devel/flex |
152 |
virtual/yacc |
153 |
chua? ( dev-libs/boost ) |
154 |
+ lua? ( dev-lang/swig ) |
155 |
python? ( dev-lang/swig ) |
156 |
nls? ( sys-devel/gettext ) |
157 |
test? ( |
158 |
@@ -74,10 +77,7 @@ CDEPEND=" |
159 |
jack? ( virtual/jack ) |
160 |
keyboard? ( x11-libs/fltk:1[threads?] ) |
161 |
linear? ( =sci-mathematics/gmm-5.1* ) |
162 |
- lua? ( |
163 |
- luajit? ( dev-lang/luajit:2 ) |
164 |
- !luajit? ( dev-lang/lua:0 ) |
165 |
- ) |
166 |
+ lua? ( ${LUA_DEPS} ) |
167 |
mp3? ( >=media-sound/lame-3.100-r3 ) |
168 |
osc? ( media-libs/liblo ) |
169 |
portaudio? ( media-libs/portaudio ) |
170 |
@@ -107,6 +107,8 @@ PATCHES=( |
171 |
) |
172 |
|
173 |
pkg_setup() { |
174 |
+ use lua && lua-single_pkg_setup |
175 |
+ |
176 |
if use python || use test ; then |
177 |
python-single-r1_pkg_setup |
178 |
fi |
179 |
@@ -200,24 +202,12 @@ src_configure() { |
180 |
#-DJAVA_AWT_INCLUDE_PATH="?" |
181 |
#) |
182 |
|
183 |
- # set the library that we want to use |
184 |
- if use lua ; then |
185 |
- local libdir |
186 |
- local libname |
187 |
- |
188 |
- if use luajit ; then |
189 |
- libdir=$(pkg-config --variable=libdir luajit) |
190 |
- libname=$(pkg-config --variable=libname luajit) |
191 |
- else |
192 |
- libdir=$(pkg-config --variable=libdir lua) |
193 |
- libname=$(pkg-config --variable=libname lua) |
194 |
- [[ -z "${libname}" ]] && libname="lua" |
195 |
- fi |
196 |
- |
197 |
- mycmakeargs+=( |
198 |
- -DLUA_LIBRARY="${libdir}/lib${libname}.so" |
199 |
- ) |
200 |
- fi |
201 |
+ use lua && mycmakeargs+=( |
202 |
+ -DLUA_H_PATH="$(lua_get_include_dir)" |
203 |
+ -DLUA_LIBRARY="$(lua_get_shared_lib)" |
204 |
+ # LUA_MODULE_INSTALL_DIR omitted on purpose, csound Lua module links against liblua |
205 |
+ # so it must NOT be installed into cmod_dir. |
206 |
+ ) |
207 |
|
208 |
use python && mycmakeargs+=( |
209 |
-DPYTHON_MODULE_INSTALL_DIR="$(python_get_sitedir)" |
210 |
|
211 |
diff --git a/profiles/package.mask b/profiles/package.mask |
212 |
index 600c1a10d85..14a289043e2 100644 |
213 |
--- a/profiles/package.mask |
214 |
+++ b/profiles/package.mask |
215 |
@@ -541,6 +541,7 @@ kde-apps/kdebase-meta:5 |
216 |
>=media-libs/libquvi-scripts-0.9.20131130-r100 |
217 |
>=media-libs/mlt-6.22.1-r100 |
218 |
>=media-sound/aqualung-1.1-r100 |
219 |
+>=media-sound/csound-6.15.0-r100 |
220 |
>=media-video/aegisub-3.2.2_p20160518-r100 |
221 |
>=media-video/obs-studio-25.0.8-r100 |
222 |
>=media-video/vlc-3.0.11.1-r100 |