summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2018-01-18 22:00:00 +0000
committerJames Le Cuirot <chewi@gentoo.org>2018-01-18 22:01:05 +0000
commit4ee1f92d3a83a75687e14feb178eb5748d9a0957 (patch)
tree3758180822a9b6e2371a863b521714e0f5460085 /media-video/ffmpeg
parenteclass/linux-mod.eclass: only need EAPI>0 if using IUSE default. (diff)
downloadgentoo-4ee1f92d3a83a75687e14feb178eb5748d9a0957.tar.gz
gentoo-4ee1f92d3a83a75687e14feb178eb5748d9a0957.tar.bz2
gentoo-4ee1f92d3a83a75687e14feb178eb5748d9a0957.zip
media-video/ffmpeg: Revert chromium.patch change and add -r1 for 9999
My change to fix 9999 in 31be70b4de8dc1f3627765a4a35a4b5cf90a170f broke all versions when ffmpeg is not already installed. I have reverted this change for earlier versions and introduced a new patch with a different approach for 9999. Closes: https://bugs.gentoo.org/643750 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'media-video/ffmpeg')
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild2
-rw-r--r--media-video/ffmpeg/files/chromium-r1.patch36
-rw-r--r--media-video/ffmpeg/files/chromium.patch2
3 files changed, 38 insertions, 2 deletions
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index f78260745ad0..bae322e21e76 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -291,7 +291,7 @@ RESTRICT="
S=${WORKDIR}/${P/_/-}
PATCHES=(
- "${FILESDIR}"/chromium.patch
+ "${FILESDIR}"/chromium-r1.patch
)
MULTILIB_WRAPPED_HEADERS=(
diff --git a/media-video/ffmpeg/files/chromium-r1.patch b/media-video/ffmpeg/files/chromium-r1.patch
new file mode 100644
index 000000000000..cfe06a7aec8d
--- /dev/null
+++ b/media-video/ffmpeg/files/chromium-r1.patch
@@ -0,0 +1,36 @@
+Allow libffmpeg to be built for Chromium-based browsers
+https://patchwork.ffmpeg.org/patch/4500/
+
+NOTE: This patch lacks the Makefile include line. We append it
+manually instead to make patching across different versions easier.
+
+diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak
+new file mode 100644
+index 0000000..992cf3c
+--- /dev/null
++++ b/ffbuild/libffmpeg.mak
+@@ -0,0 +1,21 @@
++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)
++
++libffmpeg-yes: libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
++ $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil
++
++$(LIBFFMPEG): libffmpeg-$(CONFIG_SHARED)
++libffmpeg: $(LIBFFMPEG)
++
++install-libffmpeg: $(LIBFFMPEG)
++ $(Q)mkdir -p "$(SHLIBDIR)/chromium"
++ $(INSTALL) -m 755 $< "$(SHLIBDIR)/chromium/$<"
++ $(STRIP) "$(SHLIBDIR)/chromium/$<"
++
++uninstall-libffmpeg:
++ $(RM) "$(SHLIBDIR)/chromium/$(LIBFFMPEG)"
++
++.PHONY: libffmpeg libffmpeg-* install-libffmpeg
+--
+2.13.1
+
diff --git a/media-video/ffmpeg/files/chromium.patch b/media-video/ffmpeg/files/chromium.patch
index 307f31f4a3a5..60a3e5d6cb99 100644
--- a/media-video/ffmpeg/files/chromium.patch
+++ b/media-video/ffmpeg/files/chromium.patch
@@ -14,7 +14,7 @@ index 0000000..992cf3c
+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 $(FF_EXTRALIBS)
++ $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(FFEXTRALIBS)
+
+libffmpeg-yes: libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
+ $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil