aboutsummaryrefslogtreecommitdiff
path: root/multimedia/xbmc/patches/0002-Revert-linux-link-ffmpeg-statically.patch
blob: a3f8a2cea23d0f10b0d0f209fd2ddb5927ff91f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
From 6df5c168c9de11fa6fdec250ba2b1c732ff3e9a2 Mon Sep 17 00:00:00 2001
From: Michael Cronenworth <mike@cchtml.com>
Date: Sun, 16 Mar 2014 17:23:51 -0500
Subject: [PATCH 2/2] Revert "linux: link ffmpeg statically"

This reverts commit 974a3c0e97b817ca358a959a026db95330673642.

Conflicts:
	Makefile.in
	configure.in
---
 Makefile.in         | 14 ---------------
 configure.in        | 13 +------------
 lib/DllAvCodec.h    |  4 ++--
 lib/DllAvFilter.h   |  2 +-
 lib/DllAvFormat.h   |  8 ++++----
 lib/DllAvUtil.h     |  4 ++--
 lib/DllPostProc.h   |  2 +-
 lib/DllSwResample.h |  4 ++--
 lib/DllSwScale.h    |  4 ++--
 lib/Makefile.in     | 14 --------------
 10 files changed, 15 insertions(+), 54 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 6f689cf..bfadbe6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -472,20 +472,6 @@ ifeq ($(findstring freebsd,@ARCH@),freebsd)
 DYNOBJSXBMC+= xbmc/freebsd/freebsd.a
 endif
 
-ifeq (@USE_STATIC_FFMPEG@,1)
-FFMPEGOBJS = lib/ffmpeg/libavcodec/libavcodec.a \
-             lib/ffmpeg/libavfilter/libavfilter.a \
-             lib/ffmpeg/libswresample/libswresample.a \
-             lib/ffmpeg/libavformat/libavformat.a \
-             lib/ffmpeg/libavutil/libavutil.a \
-             lib/ffmpeg/libpostproc/libpostproc.a \
-             lib/ffmpeg/libswscale/libswscale.a
-DYNOBJSXBMC+= $(FFMPEGOBJS)
-LIBS+= @GNUTLS_ALL_LIBS@ @VORBISENC_ALL_LIBS@ @HOGWEED_ALL_LIBS@
-
-$(FFMPEGOBJS): dvdpcodecs
-endif
-
 ifneq (@USE_LIBXBMC@,1)
 MAINOBJS+=xbmc/main/main.a
 else
diff --git a/configure.in b/configure.in
index c389b76..0c6fc47 100644
--- a/configure.in
+++ b/configure.in
@@ -874,15 +874,6 @@ elif test "$use_arch" = "arm"; then
     fi
   fi
 fi
-if test "$use_static_ffmpeg" = "yes"; then
-  USE_STATIC_FFMPEG=1
-  AC_DEFINE([USE_STATIC_FFMPEG], [1], [link ffmpeg statically])
-  # ffmpeg may depend on gnutls and vorbisenc, we add those libs at the end of linker
-  # command in order to resolve any missing symbols
-  GNUTLS_ALL_LIBS=`${PKG_CONFIG} --static --libs-only-l --silence-errors gnutls`
-  HOGWEED_ALL_LIBS=`${PKG_CONFIG} --static --libs-only-l --silence-errors hogweed nettle`
-  VORBISENC_ALL_LIBS=`${PKG_CONFIG} --static --libs-only-l --silence-errors vorbisenc`
-fi 
 
 # Checks for library functions.
 AC_FUNC_ALLOCA
@@ -2627,7 +2618,6 @@ AC_SUBST(DISABLE_FISHBMC)
 AC_SUBST(DISABLE_PROJECTM)
 AC_SUBST(USE_SKIN_TOUCHED)
 AC_SUBST(USE_EXTERNAL_FFMPEG)
-AC_SUBST(USE_STATIC_FFMPEG)
 AC_SUBST(USE_LIBAV_HACKS)
 AC_SUBST(PYTHON_VERSION)
 AC_SUBST(OUTPUT_FILES)
@@ -2673,9 +2663,6 @@ AC_SUBST(USE_ANDROID)
 AC_SUBST(GTEST_CONFIGURED)
 AC_SUBST(USE_DOXYGEN)
 AC_SUBST(USE_PVR_ADDONS)
-AC_SUBST(GNUTLS_ALL_LIBS)
-AC_SUBST(HOGWEED_ALL_LIBS)
-AC_SUBST(VORBISENC_ALL_LIBS)
 
 # pushd and popd are not available in other shells besides bash, so implement
 # our own pushd/popd functions
@@ -2832,7 +2819,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [
       --disable-ffserver \
       --disable-ffmpeg \
       --disable-crystalhd \
-      `if test "$use_static_ffmpeg" = "yes"; then echo --enable-static --disable-shared; else echo --disable-static --enable-shared; fi` \
+      --enable-shared \
       --disable-doc \
       --enable-postproc \
       --enable-gpl \
diff --git a/lib/DllAvCodec.h b/lib/DllAvCodec.h
index af13a15..5cef736 100644
--- a/lib/DllAvCodec.h
+++ b/lib/DllAvCodec.h
@@ -94,7 +94,7 @@ public:
   virtual AVDictionary* av_frame_get_metadata(const AVFrame* frame)=0;
 };
 
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
 
 // Use direct layer
 class DllAvCodec : public DllDynamic, DllAvCodecInterface
@@ -166,7 +166,7 @@ public:
   // DLL faking.
   virtual bool ResolveExports() { return true; }
   virtual bool Load() {
-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
+#if !defined(TARGET_DARWIN)
     CLog::Log(LOGDEBUG, "DllAvCodec: Using libavcodec system library");
 #endif
     return true;
diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
index 05e5c6f..2200bfa 100644
--- a/lib/DllAvFilter.h
+++ b/lib/DllAvFilter.h
@@ -104,7 +104,7 @@ public:
 #endif
 };
 
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
 // Use direct mapping
 class DllAvFilter : public DllDynamic, DllAvFilterInterface
 {
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h
index fc7e166..0016c0b 100644
--- a/lib/DllAvFormat.h
+++ b/lib/DllAvFormat.h
@@ -41,7 +41,7 @@ extern "C" {
   void xbmc_read_frame_flush(AVFormatContext *s);
 #else
   #include "libavformat/avformat.h"
-  #if defined(TARGET_DARWIN) || defined(USE_STATIC_FFMPEG)
+  #if defined(TARGET_DARWIN)
     void ff_read_frame_flush(AVFormatContext *s);    // internal replacement 
     #define xbmc_read_frame_flush ff_read_frame_flush
   #endif
@@ -73,7 +73,7 @@ public:
   virtual int av_read_play(AVFormatContext *s)=0;
   virtual int av_read_pause(AVFormatContext *s)=0;
   virtual int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)=0;
-#if (!defined USE_EXTERNAL_FFMPEG) && (!defined TARGET_DARWIN) && (!defined USE_STATIC_FFMPEG)
+#if (!defined USE_EXTERNAL_FFMPEG) && (!defined TARGET_DARWIN)
   virtual int avformat_find_stream_info_dont_call(AVFormatContext *ic, AVDictionary **options)=0;
 #endif
   virtual int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)=0;
@@ -108,7 +108,7 @@ public:
 #endif
 };
 
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) 
 
 // Use direct mapping
 class DllAvFormat : public DllDynamic, DllAvFormatInterface
@@ -170,7 +170,7 @@ public:
   // DLL faking.
   virtual bool ResolveExports() { return true; }
   virtual bool Load() {
-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
+#if !defined(TARGET_DARWIN)
     CLog::Log(LOGDEBUG, "DllAvFormat: Using libavformat system library");
 #endif
     CSingleLock lock(DllAvCodec::m_critSection);
diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h
index 0fcdf10..ce5889b 100644
--- a/lib/DllAvUtil.h
+++ b/lib/DllAvUtil.h
@@ -116,7 +116,7 @@ public:
 #endif
 };
 
-#if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
+#if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
 // Use direct layer
 class DllAvUtilBase : public DllDynamic, DllAvUtilInterface
 {
@@ -174,7 +174,7 @@ public:
    // DLL faking.
    virtual bool ResolveExports() { return true; }
    virtual bool Load() {
-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
+#if !defined(TARGET_DARWIN)
      CLog::Log(LOGDEBUG, "DllAvUtilBase: Using libavutil system library");
 #endif
      return true;
diff --git a/lib/DllPostProc.h b/lib/DllPostProc.h
index e9542eb..0265651 100644
--- a/lib/DllPostProc.h
+++ b/lib/DllPostProc.h
@@ -78,7 +78,7 @@ public:
   virtual void pp_free_context(pp_context *ppContext)=0;
 };
 
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) 
 
 // We call directly.
 class DllPostProc : public DllDynamic, DllPostProcInterface
diff --git a/lib/DllSwResample.h b/lib/DllSwResample.h
index cd1452b..854d250 100644
--- a/lib/DllSwResample.h
+++ b/lib/DllSwResample.h
@@ -60,7 +60,7 @@ public:
   virtual int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance) = 0;
 };
 
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) 
 
 // Use direct mapping
 class DllSwResample : public DllDynamic, DllSwResampleInterface
@@ -71,7 +71,7 @@ public:
   // DLL faking.
   virtual bool ResolveExports() { return true; }
   virtual bool Load() {
-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
+#if !defined(TARGET_DARWIN)
     CLog::Log(LOGDEBUG, "DllAvFormat: Using libswresample system library");
 #endif
     return true;
diff --git a/lib/DllSwScale.h b/lib/DllSwScale.h
index 97e3b40..36bb616 100644
--- a/lib/DllSwScale.h
+++ b/lib/DllSwScale.h
@@ -87,7 +87,7 @@ public:
    virtual void sws_freeContext(struct SwsContext *context)=0;
 };
 
-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
+#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) 
 
 // We call into this library directly.
 class DllSwScale : public DllDynamic, public DllSwScaleInterface
@@ -111,7 +111,7 @@ public:
   // DLL faking.
   virtual bool ResolveExports() { return true; }
   virtual bool Load() {
-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
+#if !defined(TARGET_DARWIN)
     CLog::Log(LOGDEBUG, "DllSwScale: Using libswscale system library");
 #endif
     return true;
diff --git a/lib/Makefile.in b/lib/Makefile.in
index ca18a4a..906219c 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -27,7 +27,6 @@ endif
 
 LIBS=
 ifneq (@USE_EXTERNAL_FFMPEG@,1)
-ifneq (@USE_STATIC_FFMPEG@,1)
   LIBS+=$(AVUTIL_SO) \
 	$(AVCODEC_SO) \
 	$(AVFORMAT_SO) \
@@ -36,12 +35,10 @@ ifneq (@USE_STATIC_FFMPEG@,1)
 	$(SWSCALE_SO) \
 	$(SWRESAMPLE_SO)
 endif
-endif
 
 .PHONY: $(DIRS) codecs
 
 ifneq ($(findstring osx,$(ARCH)), osx)
-ifneq (@USE_STATIC_FFMPEG@,1)
 
 codecs: $(addprefix $(SYSDIR)/, $(LIBS));
 
@@ -74,17 +71,6 @@ ffmpeg/libswscale/libswscale.so   : ffmpeg;
 ffmpeg/libpostproc/libpostproc.so : ffmpeg;
 ffmpeg/libswresample/libswresample.so : ffmpeg;
 endif
-endif
-
-ifeq (@USE_STATIC_FFMPEG@,1)
-ffmpeg/libavutil/libavutil.a     : ffmpeg;
-ffmpeg/libavcodec/libavcodec.a   : ffmpeg;
-ffmpeg/libavformat/libavformat.a : ffmpeg;
-ffmpeg/libavfilter/libavfilter.a : ffmpeg;
-ffmpeg/libswscale/libswscale.a   : ffmpeg;
-ffmpeg/libpostproc/libpostproc.a : ffmpeg;
-ffmpeg/libswresample/libswresample.a : ffmpeg;
-endif
 
 ffmpeg:
 	$(MAKE) -C $@
-- 
1.8.5.3