diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-02-12 01:29:06 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-02-12 01:47:00 +0100 |
commit | 91052710f9301696ff7368529e5a19069ba0e49e (patch) | |
tree | 66ab0cc3664a79f61eeb2047ce24cd6e7111ec2a /dev-lang/crystal | |
parent | dev-lang/vala: Version bump to 0.56.4 (diff) | |
download | gentoo-91052710f9301696ff7368529e5a19069ba0e49e.tar.gz gentoo-91052710f9301696ff7368529e5a19069ba0e49e.tar.bz2 gentoo-91052710f9301696ff7368529e5a19069ba0e49e.zip |
dev-lang/crystal: bump to 1.7.2
Closes: https://bugs.gentoo.org/889541
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-lang/crystal')
-rw-r--r-- | dev-lang/crystal/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/crystal/crystal-1.7.2.ebuild | 108 | ||||
-rw-r--r-- | dev-lang/crystal/files/crystal-1.7.2-extra-spec-flags.patch | 11 |
3 files changed, 121 insertions, 0 deletions
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' |