pkgname=chromium-ffmpeg-codecs pkgver=129.0.6668.58 pkgrel=1 pkgdesc="Extra ffmpeg codecs from the Chromium Browser for use in other browsers" arch=('x86_64') url="https://ffmpeg.org/" license=('LGPL2.1') depends=('gtk3') makedepends=('ninja' 'nss' 'python3' 'gn' 'clang' 'libva' 'libevdev') options=('!strip') groups=('network-web' 'multimedia') source=("https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${pkgver}.tar.xz" 'glibc2.34.patch' 'ffmpeg_clang.patch') #"https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-FORTIFY_SOURCE-r2.patch" #"https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-memcpy-r0.patch" #"https://raw.githubusercontent.com/gentoo/gentoo/master/www-client/chromium/files/chromium-clang-r2.patch") md5sums=('de7ffaa7f1605bf89e71e8ee753fb318' 'd4c8aed09b852568a58591933b7b0c96' '767e3e82f89de949909eb990204185cd') build() { cd chromium-${pkgver} #touch chrome/test/data/webui/i18n_process_css_test.html #sed -i "s|base/callback_internal.cc|base/callback_helpers.cc|g" tools/gn/bootstrap/bootstrap.py # from https://github.com/gentoo/gentoo/tree/master/www-client/chromium/files #patch -p1 -i ${srcdir}/ffmpeg_clang.patch #patch -p1 -i ${srcdir}/chromium-FORTIFY_SOURCE-r2.patch #patch -p1 -i ${srcdir}/glibc2.34.patch export CC="/usr/bin/clang" export CXX="/usr/bin/clang++" #sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py python3 tools/clang/scripts/update.py python3 tools/rust/update_rust.py #mkdir -p third_party/node/linux/node-linux-x64/bin/ #ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/node local _flags=("ffmpeg_branding=\"ChromeOS\"" 'proprietary_codecs=true' 'enable_platform_hevc=true' 'enable_platform_ac3_eac3_audio=true' 'enable_platform_mpeg_h_audio=true' 'enable_platform_dolby_vision=true' 'enable_mse_mpeg2ts_stream_parser=true' 'use_qt=false' 'use_kerberos=false' 'use_cups=false' 'use_sysroot=false' 'use_gold=false' 'is_clang=true' 'clang_use_chrome_plugins=true' 'fatal_linker_warnings=false' 'treat_warnings_as_errors=false' 'enable_nacl=false' 'is_component_build=false' 'is_component_ffmpeg=true' 'is_debug=false' 'symbol_level=0' 'use_custom_libcxx=true' 'use_glib=false' 'ozone_platform_x11=false' ) gn gen -v \ --args="${_flags[*]}" \ --script-executable=/usr/bin/python3 \ out/ffmpegso ninja -C out/ffmpegso libffmpeg.so } package() { cd chromium-${pkgver} install -Dm644 out/ffmpegso/libffmpeg.so ${pkgdir}/usr/lib/chromium/libs/libffmpeg.so }