dev-lang/crystal: bump to 1.8.2

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Maciej Barć
2023-05-15 20:56:44 +02:00
parent 563e2637ea
commit 2fa9d3c18e
2 changed files with 110 additions and 0 deletions

View File

@@ -6,3 +6,5 @@ DIST crystal-1.8.0-1-linux-x86_64.tar.gz 46313229 BLAKE2B e4f2696ed2a688e4aa85d6
DIST crystal-1.8.0.tar.gz 3169681 BLAKE2B 8a042f9b9922ed40788f2c5e3af801dfaea5fe2b33854af37d21eacd2852b64c32311e3d8b3bb09d2858446c262c0f6c4e3b3c661680f296b3a47c3b9bfc7a8f SHA512 bb78faed43849eaac0b73a1f1e5d46a0acd5bc7d5cc23544e44d5f983f640f40039c8813519c711443df246fcb88cae2dd8ebb09309aa48668feff066aef9c92
DIST crystal-1.8.1-1-linux-x86_64.tar.gz 46313888 BLAKE2B f9513bd442f2cfcddc55b45fac3d047d3d8b2bc810d1368e454498e2c520c3731f717224f5f2470e3f3bdcd4f648797037b1cc52c76e9c2aa094a0692806e0aa SHA512 bf48b71d722ac47b726f68809b9ee8d967a48c6e509446f212479e8135e1dfaa7e997d3cdfd2c1f2812f63b8f4dd2b7fbe62f936ee73ae14aee60e3493f11b52
DIST crystal-1.8.1.tar.gz 3170273 BLAKE2B 24ef580174e585c7368b3d671d19ed726eeba93655a4a6d76acd41eb3853ac328c036cb3508c960e54490c79a2b5f515130df502ba43765a41d576f5eacd6c29 SHA512 b7f00963beef0e13e67329582b7ece89d21a95ae0c1fc8e9304bf5cfa6f06bf358a9bc16b9eea6669d0f50d218a952f0fec5a2379104ecd769c215b33e8ad6d2
DIST crystal-1.8.2-1-linux-x86_64.tar.gz 46319920 BLAKE2B 3e95516e97718304cc686b7d5d2ddeee1d37da9e9a2f7e4baa36afe33d13d2f1856e51cd25b0c0f3c50c74fe948647bff20d9107619f7deea2e6689d6e0e873b SHA512 6e6413aa506a80dc1adbf745651aa9d8b39dfeea2e550b8bef7f1444c5e39e89c6e21e52e80f67ae24e0ce3a9944a9494a1818f112a518511a0fe144ae7b8de1
DIST crystal-1.8.2.tar.gz 3171583 BLAKE2B 0ac88384e0d5a04ad397d1756eec5505614fa53fa7bf9f9f2c4bf32796374c2ec5d0c2731e7c0eb0128bb93dd7cfb20b9ca7d1fedeb76bd2f429b87208672f2c SHA512 99135dabd7e63dc2dd2b55375115cd668168a2e2618a2c74808800b678bd962294850364c523225d1db043aca4bd24d2b85dd5949dbf1498647f7f45d32f7433

View File

@@ -0,0 +1,108 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
BV=${PV}-1
BV_AMD64=${BV}-linux-x86_64
LLVM_MAX_SLOT=15
inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
DESCRIPTION="The Crystal Programming Language"
HOMEPAGE="https://crystal-lang.org/
https://github.com/crystal-lang/crystal/"
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 )"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc debug llvm-libunwind"
# Upstream test suite not reliable
RESTRICT="test"
DEPEND="
dev-libs/boehm-gc:=[threads]
dev-libs/gmp:=
dev-libs/libatomic_ops:=
dev-libs/libevent:=
dev-libs/libpcre:=
dev-libs/pcl:=
<sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
llvm-libunwind? ( sys-libs/llvm-libunwind:= )
!llvm-libunwind? ( sys-libs/libunwind:= )
"
RDEPEND="
${DEPEND}
dev-libs/libxml2
dev-libs/libyaml
"
PATCHES=(
"${FILESDIR}"/${PN}-1.7.2-extra-spec-flags.patch
"${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix.patch
"${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix-2.patch
)
src_configure() {
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
# crystal uses 'LLVM_TARGETS' to override default list of targets
unset LLVM_TARGETS
MY_EMAKE_COMMON_ARGS=(
$(usex debug "" release=1)
progress=true
stats=1
threads=$(makeopts_jobs)
verbose=1
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
AR="$(tc-getAR)"
LLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
PATH="${bootstrap_path}:${PATH}"
CRYSTAL_PATH="${S}"/src
CRYSTAL_CONFIG_VERSION=${PV}
CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
)
}
src_compile() {
emake "${MY_EMAKE_COMMON_ARGS[@]}"
use doc && emake docs "${MY_EMAKE_COMMON_ARGS[@]}"
}
src_test() {
# EXTRA_SPEC_FLAGS is useful to debug individual tests
# as part of full build:
# USE=debug EXTRA_SPEC_FLAGS='-e parse_set_cookie' emerge -1 crystal
emake std_spec \
"${MY_EMAKE_COMMON_ARGS[@]}" "EXTRA_SPEC_FLAGS=${EXTRA_SPEC_FLAGS}"
}
src_install() {
insinto /usr/$(get_libdir)/crystal
doins -r src/.
exeinto /usr/bin
doexe .build/crystal
insinto /usr/share/zsh/site-functions
newins etc/completion.zsh _crystal
dodoc -r samples
doman man/${PN}.1
newbashcomp etc/completion.bash ${PN}
if use doc ; then
docinto api
dodoc -r docs/.
fi
}