public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Maciej Barć" <xgqt@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/files/, dev-lang/crystal/
Date: Sun, 12 Feb 2023 00:48:52 +0000 (UTC)	[thread overview]
Message-ID: <1676162820.91052710f9301696ff7368529e5a19069ba0e49e.xgqt@gentoo> (raw)

commit:     91052710f9301696ff7368529e5a19069ba0e49e
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 12 00:29:06 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sun Feb 12 00:47:00 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91052710

dev-lang/crystal: bump to 1.7.2

Closes: https://bugs.gentoo.org/889541
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-lang/crystal/Manifest                          |   2 +
 dev-lang/crystal/crystal-1.7.2.ebuild              | 108 +++++++++++++++++++++
 .../files/crystal-1.7.2-extra-spec-flags.patch     |  11 +++
 3 files changed, 121 insertions(+)

diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index b5467f407fad..beb47f106a07 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -1,2 +1,4 @@
 DIST crystal-1.5.0-1-linux-x86_64.tar.gz 29749716 BLAKE2B f1a84e89bb1c92349dc6e66088cd60298a7de25a5b42876b06ab8460e277db8fe53fa5477e8189f5382ad98b571df25978437c5619260f58ac721d1235882025 SHA512 49ff065bd084c4d8ad4835e79bd7679d76f4ee641ad8955c110f585429297a3343a6e7406fbacfbea18d91fd7ebbef40f61e1db66c249ca653d43b46dce68636
 DIST crystal-1.5.0.tar.gz 2909586 BLAKE2B beb6bf0b8950317fa1883fa5c281ecf205f3a2c545b99e489ab07420534fa14ff1feb2a506a961304280cfcae1142faffd42acedd6845b96f439a6407e09106b SHA512 9f1915834c0218b05c6197325df1fc52d5d6a94ba1b83629ac07df4073271d777c1f6acfa7286eafb645e9118702ff856dfe590c8b2a3d91eb6929e88275f7f0
+DIST crystal-1.7.2-1-linux-x86_64.tar.gz 41103664 BLAKE2B 399f5703fe907bed55b002d3d85873871c55e5d091c6342c3dc8356b219d5190ee3bf94456c0d4f169f4e2dee1f62cb42acbe707db9ee46c12a6ac4d60c4b5a4 SHA512 374e1a26f4540a0b368edd280dbab77d39237104432d4998f067e042de05bc58340d6a80ce569d5089b73e0d9b79fa5c65c04ea51f88ac5b0294af81d54d81ca
+DIST crystal-1.7.2.tar.gz 3121696 BLAKE2B 425d03a5ab34d885c6115582ae4aea3684fb088aeb3e8480087a14ff1963032e6ff4baa3022313d418dae5dce4a533786ee3993d19c81ed281b5a75411e5a4e8 SHA512 d278bc9a54c822e6c72269505158085bc7854b0f33c91a2adc24c656b310d20f5b49c633ec6216fbdee4dd17e9fb262d3315bf522c1c88e1ddbcb0dc386ce6c8

diff --git a/dev-lang/crystal/crystal-1.7.2.ebuild b/dev-lang/crystal/crystal-1.7.2.ebuild
new file mode 100644
index 000000000000..5a6e1e59917a
--- /dev/null
+++ b/dev-lang/crystal/crystal-1.7.2.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}"/${P}-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
+}

diff --git a/dev-lang/crystal/files/crystal-1.7.2-extra-spec-flags.patch b/dev-lang/crystal/files/crystal-1.7.2-extra-spec-flags.patch
new file mode 100644
index 000000000000..cc9e21abcbd6
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-1.7.2-extra-spec-flags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -33,7 +33,7 @@ SOURCES := $(shell find src -name '*.cr')
+ SPEC_SOURCES := $(shell find spec -name '*.cr')
+ override FLAGS += -D strict_multi_assign -D preview_overload_order $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(static),--static )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )$(if $(target),--cross-compile --target $(target) )$(if $(interpreter),,-Dwithout_interpreter )
+ SPEC_WARNINGS_OFF := --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives
+-SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )$(if $(order),--order=$(order) )
++SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )$(if $(order),--order=$(order) )$(EXTRA_SPEC_FLAGS)
+ CRYSTAL_CONFIG_LIBRARY_PATH := '$$ORIGIN/../lib/crystal'
+ CRYSTAL_CONFIG_BUILD_COMMIT := $(shell git rev-parse --short HEAD 2> /dev/null)
+ CRYSTAL_CONFIG_PATH := '$$ORIGIN/../share/crystal/src'


             reply	other threads:[~2023-02-12  0:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12  0:48 Maciej Barć [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-30 17:44 [gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/files/, dev-lang/crystal/ Maciej Barć
2022-09-09  9:24 Sam James
2022-04-24 14:41 Michał Górny
2021-07-15  9:28 Sergei Trofimovich
2020-04-07 21:47 Sergei Trofimovich
2019-01-31  7:21 Sergei Trofimovich
2018-12-23 14:23 Sergei Trofimovich
2018-12-23 13:26 Sergei Trofimovich
2018-09-02 10:53 Sergei Trofimovich
2018-08-09 22:34 Sergei Trofimovich
2017-12-21 10:13 Sergei Trofimovich
2017-12-11 20:03 Michał Górny
2017-11-25 19:58 Sergei Trofimovich
2017-09-16 10:54 Sergei Trofimovich
2017-06-30  7:08 Sergei Trofimovich
2017-04-23 21:39 Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1676162820.91052710f9301696ff7368529e5a19069ba0e49e.xgqt@gentoo \
    --to=xgqt@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox