--- /usr/portage/www-client/chromium/chromium-5.0.335.0.ebuild-orig 2010-02-25 06:06:18.000000000 -0300 +++ /usr/portage/www-client/chromium/chromium-5.0.335.0.ebuild 2010-02-27 00:13:38.649969478 -0300 @@ -24,7 +24,7 @@ >=media-libs/alsa-lib-1.0.19 media-libs/jpeg:0 media-libs/libpng - ffmpeg? ( >=media-video/ffmpeg-0.5_p19787 ) + ffmpeg? ( >=media-video/ffmpeg-0.5_p21602 ) sys-libs/zlib >=x11-libs/gtk+-2.14.7 x11-libs/libXScrnSaver @@ -77,6 +77,26 @@ # bug 297273. epatch "${FILESDIR}"/${PN}-fix-make-build.patch + # In case we don't use system ffmpeg, allow us to compile chromium with + # internal ffmpeg and h264 + if ! use ffmpeg; then + epatch "${FILESDIR}"/${PN}-fix-ffmpeg-branding.patch + + # This needs some fixing, we have to alter the chromium includes of + # ffmpeg, fix the paths inside the include and disable zlib, we will link + # against system + cp third_party/ffmpeg/source/config/Chrome/linux/x64/config.h \ + third_party/ffmpeg/source/config/Chromium/linux/x64/config.h + + sed -e 's/chrome-ffmpeg/chromium-ffmpeg/' \ + -i third_party/ffmpeg/source/config/Chromium/linux/x64/config.h \ + || die "ffmpeg chromium path sed failed" + + sed -e 's/^#define CONFIG_ZLIB 1$/#define CONFIG_ZLIB 0/' \ + -i third_party/ffmpeg/source/config/Chromium/linux/x64/config.h \ + || die "ffmpeg zlib sed failed" + fi + # Disable prefixing to allow linking against system zlib sed -e '/^#include "mozzconf.h"$/d' \ -i third_party/zlib/zconf.h \ @@ -102,13 +122,17 @@ export HOME="${S}" # Configuration options (system libraries) - local myconf="-Duse_system_zlib=1 -Duse_system_bzip2=1 -Duse_system_libevent=1 -Duse_system_libjpeg=1 -Duse_system_libpng=1 -Duse_system_libxml=1 -Duse_system_libxslt=1 -Duse_system_ffmpeg=1" + local myconf="-Duse_system_zlib=1 -Duse_system_bzip2=1 -Duse_system_libevent=1 -Duse_system_libjpeg=1 -Duse_system_libpng=1 -Duse_system_libxml=1 -Duse_system_libxslt=1" # -Duse_system_sqlite=1 : http://crbug.com/22208 # Others still bundled: icu (not possible?), hunspell (changes required for sandbox support) # Sandbox paths myconf="${myconf} -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome" + if use ffmpeg ; then + myconf="${myconf} -Duse_system_ffmpeg=1" + fi + if use amd64 ; then myconf="${myconf} -Dtarget_arch=x64" fi @@ -151,6 +175,11 @@ doexe out/Release/xdg-settings doexe "${FILESDIR}"/chromium-launcher.sh + if ! use ffmpeg; then + doexe out/Release/ffmpegsumo_nolink + doexe out/Release/libffmpegsumo.so # Treat as an exe + fi + insinto ${CHROMIUM_HOME} doins out/Release/chrome.pak