summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2024-08-24 16:15:19 +0200
committerMaciej Barć <xgqt@gentoo.org>2024-08-24 17:43:50 +0200
commitc4f99bc8de1733503d434cc882eaa1d6d8f854f7 (patch)
tree25297ad05e04e1733a337344e51731f7979f2333 /dev-lang
parentdev-lang/crystal: drop old 1.13.0 (diff)
downloadgentoo-c4f99bc8de1733503d434cc882eaa1d6d8f854f7.tar.gz
gentoo-c4f99bc8de1733503d434cc882eaa1d6d8f854f7.tar.bz2
gentoo-c4f99bc8de1733503d434cc882eaa1d6d8f854f7.zip
dev-lang/crystal: bump to 1.13.2
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.13.2.ebuild122
2 files changed, 124 insertions, 0 deletions
diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index 6bf33eca0867..4d8ee2ba9376 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -1,2 +1,4 @@
DIST crystal-1.13.1-1-linux-x86_64.tar.gz 51651920 BLAKE2B 304203d7f46653c7c687e0d96ab8ff63798cc1e8f43ffcb9d3fd12c04e5ac35d058d6964e8d6e8f407b579e1bc80daa88dc0d9463cc7dc558055b36e96f75799 SHA512 d79555b3f79b0e9ad48ae08b1566c0ac2c1097ae28c434af43d869916b5a4b81383491492f548fec2bd662ff29231c83c14f10bacbb85bc9741a1903e3f331f2
DIST crystal-1.13.1.tar.gz 3686680 BLAKE2B 8032895933d98bc8e3168a9ef1749e0b8c45e5f6501e70a4680a400d842999c2861e3d8064e457a81050f6c4dedc4ca5c968dca0ce593ff38e4091d5a45b7d40 SHA512 62e8d12d8b6fff4a8602e7b04a57b49dd17350585fa13fd015e649cae28affc134a38ec2852b07172c682affb50210df2bc26f707795a4c3483d9522272990db
+DIST crystal-1.13.2-1-linux-x86_64.tar.gz 51650862 BLAKE2B d8812a0a3e327c9aabfea982b36b7ece906ac8f5ceafccdfdebae0ea41c7e8b8989009d30f6535f069711ef0bbfb47430dbeb12fc246e1bf00663c43e54df85b SHA512 694aec1ad5b2bb89dc4adb9f6a78e73e4e2c7ff68c77fda61cc6d1efa2a309932f0634986d4da2db3e05f3f4f1991610c2f6961df0d657376b8343a0c4e2ea30
+DIST crystal-1.13.2.tar.gz 3687101 BLAKE2B 31375ea3648433e88a4813b39f25f72221c4a6d3d9346324467e79d84f43794ce3b0dfe49ec8478d6d96f9971dd8373abd4297b3310c072694be395a04042f91 SHA512 5f4add6066d22d38e59587c32c43c7a3c4bc4615f80f991af75277780efa95f359c40e6da5fe7e3f8ac7eda21f75982e3eb08cbff0702f58cc14c3b432ad7019
diff --git a/dev-lang/crystal/crystal-1.13.2.ebuild b/dev-lang/crystal/crystal-1.13.2.ebuild
new file mode 100644
index 000000000000..7d2cade29207
--- /dev/null
+++ b/dev-lang/crystal/crystal-1.13.2.ebuild
@@ -0,0 +1,122 @@
+# 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_COMPAT=( {16..18} )
+
+inherit bash-completion-r1 llvm-r1 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/libpcre2:=[unicode]
+ dev-libs/pcl:=
+ $(llvm_gen_dep '
+ sys-devel/llvm:${LLVM_SLOT}=
+ ')
+ 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 -d)/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
+}