diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-03-19 11:37:34 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-03-19 11:37:34 +0000 |
commit | b7b97785ebbb2f11d24d14dab8b81ed274f4ce6a (patch) | |
tree | 9fd110f9fc996e8a4213eeda994a8c112491b86d /media-video/handbrake | |
parent | 066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (diff) |
gentoo resync : 19.03.2019
Diffstat (limited to 'media-video/handbrake')
-rw-r--r-- | media-video/handbrake/Manifest | 6 | ||||
-rw-r--r-- | media-video/handbrake/files/handbrake-0.10.3-nolibav.patch | 76 | ||||
-rw-r--r-- | media-video/handbrake/files/handbrake-1.2.2-backport-hardware-configure.patch | 88 | ||||
-rw-r--r-- | media-video/handbrake/handbrake-1.2.2-r2.ebuild | 169 | ||||
-rw-r--r-- | media-video/handbrake/metadata.xml | 1 |
5 files changed, 262 insertions, 78 deletions
diff --git a/media-video/handbrake/Manifest b/media-video/handbrake/Manifest index 3417d107fa21..6dbec3aa92c9 100644 --- a/media-video/handbrake/Manifest +++ b/media-video/handbrake/Manifest @@ -1,13 +1,15 @@ -AUX handbrake-0.10.3-nolibav.patch 2821 BLAKE2B 78294506e6b3efe71d7d14537c2e605d10067fd9e637f06ff3b01a9d8e6bea34dfb2c871bb2558e35310bebdb4922ae99f63d9f7911f7236a28ea1a4dc3d6832 SHA512 88a0b5df6cc198a8383a2d1dcf6d4c71f24445ea71e29dac570a2b3987cdaa0a563b56c7cccd291b58099dbdb15130bdcc0cd4527bdaeb442aefe4fa06455ec7 AUX handbrake-1.1.0-nolibav.patch 9306 BLAKE2B 8b3fafe2063fc03d1e4a571eb5133b532e760dda4cafaee80b748efcacfc8c3546531e29393a82582cde75f14d07fccc9f4b3451d497cf3beae97d0e93da5515 SHA512 42f21168349a9120c78f80f14c3faea81ed4d65b9987aaa8162b718dbb919a7e736969c1ae18083bb853b657e45bd20453e6fa3a304e11592bc48c1faaa4f285 +AUX handbrake-1.2.2-backport-hardware-configure.patch 6394 BLAKE2B 64009363b658bea4aaa588339e0f596790eaf584a377b0c76ad5fded84652fa4fc93ef626e5e221b1a742b1cbc34f8a97e2f92bc875fb8e018a34c93948ede3c SHA512 62d8c54ca0148fcac76f356dd4588b1cdfdbec7621fe9a8b426a39ee7b2dc1eb3085f17e8c1ebe23f5d45b69e59e52c7c8dd113308598b3f2378bad32dec6bd5 AUX handbrake-9999-fix-missing-x265-link-flag.patch 281 BLAKE2B 623f902bb31586513a51db95a63841e6234d4841d6332d2be9a6a0d7fd07f3e9cc694eb8945bebf718e10538fa390bbaa9dcbea81ba5324cbf20bd64bc582fdb SHA512 30d457258dd287cae3df66e7899b66480be2212a3969fe3a4e4f99ed383740e8f597fa7cf869922f29f501f100313b7efd78ebe09e2949ed4c235e2df22d22e5 AUX handbrake-9999-remove-dvdnav-dup.patch 809 BLAKE2B 16cde838dcf59753e5438df0d2c2b81f45667058bd0687a7368c528f61bd2a2fedc4462894daad58c3acb5c51bdd53df3b30e28adba93a0fb2838416e4226217 SHA512 e2005155adf29e8253f4313d209b2ccc642fb1d7f63256d3bdf675ddd0e6b0e15bc6bffd98e19aa7dab3907e161e29c5268dc5656590ce9254b12a91ac3ff6b0 AUX handbrake-9999-remove-faac-dependency.patch 3697 BLAKE2B b0f7d0a1c4d464d3287ab233b756f5036d6ffa7e9e59a2f98a8ffb2ae59e46d25e56edb3e5bf9c04a16330f3dc50f4c2426f252b35834b7c9c9e6b4904244368 SHA512 9d070e50a9b7d4b8ac25b7d56bd341aca6dc979ba506c84f4b95109909f70020723915cd120bed24e84a8fc242ee3c3a5775f43a78b7995e53cd499444c9f6dc 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 EBUILD handbrake-1.1.0-r1.ebuild 3597 BLAKE2B 3f3369bb7a0149a847267e92190a6462d552d1dc2b108f9ca044335fcccbab919a30cc05eed920b6ade90d45b4fc01872846babef77386f083059c2822411d09 SHA512 96942d20f0779f0b548d644a97e3ab3b34f5e2b25cd752507936f1c4c685728705bc2476c5c6d4c1ffeff43013031419767e4aed459d0807c3a8a5ddd11ffb63 EBUILD handbrake-1.1.1.ebuild 3597 BLAKE2B 3f3369bb7a0149a847267e92190a6462d552d1dc2b108f9ca044335fcccbab919a30cc05eed920b6ade90d45b4fc01872846babef77386f083059c2822411d09 SHA512 96942d20f0779f0b548d644a97e3ab3b34f5e2b25cd752507936f1c4c685728705bc2476c5c6d4c1ffeff43013031419767e4aed459d0807c3a8a5ddd11ffb63 EBUILD handbrake-1.1.2.ebuild 3594 BLAKE2B 1812d0d143e0c01306def7d293f333bb5e6f870a7cb296a78f80e48fbbf95b35bee6aa3ba487bd3f73d735bed90382b0ec47c33e594f86ddf900cf8ce8e2a4b5 SHA512 7a740e1e8434792dc71152e5c85d9c39a70c372d50a90531d07c158c03f21c67221fed043b12446c99c21a1779498ba9932ecd9990022310d32710b60a98d522 +EBUILD handbrake-1.2.2-r2.ebuild 4122 BLAKE2B 034d8fc9c48e6dfe649ef572b380439734b594e50adc70925bf052a7d9084eff4f4812efe35daf8bad39d664fdc77d758441597bbe973bf0becb390cd5be67ac SHA512 2b6c68a33767111f90d6897822db3beef7891d3a7085df56b51af0e1ee06378c2d70dd28f9040b850fa135dfdb44a8e91a84b6915e9e15a514de6700214379c9 EBUILD handbrake-9999.ebuild 3597 BLAKE2B 5997effcfd06d412b66eb6d9cd305806c1e2f8a69c3d2fb6d123843a913c0fddbf399f35496f283507e43dd3ebbea3c2058af68d7207d7a428df605244e8225d SHA512 9cdbab17900c033bbb4b785c13828937cb0c0d8dd2e3d43af76170389ebe8d2b561f038055e1dad38259f92d723119c9f6db182266fecb36b2febd2c21d50966 -MISC metadata.xml 826 BLAKE2B 3cbdae05b5011afa3ef7dd76f7979756e0385584511b9eecdac3cc9a031ed31cc64b225214acf6e8f4691455ac31c4a8f9fa8612884705c3da23ab4bbae32e7b SHA512 f6344c1c82a507438d41d38020cd3ca33ba056d156d0fcdc72b6c4def5adee1260bb1f89ad8aec544f22e58738c2be22da210bfad7b2ed6c95f201cdc619a0d6 +MISC metadata.xml 949 BLAKE2B fc4ffd4d804c1098614e24525ae50673620b16e4d9480594cfbf4fc28f4aaa6274a6881548b9dbbbf6e431a839bf1742900faaa1612d11a22ad92f325af22579 SHA512 da975f8436e71359f279b26a2f41b1813f3177bf5768cb848f4feafa352c31084c7f2ba350fc6491400df8e261d2dcb8f32473657ceca6bd18d2fcd67b343185 diff --git a/media-video/handbrake/files/handbrake-0.10.3-nolibav.patch b/media-video/handbrake/files/handbrake-0.10.3-nolibav.patch deleted file mode 100644 index 8539186aaa56..000000000000 --- a/media-video/handbrake/files/handbrake-0.10.3-nolibav.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 75549414927212d4d1666730133805b33447de79 Mon Sep 17 00:00:00 2001 -From: John Stebbins <jstebbins.hb@gmail.com> -Date: Tue, 3 Nov 2015 10:16:01 -0800 -Subject: [PATCH] muxavformat: add support for mp4 fallback audio signalling - ---- -diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c -index 0d70597..373c2ab 100644 ---- a/libhb/muxavformat.c -+++ b/libhb/muxavformat.c -@@ -121,7 +121,7 @@ static int avformatInit( hb_mux_object_t * m ) - hb_mux_data_t * track; - int meta_mux; - int max_tracks; -- int ii, ret; -+ int ii, jj, ret; - - int clock_min, clock_max, clock; - hb_video_framerate_get_limits(&clock_min, &clock_max, &clock); -@@ -589,6 +589,56 @@ static int avformatInit( hb_mux_object_t * m ) - } - } - -+ // Check for audio track associations -+ for (ii = 0; ii < hb_list_count(job->list_audio); ii++) -+ { -+ audio = hb_list_item(job->list_audio, ii); -+ switch (audio->config.out.codec & HB_ACODEC_MASK) -+ { -+ case HB_ACODEC_FFAAC: -+ case HB_ACODEC_CA_AAC: -+ case HB_ACODEC_CA_HAAC: -+ case HB_ACODEC_FDK_AAC: -+ case HB_ACODEC_FDK_HAAC: -+ break; -+ -+ default: -+ { -+ // Mark associated fallback audio tracks for any non-aac track -+ for(jj = 0; jj < hb_list_count( job->list_audio ); jj++ ) -+ { -+ hb_audio_t * fallback; -+ int codec; -+ -+ if (ii == jj) continue; -+ -+ fallback = hb_list_item( job->list_audio, jj ); -+ codec = fallback->config.out.codec & HB_ACODEC_MASK; -+ if (fallback->config.in.track == audio->config.in.track && -+ (codec == HB_ACODEC_FFAAC || -+ codec == HB_ACODEC_CA_AAC || -+ codec == HB_ACODEC_CA_HAAC || -+ codec == HB_ACODEC_FDK_AAC || -+ codec == HB_ACODEC_FDK_HAAC)) -+ { -+ hb_mux_data_t * fallback_track; -+ int * sd; -+ -+ track = audio->priv.mux_data; -+ fallback_track = fallback->priv.mux_data; -+ sd = (int*)av_stream_new_side_data(track->st, -+ AV_PKT_DATA_FALLBACK_TRACK, -+ sizeof(int)); -+ if (sd != NULL) -+ { -+ *sd = fallback_track->st->index; -+ } -+ } -+ } -+ } break; -+ } -+ } -+ - char * subidx_fmt = - "size: %dx%d\n" - "org: %d, %d\n" diff --git a/media-video/handbrake/files/handbrake-1.2.2-backport-hardware-configure.patch b/media-video/handbrake/files/handbrake-1.2.2-backport-hardware-configure.patch new file mode 100644 index 000000000000..0618c9004e96 --- /dev/null +++ b/media-video/handbrake/files/handbrake-1.2.2-backport-hardware-configure.patch @@ -0,0 +1,88 @@ +From c7119499f5a2da7e5be0afd50a6757778fed53e7 Mon Sep 17 00:00:00 2001 +From: Bradley Sepos <bradley@bradleysepos.com> +Date: Sat, 23 Feb 2019 11:44:34 -0500 +Subject: [PATCH] configure: Enable hardware encoders by default on suitable + platforms. + +Print special encoders status at end of configure output, minor cosmetics. +--- + make/configure.py | 46 +++++++++++++++++++++++++++++----------------- + 1 file changed, 29 insertions(+), 17 deletions(-) + +diff --git a/make/configure.py b/make/configure.py +index c8bc712fe5..e673c9c5a0 100644 +--- a/make/configure.py ++++ b/make/configure.py +@@ -1298,36 +1298,37 @@ def createCLI(): + grp.add_option( '--disable-gtk', default=False, action='store_true', help=h ) + + h = IfHost( 'disable GTK GUI update checks', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value +- + grp.add_option( '--disable-gtk-update-checks', default=False, action='store_true', help=h ) + + h = IfHost( 'enable GTK GUI (mingw)', '*-*-mingw*', none=optparse.SUPPRESS_HELP ).value + grp.add_option( '--enable-gtk-mingw', default=False, action='store_true', help=h ) + + h = IfHost( 'disable GStreamer (live preview)', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value +- + grp.add_option( '--disable-gst', default=False, action='store_true', help=h ) + +- h = IfHost( 'enable Intel Quick Sync Video (QSV) hardware acceleration. (Windows and Linux only)', '*-*-linux*', '*-*-mingw*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-qsv', default=False, action='store_true', help=h ) ++ h = IfHost( 'Intel Quick Sync Video (QSV) hardware acceleration (Windows and Linux only)', '*-*-linux*', '*-*-mingw*', none=optparse.SUPPRESS_HELP ).value ++ grp.add_option( '--enable-qsv', dest="enable_qsv", default=host.match( '*-*-mingw*' ), action='store_true', help=(( 'enable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) ++ grp.add_option( '--disable-qsv', dest="enable_qsv", action='store_false', help=(( 'disable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) + +- h = IfHost( 'enable AMD VCE hardware acceleration. (Windows only)', '*-*-mingw*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-vce', default=False, action='store_true', help=h ) ++ h = IfHost( 'AMD VCE hardware acceleration (Windows only)', '*-*-mingw*', none=optparse.SUPPRESS_HELP ).value ++ grp.add_option( '--enable-vce', dest="enable_vce", default=host.match( '*-*-mingw*' ), action='store_true', help=(( 'enable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) ++ grp.add_option( '--disable-vce', dest="enable_vce", action='store_false', help=(( 'disable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) + +- h = IfHost( 'enable x265 video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-x265', dest="enable_x265", default=True, action='store_true', help=h ) +- grp.add_option( '--disable-x265', dest="enable_x265", action='store_false' ) ++ h = IfHost( 'x265 video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value ++ grp.add_option( '--enable-x265', dest="enable_x265", default=True, action='store_true', help=(( 'enable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) ++ grp.add_option( '--disable-x265', dest="enable_x265", action='store_false', help=(( 'disable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) + +- h = IfHost( 'enable FDK AAC audio encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-fdk-aac', dest="enable_fdk_aac", default=False, action='store_true', help=h ) +- grp.add_option( '--disable-fdk-aac', dest="enable_fdk_aac", action='store_false' ) ++ h = IfHost( 'FDK AAC audio encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value ++ grp.add_option( '--enable-fdk-aac', dest="enable_fdk_aac", default=False, action='store_true', help=(( 'enable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) ++ grp.add_option( '--disable-fdk-aac', dest="enable_fdk_aac", action='store_false', help=(( 'disable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) + +- h = IfHost( 'enable FFmpeg AAC audio encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-ffmpeg-aac', dest="enable_ffmpeg_aac", default=not host.match( '*-*-darwin*' ), action='store_true', help=h ) +- grp.add_option( '--disable-ffmpeg-aac', dest="enable_ffmpeg_aac", action='store_false' ) ++ h = IfHost( 'FFmpeg AAC audio encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value ++ grp.add_option( '--enable-ffmpeg-aac', dest="enable_ffmpeg_aac", default=not host.match( '*-*-darwin*' ), action='store_true', help=(( 'enable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) ++ grp.add_option( '--disable-ffmpeg-aac', dest="enable_ffmpeg_aac", action='store_false', help=(( 'disable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) + +- h = IfHost( 'enable Nvidia NVEnc video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=not (host.match( '*-*-darwin*' ) or host.match( '*-*-freebsd*' )), action='store_true', help=h ) ++ h = IfHost( 'Nvidia NVEnc video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value ++ grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=not (host.match( '*-*-darwin*' ) or host.match( '*-*-freebsd*' )), action='store_true', help=(( 'enable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) ++ grp.add_option( '--disable-nvenc', dest="enable_nvenc", action='store_false', help=(( 'disable %s' %h ) if h != optparse.SUPPRESS_HELP else h) ) + + + cli.add_option_group( grp ) +@@ -1982,6 +1983,17 @@ class Tools: + else: + nocd = False + ++ stdout.write( '%s\n' % ('-' * 79) ) ++ stdout.write( 'Configured options:\n' ) ++ stdout.write( 'Enable FDK-AAC: %s\n' % options.enable_fdk_aac ) ++ stdout.write( 'Enable FFmpeg AAC: %s\n' % options.enable_ffmpeg_aac ) ++ ++ if IfHost( True, '*-*-linux*', '*-*-mingw*', none=False ).value is True: ++ stdout.write( 'Enable NVEnc: %s\n' % options.enable_nvenc ) ++ stdout.write( 'Enable QSV: %s\n' % options.enable_qsv ) ++ if IfHost( True, '*-*-mingw*', none=False ).value is True: ++ stdout.write( 'Enable VCE: %s\n' % options.enable_vce ) ++ + stdout.write( '%s\n' % ('-' * 79) ) + if options.launch: + stdout.write( 'Build is finished!\n' ) diff --git a/media-video/handbrake/handbrake-1.2.2-r2.ebuild b/media-video/handbrake/handbrake-1.2.2-r2.ebuild new file mode 100644 index 000000000000..d780a55c6e27 --- /dev/null +++ b/media-video/handbrake/handbrake-1.2.2-r2.ebuild @@ -0,0 +1,169 @@ +# 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 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/libsamplerate + media-libs/libtheora + media-libs/libvorbis + media-libs/libvpx + 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.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 + ) + gtk? ( + >=x11-libs/gtk+-3.10 + dev-libs/dbus-glib + dev-libs/glib:2 + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/libnotify + x11-libs/pango + virtual/libgudev:= + ) + 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 x265 link flag + "${FILESDIR}/${PN}-9999-fix-missing-x265-link-flag.patch" + + # Allow disabling nvenc etc + "${FILESDIR}/${P}-backport-hardware-configure.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 \ + $(use_enable libav-aac ffmpeg-aac) \ + $(use_enable fdk fdk-aac) \ + $(use_enable 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 +} diff --git a/media-video/handbrake/metadata.xml b/media-video/handbrake/metadata.xml index 6f7dc3b848e0..0bab35dd0f09 100644 --- a/media-video/handbrake/metadata.xml +++ b/media-video/handbrake/metadata.xml @@ -13,6 +13,7 @@ <flag name="gtk">Install the GTK UI, ghb.</flag> <flag name="fdk">Support for encoding AAC using <pkg>media-libs/fdk-aac</pkg>.</flag> <flag name="libav-aac">Support for encoding AAC using <pkg>media-video/libav</pkg>'s internal encoder.</flag> + <flag name="nvenc">Adds support for NVIDIA Encoder (NVENC) API for hardware accelerated encoding on NVIDIA cards.</flag> <flag name="x265">Support for encoding h265 using <pkg>media-libs/x265</pkg>.</flag> </use> </pkgmetadata> |