1 |
commit: 4906ebc5a0e9377426f0f73b83a539bdc4c9c753 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 22 16:42:14 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 22 17:32:14 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4906ebc5 |
7 |
|
8 |
media-video/obs-studio: migrate to lua-single.eclass |
9 |
|
10 |
Based on the work of Gergely Nagy <ngg <AT> ngg.hu> from |
11 |
https://github.com/gentoo/gentoo/pull/18156, however browser source support |
12 |
has been removed (according to the PR comments chiitoo has not decided yet |
13 |
which of the competing implementations he prefers) and IUSE=luajit has been |
14 |
renamed to just "lua" (as done elsewhere, in order to avoid confusion between |
15 |
luajit and lua_single_target_luajit). |
16 |
|
17 |
Closes: https://bugs.gentoo.org/752768 |
18 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
19 |
|
20 |
...o-9999.ebuild => obs-studio-25.0.8-r100.ebuild} | 27 ++++++++++++++-------- |
21 |
media-video/obs-studio/obs-studio-9999.ebuild | 25 ++++++++++++-------- |
22 |
profiles/package.mask | 1 + |
23 |
3 files changed, 33 insertions(+), 20 deletions(-) |
24 |
|
25 |
diff --git a/media-video/obs-studio/obs-studio-9999.ebuild b/media-video/obs-studio/obs-studio-25.0.8-r100.ebuild |
26 |
similarity index 85% |
27 |
copy from media-video/obs-studio/obs-studio-9999.ebuild |
28 |
copy to media-video/obs-studio/obs-studio-25.0.8-r100.ebuild |
29 |
index c8ccd0308e5..4651e60274e 100644 |
30 |
--- a/media-video/obs-studio/obs-studio-9999.ebuild |
31 |
+++ b/media-video/obs-studio/obs-studio-25.0.8-r100.ebuild |
32 |
@@ -4,9 +4,10 @@ |
33 |
EAPI=7 |
34 |
|
35 |
CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) |
36 |
+LUA_COMPAT=( luajit ) |
37 |
PYTHON_COMPAT=( python3_{6,7} ) |
38 |
|
39 |
-inherit cmake-utils python-single-r1 xdg-utils |
40 |
+inherit cmake lua-single python-single-r1 xdg-utils |
41 |
|
42 |
if [[ ${PV} == *9999 ]]; then |
43 |
inherit git-r3 |
44 |
@@ -22,11 +23,14 @@ HOMEPAGE="https://obsproject.com" |
45 |
|
46 |
LICENSE="GPL-2" |
47 |
SLOT="0" |
48 |
-IUSE="+alsa fdk imagemagick jack luajit nvenc pulseaudio python speex +ssl truetype v4l vlc" |
49 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
50 |
+IUSE="+alsa fdk imagemagick jack lua nvenc pulseaudio python speex +ssl truetype v4l vlc" |
51 |
+REQUIRED_USE=" |
52 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
53 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
54 |
+" |
55 |
|
56 |
BDEPEND=" |
57 |
- luajit? ( dev-lang/swig ) |
58 |
+ lua? ( dev-lang/swig ) |
59 |
python? ( dev-lang/swig ) |
60 |
" |
61 |
DEPEND=" |
62 |
@@ -58,7 +62,7 @@ DEPEND=" |
63 |
fdk? ( media-libs/fdk-aac:= ) |
64 |
imagemagick? ( media-gfx/imagemagick:= ) |
65 |
jack? ( virtual/jack ) |
66 |
- luajit? ( dev-lang/luajit:2 ) |
67 |
+ lua? ( ${LUA_DEPS} ) |
68 |
nvenc? ( >=media-video/ffmpeg-4[video_cards_nvidia] ) |
69 |
pulseaudio? ( media-sound/pulseaudio ) |
70 |
python? ( ${PYTHON_DEPS} ) |
71 |
@@ -73,7 +77,10 @@ DEPEND=" |
72 |
" |
73 |
RDEPEND="${DEPEND}" |
74 |
|
75 |
+PATCHES=( "${FILESDIR}/${PN}-25.0.8-gcc-10-build.patch" ) |
76 |
+ |
77 |
pkg_setup() { |
78 |
+ use lua && lua-single_pkg_setup |
79 |
use python && python-single-r1_pkg_setup |
80 |
} |
81 |
|
82 |
@@ -94,15 +101,15 @@ src_configure() { |
83 |
-DWITH_RTMPS=$(usex ssl) |
84 |
) |
85 |
|
86 |
- if [ "${PV}" != "9999" ]; then |
87 |
+ if [[ ${PV} != *9999 ]]; then |
88 |
mycmakeargs+=( |
89 |
-DOBS_VERSION_OVERRIDE=${PV} |
90 |
) |
91 |
fi |
92 |
|
93 |
- if use luajit || use python; then |
94 |
+ if use lua || use python; then |
95 |
mycmakeargs+=( |
96 |
- -DDISABLE_LUA=$(usex !luajit) |
97 |
+ -DDISABLE_LUA=$(usex !lua) |
98 |
-DDISABLE_PYTHON=$(usex !python) |
99 |
-DENABLE_SCRIPTING=yes |
100 |
) |
101 |
@@ -110,11 +117,11 @@ src_configure() { |
102 |
mycmakeargs+=( -DENABLE_SCRIPTING=no ) |
103 |
fi |
104 |
|
105 |
- cmake-utils_src_configure |
106 |
+ cmake_src_configure |
107 |
} |
108 |
|
109 |
src_install() { |
110 |
- cmake-utils_src_install |
111 |
+ cmake_src_install |
112 |
#external plugins may need some things not installed by default, install them here |
113 |
insinto /usr/include/obs/UI/obs-frontend-api |
114 |
doins UI/obs-frontend-api/obs-frontend-api.h |
115 |
|
116 |
diff --git a/media-video/obs-studio/obs-studio-9999.ebuild b/media-video/obs-studio/obs-studio-9999.ebuild |
117 |
index c8ccd0308e5..47cfd612079 100644 |
118 |
--- a/media-video/obs-studio/obs-studio-9999.ebuild |
119 |
+++ b/media-video/obs-studio/obs-studio-9999.ebuild |
120 |
@@ -4,9 +4,10 @@ |
121 |
EAPI=7 |
122 |
|
123 |
CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) |
124 |
+LUA_COMPAT=( luajit ) |
125 |
PYTHON_COMPAT=( python3_{6,7} ) |
126 |
|
127 |
-inherit cmake-utils python-single-r1 xdg-utils |
128 |
+inherit cmake lua-single python-single-r1 xdg-utils |
129 |
|
130 |
if [[ ${PV} == *9999 ]]; then |
131 |
inherit git-r3 |
132 |
@@ -22,11 +23,14 @@ HOMEPAGE="https://obsproject.com" |
133 |
|
134 |
LICENSE="GPL-2" |
135 |
SLOT="0" |
136 |
-IUSE="+alsa fdk imagemagick jack luajit nvenc pulseaudio python speex +ssl truetype v4l vlc" |
137 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
138 |
+IUSE="+alsa fdk imagemagick jack lua nvenc pulseaudio python speex +ssl truetype v4l vlc" |
139 |
+REQUIRED_USE=" |
140 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
141 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
142 |
+" |
143 |
|
144 |
BDEPEND=" |
145 |
- luajit? ( dev-lang/swig ) |
146 |
+ lua? ( dev-lang/swig ) |
147 |
python? ( dev-lang/swig ) |
148 |
" |
149 |
DEPEND=" |
150 |
@@ -58,7 +62,7 @@ DEPEND=" |
151 |
fdk? ( media-libs/fdk-aac:= ) |
152 |
imagemagick? ( media-gfx/imagemagick:= ) |
153 |
jack? ( virtual/jack ) |
154 |
- luajit? ( dev-lang/luajit:2 ) |
155 |
+ lua? ( ${LUA_DEPS} ) |
156 |
nvenc? ( >=media-video/ffmpeg-4[video_cards_nvidia] ) |
157 |
pulseaudio? ( media-sound/pulseaudio ) |
158 |
python? ( ${PYTHON_DEPS} ) |
159 |
@@ -74,6 +78,7 @@ DEPEND=" |
160 |
RDEPEND="${DEPEND}" |
161 |
|
162 |
pkg_setup() { |
163 |
+ use lua && lua-single_pkg_setup |
164 |
use python && python-single-r1_pkg_setup |
165 |
} |
166 |
|
167 |
@@ -94,15 +99,15 @@ src_configure() { |
168 |
-DWITH_RTMPS=$(usex ssl) |
169 |
) |
170 |
|
171 |
- if [ "${PV}" != "9999" ]; then |
172 |
+ if [[ ${PV} != *9999 ]]; then |
173 |
mycmakeargs+=( |
174 |
-DOBS_VERSION_OVERRIDE=${PV} |
175 |
) |
176 |
fi |
177 |
|
178 |
- if use luajit || use python; then |
179 |
+ if use lua || use python; then |
180 |
mycmakeargs+=( |
181 |
- -DDISABLE_LUA=$(usex !luajit) |
182 |
+ -DDISABLE_LUA=$(usex !lua) |
183 |
-DDISABLE_PYTHON=$(usex !python) |
184 |
-DENABLE_SCRIPTING=yes |
185 |
) |
186 |
@@ -110,11 +115,11 @@ src_configure() { |
187 |
mycmakeargs+=( -DENABLE_SCRIPTING=no ) |
188 |
fi |
189 |
|
190 |
- cmake-utils_src_configure |
191 |
+ cmake_src_configure |
192 |
} |
193 |
|
194 |
src_install() { |
195 |
- cmake-utils_src_install |
196 |
+ cmake_src_install |
197 |
#external plugins may need some things not installed by default, install them here |
198 |
insinto /usr/include/obs/UI/obs-frontend-api |
199 |
doins UI/obs-frontend-api/obs-frontend-api.h |
200 |
|
201 |
diff --git a/profiles/package.mask b/profiles/package.mask |
202 |
index c8e8f1f5600..600c1a10d85 100644 |
203 |
--- a/profiles/package.mask |
204 |
+++ b/profiles/package.mask |
205 |
@@ -542,6 +542,7 @@ kde-apps/kdebase-meta:5 |
206 |
>=media-libs/mlt-6.22.1-r100 |
207 |
>=media-sound/aqualung-1.1-r100 |
208 |
>=media-video/aegisub-3.2.2_p20160518-r100 |
209 |
+>=media-video/obs-studio-25.0.8-r100 |
210 |
>=media-video/vlc-3.0.11.1-r100 |
211 |
>=net-analyzer/rrdtool-1.7.2-r100 |
212 |
>=net-analyzer/snort-2.9.16-r100 |