summaryrefslogtreecommitdiff
path: root/sci-mathematics/rink/rink-9999.ebuild
blob: dc1a5b4721a87f1d03e74b76c77806ec19d405a4 (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
# Copyright 2024-2025 demize
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.13.3

EAPI=8

inherit cargo desktop git-r3

DESCRIPTION="Unit conversion tool, similar to frink"
HOMEPAGE="https://rinkcalc.app/about/"
EGIT_REPO_URI="https://codeberg.org/tiffany/rink.git"

LICENSE="MPL-2.0 GPL-3"
# Dependent crate licenses
# owo-colors is MIT but notated as LICENCE
LICENSE+="
	Apache-2.0 BSD-2 BSD Boost-1.0 CC0-1.0 MIT MPL-2.0 Unicode-DFS-2016
"

SLOT="0"
IUSE="doc bundle-files test"
REQUIRED_USE="test? ( bundle-files )"

RESTRICT="!test? ( test )"

DEPEND+="
	net-misc/curl
	dev-libs/openssl
	virtual/zlib:=
"
BDEPEND+="dev-ruby/asciidoctor"
RDEPEND+="net-misc/curl"

QA_FLAGS_IGNORED="usr/bin/rink"

src_unpack() {
	git-r3_src_unpack
	cargo_live_src_unpack
}

src_configure() {
	# RINK_PATH is used in the build process to define the data file location
	export RINK_PATH=/usr/share/rink
	local myfeatures=(
		$(usev bundle-files)
	)
	cargo_src_configure --no-default-features
}

src_install() {
	cargo_src_install --path cli

	insinto /usr/share/rink
	doins core/definitions.units
	doins core/currency.units
	doins core/datepatterns.txt

	newicon -s 192 "${S}/web/site/images/icons/icon-192x192.png" rink.png
	newicon -s 512 "${S}/web/site/images/icons/icon-512x512.png" rink.png
	domenu "cli/rink.desktop"

	make man
	doman build/rink.1
	doman build/rink.5
	doman build/rink.7
	doman build/rink-defs.5
	doman build/rink-dates.5

	if use doc; then
		make htmldoc
		local DOCS=( README.md )
		local HTML_DOCS=(
			build/rink.1.html
			build/rink.5.html
			build/rink.7.html
			build/rink-defs.5.html
			build/rink-dates.5.html
		)
		einstalldocs
	fi
}