summaryrefslogtreecommitdiff
path: root/recipes/bzip2
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-12-15 04:15:53 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-12-15 04:15:53 +0530
commit07eb9b0c4b8f16035d94d32ed7a201d60938b523 (patch)
tree343e5eab8d91c0b9c09b2b82fbe988d38a86124d /recipes/bzip2
parent4e63d73d0957bec16754eaa2712c521c3f13a0ba (diff)
bzip2.recipe: Fix build error in ffmpeg with MinGW
include/bzlib.h:114:17: error: two or more data types in declaration specifiers include/bzlib.h:138:13: error: two or more data types in declaration specifiers include/bzlib.h:214:21: error: two or more data types in declaration specifiers Also touch bzip2.recipe so that it gets rebuilt.
Diffstat (limited to 'recipes/bzip2')
-rw-r--r--recipes/bzip2/add-meson-build-files.patch114
1 files changed, 95 insertions, 19 deletions
diff --git a/recipes/bzip2/add-meson-build-files.patch b/recipes/bzip2/add-meson-build-files.patch
index 45e3475f..c0605939 100644
--- a/recipes/bzip2/add-meson-build-files.patch
+++ b/recipes/bzip2/add-meson-build-files.patch
@@ -1,7 +1,7 @@
-From 42f2a11dbe251cea54844a987ca0e0715b1d8ca9 Mon Sep 17 00:00:00 2001
+From 6c85a583572229922ff685f353feedbeaeecf0d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
Date: Fri, 15 Apr 2016 11:24:29 +0100
-Subject: [PATCH 1/9] bzlib.h: don't use WINAPI and add
+Subject: [PATCH 01/12] bzlib.h: don't use WINAPI and add
__declspec(dllexport/dllimport)
windows.h does #define WINAPI __stdcall but we want
@@ -40,10 +40,10 @@ index 8277123..219a94f 100644
2.19.1
-From 1543a0a9fafc58ea2548cfbbb382f2672703159d Mon Sep 17 00:00:00 2001
+From 48f1c5863d1f8ec32f682d010dbe772a9d46e0bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
Date: Fri, 15 Apr 2016 11:26:43 +0100
-Subject: [PATCH 2/9] meson: add meson build for bz2
+Subject: [PATCH 02/12] meson: add meson build for bz2
---
meson.build | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -137,10 +137,10 @@ index 0000000..7f70507
2.19.1
-From 7e5370733be5a318b862a65667cfe63cd9873791 Mon Sep 17 00:00:00 2001
+From 28dba9f327e19a9cd13a9259a1f59d65b36bd7d8 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 17 Jun 2016 15:55:36 +0530
-Subject: [PATCH 3/9] bzlib.h: Don't need to #include windows.h anymore
+Subject: [PATCH 03/12] bzlib.h: Don't need to #include windows.h anymore
We no longer use the WINAPI macro
---
@@ -167,10 +167,10 @@ index 219a94f..955baf4 100644
2.19.1
-From 07d00c5c16ff44800b8737c7d948d2d9beb057a8 Mon Sep 17 00:00:00 2001
+From 580d70a187dab25820523e88af26dea67e047fd8 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 17 Jun 2016 15:57:54 +0530
-Subject: [PATCH 4/9] bzlib.h: Don't use dllimport/dllexport when
+Subject: [PATCH 04/12] bzlib.h: Don't use dllimport/dllexport when
BZ_STATIC_COMPILATION is defined
This allows code to see the correct prototypes for linking to the static
@@ -199,10 +199,10 @@ index 955baf4..acc6bf8 100644
2.19.1
-From bcc6bbdb93c5591945ddd4c499f49c6caf56e474 Mon Sep 17 00:00:00 2001
+From e51a4a15b20abf422fba043cdd5b8f2ebd537872 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 17 Jun 2016 15:59:11 +0530
-Subject: [PATCH 5/9] meson: soversion should be an unsigned integer
+Subject: [PATCH 05/12] meson: soversion should be an unsigned integer
Either as an integer, or as a string containing an integer
---
@@ -226,10 +226,10 @@ index 7f70507..8146535 100644
2.19.1
-From 14306fd5a9c3f12cb7c36af6c8b4719234586540 Mon Sep 17 00:00:00 2001
+From 4d9a917d818c45a008ad20121fbdfb45ac04c5cb Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 17 Jun 2016 16:00:21 +0530
-Subject: [PATCH 6/9] meson: Ignore warnings about 'insecure functions' that
+Subject: [PATCH 06/12] meson: Ignore warnings about 'insecure functions' that
are used everywhere by bz2
---
@@ -254,10 +254,10 @@ index 8146535..bc333c5 100644
2.19.1
-From 25bbfc99440c0a6183aa8a6f367391716b7b4e50 Mon Sep 17 00:00:00 2001
+From aca8425eab7095c97980d83edf3527d06617768e Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 13 Dec 2018 20:19:18 +0530
-Subject: [PATCH 7/9] Update to latest meson, fix MSVC support, etc.
+Subject: [PATCH 07/12] Update to latest meson, fix MSVC support, etc.
---
meson.build | 61 ++++++++++++++++++++++++-----------------------------
@@ -361,10 +361,10 @@ index bc333c5..c2cb942 100644
2.19.1
-From 96d60e1713e1ca30d472d043ccb9e1b4e15d2be9 Mon Sep 17 00:00:00 2001
+From 70ca7688f527cf17078b6e6551ef7800550a3e0a Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 13 Dec 2018 20:22:55 +0530
-Subject: [PATCH 8/9] Don't use __declspec(dllimport/export) for symbol
+Subject: [PATCH 08/12] Don't use __declspec(dllimport/export) for symbol
exporting
This partially reverts commit 42f2a11dbe251cea54844a987ca0e0715b1d8ca9.
@@ -403,10 +403,10 @@ index acc6bf8..8a0363d 100644
2.19.1
-From c13f8250377ae78357528770ce87cc35c4a2fae3 Mon Sep 17 00:00:00 2001
+From ed95413aa0bd4d6f435b53429cf56dcdea98834b Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 13 Dec 2018 20:26:34 +0530
-Subject: [PATCH 9/9] libbz2.def: Don't encode the library name
+Subject: [PATCH 09/12] libbz2.def: Don't encode the library name
With MSVC we output bz2.dll, not libbz2.dll
---
@@ -425,10 +425,11 @@ index 2dc0dd8..6e4ddf6 100644
--
2.19.1
+
From 9984c2128e15d309a85922599d54366387265c57 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 14 Dec 2018 14:29:38 +0530
-Subject: [PATCH] Don't use \ in #include lines
+Subject: [PATCH 10/12] Don't use \ in #include lines
Causes a build failure with MinGW, and is also against the convention
around path separators in #include lines.
@@ -452,3 +453,78 @@ index 6de9d1d..dc626a4 100644
--
2.19.1
+
+From 928fd716ecffa87f47d47585a9e09ff364c7689a Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@centricular.com>
+Date: Sat, 15 Dec 2018 03:41:52 +0530
+Subject: [PATCH 11/12] meson: Set the dylib current_version as the project
+ version
+
+Just for completeness in ABI compatibility.
+---
+ meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/meson.build b/meson.build
+index c2cb942..400a1c3 100644
+--- a/meson.build
++++ b/meson.build
+@@ -36,6 +36,7 @@ libbz2 = library('bz2', bzip2_sources,
+ include_directories : bz2_incs,
+ install : true,
+ vs_module_defs : 'libbz2.def',
++ darwin_versions : ['1', meson.project_version()],
+ kwargs : libkwargs,
+ )
+
+--
+2.19.1
+
+
+From d98301c372c5066c22410cb8323da08badd4de64 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@centricular.com>
+Date: Sat, 15 Dec 2018 04:12:36 +0530
+Subject: [PATCH 12/12] Don't use 'small' as a function prototype parameter
+
+While using MinGW or targetting old Windows versions, windows.h defines
+`small` as `char`, which results in a compiler error:
+
+error: two or more data types in declaration specifiers
+---
+ bzlib.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/bzlib.h b/bzlib.h
+index 8a0363d..5dd7461 100644
+--- a/bzlib.h
++++ b/bzlib.h
+@@ -111,7 +111,7 @@ BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
+ BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
+ bz_stream *strm,
+ int verbosity,
+- int small
++ int small_
+ );
+
+ BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
+@@ -135,7 +135,7 @@ BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
+ int* bzerror,
+ FILE* f,
+ int verbosity,
+- int small,
++ int small_,
+ void* unused,
+ int nUnused
+ );
+@@ -211,7 +211,7 @@ BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
+ unsigned int* destLen,
+ char* source,
+ unsigned int sourceLen,
+- int small,
++ int small_,
+ int verbosity
+ );
+
+--
+2.19.1
+