www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / media-video / makemkv / makemkv-1.15.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit flag-o-matic linux-info xdg
7
8 MY_P=makemkv-oss-${PV}
9 MY_PB=makemkv-bin-${PV}
10
11 DESCRIPTION="Tool for ripping and streaming Blu-ray, HD-DVD and DVD discs"
12 HOMEPAGE="http://www.makemkv.com/"
13 SRC_URI="http://www.makemkv.com/download/${MY_P}.tar.gz
14         http://www.makemkv.com/download/${MY_PB}.tar.gz"
15
16 LICENSE="LGPL-2.1 MPL-1.1 MakeMKV-EULA openssl"
17 SLOT="0"
18 KEYWORDS="-* ~amd64 ~x86"
19 IUSE="+gui libressl"
20 RESTRICT="bindist mirror"
21
22 QA_PREBUILT="usr/bin/makemkvcon usr/bin/mmdtsdec"
23
24 DEPEND="
25         sys-libs/glibc
26         dev-libs/expat
27         sys-libs/zlib
28         gui? (
29                 dev-qt/qtcore:5
30                 dev-qt/qtdbus:5
31                 dev-qt/qtgui:5
32                 dev-qt/qtwidgets:5
33         )
34         >=media-video/ffmpeg-1.0.0:0=
35         !libressl? ( dev-libs/openssl:0=[-bindist(-)] )
36         libressl? ( dev-libs/libressl:0= )
37 "
38 RDEPEND="
39         ${DEPEND}
40         media-video/ccextractor
41         net-misc/wget
42 "
43 BDEPEND="
44         virtual/pkgconfig
45         gui? ( dev-qt/qtcore:5 )
46 "
47
48 CONFIG_CHECK="~CHR_DEV_SG"
49 S="${WORKDIR}/${MY_P}"
50 PATCHES=( "${FILESDIR}"/${PN}-path.patch )
51
52 src_configure() {
53         # See bug #439380.
54         replace-flags -O* -Os
55
56         econf \
57                 --enable-debug \
58                 --disable-noec \
59                 $(use_enable gui) \
60                 $(use_enable gui qt5)
61 }
62
63 src_install() {
64         default
65
66         # add missing symlinks for QA
67         dosym libdriveio.so.0 /usr/$(get_libdir)/libdriveio.so.0.${PV}
68         dosym libdriveio.so.0 /usr/$(get_libdir)/libdriveio.so
69         dosym libmakemkv.so.1 /usr/$(get_libdir)/libmakemkv.so.1.${PV}
70         dosym libmakemkv.so.1 /usr/$(get_libdir)/libmakemkv.so
71         dosym libmmbd.so.0    /usr/$(get_libdir)/libmmbd.so
72         dosym libmmbd.so.0    /usr/$(get_libdir)/libmmbd.so.0.${PV}
73
74         cd "${WORKDIR}"/${MY_PB} || die
75
76         # install prebuilt bin
77         dobin bin/$(usex x86 i386 ${ARCH})/makemkvcon
78
79         # install profiles and locales
80         insinto /usr/share/MakeMKV
81         doins src/share/*
82
83         # add symlink rather than relying on MMCCEXTRACTOR env var
84         dosym ccextractor /usr/bin/mmccextr
85 }
86
87 pkg_postinst() {
88         xdg_pkg_postinst
89
90         elog "While MakeMKV is in beta mode, upstream has provided a license"
91         elog "to use if you do not want to purchase one."
92         elog ""
93         elog "See this forum thread for more information, including the key:"
94         elog "https://www.makemkv.com/forum/viewtopic.php?f=5&t=1053"
95         elog ""
96         elog "Note that beta license may have an expiration date and you will"
97         elog "need to check for newer licenses/releases. "
98         elog ""
99         elog "We previously said to copy default.mmcp.xml to ~/.MakeMKV/. This"
100         elog "is no longer necessary and you should delete it from there to"
101         elog "avoid warning messages."
102         elog ""
103         elog "MakeMKV can also act as a drop-in replacement for libaacs and"
104         elog "libbdplus, allowing transparent decryption of a wider range of"
105         elog "titles under players like VLC and mplayer. To enable this, set"
106         elog "the following variables when launching the player:"
107         elog "LIBAACS_PATH=libmmbd LIBBDPLUS_PATH=libmmbd"
108 }