Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libopenshot/, media-libs/libopenshot/files/
Date: Sun, 30 May 2021 19:04:47
Message-Id: 1622401462.4d3ff2f1924ae1df716b910b256352c7c0c5bf90.asturm@gentoo
1 commit: 4d3ff2f1924ae1df716b910b256352c7c0c5bf90
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 17 11:02:26 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 30 19:04:22 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d3ff2f1
7
8 media-libs/libopenshot: Drop 0.2.4_pre20190609
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 media-libs/libopenshot/Manifest | 1 -
14 .../files/libopenshot-0.2.2-imagemagick7.patch | 78 ----------------
15 .../libopenshot-0.2.4_pre20190609.ebuild | 101 ---------------------
16 3 files changed, 180 deletions(-)
17
18 diff --git a/media-libs/libopenshot/Manifest b/media-libs/libopenshot/Manifest
19 index 3d66306ec18..fd37645a4e6 100644
20 --- a/media-libs/libopenshot/Manifest
21 +++ b/media-libs/libopenshot/Manifest
22 @@ -1,2 +1 @@
23 -DIST libopenshot-0.2.4_pre20190609.tar.gz 10268173 BLAKE2B 01e07c0a7c051b5804f24fab1bfb920862a165ef14d3fdd020430b9e3a47858842c8cab3408ba0d161cb15cc6e90531a3b5df9ad327a01f414ff2e7e392fc243 SHA512 bf8c06aba6a899cb1ca6fbe9ac89fc859083b03175338c04af8dce68698f4ac78eac0b5b594e2b02390cd5e64576445b1c95324b254a267506353bed97ca16d1
24 DIST libopenshot-0.2.5.tar.gz 10295768 BLAKE2B 19205c4f02d8b863b48e920164302853c7a505893783161e6a146e7a9728cefa19d4e48bc82b862e920967f110988ac28f5f495912efabbbacc98f55ebb51856 SHA512 b7cdf72897e6edaa8cc00e17dbe30f5b22a6b5d69aab64ddafb184458b41ef0332db1f3e2c6f039492bf7adb521d9758834d0bf6c24e6421a55970d8cf8caba7
25
26 diff --git a/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch b/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch
27 deleted file mode 100644
28 index bc5f738d7f6..00000000000
29 --- a/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch
30 +++ /dev/null
31 @@ -1,78 +0,0 @@
32 -diff -Nru a/include/TextReader.h b/include/TextReader.h
33 ---- a/include/TextReader.h 2018-09-22 21:47:46.000000000 +0200
34 -+++ b/include/TextReader.h 2018-09-23 16:17:21.212888285 +0200
35 -@@ -91,7 +91,7 @@
36 - string text_color;
37 - string background_color;
38 - std::shared_ptr<Magick::Image> image;
39 -- list<Magick::Drawable> lines;
40 -+ vector<Magick::Drawable> lines;
41 - bool is_open;
42 - GravityType gravity;
43 -
44 -diff -Nru a/src/Frame.cpp b/src/Frame.cpp
45 ---- a/src/Frame.cpp 2018-09-22 21:47:46.000000000 +0200
46 -+++ b/src/Frame.cpp 2018-09-23 16:21:44.921563711 +0200
47 -@@ -29,6 +29,9 @@
48 -
49 - using namespace std;
50 - using namespace openshot;
51 -+#ifdef USE_IMAGEMAGICK
52 -+using namespace Magick;
53 -+#endif
54 -
55 - // Constructor - blank frame (300x200 blank image, 48kHz audio silence)
56 - Frame::Frame() : number(1), pixel_ratio(1,1), channels(2), width(1), height(1), color("#000000"),
57 -@@ -904,7 +907,7 @@
58 - // Give image a transparent background color
59 - magick_image->backgroundColor(Magick::Color("none"));
60 - magick_image->virtualPixelMethod(Magick::TransparentVirtualPixelMethod);
61 -- magick_image->matte(true);
62 -+ magick_image->alpha(true);
63 -
64 - return magick_image;
65 - }
66 -@@ -926,13 +929,14 @@
67 - // Iterate through the pixel packets, and load our own buffer
68 - // Each color needs to be scaled to 8 bit (using the ImageMagick built-in ScaleQuantumToChar function)
69 - int numcopied = 0;
70 -- Magick::PixelPacket *pixels = new_image->getPixels(0,0, new_image->columns(), new_image->rows());
71 -+ const Quantum *pixels = new_image->getConstPixels(0,0, new_image->columns(), new_image->rows());
72 - for (int n = 0, i = 0; n < new_image->columns() * new_image->rows(); n += 1, i += 4) {
73 -- buffer[i+0] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].red);
74 -- buffer[i+1] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].green);
75 -- buffer[i+2] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].blue);
76 -- buffer[i+3] = 255 - MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].opacity);
77 -+ buffer[i+0] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelRed(new_image->image(), pixels));
78 -+ buffer[i+1] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelGreen(new_image->image(), pixels));
79 -+ buffer[i+2] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelBlue(new_image->image(), pixels));
80 -+ buffer[i+3] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelAlpha(new_image->image(), pixels));
81 - numcopied+=4;
82 -+ pixels += MagickCore::GetPixelChannels(new_image->image());
83 - }
84 -
85 - // Create QImage of frame data
86 -diff -Nru a/src/ImageReader.cpp b/src/ImageReader.cpp
87 ---- a/src/ImageReader.cpp 2018-09-22 21:47:46.000000000 +0200
88 -+++ b/src/ImageReader.cpp 2018-09-23 16:22:32.330865516 +0200
89 -@@ -59,7 +59,7 @@
90 -
91 - // Give image a transparent background color
92 - image->backgroundColor(Magick::Color("none"));
93 -- image->matte(true);
94 -+ image->alpha(true);
95 - }
96 - catch (Magick::Exception e) {
97 - // raise exception
98 -diff -Nru a/src/ImageWriter.cpp b/src/ImageWriter.cpp
99 ---- a/src/ImageWriter.cpp 2018-09-22 21:47:46.000000000 +0200
100 -+++ b/src/ImageWriter.cpp 2018-09-23 16:22:58.380031419 +0200
101 -@@ -97,7 +97,7 @@
102 - std::shared_ptr<Magick::Image> frame_image = frame->GetMagickImage();
103 - frame_image->magick( info.vcodec );
104 - frame_image->backgroundColor(Magick::Color("none"));
105 -- frame_image->matte(true);
106 -+ frame_image->alpha(true);
107 - frame_image->quality(image_quality);
108 - frame_image->animationDelay(info.video_timebase.ToFloat() * 100);
109 - frame_image->animationIterations(number_of_loops);
110
111 diff --git a/media-libs/libopenshot/libopenshot-0.2.4_pre20190609.ebuild b/media-libs/libopenshot/libopenshot-0.2.4_pre20190609.ebuild
112 deleted file mode 100644
113 index eea5ca7a14f..00000000000
114 --- a/media-libs/libopenshot/libopenshot-0.2.4_pre20190609.ebuild
115 +++ /dev/null
116 @@ -1,101 +0,0 @@
117 -# Copyright 1999-2020 Gentoo Authors
118 -# Distributed under the terms of the GNU General Public License v2
119 -
120 -EAPI=7
121 -
122 -PYTHON_COMPAT=( python3_7 )
123 -
124 -inherit cmake python-single-r1 toolchain-funcs
125 -
126 -COMMIT="0d4ea7fe71e88bcee4a7fd1404bd52c8e2169997"
127 -
128 -DESCRIPTION="Video editing library used by OpenShot"
129 -HOMEPAGE="https://www.openshot.org/"
130 -SRC_URI="https://github.com/OpenShot/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
131 -
132 -LICENSE="GPL-3+"
133 -SLOT="0/17"
134 -KEYWORDS="amd64 x86"
135 -IUSE="doc examples +imagemagick +python test"
136 -RESTRICT="!test? ( test )"
137 -
138 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
139 -
140 -RDEPEND="
141 - net-libs/cppzmq
142 - dev-qt/qtcore:5
143 - dev-qt/qtgui:5
144 - dev-qt/qtmultimedia:5[widgets]
145 - >=media-libs/libopenshot-audio-0.1.9_pre20190502:0=
146 - imagemagick? ( >=media-gfx/imagemagick-7:0=[cxx] )
147 - media-video/ffmpeg:0=[encode,x264,xvid,vpx,mp3,theora]
148 - python? ( ${PYTHON_DEPS} )
149 -"
150 -DEPEND="${RDEPEND}"
151 -BDEPEND="
152 - doc? ( app-doc/doxygen )
153 - python? ( dev-lang/swig )
154 - test? ( dev-libs/unittest++ )
155 -"
156 -
157 -S="${WORKDIR}/${PN}-${COMMIT}"
158 -
159 -# From Mageia
160 -# https://github.com/OpenShot/libopenshot/issues/60
161 -PATCHES=( ${FILESDIR}/${PN}-0.2.2-imagemagick7.patch )
162 -
163 -check_compiler() {
164 - if [[ ${MERGE_TYPE} != binary ]] && ! tc-has-openmp; then
165 - eerror "${P} requires a compiler with OpenMP support. Your current"
166 - eerror "compiler does not support it. If you use gcc, you can"
167 - eerror "re-emerge it with the 'openmp' use flag enabled."
168 - die "The current compiler does not support OpenMP"
169 - fi
170 -}
171 -
172 -pkg_pretend() {
173 - check_compiler
174 -}
175 -
176 -pkg_setup() {
177 - check_compiler
178 - use python && python-single-r1_pkg_setup
179 -}
180 -
181 -src_prepare() {
182 - cmake_src_prepare
183 - # https://github.com/OpenShot/libopenshot/issues/17
184 - use test || cmake_comment_add_subdirectory tests
185 -}
186 -
187 -src_configure() {
188 - local mycmakeargs=(
189 - -DENABLE_RUBY=OFF # TODO: add ruby support
190 - -DENABLE_PYTHON=$(usex python)
191 - $(cmake_use_find_package imagemagick ImageMagick)
192 - )
193 - use python && mycmakeargs+=(
194 - -DPYTHON_EXECUTABLE="${PYTHON}"
195 - -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
196 - -DPYTHON_LIBRARY="$(python_get_library_path)"
197 - )
198 - cmake_src_configure
199 -}
200 -
201 -src_compile() {
202 - cmake_src_compile
203 - use doc && cmake_build doc
204 -}
205 -
206 -src_test() {
207 - cmake_build os_test
208 -}
209 -
210 -src_install() {
211 - local DOCS=( AUTHORS README.md doc/HW-ACCEL.md )
212 - use examples && DOCS+=( src/examples/ )
213 - use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
214 -
215 - cmake_src_install
216 - use python && python_optimize
217 -}