summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2024-06-04 12:41:29 +0200
committerMaciej Barć <xgqt@gentoo.org>2024-06-04 17:07:31 +0200
commit52cf81a36a88416150c0814677f945c1fb12ab5f (patch)
tree7091e6d429fed4f387563b53232a7dc167c62982 /dev-lang/crystal
parentdev-lang/crystal: drop old 1.11.2 (diff)
downloadgentoo-52cf81a36a88416150c0814677f945c1fb12ab5f.tar.gz
gentoo-52cf81a36a88416150c0814677f945c1fb12ab5f.tar.bz2
gentoo-52cf81a36a88416150c0814677f945c1fb12ab5f.zip
dev-lang/crystal: bump to 1.12.2
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-lang/crystal')
-rw-r--r--dev-lang/crystal/Manifest2
-rw-r--r--dev-lang/crystal/crystal-1.12.2.ebuild120
2 files changed, 122 insertions, 0 deletions
diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index 13ad201fe923..4d0605f5725e 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -1,2 +1,4 @@
DIST crystal-1.12.1-1-linux-x86_64.tar.gz 47041074 BLAKE2B 7e5d4a422144902de4b187947d55f9e8069d55f51013e10236fcf79b142ff96fc39973c883f5a633fbd10180553b6c82bdea824bff09d355fa171e4f5e308b68 SHA512 3256dc2340ed7b783bdf7e5f3d5c03cf981655ac2f50921aa53ada13cc72315d5a70515adb1c511f0f6e37c09310a963773b4f57eaeffe34c68e539edaaa7726
DIST crystal-1.12.1.tar.gz 3657963 BLAKE2B 42cf32dca63a2bdd2925b4970e2277cb163ddcdbcbc997b7c72b155024f642d03c5a565e82dfc8a2b1aed0d3f877633beb9d128eb592485c034bfdcbc3f5baab SHA512 bd0c085d44a473b86797fa64ce9a5c66c7d3eda44bdba929faee490b635aef45bdf84b45baaa5dfea8e2b6fd218d1ae7fbdf117d3924b04b284075d4a500e55c
+DIST crystal-1.12.2-1-linux-x86_64.tar.gz 47042270 BLAKE2B 17c29658fba1e32eafc0716f34d96f080b8500ef81d573719a3944873fbd16521ef2e3c0b6f3ea2753f67e96fe6cbf361df03233aa9e3eea19b87850b8d38089 SHA512 33d40b003481f56c1a3dcefb586e45326629455faad0adc6fce60f4fe91b586f01f997665aa535286b6909b5a4e0c05db3577b3eb8b36f6864f80d576ddd1d39
+DIST crystal-1.12.2.tar.gz 3655994 BLAKE2B d5de81445e3e81352ae821cdf91863464f70466674f541e2b9e499610e0d68b4aac3af6e2688870be8b2ccd84c9da78734e0e8f5f8be070192bd7d7342d77853 SHA512 b972015fa17da19bcb649a4e0387e709b4a792c8e9279898e48fb82f8840e92f35492df9cce1ec2487724ee460d3ab9099144f6bd25a091a725578ec3fb0fbd6
diff --git a/dev-lang/crystal/crystal-1.12.2.ebuild b/dev-lang/crystal/crystal-1.12.2.ebuild
new file mode 100644
index 000000000000..02631f5f838f
--- /dev/null
+++ b/dev-lang/crystal/crystal-1.12.2.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2024 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=17
+
+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="
+ <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
+ dev-libs/boehm-gc:=[threads]
+ dev-libs/gmp:=
+ dev-libs/libatomic_ops:=
+ dev-libs/libevent:=
+ dev-libs/libpcre2:=[unicode]
+ dev-libs/pcl:=
+ 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=(
+ PATH="${bootstrap_path}:${PATH}"
+
+ CRYSTAL_CONFIG_VERSION="${PV}"
+ CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+
+ $(usex debug "" release=1)
+ progress=true
+ stats=1
+ threads="$(makeopts_jobs)"
+ verbose=1
+
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ LLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ )
+}
+
+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
+}