Gentoo Archives: gentoo-commits

From: Anna Vyalkova <cyber+gentoo@×××××.in>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-util/gshards/files/0.1/, dev-util/gshards/
Date: Tue, 08 Nov 2022 17:55:42
Message-Id: 1667927490.582cf2584bc6d154d48a3316252068f674c68f41.cybertailor@gentoo
1 commit: 582cf2584bc6d154d48a3316252068f674c68f41
2 Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Tue Nov 8 16:13:19 2022 +0000
4 Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
5 CommitDate: Tue Nov 8 17:11:30 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=582cf258
7
8 dev-util/gshards: new package, add 0.1
9
10 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
11
12 dev-util/gshards/files/0.1/gshards-get-pkgname.cr | 10 ++++++
13 dev-util/gshards/files/0.1/gshards-has-targets.cr | 14 ++++++++
14 dev-util/gshards/gshards-0.1.ebuild | 39 +++++++++++++++++++++++
15 dev-util/gshards/metadata.xml | 8 +++++
16 4 files changed, 71 insertions(+)
17
18 diff --git a/dev-util/gshards/files/0.1/gshards-get-pkgname.cr b/dev-util/gshards/files/0.1/gshards-get-pkgname.cr
19 new file mode 100644
20 index 000000000..4a1947221
21 --- /dev/null
22 +++ b/dev-util/gshards/files/0.1/gshards-get-pkgname.cr
23 @@ -0,0 +1,10 @@
24 +# Copyright 2022 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +require "yaml"
28 +
29 +yaml = File.open("shard.yml") do |file|
30 + YAML.parse(file)
31 +end
32 +
33 +puts yaml["name"].as_s
34
35 diff --git a/dev-util/gshards/files/0.1/gshards-has-targets.cr b/dev-util/gshards/files/0.1/gshards-has-targets.cr
36 new file mode 100644
37 index 000000000..1b2eb308e
38 --- /dev/null
39 +++ b/dev-util/gshards/files/0.1/gshards-has-targets.cr
40 @@ -0,0 +1,14 @@
41 +# Copyright 2022 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +require "yaml"
45 +
46 +yaml = File.open("shard.yml") do |file|
47 + YAML.parse(file)
48 +end
49 +
50 +if yaml["targets"]?
51 + exit(0)
52 +end
53 +
54 +exit(1)
55
56 diff --git a/dev-util/gshards/gshards-0.1.ebuild b/dev-util/gshards/gshards-0.1.ebuild
57 new file mode 100644
58 index 000000000..e5541387e
59 --- /dev/null
60 +++ b/dev-util/gshards/gshards-0.1.ebuild
61 @@ -0,0 +1,39 @@
62 +# Copyright 2022 Gentoo Authors
63 +# Distributed under the terms of the GNU General Public License v2
64 +
65 +EAPI=8
66 +
67 +inherit crystal-utils multiprocessing toolchain-funcs
68 +
69 +DESCRIPTION="Small helper tools to aid installing Crystal packages in Gentoo"
70 +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
71 +S="${WORKDIR}"
72 +
73 +LICENSE="GPL-2"
74 +SLOT="0"
75 +KEYWORDS="~amd64"
76 +
77 +RDEPEND="
78 + dev-libs/boehm-gc
79 + dev-libs/libevent:=
80 + dev-libs/libyaml
81 +"
82 +DEPEND="${RDEPEND}"
83 +BDEPEND="${CRYSTAL_DEPS}"
84 +
85 +QA_FLAGS_IGNORED='.*'
86 +
87 +src_configure() {
88 + crystal_configure
89 + tc-export CC
90 +}
91 +
92 +src_compile() {
93 + for prog in "${FILESDIR}"/${PV}/gshards-*.cr; do
94 + ecrystal build "${prog}" --verbose --threads=$(makeopts_jobs)
95 + done
96 +}
97 +
98 +src_install() {
99 + dobin gshards-*
100 +}
101
102 diff --git a/dev-util/gshards/metadata.xml b/dev-util/gshards/metadata.xml
103 new file mode 100644
104 index 000000000..7ebbd0334
105 --- /dev/null
106 +++ b/dev-util/gshards/metadata.xml
107 @@ -0,0 +1,8 @@
108 +<?xml version="1.0" encoding="UTF-8"?>
109 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
110 +<pkgmetadata>
111 + <maintainer type="person">
112 + <email>cyber+gentoo@×××××.in</email>
113 + <name>Anna</name>
114 + </maintainer>
115 +</pkgmetadata>