summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-09-04 09:06:47 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-09-04 09:19:25 +0100
commit4504ee0e021e5e9cd2b7c8f10af9c16cf8c31627 (patch)
tree10b0cd3727bf3427524a72ec37bab763a4d17195 /dev-lang/crystal
parentsys-apps/nix: bump up to 2.1, unkeyworded (diff)
downloadgentoo-4504ee0e021e5e9cd2b7c8f10af9c16cf8c31627.tar.gz
gentoo-4504ee0e021e5e9cd2b7c8f10af9c16cf8c31627.tar.bz2
gentoo-4504ee0e021e5e9cd2b7c8f10af9c16cf8c31627.zip
dev-lang/crystal: fix PATH path when bootstrapping
Before crystal-0.25.0 binary tarball directories did not contain '-<N>' revisions: crystal-0.24.2-1-linux-x86_64 -> crystal-0.24.2 After crystal-0.25.0 they did: crystal-0.25.1-1-linux-x86_64 -> crystal-0.25.1-1 Ebuild missed the change and kept passing PATH without '-<N>' revision. This change resotres revision for crystal-0.26.0, 0.26.1 and adds sanity check to make sure expected directry is in place. Should help catching the failure next time. Reported-by: Myrddin Emrys Bug: https://github.com/crystal-lang/crystal/issues/6650 Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'dev-lang/crystal')
-rw-r--r--dev-lang/crystal/crystal-0.26.0.ebuild10
-rw-r--r--dev-lang/crystal/crystal-0.26.1.ebuild18
2 files changed, 17 insertions, 11 deletions
diff --git a/dev-lang/crystal/crystal-0.26.0.ebuild b/dev-lang/crystal/crystal-0.26.0.ebuild
index 033b3eb6c94..59268e937a6 100644
--- a/dev-lang/crystal/crystal-0.26.0.ebuild
+++ b/dev-lang/crystal/crystal-0.26.0.ebuild
@@ -5,15 +5,15 @@ EAPI=6
inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
-BV=0.25.1
-BV_AMD64=${BV}-1-linux-x86_64
-BV_X86=${BV}-1-linux-i686
+BV=0.25.1-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
DESCRIPTION="The Crystal Programming Language"
HOMEPAGE="https://crystal-lang.org"
SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
- amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/}/crystal-${BV_AMD64}.tar.gz )
- x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV}/crystal-${BV_X86}.tar.gz )"
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz )"
LICENSE="Apache-2.0"
SLOT="0"
diff --git a/dev-lang/crystal/crystal-0.26.1.ebuild b/dev-lang/crystal/crystal-0.26.1.ebuild
index d02b47f0788..7d0ff4c7b5b 100644
--- a/dev-lang/crystal/crystal-0.26.1.ebuild
+++ b/dev-lang/crystal/crystal-0.26.1.ebuild
@@ -5,15 +5,15 @@ EAPI=6
inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
-BV=0.26.0
-BV_AMD64=${BV}-1-linux-x86_64
-BV_X86=${BV}-1-linux-i686
+BV=0.26.0-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
DESCRIPTION="The Crystal Programming Language"
HOMEPAGE="https://crystal-lang.org"
SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
- amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/}/crystal-${BV_AMD64}.tar.gz )
- x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV}/crystal-${BV_X86}.tar.gz )"
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz )"
LICENSE="Apache-2.0"
SLOT="0"
@@ -53,6 +53,12 @@ src_prepare() {
}
src_compile() {
+ local bootstrap_path=${WORKDIR}/${PN}-${BV}/bin
+ if [[ ! -d ${bootstrap_path} ]]; then
+ eerror "Binary tarball does not contain expected directory:"
+ die "'${bootstrap_path}' path does not exist."
+ fi
+
emake \
$(usex debug "" release=1) \
progress=true \
@@ -64,7 +70,7 @@ src_compile() {
CXX=$(tc-getCXX) \
AR=$(tc-getAR) \
\
- PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+ PATH="${bootstrap_path}:${PATH}" \
CRYSTAL_PATH=src \
CRYSTAL_CONFIG_VERSION=${PV} \
CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"