Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/ytfzf/, net-misc/ytfzf/files/
Date: Wed, 14 Sep 2022 04:05:48
Message-Id: 1663128169.f7d92d2c8e00f41bfcb6aedd8bff71b7f0fdb2c1.ionen@gentoo
1 commit: f7d92d2c8e00f41bfcb6aedd8bff71b7f0fdb2c1
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 14 02:01:15 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 14 04:02:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7d92d2c
7
8 net-misc/ytfzf: add 2.5.0
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 net-misc/ytfzf/Manifest | 1 +
13 net-misc/ytfzf/files/ytfzf-2.5.0-cachedir.patch | 16 +++++++
14 net-misc/ytfzf/ytfzf-2.5.0.ebuild | 63 +++++++++++++++++++++++++
15 3 files changed, 80 insertions(+)
16
17 diff --git a/net-misc/ytfzf/Manifest b/net-misc/ytfzf/Manifest
18 index 77eab4c37ce4..4a94a807b041 100644
19 --- a/net-misc/ytfzf/Manifest
20 +++ b/net-misc/ytfzf/Manifest
21 @@ -1 +1,2 @@
22 DIST ytfzf-2.4.1.tar.gz 3256903 BLAKE2B e95fc86d1ed2099aeb96d8daf808861e279865e17758dc8b0b5fa4c349dd819371012d13073f89b94469f1d69f00b66bb01860e3190e324baadc30e2cbae8074 SHA512 f0be168d5fd32cc75f95d0533a093cb9e3aa238d39e024271d69f078b974da51504bd1fd65a34378085a148f1ddae68f6c2fdc15c7a56c2353ec3d6695451771
23 +DIST ytfzf-2.5.0.tar.gz 3260280 BLAKE2B 33535afc6be18fe9efeddf666ccdc646db227fcb601a52baeaca91b9316b87b1300fdab50ceca5eb9e21fef5571a87e917f78f71b97e7ec2abbebf5158b4487d SHA512 43e366694687be517a0b3da0d16e423f32046ab5de92368748e87c622f43e34bd1037f01b37fcb05ae8ce87ca536672cf3f5ca2b2608bab07ec9f4abeabb61ec
24
25 diff --git a/net-misc/ytfzf/files/ytfzf-2.5.0-cachedir.patch b/net-misc/ytfzf/files/ytfzf-2.5.0-cachedir.patch
26 new file mode 100644
27 index 000000000000..11023779e690
28 --- /dev/null
29 +++ b/net-misc/ytfzf/files/ytfzf-2.5.0-cachedir.patch
30 @@ -0,0 +1,16 @@
31 +https://github.com/pystardust/ytfzf/commit/cfc739211352b0d5249e48419a34ee6e1913aadd
32 +From: Euro20179 <sandollar2020@×××××.com>
33 +Date: Tue, 13 Sep 2022 18:50:36 -0700
34 +Subject: [PATCH] fix: if cache dir is missing, ytfzf complains when trying to
35 + create instances.json
36 +--- a/ytfzf
37 ++++ b/ytfzf
38 +@@ -2278,6 +2278,8 @@ do_an_event_function "on_post_set_vars"
39 + # files
40 + : "${hist_file:="$cache_dir/watch_hist"}" "${search_hist_file:="$cache_dir/search_hist"}"
41 +
42 ++[ ! -d "$cache_dir" ] && mkdir -p "$cache_dir"
43 ++
44 + # Where do we put the list of healthy instances?
45 + : "${instances_file:="$cache_dir/instances.json"}"
46 +
47
48 diff --git a/net-misc/ytfzf/ytfzf-2.5.0.ebuild b/net-misc/ytfzf/ytfzf-2.5.0.ebuild
49 new file mode 100644
50 index 000000000000..743a99d9afe1
51 --- /dev/null
52 +++ b/net-misc/ytfzf/ytfzf-2.5.0.ebuild
53 @@ -0,0 +1,63 @@
54 +# Copyright 2021-2022 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=8
58 +
59 +inherit optfeature
60 +
61 +DESCRIPTION="Posix script to find and watch youtube videos from the terminal"
62 +HOMEPAGE="https://github.com/pystardust/ytfzf/"
63 +SRC_URI="https://github.com/pystardust/ytfzf/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
64 +
65 +LICENSE="GPL-3"
66 +SLOT="0"
67 +KEYWORDS="~amd64 ~x86"
68 +IUSE="X minimal"
69 +
70 +RDEPEND="
71 + app-misc/jq
72 + net-misc/curl[ssl]
73 + virtual/awk
74 + !minimal? (
75 + X? ( media-gfx/ueberzug )
76 + app-shells/fzf
77 + media-video/mpv[lua]
78 + net-misc/yt-dlp
79 + )"
80 +
81 +PATCHES=(
82 + "${FILESDIR}"/${P}-cachedir.patch
83 +)
84 +
85 +src_prepare() {
86 + default
87 +
88 + sed -i "/^: ...YTFZF_SYSTEM_ADDON_DIR/s|/usr/local|${EPREFIX}/usr|" ytfzf || die
89 +}
90 +
91 +src_compile() { :; }
92 +
93 +src_install() {
94 + local emakeargs=(
95 + DESTDIR="${D}"
96 + PREFIX="${EPREFIX}"/usr
97 + DOCDIR="${EPREFIX}"/usr/share/doc/${PF}
98 + )
99 +
100 + emake "${emakeargs[@]}" addons doc install
101 + einstalldocs
102 +
103 + rm -r "${ED}"/usr/share/licenses || die
104 +}
105 +
106 +pkg_postinst() {
107 + optfeature "external menu support" x11-misc/dmenu
108 + optfeature "desktop notifications" x11-libs/libnotify
109 +
110 + if [[ ! ${REPLACING_VERSIONS} ]]; then
111 + elog "Note that ${PN} supports many methods to display menus/thumbnails."
112 + elog "This ebuild primarily covers defaults and major features, additional"
113 + elog "dependencies may be needed for others. Set USE=minimal if want full"
114 + elog "control over optional dependencies (e.g. fzf is optional if use dmenu)."
115 + fi
116 +}