summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2018-12-01 23:18:32 +0000
committerJames Le Cuirot <chewi@gentoo.org>2018-12-02 21:41:31 +0000
commit36e878ee7e983945a26092328ac0487e43abde6a (patch)
tree09d6653084a65c816e36aa9254abdd2041b35af6 /media-video
parentmedia-video/ffmpeg: Use main build for Chromium where possible in v4+ (diff)
downloadgentoo-36e878ee7e983945a26092328ac0487e43abde6a.tar.gz
gentoo-36e878ee7e983945a26092328ac0487e43abde6a.tar.bz2
gentoo-36e878ee7e983945a26092328ac0487e43abde6a.zip
media-video/ffmpeg: Fix chromium-r1.patch to not link every time
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/ffmpeg/files/chromium-r1.patch18
1 files changed, 12 insertions, 6 deletions
diff --git a/media-video/ffmpeg/files/chromium-r1.patch b/media-video/ffmpeg/files/chromium-r1.patch
index cfe06a7aec8d..514780035bc0 100644
--- a/media-video/ffmpeg/files/chromium-r1.patch
+++ b/media-video/ffmpeg/files/chromium-r1.patch
@@ -9,17 +9,23 @@ new file mode 100644
index 0000000..992cf3c
--- /dev/null
+++ b/ffbuild/libffmpeg.mak
-@@ -0,0 +1,21 @@
+@@ -0,0 +1,27 @@
+LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF)
+LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) -o $(LIBFFMPEG)
+
-+libffmpeg-: libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) libswresample/$(LIBPREF)swresample$(LIBSUF)
-+ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) $(EXTRALIBS-swresample)
++ifeq ($(CONFIG_SHARED),yes)
++LIBFFMPEG_DEPS = libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
++else
++LIBFFMPEG_DEPS = libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) libswresample/$(LIBPREF)swresample$(LIBSUF)
++endif
+
-+libffmpeg-yes: libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
++$(LIBFFMPEG): $(LIBFFMPEG_DEPS)
++ifeq ($(CONFIG_SHARED),yes)
+ $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil
++else
++ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(EXTRALIBS-avcodec) $(EXTRALIBS-avformat) $(EXTRALIBS-avutil) $(EXTRALIBS-swresample)
++endif
+
-+$(LIBFFMPEG): libffmpeg-$(CONFIG_SHARED)
+libffmpeg: $(LIBFFMPEG)
+
+install-libffmpeg: $(LIBFFMPEG)
@@ -30,7 +36,7 @@ index 0000000..992cf3c
+uninstall-libffmpeg:
+ $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG)"
+
-+.PHONY: libffmpeg libffmpeg-* install-libffmpeg
++.PHONY: libffmpeg install-libffmpeg uninstall-libffmpeg
--
2.13.1