media-video/handbrake: 1.3.0 Bump
authorIan Whyman <thev00d00@gentoo.org>
Fri, 15 Nov 2019 20:50:01 +0000 (20:50 +0000)
committerIan Whyman <thev00d00@gentoo.org>
Fri, 15 Nov 2019 20:50:22 +0000 (20:50 +0000)
Closes: https://bugs.gentoo.org/698970
Closes: https://bugs.gentoo.org/700098
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Ian Whyman <thev00d00@gentoo.org>
media-video/handbrake/Manifest
media-video/handbrake/handbrake-1.3.0.ebuild [new file with mode: 0644]
media-video/handbrake/handbrake-9999.ebuild

index 704911517b5c47997820ffea8e6b31f33efbe221..39ca8d3e61098162713b0fb44de42f269aeb2bba 100644 (file)
@@ -1 +1,2 @@
 DIST handbrake-1.2.2.tar.bz2 18010777 BLAKE2B 75ace4565bef22a6ee8cd3291a393dd20d9a8fcc57b16bca15393f9a5f18949bf104ad69b536453013598ea3dc0ddbceddf85b96e234f09ef2c119810242f48e SHA512 434e6db1acbe01771aeefd2f257bdc58ad84e63ba441f4977f634b9ccb3c708176b928adf1dfa9e20d4948b65876ae9b4dfdc35f9c56f03f34858380090ab29c
+DIST handbrake-1.3.0.tar.bz2 16801695 BLAKE2B 2a71674f557562317ed643064f252f3f88815a0b2fbbf9478f79efdd18282304443a29120effdce8ed9b07d00896d0946be0a7f4a94ae65252f9935c97829fb4 SHA512 40801a5a3756feb33f374e68e7ed743841d33f7a6b22dd2361034f182b32cdcead3ff02a7a6e16f0ffbc7b693541747b048dc606deadf7a8e490aad193e07c4d
diff --git a/media-video/handbrake/handbrake-1.3.0.ebuild b/media-video/handbrake/handbrake-1.3.0.ebuild
new file mode 100644 (file)
index 0000000..13e3bf9
--- /dev/null
@@ -0,0 +1,171 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{1,2,3,4,5,6,7} python2_7 )
+
+inherit autotools eutils gnome2-utils python-any-r1 xdg-utils
+
+if [[ ${PV} = *9999* ]]; then
+       EGIT_REPO_URI="https://github.com/HandBrake/HandBrake.git"
+       inherit git-r3
+       KEYWORDS=""
+else
+       MY_P="HandBrake-${PV}"
+       SRC_URI="https://download2.handbrake.fr/${PV}/${MY_P}-source.tar.bz2 -> ${P}.tar.bz2"
+       S="${WORKDIR}/${MY_P}"
+       KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Open-source, GPL-licensed, multiplatform, multithreaded video transcoder"
+HOMEPAGE="http://handbrake.fr/"
+LICENSE="GPL-2"
+
+SLOT="0"
+IUSE="+fdk gstreamer gtk libav libav-aac nvenc x265"
+
+REQUIRED_USE="^^ ( fdk libav-aac )"
+
+RDEPEND="
+       app-arch/xz-utils
+       media-libs/speex
+       dev-libs/jansson
+       dev-libs/libxml2
+       media-libs/a52dec
+       media-libs/libass:=
+       >=media-libs/libbluray-1.0
+       >=media-libs/dav1d-0.5.1
+       media-libs/libdvdnav
+       media-libs/libdvdread:=
+       media-libs/libsamplerate
+       media-libs/libtheora
+       media-libs/libvorbis
+       >=media-libs/libvpx-1.8
+       nvenc? ( media-libs/nv-codec-headers )
+       media-libs/opus
+       media-libs/x264:=
+       media-sound/lame
+       sys-libs/zlib
+       libav? ( >=media-video/libav-12.2:0=[fdk?] )
+       !libav? ( >=media-video/ffmpeg-4.2.1:0=[fdk?] )
+       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
+               dev-libs/glib:2
+               dev-libs/libgudev:=
+               x11-libs/cairo
+               x11-libs/gdk-pixbuf:2
+               x11-libs/libnotify
+               x11-libs/pango
+       )
+       fdk? ( media-libs/fdk-aac )
+       x265? ( >=media-libs/x265-2.9:0= )
+       "
+
+DEPEND="${RDEPEND}
+       ${PYTHON_DEPS}
+       dev-lang/yasm
+       dev-util/intltool
+       sys-devel/automake"
+
+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"
+
+       # Remove faac dependency; TODO: figure out if we need to do this at all.
+       "${FILESDIR}/${PN}-9999-remove-faac-dependency.patch"
+
+       # Fix missing -ldl
+       "${FILESDIR}/${PN}-9999-libdl-link.patch"
+)
+
+pkg_setup() {
+       python-any-r1_pkg_setup
+}
+
+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."
+
+       default
+
+       cd "${S}/gtk"
+       # Don't run autogen.sh.
+       sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
+       eautoreconf
+}
+
+src_configure() {
+       # 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
+       ./configure \
+               --force \
+               --verbose \
+               --prefix="${EPREFIX}/usr" \
+               --disable-gtk-update-checks \
+               --disable-flatpak \
+               --disable-gtk4 \
+               $(use_enable libav-aac ffmpeg-aac) \
+               $(use_enable fdk fdk-aac) \
+               $(usex !gtk --disable-gtk) \
+               $(usex !gstreamer --disable-gst) \
+               $(use_enable nvenc) \
+               $(use_enable x265) || die "Configure failed."
+}
+
+src_compile() {
+       emake -C build
+
+       # TODO: Documentation building is currently broken, try to fix it.
+       #
+       # if use doc ; then
+       #       emake -C build doc
+       # fi
+}
+
+src_install() {
+       emake -C build DESTDIR="${D}" install
+
+       dodoc README.markdown AUTHORS.markdown NEWS.markdown THANKS.markdown
+}
+
+pkg_postinst() {
+       einfo "Gentoo builds of HandBrake are NOT SUPPORTED by upstream as they"
+       einfo "do not use the bundled (and often patched) upstream libraries."
+       einfo ""
+       einfo "Please do not raise bugs with upstream because of these ebuilds,"
+       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\`."
+       fi
+
+       gnome2_icon_cache_update
+       xdg_desktop_database_update
+}
+
+pkg_preinst() {
+       gnome2_icon_savelist
+}
+
+pkg_postrm() {
+       gnome2_icon_cache_update
+       xdg_desktop_database_update
+}
index f75730cee0d1cdd788f43ac63d1ebb4afb4737cd..13e3bf9a6ad8490dcc1422e7a64d5913421daa0e 100644 (file)
@@ -31,9 +31,11 @@ RDEPEND="
        app-arch/xz-utils
        media-libs/speex
        dev-libs/jansson
+       dev-libs/libxml2
        media-libs/a52dec
        media-libs/libass:=
        >=media-libs/libbluray-1.0
+       >=media-libs/dav1d-0.5.1
        media-libs/libdvdnav
        media-libs/libdvdread:=
        media-libs/libsamplerate