Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libopenshot/
Date: Sat, 13 Oct 2018 17:36:09
Message-Id: 1539452110.8c92f623c925ff0b5f027e17c0e0b96c8b2a3d24.pacho@gentoo
1 commit: 8c92f623c925ff0b5f027e17c0e0b96c8b2a3d24
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 13 17:32:15 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 13 17:35:10 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c92f623
7
8 Revert "media-libs/libopenshot: Commit the patch, drop old"
9
10 This reverts commit 9e4cf555ecf51c074d6d179897894413a8e9eb9a.
11
12 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
13 Package-Manager: Portage-2.3.51, Repoman-2.3.11
14
15 media-libs/libopenshot/Manifest | 2 +
16 media-libs/libopenshot/libopenshot-0.1.3.ebuild | 84 ++++++++++++++++++++++
17 media-libs/libopenshot/libopenshot-0.1.7.ebuild | 83 +++++++++++++++++++++
18 .../libopenshot-0.2.2-imagemagick7.patch | 78 --------------------
19 4 files changed, 169 insertions(+), 78 deletions(-)
20
21 diff --git a/media-libs/libopenshot/Manifest b/media-libs/libopenshot/Manifest
22 index d1299bd05fb..be122d9c41a 100644
23 --- a/media-libs/libopenshot/Manifest
24 +++ b/media-libs/libopenshot/Manifest
25 @@ -1,2 +1,4 @@
26 +DIST libopenshot-0.1.3.tar.gz 11019740 BLAKE2B a706889f709024300ef79518406da861111a8445b5ce23364b8492a72e74e7944c88ba9b4a29da356ca21500253d19e8c32abe7b5aaa0ac35bebec85e52ba970 SHA512 d59817505812868db408a88dc1d30b5b1833910f45dd0df03937110b7d4cbd85a270773008e75a1501f4b3b89a09ea798ed9b580755adf3ae79ac24d403f6982
27 +DIST libopenshot-0.1.7.tar.gz 11022594 BLAKE2B f3e0836ebb6dd89ce42085dc9d18dd3bce9ab3011550958bec41eead2c62b454459d219d2efeece1a43eb0536cb99866eaf9b478205d717da4c173e954772a46 SHA512 4c8871ff30c03a14766e35a64052695768311afd81ecc55598720ad146f53c122ef3b1293467670f7dd48da77bf6cb4f4f14a18c298a649b8827f901ed653709
28 DIST libopenshot-0.1.8.tar.gz 11019495 BLAKE2B a86994a09328e24705fe06ec3c47cbedb89815e6ec1440237dc58babfc066655f1c7dacc19257b02b645a9415c63cd4e0c1191fa452b7632cf531d98a1b073c3 SHA512 02630d7ce9fd378ad648d034622d4f971728a2074691d7facc8a36dcd52b87c1372dd5a9588c0ba852589105bdbf78941083fd6b1eb1bcc0a33d4ca49634162c
29 DIST libopenshot-0.2.2.tar.gz 11037768 BLAKE2B c307e41bf17d40ae421a541bbdf4cd53c6ef4d97041a476c6910bd156c10815aa5a5811813b24fdc472401516f29cf8cb68fbda17a0b434767c3f3aa63d6f222 SHA512 b89189e57e82da68a063417bba9c94704c04b0546c0aed227daa23a794eee56341a05988d8e28dbd339edfcdeeaed48103b347060eccf94f32fe1a4bf23d6553
30
31 diff --git a/media-libs/libopenshot/libopenshot-0.1.3.ebuild b/media-libs/libopenshot/libopenshot-0.1.3.ebuild
32 new file mode 100644
33 index 00000000000..cc13df34d2a
34 --- /dev/null
35 +++ b/media-libs/libopenshot/libopenshot-0.1.3.ebuild
36 @@ -0,0 +1,84 @@
37 +# Copyright 1999-2017 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +
42 +PYTHON_COMPAT=( python3_{4,5} )
43 +
44 +inherit cmake-utils python-single-r1 toolchain-funcs versionator
45 +
46 +DESCRIPTION="Video editing library used by OpenShot"
47 +HOMEPAGE="http://www.openshotvideo.com/"
48 +SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
49 +
50 +LICENSE="GPL-3"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~x86"
53 +IUSE="+imagemagick libav +python test"
54 +# https://github.com/OpenShot/libopenshot/issues/43
55 +RESTRICT="test"
56 +
57 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
58 +
59 +RDEPEND="
60 + net-libs/cppzmq
61 + dev-qt/qtcore:5
62 + dev-qt/qtgui:5
63 + dev-qt/qtmultimedia:5[widgets]
64 + media-libs/libopenshot-audio
65 + imagemagick? ( media-gfx/imagemagick:0=[cxx] )
66 + libav? ( media-video/libav:=[encode,x264,xvid,vpx,mp3,theora] )
67 + !libav? ( media-video/ffmpeg:0=[encode,x264,xvid,vpx,mp3,theora] )
68 + python? ( ${PYTHON_DEPS} )
69 +"
70 +DEPEND="
71 + ${RDEPEND}
72 + python? ( dev-lang/swig )
73 + test? ( dev-libs/unittest++ )
74 +"
75 +
76 +# https://github.com/OpenShot/libopenshot/pull/45
77 +PATCHES=( ${FILESDIR}/${P}-fix-tests.patch )
78 +
79 +pkg_pretend() {
80 + if [[ ${MERGE_TYPE} != binary ]] && ! tc-has-openmp; then
81 + eerror "${P} requires a compiler with OpenMP support. Your current"
82 + eerror "compiler does not support it. If you use gcc, you can"
83 + eerror "re-emerge it with the 'openmp' use flag enabled."
84 + die "The current compiler does not support OpenMP"
85 + fi
86 +}
87 +
88 +pkg_setup() {
89 + use python && python-single-r1_pkg_setup
90 +}
91 +
92 +src_prepare() {
93 + # https://github.com/OpenShot/libopenshot/issues/17
94 + use test || cmake_comment_add_subdirectory tests
95 + cmake-utils_src_prepare
96 +}
97 +
98 +src_configure() {
99 + local mycmakeargs=(
100 + -DENABLE_RUBY=OFF # TODO: add ruby support
101 + -DENABLE_PYTHON=$(usex python)
102 + -DCMAKE_DISABLE_FIND_PACKAGE_ImageMagick=$(usex !imagemagick)
103 + )
104 + use python && mycmakeargs+=(
105 + -DPYTHON_EXECUTABLE="${PYTHON}"
106 + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
107 + -DPYTHON_LIBRARY="$(python_get_library_path)"
108 + )
109 + cmake-utils_src_configure
110 +}
111 +
112 +src_test() {
113 + cd "${BUILD_DIR}" || die
114 + emake test
115 +}
116 +
117 +src_install() {
118 + cmake-utils_src_install
119 + python_optimize
120 +}
121
122 diff --git a/media-libs/libopenshot/libopenshot-0.1.7.ebuild b/media-libs/libopenshot/libopenshot-0.1.7.ebuild
123 new file mode 100644
124 index 00000000000..4f9643afa9b
125 --- /dev/null
126 +++ b/media-libs/libopenshot/libopenshot-0.1.7.ebuild
127 @@ -0,0 +1,83 @@
128 +# Copyright 1999-2017 Gentoo Foundation
129 +# Distributed under the terms of the GNU General Public License v2
130 +
131 +EAPI=6
132 +
133 +PYTHON_COMPAT=( python3_{4,5,6} )
134 +
135 +inherit cmake-utils python-single-r1 toolchain-funcs versionator
136 +
137 +DESCRIPTION="Video editing library used by OpenShot"
138 +HOMEPAGE="http://www.openshotvideo.com/"
139 +SRC_URI="https://github.com/OpenShot/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
140 +
141 +LICENSE="GPL-3"
142 +SLOT="0"
143 +KEYWORDS="~amd64 ~x86"
144 +IUSE="+imagemagick libav +python test"
145 +# https://github.com/OpenShot/libopenshot/issues/43
146 +RESTRICT="test"
147 +
148 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
149 +
150 +RDEPEND="
151 + net-libs/cppzmq
152 + dev-qt/qtcore:5
153 + dev-qt/qtgui:5
154 + dev-qt/qtmultimedia:5[widgets]
155 + media-libs/libopenshot-audio
156 + imagemagick? ( <media-gfx/imagemagick-7:0=[cxx] )
157 + libav? ( media-video/libav:=[encode,x264,xvid,vpx,mp3,theora] )
158 + !libav? ( media-video/ffmpeg:0=[encode,x264,xvid,vpx,mp3,theora] )
159 + python? ( ${PYTHON_DEPS} )
160 +"
161 +DEPEND="
162 + ${RDEPEND}
163 + python? ( dev-lang/swig )
164 + test? ( dev-libs/unittest++ )
165 +"
166 +
167 +# https://github.com/OpenShot/libopenshot/pull/45
168 +PATCHES=( ${FILESDIR}/${PN}-0.1.3-fix-tests.patch )
169 +
170 +pkg_pretend() {
171 + if [[ ${MERGE_TYPE} != binary ]] && ! tc-has-openmp; then
172 + eerror "${P} requires a compiler with OpenMP support. Your current"
173 + eerror "compiler does not support it. If you use gcc, you can"
174 + eerror "re-emerge it with the 'openmp' use flag enabled."
175 + die "The current compiler does not support OpenMP"
176 + fi
177 +}
178 +
179 +pkg_setup() {
180 + use python && python-single-r1_pkg_setup
181 +}
182 +
183 +src_prepare() {
184 + # https://github.com/OpenShot/libopenshot/issues/17
185 + use test || cmake_comment_add_subdirectory tests
186 + cmake-utils_src_prepare
187 +}
188 +
189 +src_configure() {
190 + local mycmakeargs=(
191 + -DENABLE_RUBY=OFF # TODO: add ruby support
192 + -DENABLE_PYTHON=$(usex python)
193 + -DCMAKE_DISABLE_FIND_PACKAGE_ImageMagick=$(usex !imagemagick)
194 + )
195 + use python && mycmakeargs+=(
196 + -DPYTHON_EXECUTABLE="${PYTHON}"
197 + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
198 + -DPYTHON_LIBRARY="$(python_get_library_path)"
199 + )
200 + cmake-utils_src_configure
201 +}
202 +
203 +src_test() {
204 + cmake-utils_src_make test
205 +}
206 +
207 +src_install() {
208 + cmake-utils_src_install
209 + python_optimize
210 +}
211
212 diff --git a/media-libs/libopenshot/libopenshot-0.2.2-imagemagick7.patch b/media-libs/libopenshot/libopenshot-0.2.2-imagemagick7.patch
213 deleted file mode 100644
214 index bc5f738d7f6..00000000000
215 --- a/media-libs/libopenshot/libopenshot-0.2.2-imagemagick7.patch
216 +++ /dev/null
217 @@ -1,78 +0,0 @@
218 -diff -Nru a/include/TextReader.h b/include/TextReader.h
219 ---- a/include/TextReader.h 2018-09-22 21:47:46.000000000 +0200
220 -+++ b/include/TextReader.h 2018-09-23 16:17:21.212888285 +0200
221 -@@ -91,7 +91,7 @@
222 - string text_color;
223 - string background_color;
224 - std::shared_ptr<Magick::Image> image;
225 -- list<Magick::Drawable> lines;
226 -+ vector<Magick::Drawable> lines;
227 - bool is_open;
228 - GravityType gravity;
229 -
230 -diff -Nru a/src/Frame.cpp b/src/Frame.cpp
231 ---- a/src/Frame.cpp 2018-09-22 21:47:46.000000000 +0200
232 -+++ b/src/Frame.cpp 2018-09-23 16:21:44.921563711 +0200
233 -@@ -29,6 +29,9 @@
234 -
235 - using namespace std;
236 - using namespace openshot;
237 -+#ifdef USE_IMAGEMAGICK
238 -+using namespace Magick;
239 -+#endif
240 -
241 - // Constructor - blank frame (300x200 blank image, 48kHz audio silence)
242 - Frame::Frame() : number(1), pixel_ratio(1,1), channels(2), width(1), height(1), color("#000000"),
243 -@@ -904,7 +907,7 @@
244 - // Give image a transparent background color
245 - magick_image->backgroundColor(Magick::Color("none"));
246 - magick_image->virtualPixelMethod(Magick::TransparentVirtualPixelMethod);
247 -- magick_image->matte(true);
248 -+ magick_image->alpha(true);
249 -
250 - return magick_image;
251 - }
252 -@@ -926,13 +929,14 @@
253 - // Iterate through the pixel packets, and load our own buffer
254 - // Each color needs to be scaled to 8 bit (using the ImageMagick built-in ScaleQuantumToChar function)
255 - int numcopied = 0;
256 -- Magick::PixelPacket *pixels = new_image->getPixels(0,0, new_image->columns(), new_image->rows());
257 -+ const Quantum *pixels = new_image->getConstPixels(0,0, new_image->columns(), new_image->rows());
258 - for (int n = 0, i = 0; n < new_image->columns() * new_image->rows(); n += 1, i += 4) {
259 -- buffer[i+0] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].red);
260 -- buffer[i+1] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].green);
261 -- buffer[i+2] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].blue);
262 -- buffer[i+3] = 255 - MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].opacity);
263 -+ buffer[i+0] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelRed(new_image->image(), pixels));
264 -+ buffer[i+1] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelGreen(new_image->image(), pixels));
265 -+ buffer[i+2] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelBlue(new_image->image(), pixels));
266 -+ buffer[i+3] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelAlpha(new_image->image(), pixels));
267 - numcopied+=4;
268 -+ pixels += MagickCore::GetPixelChannels(new_image->image());
269 - }
270 -
271 - // Create QImage of frame data
272 -diff -Nru a/src/ImageReader.cpp b/src/ImageReader.cpp
273 ---- a/src/ImageReader.cpp 2018-09-22 21:47:46.000000000 +0200
274 -+++ b/src/ImageReader.cpp 2018-09-23 16:22:32.330865516 +0200
275 -@@ -59,7 +59,7 @@
276 -
277 - // Give image a transparent background color
278 - image->backgroundColor(Magick::Color("none"));
279 -- image->matte(true);
280 -+ image->alpha(true);
281 - }
282 - catch (Magick::Exception e) {
283 - // raise exception
284 -diff -Nru a/src/ImageWriter.cpp b/src/ImageWriter.cpp
285 ---- a/src/ImageWriter.cpp 2018-09-22 21:47:46.000000000 +0200
286 -+++ b/src/ImageWriter.cpp 2018-09-23 16:22:58.380031419 +0200
287 -@@ -97,7 +97,7 @@
288 - std::shared_ptr<Magick::Image> frame_image = frame->GetMagickImage();
289 - frame_image->magick( info.vcodec );
290 - frame_image->backgroundColor(Magick::Color("none"));
291 -- frame_image->matte(true);
292 -+ frame_image->alpha(true);
293 - frame_image->quality(image_quality);
294 - frame_image->animationDelay(info.video_timebase.ToFloat() * 100);
295 - frame_image->animationIterations(number_of_loops);