summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-04-16 12:02:39 +0200
committerMaciej Barć <xgqt@gentoo.org>2023-04-16 12:02:47 +0200
commitb736f3576ba078aa8ed58a8f5b2b409b7b83b542 (patch)
treec9443d2ae85487002a6304e1678ba8ba31c45788 /dev-lang
parentdev-util/shards: bump to 0.17.3 (diff)
downloadgentoo-b736f3576ba078aa8ed58a8f5b2b409b7b83b542.tar.gz
gentoo-b736f3576ba078aa8ed58a8f5b2b409b7b83b542.tar.bz2
gentoo-b736f3576ba078aa8ed58a8f5b2b409b7b83b542.zip
dev-lang/crystal: bump to 1.8.0
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/crystal/Manifest2
-rw-r--r--dev-lang/crystal/crystal-1.8.0.ebuild108
2 files changed, 110 insertions, 0 deletions
diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index c22a89135e7d..67c1d3a4c957 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -4,3 +4,5 @@ DIST crystal-1.7.2-1-linux-x86_64.tar.gz 41103664 BLAKE2B 399f5703fe907bed55b002
DIST crystal-1.7.2.tar.gz 3121696 BLAKE2B 425d03a5ab34d885c6115582ae4aea3684fb088aeb3e8480087a14ff1963032e6ff4baa3022313d418dae5dce4a533786ee3993d19c81ed281b5a75411e5a4e8 SHA512 d278bc9a54c822e6c72269505158085bc7854b0f33c91a2adc24c656b310d20f5b49c633ec6216fbdee4dd17e9fb262d3315bf522c1c88e1ddbcb0dc386ce6c8
DIST crystal-1.7.3-1-linux-x86_64.tar.gz 41098689 BLAKE2B 38ff4e7bf0c6aeb8364fb18ed877ee000ae51ac274fb55a0f8ac60637ad20ecb53a95e3e9304b228bd20c00f30be14aed4d19e7146998b73d908bf0c7e60bf95 SHA512 c2fbdc455c8555cb03409a8a6ec0de9d0376d7bd5ebaba97d14f6642f0cf0d90f09479e1d1a1a3a3e80c0d81393e2915e12201e1682cc1b84cc8e3b27386d88e
DIST crystal-1.7.3.tar.gz 3122395 BLAKE2B 5ccb18fe9d24f655d7210e99d81593d177063f8f9fb278ebdad6bb3c418684462178b754a9ed9d84423e8c3682eddf56360def4f2c29dde22eebfe34c503f499 SHA512 97efff14523207d5939a6fb92c648c0d1160d968a359b505e916ce438b71797539498a6b90da5bb9474d509a13b313622f6e3520523378342e099ad1e6d9c5a5
+DIST crystal-1.8.0-1-linux-x86_64.tar.gz 46313229 BLAKE2B e4f2696ed2a688e4aa85d6e97c47ca93109edd05c47495bab228ddacc9152a4fba865b10a9a7fbe37ffd3df92ef333ddfdd62598d72509434aa89da39a4a424b SHA512 a1f558890025eed72da5ab45e73c3fafa0da733ba8c4a375cf0e8a7fed165cfd938dca508ccea9d803535ea826818ae9e73e0b37dfa2003124e0fd8f0aafda03
+DIST crystal-1.8.0.tar.gz 3169681 BLAKE2B 8a042f9b9922ed40788f2c5e3af801dfaea5fe2b33854af37d21eacd2852b64c32311e3d8b3bb09d2858446c262c0f6c4e3b3c661680f296b3a47c3b9bfc7a8f SHA512 bb78faed43849eaac0b73a1f1e5d46a0acd5bc7d5cc23544e44d5f983f640f40039c8813519c711443df246fcb88cae2dd8ebb09309aa48668feff066aef9c92
diff --git a/dev-lang/crystal/crystal-1.8.0.ebuild b/dev-lang/crystal/crystal-1.8.0.ebuild
new file mode 100644
index 000000000000..9c03c216028f
--- /dev/null
+++ b/dev-lang/crystal/crystal-1.8.0.ebuild
@@ -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=14
+
+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
+}