summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Whyman <thev00d00@gentoo.org>2019-11-08 21:57:55 +0000
committerIan Whyman <thev00d00@gentoo.org>2019-11-08 21:58:14 +0000
commita8cd5bdcf4af8346c1af8c6e85d19b3959f6b7e9 (patch)
tree5c627d54acb92cdb0b5d742343e5d28d956103a6 /media-video
parentmedia-gfx/enblend: EAPI-7 bump, fix unused cmake vars (diff)
downloadgentoo-a8cd5bdcf4af8346c1af8c6e85d19b3959f6b7e9.tar.gz
gentoo-a8cd5bdcf4af8346c1af8c6e85d19b3959f6b7e9.tar.bz2
gentoo-a8cd5bdcf4af8346c1af8c6e85d19b3959f6b7e9.zip
media-video/handbrake: Tidy old, fix git ebuild
Bug: https://bugs.gentoo.org/698970 Closes: https://bugs.gentoo.org/625866 Closes: https://bugs.gentoo.org/698214 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Ian Whyman <thev00d00@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/handbrake/Manifest3
-rw-r--r--media-video/handbrake/files/handbrake-1.1.0-nolibav.patch235
-rw-r--r--media-video/handbrake/files/handbrake-9999-libdl-link.patch13
-rw-r--r--media-video/handbrake/handbrake-1.1.0-r1.ebuild158
-rw-r--r--media-video/handbrake/handbrake-1.1.1.ebuild158
-rw-r--r--media-video/handbrake/handbrake-1.1.2.ebuild158
-rw-r--r--media-video/handbrake/handbrake-9999.ebuild45
7 files changed, 41 insertions, 729 deletions
diff --git a/media-video/handbrake/Manifest b/media-video/handbrake/Manifest
index 6a06e9b1e7df..704911517b5c 100644
--- a/media-video/handbrake/Manifest
+++ b/media-video/handbrake/Manifest
@@ -1,4 +1 @@
-DIST handbrake-1.1.0.tar.bz2 15262590 BLAKE2B b2f892c57cd562124460ac2846949bd0ce05eff0b87fbd733d7102eeda9455f57997fb0bbd72d991d0f2d8ab3f02e6f82d88a0449158c3a947595f50198eb4bd SHA512 48cbbc57e93e74a8aa3d224311f5d97905061e103c3ecb07aa5e09d8f401687679cac0e8952e146fea0fad5d00e6c26fe90159c11e87b8b413469abbe900edc3
-DIST handbrake-1.1.1.tar.bz2 15319551 BLAKE2B d0569a796f3838f5696e3dcfed348a5111e063841cb594bbce7283568cdf868e6b751f3cd6086ebc83af5f2d6ad9e238717425f953677cca9e2908a9c0301aa9 SHA512 990035a5f850fafbc68c77dd61d7f7371c3eda2cc6e6ceb377f111c9016713523cf1685f519926ae8859446c99392c64b7ce91d72f9b5f9643a35a3d0326eef4
-DIST handbrake-1.1.2.tar.bz2 15291003 BLAKE2B b502ba18139c3332b8614e831005b4a846c0fab9a31bce2c9f3481d6d41ba3f087ded30adb6bd58220b14002f230fb920db1cc45ec7baee4fda573148fddfc8e SHA512 360f7fe3e4571bb623f54a00e9478a78d655448ffb1b8d72b7d32636a230f2ae4dabbfe803f6f9491537064ea4f6e238700b3d29912ae34383fbb1922e18e9b8
DIST handbrake-1.2.2.tar.bz2 18010777 BLAKE2B 75ace4565bef22a6ee8cd3291a393dd20d9a8fcc57b16bca15393f9a5f18949bf104ad69b536453013598ea3dc0ddbceddf85b96e234f09ef2c119810242f48e SHA512 434e6db1acbe01771aeefd2f257bdc58ad84e63ba441f4977f634b9ccb3c708176b928adf1dfa9e20d4948b65876ae9b4dfdc35f9c56f03f34858380090ab29c
diff --git a/media-video/handbrake/files/handbrake-1.1.0-nolibav.patch b/media-video/handbrake/files/handbrake-1.1.0-nolibav.patch
deleted file mode 100644
index bb7e17bdde5b..000000000000
--- a/media-video/handbrake/files/handbrake-1.1.0-nolibav.patch
+++ /dev/null
@@ -1,235 +0,0 @@
-From 9e1f245708a157231c427c0ef9b91729d59a30e1 Mon Sep 17 00:00:00 2001
-From: John Stebbins <jstebbins.hb@gmail.com>
-Date: Tue, 28 Nov 2017 08:22:54 -0800
-Subject: [PATCH] add sdtp (sample dependency) box to mp4 (#1006)
-
-* add sdtp (sample dependency) box to mp4
-
-The AppleTV 4K requires this box in order to play 2160p60 video.
----
- contrib/ffmpeg/A21-mp4-sdtp.patch | 126 ++++++++++++++++++++++++++++++++++++++
- libhb/encavcodec.c | 8 ++-
- libhb/encx264.c | 7 +--
- libhb/encx265.c | 3 +
- libhb/muxavformat.c | 4 ++
- 5 files changed, 140 insertions(+), 8 deletions(-)
- create mode 100644 contrib/ffmpeg/A21-mp4-sdtp.patch
-
-diff --git a/contrib/ffmpeg/A21-mp4-sdtp.patch b/contrib/ffmpeg/A21-mp4-sdtp.patch
-new file mode 100644
-index 000000000..5d2221c47
---- /dev/null
-+++ b/contrib/ffmpeg/A21-mp4-sdtp.patch
-@@ -0,0 +1,126 @@
-+From c2204c579c8411771b53a4bc66324c7c5d07698a Mon Sep 17 00:00:00 2001
-+From: John Stebbins <stebbins@jetheaddev.com>
-+Date: Thu, 16 Nov 2017 14:40:12 -0800
-+Subject: [PATCH] movenc: add sdtp (sample dependency) box to mp4
-+
-+The AppleTV 4K requires this box in order to play 2160p60 video.
-+---
-+ libavcodec/avcodec.h | 9 +++++++--
-+ libavformat/movenc.c | 34 +++++++++++++++++++++++++++++++++-
-+ libavformat/movenc.h | 6 ++++++
-+ 3 files changed, 46 insertions(+), 3 deletions(-)
-+
-+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
-+index 5624835023..48e9d23679 100644
-+--- a/libavcodec/avcodec.h
-++++ b/libavcodec/avcodec.h
-+@@ -1161,8 +1161,13 @@ typedef struct AVPacket {
-+ int64_t convergence_duration;
-+ #endif
-+ } AVPacket;
-+-#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe
-+-#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
-++#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe
-++#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
-++/**
-++ * Flag is used to indicate packets that contain frames that can
-++ * be discarded by the decoder. I.e. Non-reference frames.
-++ */
-++#define AV_PKT_FLAG_DISPOSABLE 0x0004
-+
-+ enum AVSideDataParamChangeFlags {
-+ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
-+diff --git a/libavformat/movenc.c b/libavformat/movenc.c
-+index a546fdfead..d263f444f4 100644
-+--- a/libavformat/movenc.c
-++++ b/libavformat/movenc.c
-+@@ -227,6 +227,30 @@ static int mov_write_stss_tag(AVIOContext *pb, MOVTrack *track, uint32_t flag)
-+ return update_size(pb, pos);
-+ }
-+
-++/* Sample dependency atom */
-++static int mov_write_sdtp_tag(AVIOContext *pb, MOVTrack *track)
-++{
-++ int i;
-++ uint8_t leading, dependent, reference, redundancy;
-++ int64_t pos = avio_tell(pb);
-++ avio_wb32(pb, 0); // size
-++ ffio_wfourcc(pb, "sdtp");
-++ avio_wb32(pb, 0); // version & flags
-++ for (i = 0; i < track->entry; i++) {
-++ dependent = MOV_SAMPLE_DEPENDENCY_YES;
-++ leading = reference = redundancy = MOV_SAMPLE_DEPENDENCY_UNKNOWN;
-++ if (track->cluster[i].flags & MOV_DISPOSABLE_SAMPLE) {
-++ reference = MOV_SAMPLE_DEPENDENCY_NO;
-++ }
-++ if (track->cluster[i].flags & MOV_SYNC_SAMPLE) {
-++ dependent = MOV_SAMPLE_DEPENDENCY_NO;
-++ }
-++ avio_w8(pb, (leading << 6) | (dependent << 4) |
-++ (reference << 2) | redundancy);
-++ }
-++ return update_size(pb, pos);
-++}
-++
-+ static int mov_write_amr_tag(AVIOContext *pb, MOVTrack *track)
-+ {
-+ avio_wb32(pb, 0x11); /* size */
-+@@ -1211,8 +1235,12 @@ static int mov_write_stbl_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra
-+ mov_write_stts_tag(pb, track);
-+ if ((track->par->codec_type == AVMEDIA_TYPE_VIDEO ||
-+ track->par->codec_tag == MKTAG('r','t','p',' ')) &&
-+- track->has_keyframes && track->has_keyframes < track->entry)
-++ track->has_keyframes && track->has_keyframes < track->entry) {
-+ mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
-++ }
-++ if (track->par->codec_type == AVMEDIA_TYPE_VIDEO && track->has_disposable) {
-++ mov_write_sdtp_tag(pb, track);
-++ }
-+ if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS)
-+ mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE);
-+ if (track->par->codec_type == AVMEDIA_TYPE_VIDEO &&
-+@@ -3647,6 +3675,10 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
-+ if (trk->cluster[trk->entry].flags & MOV_SYNC_SAMPLE)
-+ trk->has_keyframes++;
-+ }
-++ if (pkt->flags & AV_PKT_FLAG_DISPOSABLE) {
-++ trk->cluster[trk->entry].flags |= MOV_DISPOSABLE_SAMPLE;
-++ trk->has_disposable++;
-++ }
-+ trk->entry++;
-+ trk->sample_count += samples_in_chunk;
-+ mov->mdat_size += size;
-+diff --git a/libavformat/movenc.h b/libavformat/movenc.h
-+index 008f4671c6..f4eb4e8078 100644
-+--- a/libavformat/movenc.h
-++++ b/libavformat/movenc.h
-+@@ -51,6 +51,7 @@ typedef struct MOVIentry {
-+ int cts;
-+ #define MOV_SYNC_SAMPLE 0x0001
-+ #define MOV_PARTIAL_SYNC_SAMPLE 0x0002
-++#define MOV_DISPOSABLE_SAMPLE 0x0004
-+ uint32_t flags;
-+ } MOVIentry;
-+
-+@@ -85,6 +86,7 @@ typedef struct MOVTrack {
-+ long sample_count;
-+ long sample_size;
-+ int has_keyframes;
-++ int has_disposable;
-+ #define MOV_TRACK_CTTS 0x0001
-+ #define MOV_TRACK_STPS 0x0002
-+ #define MOV_TRACK_ENABLED 0x0004
-+@@ -180,6 +182,10 @@ typedef struct MOVMuxContext {
-+ int missing_duration_warned;
-+ } MOVMuxContext;
-+
-++#define MOV_SAMPLE_DEPENDENCY_UNKNOWN 0x0
-++#define MOV_SAMPLE_DEPENDENCY_YES 0x1
-++#define MOV_SAMPLE_DEPENDENCY_NO 0x2
-++
-+ #define FF_MOV_FLAG_RTP_HINT (1 << 0)
-+ #define FF_MOV_FLAG_FRAGMENT (1 << 1)
-+ #define FF_MOV_FLAG_EMPTY_MOOV (1 << 2)
-+--
-+2.13.6
-+
-diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
-index 59d491148..9960a21b4 100644
---- a/libhb/encavcodec.c
-+++ b/libhb/encavcodec.c
-@@ -532,12 +532,14 @@ static void get_packets( hb_work_object_t * w, hb_buffer_list_t * list )
- out->s.duration = get_frame_duration(pv, frameno);
- out->s.stop = out->s.stop + out->s.duration;
- // libav 12 deprecated context->coded_frame, so we can't determine
-- // the exact frame type any more. Luckily for us, we really don't
-- // require it.
-+ // the exact frame type any more. So until I can completely
-+ // wire up ffmpeg with AV_PKT_DISPOSABLE_FRAME, all frames
-+ // must be considered to potentially be reference frames
-+ out->s.flags = HB_FLAG_FRAMETYPE_REF;
- out->s.frametype = 0;
- if (pkt.flags & AV_PKT_FLAG_KEY)
- {
-- out->s.flags = HB_FLAG_FRAMETYPE_REF | HB_FLAG_FRAMETYPE_KEY;
-+ out->s.flags |= HB_FLAG_FRAMETYPE_KEY;
- hb_chapter_dequeue(pv->chapter_queue, out);
- }
- out = process_delay_list(pv, out);
-diff --git a/libhb/encx264.c b/libhb/encx264.c
-index ce7879ec7..26645213a 100644
---- a/libhb/encx264.c
-+++ b/libhb/encx264.c
-@@ -701,6 +701,7 @@ static hb_buffer_t *nal_encode( hb_work_object_t *w, x264_picture_t *pic_out,
- frames we only get the duration of the first which will
- eventually screw up the muxer & decoder. */
- int i;
-+ buf->s.flags &= ~HB_FLAG_FRAMETYPE_REF;
- for( i = 0; i < i_nal; i++ )
- {
- int size = nal[i].i_payload;
-@@ -737,11 +738,7 @@ static hb_buffer_t *nal_encode( hb_work_object_t *w, x264_picture_t *pic_out,
- * Also, since libx264 doesn't tell us when B-frames are
- * themselves reference frames, figure it out on our own.
- */
-- if (nal[i].i_ref_idc == NAL_PRIORITY_DISPOSABLE)
-- {
-- buf->s.flags &= ~HB_FLAG_FRAMETYPE_REF;
-- }
-- else
-+ if (nal[i].i_ref_idc != NAL_PRIORITY_DISPOSABLE)
- {
- if (buf->s.frametype == HB_FRAME_B)
- {
-diff --git a/libhb/encx265.c b/libhb/encx265.c
-index ec7b7d574..242dc6f1f 100644
---- a/libhb/encx265.c
-+++ b/libhb/encx265.c
-@@ -425,16 +425,19 @@ static hb_buffer_t* nal_encode(hb_work_object_t *w,
- buf->s.frametype = HB_FRAME_IDR;
- break;
- case X265_TYPE_P:
-+ buf->s.flags |= HB_FLAG_FRAMETYPE_REF;
- buf->s.frametype = HB_FRAME_P;
- break;
- case X265_TYPE_B:
- buf->s.frametype = HB_FRAME_B;
- break;
- case X265_TYPE_BREF:
-+ buf->s.flags |= HB_FLAG_FRAMETYPE_REF;
- buf->s.frametype = HB_FRAME_BREF;
- break;
- case X265_TYPE_I:
- default:
-+ buf->s.flags |= HB_FLAG_FRAMETYPE_REF;
- buf->s.frametype = HB_FRAME_I;
- break;
- }
-diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
-index f85336dfe..62a270d5b 100644
---- a/libhb/muxavformat.c
-+++ b/libhb/muxavformat.c
-@@ -1197,6 +1197,10 @@ static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *bu
- {
- pkt.flags |= AV_PKT_FLAG_KEY;
- }
-+ if (!(buf->s.flags & HB_FLAG_FRAMETYPE_REF))
-+ {
-+ pkt.flags |= AV_PKT_FLAG_DISPOSABLE;
-+ }
- }
- else if (buf->s.frametype & HB_FRAME_MASK_KEY)
- {
diff --git a/media-video/handbrake/files/handbrake-9999-libdl-link.patch b/media-video/handbrake/files/handbrake-9999-libdl-link.patch
new file mode 100644
index 000000000000..ace1528053a0
--- /dev/null
+++ b/media-video/handbrake/files/handbrake-9999-libdl-link.patch
@@ -0,0 +1,13 @@
+diff --git a/gtk/configure.ac b/gtk/configure.ac
+index 92aabcbe8..1f4a1df95 100644
+--- a/gtk/configure.ac
++++ b/gtk/configure.ac
+@@ -199,7 +199,7 @@ PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES])
+
+ GHB_CFLAGS="$HBINC $GHB_CFLAGS"
+
+-HB_LIBS="-lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -llzma"
++HB_LIBS="-lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -llzma -ldl"
+
+ if test "x$use_fdk_aac" = "xyes" ; then
+ HB_LIBS="$HB_LIBS -lfdk-aac"
diff --git a/media-video/handbrake/handbrake-1.1.0-r1.ebuild b/media-video/handbrake/handbrake-1.1.0-r1.ebuild
deleted file mode 100644
index 5ab5c42c603c..000000000000
--- a/media-video/handbrake/handbrake-1.1.0-r1.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( 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 x265"
-
-REQUIRED_USE="^^ ( fdk libav-aac )"
-
-RDEPEND="
- dev-libs/jansson
- media-libs/a52dec
- media-libs/libass:=
- >=media-libs/libbluray-1.0
- media-libs/libdvdnav
- media-libs/libdvdread
- media-libs/libsamplerate
- media-libs/libtheora
- media-libs/libvorbis
- media-libs/libvpx
- media-libs/opus
- media-libs/x264:=
- media-sound/lame
- sys-libs/zlib
- libav? ( >=media-video/libav-12.2:0=[fdk?] )
- !libav? ( >=media-video/ffmpeg-3.4: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
- )
- 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-1.7: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 x265 link flag
- "${FILESDIR}/${PN}-9999-fix-missing-x265-link-flag.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
-
- # Get rid of libav specific code when using ffmpeg
- use libav || eapply -R "${FILESDIR}/${PN}-1.1.0-nolibav.patch"
-
- cd "${S}/gtk"
- # Don't run autogen.sh.
- sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
- eautoreconf
-}
-
-src_configure() {
- ./configure \
- --force \
- --verbose \
- --prefix="${EPREFIX}/usr" \
- --disable-gtk-update-checks \
- $(use_enable libav-aac) \
- $(use_enable fdk fdk-aac) \
- $(use_enable gtk) \
- $(usex !gstreamer --disable-gst) \
- $(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 "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
-
- if use gtk ; then
- einfo ""
- 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
-}
diff --git a/media-video/handbrake/handbrake-1.1.1.ebuild b/media-video/handbrake/handbrake-1.1.1.ebuild
deleted file mode 100644
index 5ab5c42c603c..000000000000
--- a/media-video/handbrake/handbrake-1.1.1.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( 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 x265"
-
-REQUIRED_USE="^^ ( fdk libav-aac )"
-
-RDEPEND="
- dev-libs/jansson
- media-libs/a52dec
- media-libs/libass:=
- >=media-libs/libbluray-1.0
- media-libs/libdvdnav
- media-libs/libdvdread
- media-libs/libsamplerate
- media-libs/libtheora
- media-libs/libvorbis
- media-libs/libvpx
- media-libs/opus
- media-libs/x264:=
- media-sound/lame
- sys-libs/zlib
- libav? ( >=media-video/libav-12.2:0=[fdk?] )
- !libav? ( >=media-video/ffmpeg-3.4: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
- )
- 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-1.7: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 x265 link flag
- "${FILESDIR}/${PN}-9999-fix-missing-x265-link-flag.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
-
- # Get rid of libav specific code when using ffmpeg
- use libav || eapply -R "${FILESDIR}/${PN}-1.1.0-nolibav.patch"
-
- cd "${S}/gtk"
- # Don't run autogen.sh.
- sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
- eautoreconf
-}
-
-src_configure() {
- ./configure \
- --force \
- --verbose \
- --prefix="${EPREFIX}/usr" \
- --disable-gtk-update-checks \
- $(use_enable libav-aac) \
- $(use_enable fdk fdk-aac) \
- $(use_enable gtk) \
- $(usex !gstreamer --disable-gst) \
- $(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 "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
-
- if use gtk ; then
- einfo ""
- 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
-}
diff --git a/media-video/handbrake/handbrake-1.1.2.ebuild b/media-video/handbrake/handbrake-1.1.2.ebuild
deleted file mode 100644
index 5ab5c42c603c..000000000000
--- a/media-video/handbrake/handbrake-1.1.2.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( 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 x265"
-
-REQUIRED_USE="^^ ( fdk libav-aac )"
-
-RDEPEND="
- dev-libs/jansson
- media-libs/a52dec
- media-libs/libass:=
- >=media-libs/libbluray-1.0
- media-libs/libdvdnav
- media-libs/libdvdread
- media-libs/libsamplerate
- media-libs/libtheora
- media-libs/libvorbis
- media-libs/libvpx
- media-libs/opus
- media-libs/x264:=
- media-sound/lame
- sys-libs/zlib
- libav? ( >=media-video/libav-12.2:0=[fdk?] )
- !libav? ( >=media-video/ffmpeg-3.4: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
- )
- 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-1.7: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 x265 link flag
- "${FILESDIR}/${PN}-9999-fix-missing-x265-link-flag.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
-
- # Get rid of libav specific code when using ffmpeg
- use libav || eapply -R "${FILESDIR}/${PN}-1.1.0-nolibav.patch"
-
- cd "${S}/gtk"
- # Don't run autogen.sh.
- sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
- eautoreconf
-}
-
-src_configure() {
- ./configure \
- --force \
- --verbose \
- --prefix="${EPREFIX}/usr" \
- --disable-gtk-update-checks \
- $(use_enable libav-aac) \
- $(use_enable fdk fdk-aac) \
- $(use_enable gtk) \
- $(usex !gstreamer --disable-gst) \
- $(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 "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
-
- if use gtk ; then
- einfo ""
- 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
-}
diff --git a/media-video/handbrake/handbrake-9999.ebuild b/media-video/handbrake/handbrake-9999.ebuild
index 26469e6268b5..f75730cee0d1 100644
--- a/media-video/handbrake/handbrake-9999.ebuild
+++ b/media-video/handbrake/handbrake-9999.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_{1,2,3,4,5,6,7} python2_7 )
inherit autotools eutils gnome2-utils python-any-r1 xdg-utils
@@ -23,27 +23,30 @@ HOMEPAGE="http://handbrake.fr/"
LICENSE="GPL-2"
SLOT="0"
-IUSE="+fdk gstreamer gtk libav libav-aac x265"
+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
media-libs/a52dec
media-libs/libass:=
>=media-libs/libbluray-1.0
media-libs/libdvdnav
- media-libs/libdvdread
+ media-libs/libdvdread:=
media-libs/libsamplerate
media-libs/libtheora
media-libs/libvorbis
- media-libs/libvpx
+ >=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.3:0=[fdk?] )
- !libav? ( >=media-video/ffmpeg-3.4:0=[fdk?] )
+ 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
@@ -53,6 +56,7 @@ RDEPEND="
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
@@ -65,7 +69,7 @@ RDEPEND="
x11-libs/pango
)
fdk? ( media-libs/fdk-aac )
- x265? ( >=media-libs/x265-1.7:0= )
+ x265? ( >=media-libs/x265-2.9:0= )
"
DEPEND="${RDEPEND}
@@ -82,8 +86,8 @@ PATCHES=(
# Remove faac dependency; TODO: figure out if we need to do this at all.
"${FILESDIR}/${PN}-9999-remove-faac-dependency.patch"
- # Fix missing x265 link flag
- "${FILESDIR}/${PN}-9999-fix-missing-x265-link-flag.patch"
+ # Fix missing -ldl
+ "${FILESDIR}/${PN}-9999-libdl-link.patch"
)
pkg_setup() {
@@ -98,9 +102,6 @@ src_prepare() {
default
- # Get rid of libav specific code when using ffmpeg
- use libav || eapply -R "${FILESDIR}/${PN}-1.1.0-nolibav.patch"
-
cd "${S}/gtk"
# Don't run autogen.sh.
sed -i '/autogen.sh/d' module.rules || die "Removing autogen.sh call failed"
@@ -108,15 +109,21 @@ src_prepare() {
}
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 \
- $(use_enable libav-aac) \
+ --disable-flatpak \
+ --disable-gtk4 \
+ $(use_enable libav-aac ffmpeg-aac) \
$(use_enable fdk fdk-aac) \
- $(use_enable gtk) \
+ $(usex !gtk --disable-gtk) \
$(usex !gstreamer --disable-gst) \
+ $(use_enable nvenc) \
$(use_enable x265) || die "Configure failed."
}
@@ -137,10 +144,14 @@ src_install() {
}
pkg_postinst() {
- einfo "For the CLI version of HandBrake, you can use \`HandBrakeCLI\`."
+ 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 ""
einfo "For the GTK+ version of HandBrake, you can run \`ghb\`."
fi