summaryrefslogtreecommitdiff
blob: 65013295fed735bb8a02b81588f143bd117578d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

USE_RUBY="ruby31 ruby32"

inherit desktop ruby-ng

PLUGIN_HASH="30071c3008e4616e723cf4e734fc79254019af09"
BLOWFISH_PATCH_NAME="1585-use-own-blowfish-impl.patch"
BLOWFISH_PATCH_URI="https://dev.mikutter.hachune.net/attachments/download/813/${BLOWFISH_PATCH_NAME}"

if [ "${PV}" = "9999" ]; then
	EGIT_REPO_URI="git://mikutter.hachune.net/mikutter.git"
	inherit git-r3
	SRC_URI=" ${BLOWFISH_PATCH_URI}"
	EGIT_CHECKOUT_DIR="${WORKDIR}/all"
else
	SRC_URI="http://mikutter.hachune.net/bin/${P}.tar.gz
		${BLOWFISH_PATCH_URI}"
	KEYWORDS="~amd64 ~riscv"
fi

DESCRIPTION="Simple, powerful and moeful twitter client"
HOMEPAGE="https://mikutter.hachune.net/"

# Apache license for the blowfish patch
# https://dev.mikutter.hachune.net/issues/1585
LICENSE="Apache-2.0 MIT"
SLOT="0"
IUSE="+libnotify"

PATCHES=(
	"${DISTDIR}/${BLOWFISH_PATCH_NAME}"
)

DEPEND=""
RDEPEND="
	libnotify? ( x11-libs/libnotify )
	media-sound/alsa-utils"

ruby_add_rdepend "=dev-ruby/addressable-2.8*
	>=dev-ruby/delayer-1.2.1
	!>=dev-ruby/delayer-2.0
	>=dev-ruby/delayer-deferred-2.2.0
	!>=dev-ruby/delayer-deferred-3.0
	>=dev-ruby/diva-2.0.1
	!>=dev-ruby/diva-3.0
	dev-ruby/httpclient
	dev-ruby/json:2
	>=dev-ruby/memoist-0.16.2
	!>=dev-ruby/memoist-0.17
	dev-ruby/moneta
	dev-ruby/nokogiri
	>=dev-ruby/oauth-0.5.8
	>=dev-ruby/pluggaloid-1.7.0
	!>=dev-ruby/pluggaloid-2.0
	=dev-ruby/prime-0.1.2*
	dev-ruby/rcairo
	>=dev-ruby/ruby-gettext-3.4
	!>=dev-ruby/ruby-gettext-3.5
	dev-ruby/ruby-gtk3
	>=dev-ruby/typed-array-0.1.2
	!>=dev-ruby/typed-array-0.2
	virtual/ruby-ssl"

all_ruby_unpack() {
	if [ "${PV}" = "9999" ];then
		git-3_src_unpack
	else
		default
	fi
}

all_ruby_install() {
	local ruby

	for ruby in ${RUBY_TARGETS_PREFERENCE}; do
		if use ruby_targets_${ruby}; then
			break
		fi
	done

	exeinto /usr/share/mikutter
	doexe mikutter.rb
	insinto /usr/share/mikutter
	doins -r core plugin
	sed -e "s/ruby19/${ruby}/" "${FILESDIR}"/mikutter \
		| newbin - mikutter
	dodoc README
	make_desktop_entry mikutter Mikutter \
		/usr/share/mikutter/core/skin/data/icon.png
}