[DO-971] ffmpeg recipe with requirements (!9)
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/9
This commit is contained in:
77
recipes/libmp3lame/all/patches/6410.patch
Normal file
77
recipes/libmp3lame/all/patches/6410.patch
Normal file
@@ -0,0 +1,77 @@
|
||||
--- a/frontend/parse.c
|
||||
+++ b/frontend/parse.c
|
||||
@@ -70,8 +70,10 @@
|
||||
#ifdef HAVE_ICONV
|
||||
#include <iconv.h>
|
||||
#include <errno.h>
|
||||
+#ifdef HAVE_LANGINFO
|
||||
#include <locale.h>
|
||||
#include <langinfo.h>
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#if defined _ALLOW_INTERNAL_OPTIONS
|
||||
@@ -146,6 +148,18 @@
|
||||
return n;
|
||||
}
|
||||
|
||||
+static char*
|
||||
+currentCharacterEncoding()
|
||||
+{
|
||||
+#ifdef HAVE_LANGINFO
|
||||
+ char* cur_code = nl_langinfo(CODESET);
|
||||
+#else
|
||||
+ char* env_lang = getenv("LANG");
|
||||
+ char* xxx_code = env_lang == NULL ? NULL : strrchr(env_lang, '.');
|
||||
+ char* cur_code = xxx_code == NULL ? "" : xxx_code+1;
|
||||
+#endif
|
||||
+ return cur_code;
|
||||
+}
|
||||
|
||||
static size_t
|
||||
currCharCodeSize(void)
|
||||
@@ -153,7 +167,7 @@
|
||||
size_t n = 1;
|
||||
char dst[32];
|
||||
char* src = "A";
|
||||
- char* cur_code = nl_langinfo(CODESET);
|
||||
+ char* cur_code = currentCharacterEncoding();
|
||||
iconv_t xiconv = iconv_open(cur_code, "ISO_8859-1");
|
||||
if (xiconv != (iconv_t)-1) {
|
||||
for (n = 0; n < 32; ++n) {
|
||||
@@ -181,7 +195,7 @@
|
||||
size_t const n = l*4;
|
||||
dst = calloc(n+4, 4);
|
||||
if (dst != 0) {
|
||||
- char* cur_code = nl_langinfo(CODESET);
|
||||
+ char* cur_code = currentCharacterEncoding();
|
||||
iconv_t xiconv = iconv_open(cur_code, "ISO_8859-1");
|
||||
if (xiconv != (iconv_t)-1) {
|
||||
char* i_ptr = src;
|
||||
@@ -205,7 +219,7 @@
|
||||
size_t const n = l*4;
|
||||
dst = calloc(n+4, 4);
|
||||
if (dst != 0) {
|
||||
- char* cur_code = nl_langinfo(CODESET);
|
||||
+ char* cur_code = currentCharacterEncoding();
|
||||
iconv_t xiconv = iconv_open(cur_code, "UTF-16LE");
|
||||
if (xiconv != (iconv_t)-1) {
|
||||
char* i_ptr = (char*)src;
|
||||
@@ -231,7 +245,7 @@
|
||||
size_t const n = l*4;
|
||||
dst = calloc(n+4, 4);
|
||||
if (dst != 0) {
|
||||
- char* cur_code = nl_langinfo(CODESET);
|
||||
+ char* cur_code = currentCharacterEncoding();
|
||||
iconv_t xiconv = iconv_open("ISO_8859-1//TRANSLIT", cur_code);
|
||||
if (xiconv != (iconv_t)-1) {
|
||||
char* i_ptr = (char*)src;
|
||||
@@ -257,7 +271,7 @@
|
||||
size_t const n = (l+1)*4;
|
||||
dst = calloc(n+4, 4);
|
||||
if (dst != 0) {
|
||||
- char* cur_code = nl_langinfo(CODESET);
|
||||
+ char* cur_code = currentCharacterEncoding();
|
||||
iconv_t xiconv = iconv_open("UTF-16LE//TRANSLIT", cur_code);
|
||||
dst[0] = 0xff;
|
||||
dst[1] = 0xfe;
|
||||
39
recipes/libmp3lame/all/patches/6416.patch
Normal file
39
recipes/libmp3lame/all/patches/6416.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -421,6 +421,7 @@
|
||||
AC_CHECK_LIB(termcap, initscr, HAVE_TERMCAP="termcap")
|
||||
AC_CHECK_LIB(curses, initscr, HAVE_TERMCAP="curses")
|
||||
AC_CHECK_LIB(ncurses, initscr, HAVE_TERMCAP="ncurses")
|
||||
+AC_CHECK_HEADERS(langinfo.h, AC_CHECK_FUNCS(nl_langinfo))
|
||||
|
||||
AM_ICONV
|
||||
|
||||
--- a/frontend/parse.c
|
||||
+++ b/frontend/parse.c
|
||||
@@ -70,7 +70,7 @@
|
||||
#ifdef HAVE_ICONV
|
||||
#include <iconv.h>
|
||||
#include <errno.h>
|
||||
-#ifdef HAVE_LANGINFO
|
||||
+#ifdef HAVE_LANGINFO_H
|
||||
#include <locale.h>
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
@@ -151,7 +151,7 @@
|
||||
static char*
|
||||
currentCharacterEncoding()
|
||||
{
|
||||
-#ifdef HAVE_LANGINFO
|
||||
+#ifdef HAVE_LANGINFO_H
|
||||
char* cur_code = nl_langinfo(CODESET);
|
||||
#else
|
||||
char* env_lang = getenv("LANG");
|
||||
@@ -1527,7 +1527,7 @@
|
||||
enum TextEncoding id3_tenc = TENC_LATIN1;
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_ICONV
|
||||
+#ifdef HAVE_LANGINFO_H
|
||||
setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
inPath[0] = '\0';
|
||||
11
recipes/libmp3lame/all/patches/android.patch
Normal file
11
recipes/libmp3lame/all/patches/android.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/libmp3lame/util.c
|
||||
+++ b/libmp3lame/util.c
|
||||
@@ -911,7 +911,7 @@
|
||||
mask &= ~(_EM_OVERFLOW | _EM_ZERODIVIDE | _EM_INVALID);
|
||||
_FPU_SETCW(mask);
|
||||
}
|
||||
-# elif defined(__linux__)
|
||||
+# elif defined(__linux__) && !defined(__ANDROID__)
|
||||
{
|
||||
|
||||
# include <fpu_control.h>
|
||||
Reference in New Issue
Block a user