Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/
Date: Tue, 24 Sep 2019 19:17:35
Message-Id: 1569352643.1d37f836b1438b18f433a8c83724ffad0bf91f90.slyfox@gentoo
1 commit: 1d37f836b1438b18f433a8c83724ffad0bf91f90
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 24 19:12:22 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 24 19:17:23 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d37f836
7
8 dev-lang/crystal: bump up to 0.31.0
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.17
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 dev-lang/crystal/Manifest | 3 +
14 dev-lang/crystal/crystal-0.31.0.ebuild | 121 +++++++++++++++++++++
15 .../crystal/files/crystal-0.31.0-verbose.patch | 7 ++
16 3 files changed, 131 insertions(+)
17
18 diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
19 index 1a98a93bcc5..282ef378f8f 100644
20 --- a/dev-lang/crystal/Manifest
21 +++ b/dev-lang/crystal/Manifest
22 @@ -10,3 +10,6 @@ DIST crystal-0.30.0.tar.gz 2151397 BLAKE2B 8b32d12e6f45d18c5ef23dce0520d76690762
23 DIST crystal-0.30.1-1-linux-i686.tar.gz 31972575 BLAKE2B 75350799d836110448f56a7b0f49ad27fdeef0f1da169cc15b411482649538e48c3895b169a1deb4c5691f97329ad70a126396425fd096f0dbd83db7e989e4b2 SHA512 9ede9ed7522a82270d91c316b9b98d8ab2d497def2432b99e2d2f21175e978b5b984df92c9637b4600ef27b6e84bd7bc7a5a1b227b17538804a1bc52dabdf84a
24 DIST crystal-0.30.1-1-linux-x86_64.tar.gz 30166159 BLAKE2B b58e69f9f00e15c3b6e7e259179903f6f210f463c89b8d50a99b1a7d413092585afddf94cac3a461c041c3d91301aac8e61dbab37282a29f781a34367a1d9ddb SHA512 31f06163951fb6ede70eb41f6047c96a74293754bba360b428bf162b1661eed47f8b426327f074f3523ae16b073e8ae5f5e0e6b36ebf83031fa5a0b414b41648
25 DIST crystal-0.30.1.tar.gz 2153037 BLAKE2B e5cb2d49688aba75f684ea9fea7e6b0e85eb124f55bf00472595ba83bedd50a8042c5b3c40358254c3fdec3bce2f351ca5e6d385a7841d33f44b934844fd89b1 SHA512 62ddb0dc45385d52d7fdd593f85ec4bef2451aa9a48aabe0115ffe8cfe820e6665b2d51d097339fe931d8599bb6c62c7ddfcaae36a199db0726df4e246af6eab
26 +DIST crystal-0.31.0-1-linux-i686.tar.gz 28656362 BLAKE2B 032e276ee12978fdf1e4d59c1cab680ba6c67b23479820edf16d0957e4ec5f054c49775a719f601766477808898bebb4eb64a2e77c413fba28f4f9f50d25f73c SHA512 bafd566c000f190c9fc7cf327411e1683cda5ea7bd4f2e09660749c99ec661997d1e7b1076ea3624bfa8f2a6432bd283a170efaa17a4988c8bb7195eaa41f872
27 +DIST crystal-0.31.0-1-linux-x86_64.tar.gz 26985093 BLAKE2B f9d663cab6ee81abd941dbf528b25efd0a2d2a5d7cc21fa56456b7f9720e85d297d13c254c9a5b392dc3f054535ea4131d6ec7f43f6ac6621fd19ed2453e475b SHA512 f2d0ee26d01432fe0f2d2e5c847f88d4f58d2498d4f7769fa29817a172012628d5c63702c09451de54a154e8e2bb78709379f4d695773d999ca8e32bd559b65a
28 +DIST crystal-0.31.0.tar.gz 2190452 BLAKE2B 126da5d787feea3c4d12f496321f9b16257f96cbdc9f3290b1bca8d8a5902d3a0a65e9b9d5e28c4ccd791f0fcc0139321251dcc775a926a6271be480111d251d SHA512 c5a276c7b098bc863087449328326a54186ddc1c269b90a8d94d9133feaa001398d0272c6ff48e1376d3d8a276a074f50ef67ca4e2bc27cbfd0dfd0f952efd8f
29
30 diff --git a/dev-lang/crystal/crystal-0.31.0.ebuild b/dev-lang/crystal/crystal-0.31.0.ebuild
31 new file mode 100644
32 index 00000000000..b67566686cd
33 --- /dev/null
34 +++ b/dev-lang/crystal/crystal-0.31.0.ebuild
35 @@ -0,0 +1,121 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
42 +
43 +BV=${PV}-1
44 +BV_AMD64=${BV}-linux-x86_64
45 +BV_X86=${BV}-linux-i686
46 +
47 +DESCRIPTION="The Crystal Programming Language"
48 +HOMEPAGE="https://crystal-lang.org"
49 +SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
50 + amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz )
51 + x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz )"
52 +
53 +LICENSE="Apache-2.0"
54 +SLOT="0"
55 +KEYWORDS="~amd64"
56 +IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
57 +
58 +RESTRICT=test # not stable for day-to-day runs
59 +
60 +LLVM_MAX_SLOT=8
61 +
62 +# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
63 +DEPEND="
64 + sys-devel/llvm:${LLVM_MAX_SLOT}
65 + dev-libs/boehm-gc[static-libs,threads]
66 + dev-libs/libatomic_ops
67 + dev-libs/libevent
68 + dev-libs/libpcre
69 + sys-libs/libunwind
70 + dev-libs/pcl
71 + dev-libs/gmp:0
72 +"
73 +RDEPEND="${DEPEND}
74 + xml? ( dev-libs/libxml2 )
75 + yaml? ( dev-libs/libyaml )
76 +"
77 +
78 +PATCHES=(
79 + "${FILESDIR}"/${PN}-0.31.0-verbose.patch
80 + "${FILESDIR}"/${PN}-0.26.1-gentoo-tests-sandbox.patch
81 + "${FILESDIR}"/${PN}-0.27.0-extra-spec-flags.patch
82 + #"${FILESDIR}"/${PN}-0.27.0-max-age-0-test.patch
83 + "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix.patch
84 + "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix-2.patch
85 + "${FILESDIR}"/${PN}-0.29.0-no-usr-lib.patch
86 +)
87 +
88 +src_prepare() {
89 + default
90 +
91 + use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
92 +}
93 +
94 +src_compile() {
95 + local bootstrap_path=${WORKDIR}/${PN}-${BV}/bin
96 + if [[ ! -d ${bootstrap_path} ]]; then
97 + eerror "Binary tarball does not contain expected directory:"
98 + die "'${bootstrap_path}' path does not exist."
99 + fi
100 +
101 + emake \
102 + $(usex debug "" release=1) \
103 + progress=true \
104 + stats=1 \
105 + threads=$(makeopts_jobs) \
106 + verbose=1 \
107 + \
108 + CC=$(tc-getCC) \
109 + CXX=$(tc-getCXX) \
110 + AR=$(tc-getAR) \
111 + \
112 + PATH="${bootstrap_path}:${PATH}" \
113 + CRYSTAL_PATH=src \
114 + CRYSTAL_CONFIG_VERSION=${PV} \
115 + CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
116 + use doc && emake docs
117 +}
118 +
119 +src_test() {
120 + # EXTRA_SPEC_FLAGS is useful to debug individual tests
121 + # as part of full build:
122 + # USE=debug EXTRA_SPEC_FLAGS='-e parse_set_cookie' emerge -1 crystal
123 + emake spec \
124 + $(usex debug "" release=1) \
125 + progress=true \
126 + stats=1 \
127 + threads=$(makeopts_jobs) \
128 + verbose=1 \
129 + \
130 + CC=$(tc-getCC) \
131 + CXX=$(tc-getCXX) \
132 + AR=$(tc-getAR) \
133 + \
134 + CRYSTAL_PATH=src \
135 + CRYSTAL_CONFIG_VERSION=${PV} \
136 + \
137 + "EXTRA_SPEC_FLAGS=${EXTRA_SPEC_FLAGS}"
138 +}
139 +
140 +src_install() {
141 + insinto /usr/$(get_libdir)/crystal
142 + doins -r src/.
143 + dobin .build/crystal
144 +
145 + insinto /usr/share/zsh/site-functions
146 + newins etc/completion.zsh _crystal
147 +
148 + use examples && dodoc -r samples
149 +
150 + if use doc ; then
151 + docinto api
152 + dodoc -r docs/.
153 + fi
154 +
155 + newbashcomp etc/completion.bash ${PN}
156 +}
157
158 diff --git a/dev-lang/crystal/files/crystal-0.31.0-verbose.patch b/dev-lang/crystal/files/crystal-0.31.0-verbose.patch
159 new file mode 100644
160 index 00000000000..f381704ba0d
161 --- /dev/null
162 +++ b/dev-lang/crystal/files/crystal-0.31.0-verbose.patch
163 @@ -0,0 +1,7 @@
164 +--- a/Makefile
165 ++++ b/Makefile
166 +@@ -29,3 +29,3 @@ SOURCES := $(shell find src -name '*.cr')
167 + SPEC_SOURCES := $(shell find spec -name '*.cr')
168 +-override FLAGS += $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(static),--static )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )
169 ++override FLAGS += $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(static),--static )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )$(if $(verbose),--verbose )
170 + SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )