Skip to content

Commit

Permalink
dev-lang/crystal: bump to 1.10.1
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej Barć <[email protected]>
  • Loading branch information
xgqt committed Oct 17, 2023
1 parent 0127147 commit d136657
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev-lang/crystal/Manifest
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
DIST crystal-1.10.0-1-linux-x86_64.tar.gz 46235471 BLAKE2B 43e074f2b40ad1b6da9c16b09fe72f8d626ae2c35f379f8b70647bb7187d529588887666aa46ed94dc9fa099395b161dc076f41a108331335eb8f9878d3afa18 SHA512 a7570a9157c0c79a1cdda977290431704aab669a0c77d9ffd3cfa851285ac162b731c8655a81956d3b835673222656d0288c3eadaa08764bbeade6636ec015a2
DIST crystal-1.10.0.tar.gz 3305156 BLAKE2B 573b8c8797eeabec03154a59e1a9af2201056d5fad7fa3636e0738eb2dca62db013fb2a295a4adf4a8da03b54821cee5b5a58cdec3ddce9706c1e3d19ca3cba5 SHA512 aecf5af72f13c0da57a64af250e3bdf10ed74e7eb9bc4bb5cee0131f65bf73b1182742152b37e53702e6c135476016139088e6524d96fbf9f6f8c50120cd2464
DIST crystal-1.10.1-1-linux-x86_64.tar.gz 46236242 BLAKE2B 8c74672aaeb99cdb9ebcc0a1fa82cb148e81f6abc703e488df585aa4ecf30592ab5139079aad1506a55d69e255f07ff902f36a8f6bfffdaa9ca7079260303dc8 SHA512 5828fd3246102e5c779f722c50c42435f7d2a36943c283d3220b13aa0e86ea1fd0c0fe668a6e5c731c302519108d8bf08677d48f4360c05d80d9ee4b9c6c5a77
DIST crystal-1.10.1.tar.gz 3305965 BLAKE2B eede32a5ed5695bbe4288f8942db251ebe3b57c241523a215109994e703c58cd95c2d449b0bf87cd45cfa637d264a73ea060227f0459034cc40135b1c2ee20c5 SHA512 2e26d6e366ea5c8b7abe3457608a0a0eca60b5d15f3c9079a58c3855302c7c07cd705d04fb6aa1bec2681fe40799609cab77a8b8e6fc10be7a8e545c5b0ecfc1
DIST crystal-1.9.2-1-linux-x86_64.tar.gz 46171732 BLAKE2B b664207f2994a16e8e05cfc72d5e4e3cf9ec1e8b8a41869a56fc03b0946b7439f1528ec78c0affd32bf07a67d3329a644f5ba7f1270982723697071266a6ab7f SHA512 bce18bf48c5c746aa1ee8aa9a34b5ec2f104aed95f3a74070229df4bf73a0ac9297af79a873d965c9631196b6f1103059a015c4f68cea800a779936aef9389d0
DIST crystal-1.9.2.tar.gz 3245770 BLAKE2B 76795f79f305863aed9fd8b5de8fe7edcb512e7a64e2368a606fe38171cc4653a126dba71c071cffb1a6a26426a5eeb3c5bc458800cbc95f083c8895d962d7e2 SHA512 9356b7e267bfa2183af2184e633cd91ef23487e46e73db33f4363ce4fcf5515349555dfd5c056a0616855e49cff4bbab07d1eeed84e087ae469bfc0eb49b63b1
108 changes: 108 additions & 0 deletions dev-lang/crystal/crystal-1.10.1.ebuild
Original file line number Diff line number Diff line change
@@ -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=16

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
}

0 comments on commit d136657

Please sign in to comment.