1 |
commit: 0b752c3ee0714ca50daa0ea3816f03c1b792863c |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 5 10:53:48 2020 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 5 10:54:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b752c3e |
7 |
|
8 |
media-plugins/libvisual-plugins: fixed clang compilation in 0.4.0-r4 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/740304 |
11 |
Package-Manager: Portage-3.0.5, Repoman-3.0.1 |
12 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
13 |
|
14 |
.../files/libvisual-plugins-0.4.0-clang.patch | 42 ++++++++++++++++++++++ |
15 |
.../libvisual-plugins-0.4.0-r4.ebuild | 1 + |
16 |
2 files changed, 43 insertions(+) |
17 |
|
18 |
diff --git a/media-plugins/libvisual-plugins/files/libvisual-plugins-0.4.0-clang.patch b/media-plugins/libvisual-plugins/files/libvisual-plugins-0.4.0-clang.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..25c2880fa0c |
21 |
--- /dev/null |
22 |
+++ b/media-plugins/libvisual-plugins/files/libvisual-plugins-0.4.0-clang.patch |
23 |
@@ -0,0 +1,42 @@ |
24 |
+diff --git a/plugins/actor/G-Force/Common/UI/LineXX.cpp b/plugins/actor/G-Force/Common/UI/LineXX.cpp |
25 |
+index 304eec8..5b18503 100644 |
26 |
+--- a/plugins/actor/G-Force/Common/UI/LineXX.cpp |
27 |
++++ b/plugins/actor/G-Force/Common/UI/LineXX.cpp |
28 |
+@@ -74,13 +74,13 @@ |
29 |
+ |
30 |
+ |
31 |
+ #if CLR_INTERP && P_SZ != 1 |
32 |
+- int32_t len = sqrt( dx * dx + dy * dy ) + 1; |
33 |
++ int32_t len = sqrt( (long double) dx * dx + dy * dy ) + 1; |
34 |
+ dR /= len; |
35 |
+ dG /= len; |
36 |
+ dB /= len; |
37 |
+ color = __Clr( R, G, B ); |
38 |
+ #elif CLR_INTERP && P_SZ == 1 |
39 |
+- int32_t len = sqrt( dx * dx + dy * dy ) + 1; |
40 |
++ int32_t len = sqrt( (long double) dx * dx + dy * dy ) + 1; |
41 |
+ dR /= len; |
42 |
+ color = __Clr( R, G, B ); |
43 |
+ #endif |
44 |
+@@ -154,7 +154,7 @@ |
45 |
+ |
46 |
+ for ( j = 0; j < tw; j++ ) { |
47 |
+ int32_t tmp = j - halfW; |
48 |
+- c_x = halfW - ( ( int32_t ) sqrt( halfW * halfW - tmp * tmp ) ); |
49 |
++ c_x = halfW - ( ( int32_t ) sqrt( (long double) halfW * halfW - tmp * tmp ) ); |
50 |
+ center = basePtr + (j-halfW) * mBytesPerRow; |
51 |
+ for ( int k = c_x; k < tw - c_x; k++ ){ |
52 |
+ ((PIXTYPE*) center)[k-halfW] = color; |
53 |
+diff --git a/plugins/morph/flash/morph_flash.c b/plugins/morph/flash/morph_flash.c |
54 |
+index fb5308a..c57f490 100644 |
55 |
+--- a/plugins/morph/flash/morph_flash.c |
56 |
++++ b/plugins/morph/flash/morph_flash.c |
57 |
+@@ -116,7 +116,7 @@ int lv_morph_flash_palette (VisPluginData *plugin, float rate, VisAudio *audio, |
58 |
+ FlashPrivate *priv = visual_object_get_private (VISUAL_OBJECT (plugin)); |
59 |
+ |
60 |
+ if (src1->pal == NULL || src2->pal == NULL) |
61 |
+- return; |
62 |
++ return -1; |
63 |
+ |
64 |
+ if (rate < 0.5) |
65 |
+ visual_palette_blend (pal, src1->pal, &priv->whitepal, rate * 2); |
66 |
|
67 |
diff --git a/media-plugins/libvisual-plugins/libvisual-plugins-0.4.0-r4.ebuild b/media-plugins/libvisual-plugins/libvisual-plugins-0.4.0-r4.ebuild |
68 |
index 401d8343726..01b17e2e5ae 100644 |
69 |
--- a/media-plugins/libvisual-plugins/libvisual-plugins-0.4.0-r4.ebuild |
70 |
+++ b/media-plugins/libvisual-plugins/libvisual-plugins-0.4.0-r4.ebuild |
71 |
@@ -38,6 +38,7 @@ DOCS=( AUTHORS ChangeLog NEWS README TODO ) |
72 |
|
73 |
PATCHES=( |
74 |
"${FILESDIR}/${P}-fno-common.patch" |
75 |
+ "${FILESDIR}/${P}-clang.patch" |
76 |
) |
77 |
|
78 |
src_prepare() { |