3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
PYTHON_COMPAT=( python3_{9..11} )
|
|
6 |
PYTHON_COMPAT=( python3_{10..12} )
|
7 |
7 |
|
8 |
|
inherit autotools python-any-r1 toolchain-funcs xdg
|
|
8 |
inherit autotools edo python-any-r1 toolchain-funcs xdg
|
9 |
9 |
|
10 |
|
if [[ ${PV} = *9999* ]]; then
|
|
10 |
if [[ ${PV} == *9999* ]]; then
|
11 |
11 |
EGIT_REPO_URI="https://github.com/HandBrake/HandBrake.git"
|
12 |
12 |
inherit git-r3
|
13 |
13 |
else
|
... | ... | |
22 |
22 |
|
23 |
23 |
LICENSE="GPL-2"
|
24 |
24 |
SLOT="0"
|
25 |
|
IUSE="+fdk gstreamer gtk libav-aac numa nvenc x265"
|
|
25 |
IUSE="+fdk gstreamer gtk numa nvenc x265" # TODO: qsv vce
|
26 |
26 |
|
27 |
|
REQUIRED_USE="^^ ( fdk libav-aac )"
|
|
27 |
REQUIRED_USE="numa? ( x265 )"
|
28 |
28 |
|
29 |
|
# < ffmpeg-5.1 dep for bug #907406
|
30 |
29 |
RDEPEND="
|
31 |
|
app-arch/xz-utils
|
|
30 |
>=app-arch/xz-utils-5.2.6
|
32 |
31 |
dev-libs/jansson:=
|
33 |
|
dev-libs/libxml2
|
|
32 |
>=dev-libs/libxml2-2.10.3
|
34 |
33 |
media-libs/a52dec
|
35 |
|
>=media-libs/dav1d-0.5.1:=
|
36 |
|
media-libs/libjpeg-turbo:=
|
37 |
|
media-libs/libass:=
|
38 |
|
>=media-libs/libbluray-1.0:=
|
|
34 |
>=media-libs/dav1d-1.0.0:=
|
|
35 |
>=media-libs/libjpeg-turbo-2.1.4:=
|
|
36 |
>=media-libs/libass-0.16.0:=
|
|
37 |
>=media-libs/libbluray-1.3.4:=
|
39 |
38 |
media-libs/libdvdnav
|
40 |
|
media-libs/libdvdread:=
|
|
39 |
>=media-libs/libdvdread-6.1.3:=
|
41 |
40 |
media-libs/libsamplerate
|
42 |
41 |
media-libs/libtheora
|
43 |
42 |
media-libs/libvorbis
|
44 |
|
>=media-libs/libvpx-1.8:=
|
|
43 |
>=media-libs/libvpx-1.12.0:=
|
45 |
44 |
media-libs/opus
|
46 |
|
media-libs/speex
|
47 |
|
media-libs/x264:=
|
48 |
|
media-libs/zimg
|
|
45 |
>=media-libs/speex-1.2.1
|
|
46 |
>=media-libs/svt-av1-1.4.1
|
|
47 |
>=media-libs/x264-0.0.20220222:=
|
|
48 |
>=media-libs/zimg-3.0.4
|
49 |
49 |
media-sound/lame
|
50 |
|
<media-video/ffmpeg-5.1:=[postproc,fdk?]
|
|
50 |
>=media-video/ffmpeg-5.1.2:=[postproc,fdk?]
|
51 |
51 |
sys-libs/zlib
|
52 |
52 |
fdk? ( media-libs/fdk-aac:= )
|
53 |
53 |
gstreamer? (
|
... | ... | |
71 |
71 |
x11-libs/libnotify
|
72 |
72 |
x11-libs/pango
|
73 |
73 |
)
|
74 |
|
nvenc? ( media-libs/nv-codec-headers )
|
75 |
|
x265? ( >=media-libs/x265-3.2:0=[10bit,12bit,numa?] )
|
|
74 |
nvenc? (
|
|
75 |
media-libs/nv-codec-headers
|
|
76 |
media-video/ffmpeg[nvenc]
|
|
77 |
)
|
|
78 |
x265? ( >=media-libs/x265-3.5-r2:=[10bit,12bit,numa?] )
|
76 |
79 |
"
|
77 |
80 |
DEPEND="${RDEPEND}"
|
78 |
81 |
# cmake needed for custom script: bug #852701
|
... | ... | |
87 |
90 |
# It may work this way; if not, we should try to mimic the duplication.
|
88 |
91 |
"${FILESDIR}/${PN}-9999-remove-dvdnav-dup.patch"
|
89 |
92 |
|
90 |
|
# Remove faac dependency; TODO: figure out if we need to do this at all.
|
91 |
|
"${FILESDIR}/${PN}-9999-remove-faac-dependency.patch"
|
92 |
|
|
93 |
93 |
# Detect system tools - bug 738110
|
94 |
94 |
"${FILESDIR}/${PN}-9999-system-tools.patch"
|
95 |
95 |
|
96 |
96 |
# Use whichever python is set by portage
|
97 |
|
"${FILESDIR}/${PN}-1.3.0-dont-search-for-python.patch"
|
|
97 |
"${FILESDIR}/${PN}-9999-dont-search-for-python.patch"
|
98 |
98 |
|
99 |
99 |
# Fix x265 linkage... again again #730034
|
100 |
100 |
"${FILESDIR}/${PN}-1.3.3-x265-link.patch"
|
101 |
|
|
102 |
|
# Fix compatability with ffmpeg-5.0
|
103 |
|
"${FILESDIR}/${PN}-1.5.1-ffmpeg-5.0.patch"
|
104 |
101 |
)
|
105 |
102 |
|
106 |
103 |
src_prepare() {
|
... | ... | |
125 |
122 |
--force
|
126 |
123 |
--verbose
|
127 |
124 |
--prefix="${EPREFIX}/usr"
|
128 |
|
--disable-gtk-update-checks
|
129 |
125 |
--disable-flatpak
|
130 |
|
--disable-gtk4
|
131 |
|
$(use_enable libav-aac ffmpeg-aac)
|
132 |
|
$(use_enable fdk fdk-aac)
|
133 |
126 |
$(usex !gtk --disable-gtk)
|
|
127 |
--disable-gtk4
|
134 |
128 |
$(usex !gstreamer --disable-gst)
|
|
129 |
$(use_enable x265)
|
135 |
130 |
$(use_enable numa)
|
|
131 |
$(use_enable fdk fdk-aac)
|
|
132 |
--enable-ffmpeg-aac # Forced on
|
136 |
133 |
$(use_enable nvenc)
|
137 |
|
$(use_enable x265)
|
|
134 |
# TODO: $(use_enable qsv)
|
|
135 |
# TODO: $(use_enable vce)
|
138 |
136 |
)
|
139 |
137 |
|
140 |
|
./configure "${myconfargs[@]}" || die "Configure failed."
|
|
138 |
edo ./configure "${myconfargs[@]}"
|
141 |
139 |
}
|
142 |
140 |
|
143 |
141 |
src_compile() {
|