From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/handbrake/
Date: Sun, 22 Dec 2024 06:21:41 +0000 (UTC) [thread overview]
Message-ID: <1734848428.ec4706608de044508e04021fd40e6cdcf79b87f9.sam@gentoo> (raw)
commit: ec4706608de044508e04021fd40e6cdcf79b87f9
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Mon Dec 16 02:50:41 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 22 06:20:28 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec470660
media-video/handbrake: update live
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-video/handbrake/handbrake-9999.ebuild | 179 ++++++++++++++++++----------
1 file changed, 114 insertions(+), 65 deletions(-)
diff --git a/media-video/handbrake/handbrake-9999.ebuild b/media-video/handbrake/handbrake-9999.ebuild
index d12123f0bf5e..87d75de6700c 100644
--- a/media-video/handbrake/handbrake-9999.ebuild
+++ b/media-video/handbrake/handbrake-9999.ebuild
@@ -3,9 +3,12 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
-inherit autotools edo python-any-r1 toolchain-funcs xdg
+inherit edo flag-o-matic multiprocessing python-any-r1 toolchain-funcs xdg
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="https://handbrake.fr/ https://github.com/HandBrake/HandBrake"
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/HandBrake/HandBrake.git"
@@ -17,27 +20,49 @@ else
KEYWORDS="~amd64 ~arm64 ~x86"
fi
-DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
-HOMEPAGE="https://handbrake.fr/ https://github.com/HandBrake/HandBrake"
+# contrib/<project>/module.defs
+declare -A BUNDLED=(
+ # Heavily patched in an incompatible way.
+ # Issues related to using system ffmpeg historically.
+ # See bug #829595 and #922828
+ [ffmpeg]="https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs2/ffmpeg-7.1.tar.bz2;"
+ # Patched in an incompatible way
+ [x265]="https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs2/x265_4.1.tar.gz;x265"
+ [x265_8bit]="https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs2/x265_4.1.tar.gz;x265"
+ [x265_10bit]="https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs2/x265_4.1.tar.gz;x265"
+ [x265_12bit]="https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs2/x265_4.1.tar.gz;x265"
+)
+
+bundle_src_uri() {
+ for name in "${!BUNDLED[@]}"; do
+ IFS=$';' read -r uri use <<< ${BUNDLED[${name}]}
+ local tarball=${uri##*/}
+ if [[ -n ${use} ]]; then
+ SRC_URI+=" ${use}? ( ${uri} -> handbrake-${tarball} )"
+ else
+ SRC_URI+=" ${uri} -> handbrake-${tarball}"
+ fi
+ done
+}
+
+bundle_src_uri
LICENSE="GPL-2"
SLOT="0"
-IUSE="+fdk gstreamer gtk numa nvenc x265" # TODO: qsv vce
+IUSE="amf +fdk gui libdovi numa nvenc qsv x265"
REQUIRED_USE="numa? ( x265 )"
-RDEPEND="
+COMMON_DEPEND="
+ app-arch/bzip2
>=app-arch/xz-utils-5.2.6
dev-libs/jansson:=
- >=dev-libs/libxml2-2.10.3
- media-libs/a52dec
>=media-libs/dav1d-1.0.0:=
>=media-libs/libjpeg-turbo-2.1.4:=
>=media-libs/libass-0.16.0:=
>=media-libs/libbluray-1.3.4:=
media-libs/libdvdnav
>=media-libs/libdvdread-6.1.3:=
- media-libs/libsamplerate
media-libs/libtheora
media-libs/libvorbis
>=media-libs/libvpx-1.12.0:=
@@ -47,95 +72,119 @@ RDEPEND="
>=media-libs/x264-0.0.20220222:=
>=media-libs/zimg-3.0.4
media-sound/lame
- >=media-video/ffmpeg-5.1.2:=[postproc,fdk?]
sys-libs/zlib
fdk? ( media-libs/fdk-aac:= )
- gstreamer? (
- media-libs/gstreamer:1.0
- media-libs/gst-plugins-base:1.0
- media-libs/gst-plugins-good:1.0
- media-libs/gst-plugins-bad:1.0
- media-libs/gst-plugins-ugly:1.0
- media-plugins/gst-plugins-a52dec:1.0
- media-plugins/gst-plugins-libav:1.0
- media-plugins/gst-plugins-x264:1.0
- media-plugins/gst-plugins-gdkpixbuf:1.0
- )
- gtk? (
- >=x11-libs/gtk+-3.10
- dev-libs/dbus-glib
+ libdovi? ( media-libs/libdovi:= )
+ gui? (
+ >=gui-libs/gtk-4.4:4[gstreamer]
dev-libs/glib:2
- dev-libs/libgudev:=
- x11-libs/cairo
+ >=dev-libs/libxml2-2.10.3
x11-libs/gdk-pixbuf:2
- x11-libs/libnotify
x11-libs/pango
)
- nvenc? (
- media-libs/nv-codec-headers
- media-video/ffmpeg[nvenc]
+ numa? ( sys-process/numactl )
+ nvenc? ( media-libs/nv-codec-headers )
+ qsv? (
+ media-libs/libva:=
+ media-libs/libvpl:=
)
- x265? ( >=media-libs/x265-3.5-r2:=[10bit,12bit,numa?] )
"
-DEPEND="${RDEPEND}"
+RDEPEND="
+ ${COMMON_DEPEND}
+ amf? ( media-video/amdgpu-pro-amf )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ amf? ( media-libs/amf-headers )
+"
# cmake needed for custom script: bug #852701
BDEPEND="
${PYTHON_DEPS}
dev-build/cmake
dev-lang/nasm
+ gui? (
+ dev-build/meson
+ sys-devel/gettext
+ )
"
PATCHES=(
- # Remove libdvdnav duplication and call it on the original instead.
- # It may work this way; if not, we should try to mimic the duplication.
- "${FILESDIR}/${PN}-9999-remove-dvdnav-dup.patch"
+ "${FILESDIR}"/handbrake-1.9.0-link-libdovi-properly.patch
+ "${FILESDIR}"/handbrake-1.9.0-include-vpl-properly.patch
+)
- # Detect system tools - bug 738110
- "${FILESDIR}/${PN}-9999-system-tools.patch"
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.bz2
+ fi
+}
- # Use whichever python is set by portage
- "${FILESDIR}/${PN}-9999-dont-search-for-python.patch"
+src_prepare() {
+ mkdir download || die
+ for name in "${!BUNDLED[@]}"; do
+ IFS=$';' read -r uri use <<< ${BUNDLED[${name}]}
+ local tarball="${uri##*/}"
+ if [[ -n ${use} ]]; then
+ use ${use} || continue
+ fi
+ cp "${DISTDIR}/handbrake-${tarball}" download/${tarball} || die
+ done
+
+ # Get rid of leftover bundled library build definitions
+ sed -i -E \
+ -e "/MODULES \+= contrib\// { /($(IFS=$'|'; echo "${!BUNDLED[*]}"))$/! d }" \
+ "${S}"/make/include/main.defs || die
+
+ # noop fetching
+ sed -i -e '/DF..*.exe/ { s/= .*/= true/ }' make/include/tool.defs || die
+
+ # noop strip
+ sed -i \
+ -e "s/\(strip\s*= ToolProbe( 'STRIP.exe',\s*'strip',\s*\)'strip'/\1'true'/" \
+ make/configure.py || die
- # Fix x265 linkage... again again #730034
- "${FILESDIR}/${PN}-1.3.3-x265-link.patch"
-)
+ # Use whichever python is set by portage
+ sed -i -e "s/for p in .*/for p in ${EPYTHON}/" configure || die
-src_prepare() {
- # Get rid of leftover bundled library build definitions,
- sed -i 's:.*\(/contrib\|contrib/\).*::g' \
- "${S}"/make/include/main.defs \
- || die "Contrib removal failed."
+ for tool in ar ranlib libtool; do
+ # Detect system tools - bug 738110
+ sed -i \
+ -e "s/\(${tool}\s*= ToolProbe( '${tool^^}.exe',\s*'${tool}',\s*\)'${tool}'/\1os.environ.get('${tool^^}', '${tool}')/" \
+ make/configure.py || die
+ done
default
-
- cd "${S}/gtk" || die
- eautoreconf
}
src_configure() {
- tc-export AR RANLIB STRIP
+ tc-export AR RANLIB
+
+ # ODR violations, lto-type-mismatches
+ # bug #878899
+ filter-lto
- # Libav was replaced in 1.2 with ffmpeg by default
- # but I've elected to not make people change their use flags for AAC
- # as its the same code anyway
local myconfargs=(
--force
--verbose
+ --disable-df-fetch
+ --disable-df-verify
+ --launch-jobs=$(get_makeopts_jobs)
--prefix="${EPREFIX}/usr"
--disable-flatpak
- $(usex !gtk --disable-gtk)
- --disable-gtk4
- $(usex !gstreamer --disable-gst)
- $(use_enable x265)
- $(use_enable numa)
+ --no-harden #bug #890279
+ $(use_enable amf vce)
$(use_enable fdk fdk-aac)
- --enable-ffmpeg-aac # Forced on
+ $(use_enable gui gtk)
+ $(use_enable libdovi)
+ $(use_enable numa)
$(use_enable nvenc)
- # TODO: $(use_enable qsv)
- # TODO: $(use_enable vce)
+ $(use_enable x265)
+ $(use_enable qsv)
)
- edo ./configure "${myconfargs[@]}"
+ edo ./configure ${myconfargs[@]}
}
src_compile() {
@@ -155,8 +204,8 @@ pkg_postinst() {
einfo "report bugs to Gentoo's bugzilla or Multimedia forum instead."
einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
- if use gtk ; then
- einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
+ if use gui ; then
+ einfo "For the GUI version of HandBrake, you can run \`ghb\`."
fi
xdg_pkg_postinst
next reply other threads:[~2024-12-22 6:21 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 6:21 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-06 14:12 [gentoo-commits] repo/gentoo:master commit in: media-video/handbrake/ Sam James
2025-09-06 14:12 Sam James
2025-09-06 14:12 Sam James
2025-08-25 10:04 Sam James
2025-08-23 7:39 Sam James
2025-07-31 6:59 Sam James
2025-07-31 6:59 Sam James
2025-06-30 21:10 Sam James
2025-06-15 22:30 Sam James
2025-05-21 20:59 Sam James
2025-05-21 20:59 Sam James
2025-05-06 18:43 Sam James
2025-05-06 18:42 Sam James
2025-05-06 18:42 Sam James
2025-05-06 18:42 Sam James
2025-05-06 18:42 Sam James
2025-04-12 20:50 Sam James
2024-12-22 6:21 Sam James
2024-12-22 6:21 Sam James
2024-10-31 22:27 Andreas K. Hüttel
2024-08-13 4:55 Michał Górny
2024-01-28 22:53 Jonas Stein
2023-09-27 13:22 Joonas Niilola
2023-07-12 7:37 Sam James
2023-07-12 7:37 Sam James
2023-07-12 7:33 Sam James
2023-06-03 5:15 Sam James
2023-06-01 3:27 Sam James
2023-05-06 11:34 Sam James
2023-05-03 4:45 Sam James
2023-04-07 11:44 Sam James
2022-06-20 2:35 Sam James
2022-06-20 2:35 Sam James
2022-06-18 16:54 Agostino Sarubbo
2022-01-16 2:23 Sam James
2022-01-16 2:23 Sam James
2021-12-30 4:42 Sam James
2021-12-29 12:11 Jakov Smolić
2021-10-25 3:52 Sam James
2021-10-24 8:44 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-24 8:27 Sam James
2021-10-16 1:24 Sam James
2021-09-25 19:08 Sam James
2021-06-01 14:05 Sam James
2021-05-31 23:19 Sam James
2021-05-31 23:19 Sam James
2021-05-31 23:19 Sam James
2020-09-14 19:31 Michał Górny
2020-05-23 9:51 Ian Whyman
2020-04-26 18:27 Mikle Kolyada
2020-04-19 2:35 Craig Andrews
2019-11-15 20:50 Ian Whyman
2019-03-12 21:55 Ian Whyman
2019-03-09 10:34 Ian Whyman
2018-10-25 18:34 Ian Whyman
2018-07-29 8:42 Ian Whyman
2018-05-05 13:30 Ian Whyman
2018-04-15 14:18 Ian Whyman
2017-11-26 23:11 David Seifert
2017-05-12 21:22 Ian Whyman
2017-03-06 17:27 Ian Whyman
2017-03-04 22:35 Ian Whyman
2017-03-04 13:37 Alexis Ballier
2017-01-07 1:22 Lars Wendler
2016-09-27 22:34 Lars Wendler
2016-07-10 14:06 Ian Whyman
2016-05-22 11:28 Ian Whyman
2016-05-22 11:19 Ian Whyman
2016-04-19 21:13 Ian Stakenvicius
2016-03-31 12:45 Lars Wendler
2015-10-11 14:42 Alexis Ballier
2015-08-27 19:24 Ian Whyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1734848428.ec4706608de044508e04021fd40e6cdcf79b87f9.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox