1 |
commit: 1ff80614a9657203b3d50042bd266e7e90f6812f |
2 |
Author: Alfred Persson Forsberg <cat <AT> catcream <DOT> org> |
3 |
AuthorDate: Sun Jun 26 19:14:54 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 26 20:08:25 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ff80614 |
7 |
|
8 |
media-libs/mlt: fix build for musl |
9 |
|
10 |
There is no gurantee that either HAVE_STRTOD_L or HAVE_LOCALE_H will be |
11 |
defined at compile-time. Try for example building this project :) |
12 |
|
13 |
The locale usage is now defined in POSIX and therefore we can now |
14 |
assume it will be available on Linux, except for ancient systems. |
15 |
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html |
16 |
|
17 |
Another way of dealing with this would be to have a global mlt_config.h |
18 |
where HAVE_LOCALE_H and HAVE_STRTOD_L are defined to values determined |
19 |
when mlt is installed. |
20 |
See-also: |
21 |
https://git.alpinelinux.org/aports/tree/community/mlt/musl-locale.patch, https://github.com/mltframework/mlt/pull/803 |
22 |
|
23 |
Closes: https://bugs.gentoo.org/829608 |
24 |
Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org> |
25 |
Closes: https://github.com/gentoo/gentoo/pull/26083 |
26 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
27 |
|
28 |
.../mlt/files/mlt-7.8.0-linux_locale_h.patch | 37 ++++++++++++++++++++++ |
29 |
media-libs/mlt/mlt-7.8.0.ebuild | 1 + |
30 |
2 files changed, 38 insertions(+) |
31 |
|
32 |
diff --git a/media-libs/mlt/files/mlt-7.8.0-linux_locale_h.patch b/media-libs/mlt/files/mlt-7.8.0-linux_locale_h.patch |
33 |
new file mode 100644 |
34 |
index 000000000000..43822c446654 |
35 |
--- /dev/null |
36 |
+++ b/media-libs/mlt/files/mlt-7.8.0-linux_locale_h.patch |
37 |
@@ -0,0 +1,37 @@ |
38 |
+From 7d82553a00e74af77e69cc74645e0a3ec6bb3aa1 Mon Sep 17 00:00:00 2001 |
39 |
+From: alfredfo <98554039+alfredfo@××××××××××××××××××××.com> |
40 |
+Date: Sat, 25 Jun 2022 01:00:11 +0000 |
41 |
+Subject: [PATCH] Fix building for musl (#803) |
42 |
+ |
43 |
+reverts: https://github.com/mltframework/mlt/pull/298. |
44 |
+There is no gurantee that either HAVE_STRTOD_L or HAVE_LOCALE_H will be |
45 |
+defined at compile-time. Try for example building this project :) |
46 |
+ |
47 |
+The locale usage is now defined in POSIX and therefore we can now |
48 |
+assume it will be available on Linux, except for ancient systems. |
49 |
+https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html |
50 |
+ |
51 |
+Another way of dealing with this would be to have a global mlt_config.h |
52 |
+where HAVE_LOCALE_H and HAVE_STRTOD_L are defined to values determined |
53 |
+when mlt is installed. |
54 |
+ |
55 |
+https://git.alpinelinux.org/aports/tree/community/mlt/musl-locale.patch |
56 |
+https://bugs.gentoo.org/829608 |
57 |
+https://github.com/mltframework/mlt/pull/803 |
58 |
+--- |
59 |
+ src/framework/mlt_property.h | 2 +- |
60 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
61 |
+ |
62 |
+diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h |
63 |
+index 85d550ac0..be61c23c2 100644 |
64 |
+--- a/src/framework/mlt_property.h |
65 |
++++ b/src/framework/mlt_property.h |
66 |
+@@ -30,7 +30,7 @@ |
67 |
+ #include <sys/param.h> |
68 |
+ #endif |
69 |
+ |
70 |
+-#if (defined(__GLIBC__) && !defined(__APPLE__)) || defined(HAVE_LOCALE_H) |
71 |
++#if (defined(__linux__) && !defined(__APPLE__)) |
72 |
+ # include <locale.h> |
73 |
+ #elif defined(__APPLE__) || (defined(__FreeBSD_version) && __FreeBSD_version >= 900506) |
74 |
+ # include <xlocale.h> |
75 |
|
76 |
diff --git a/media-libs/mlt/mlt-7.8.0.ebuild b/media-libs/mlt/mlt-7.8.0.ebuild |
77 |
index 0415d23c4499..badcf2ff5bcd 100644 |
78 |
--- a/media-libs/mlt/mlt-7.8.0.ebuild |
79 |
+++ b/media-libs/mlt/mlt-7.8.0.ebuild |
80 |
@@ -84,6 +84,7 @@ PATCHES=( |
81 |
"${FILESDIR}"/${PN}-6.10.0-swig-underlinking.patch |
82 |
"${FILESDIR}"/${PN}-6.22.1-no_lua_bdepend.patch |
83 |
"${FILESDIR}"/${PN}-7.0.1-cmake-symlink.patch |
84 |
+ "${FILESDIR}"/${PN}-7.8.0-linux_locale_h.patch |
85 |
) |
86 |
|
87 |
pkg_setup() { |