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/
Date: Tue, 04 Sep 2018 08:19:48
Message-Id: 1536049165.4504ee0e021e5e9cd2b7c8f10af9c16cf8c31627.slyfox@gentoo
1 commit: 4504ee0e021e5e9cd2b7c8f10af9c16cf8c31627
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 4 08:06:47 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 4 08:19:25 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4504ee0e
7
8 dev-lang/crystal: fix PATH path when bootstrapping
9
10 Before crystal-0.25.0 binary tarball directories did
11 not contain '-<N>' revisions:
12 crystal-0.24.2-1-linux-x86_64 -> crystal-0.24.2
13 After crystal-0.25.0 they did:
14 crystal-0.25.1-1-linux-x86_64 -> crystal-0.25.1-1
15
16 Ebuild missed the change and kept passing PATH without
17 '-<N>' revision.
18
19 This change resotres revision for crystal-0.26.0, 0.26.1
20 and adds sanity check to make sure expected directry
21 is in place. Should help catching the failure next time.
22
23 Reported-by: Myrddin Emrys
24 Bug: https://github.com/crystal-lang/crystal/issues/6650
25 Package-Manager: Portage-2.3.49, Repoman-2.3.10
26
27 dev-lang/crystal/crystal-0.26.0.ebuild | 10 +++++-----
28 dev-lang/crystal/crystal-0.26.1.ebuild | 18 ++++++++++++------
29 2 files changed, 17 insertions(+), 11 deletions(-)
30
31 diff --git a/dev-lang/crystal/crystal-0.26.0.ebuild b/dev-lang/crystal/crystal-0.26.0.ebuild
32 index 033b3eb6c94..59268e937a6 100644
33 --- a/dev-lang/crystal/crystal-0.26.0.ebuild
34 +++ b/dev-lang/crystal/crystal-0.26.0.ebuild
35 @@ -5,15 +5,15 @@ EAPI=6
36
37 inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
38
39 -BV=0.25.1
40 -BV_AMD64=${BV}-1-linux-x86_64
41 -BV_X86=${BV}-1-linux-i686
42 +BV=0.25.1-1
43 +BV_AMD64=${BV}-linux-x86_64
44 +BV_X86=${BV}-linux-i686
45
46 DESCRIPTION="The Crystal Programming Language"
47 HOMEPAGE="https://crystal-lang.org"
48 SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
49 - amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/}/crystal-${BV_AMD64}.tar.gz )
50 - x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV}/crystal-${BV_X86}.tar.gz )"
51 + amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz )
52 + x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz )"
53
54 LICENSE="Apache-2.0"
55 SLOT="0"
56
57 diff --git a/dev-lang/crystal/crystal-0.26.1.ebuild b/dev-lang/crystal/crystal-0.26.1.ebuild
58 index d02b47f0788..7d0ff4c7b5b 100644
59 --- a/dev-lang/crystal/crystal-0.26.1.ebuild
60 +++ b/dev-lang/crystal/crystal-0.26.1.ebuild
61 @@ -5,15 +5,15 @@ EAPI=6
62
63 inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
64
65 -BV=0.26.0
66 -BV_AMD64=${BV}-1-linux-x86_64
67 -BV_X86=${BV}-1-linux-i686
68 +BV=0.26.0-1
69 +BV_AMD64=${BV}-linux-x86_64
70 +BV_X86=${BV}-linux-i686
71
72 DESCRIPTION="The Crystal Programming Language"
73 HOMEPAGE="https://crystal-lang.org"
74 SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
75 - amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/}/crystal-${BV_AMD64}.tar.gz )
76 - x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV}/crystal-${BV_X86}.tar.gz )"
77 + amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz )
78 + x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz )"
79
80 LICENSE="Apache-2.0"
81 SLOT="0"
82 @@ -53,6 +53,12 @@ src_prepare() {
83 }
84
85 src_compile() {
86 + local bootstrap_path=${WORKDIR}/${PN}-${BV}/bin
87 + if [[ ! -d ${bootstrap_path} ]]; then
88 + eerror "Binary tarball does not contain expected directory:"
89 + die "'${bootstrap_path}' path does not exist."
90 + fi
91 +
92 emake \
93 $(usex debug "" release=1) \
94 progress=true \
95 @@ -64,7 +70,7 @@ src_compile() {
96 CXX=$(tc-getCXX) \
97 AR=$(tc-getAR) \
98 \
99 - PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
100 + PATH="${bootstrap_path}:${PATH}" \
101 CRYSTAL_PATH=src \
102 CRYSTAL_CONFIG_VERSION=${PV} \
103 CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"