Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] srcpkgs/crystal: update to 1.0.0.
@ 2021-04-05 15:07 mipmip
  2021-04-05 15:10 ` ericonr
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: mipmip @ 2021-04-05 15:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]

There is a new pull request by mipmip against master on the void-packages repository

https://github.com/mipmip/void-packages crystal-1.0
https://github.com/void-linux/void-packages/pull/30019

srcpkgs/crystal: update to 1.0.0.
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

#### Extra info

- upgrade to llvm11
- use openssl
- re-enabled do_check()

#### Archs

- I built this PR locally for these architectures with -Q:
  - [x] i686-glibc with -Q
  - [x] x86_64-glibc with -Q
  - [x] x86_64-musl with -Q

Were not able to test the ARM platforms



A patch file from https://github.com/void-linux/void-packages/pull/30019.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-crystal-1.0-30019.patch --]
[-- Type: text/x-diff, Size: 5706 bytes --]

From cddd96a3e4f99cb309fe8579f265dfd9ec97d178 Mon Sep 17 00:00:00 2001
From: Pim Snel <pim@lingewoud.nl>
Date: Mon, 5 Apr 2021 16:20:44 +0200
Subject: [PATCH] srcpkgs/crystal: update to 1.0.0.

---
 srcpkgs/crystal/template | 127 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 127 insertions(+)
 create mode 100644 srcpkgs/crystal/template

diff --git a/srcpkgs/crystal/template b/srcpkgs/crystal/template
new file mode 100644
index 000000000000..724d42d95da1
--- /dev/null
+++ b/srcpkgs/crystal/template
@@ -0,0 +1,127 @@
+# Template file for 'crystal'
+pkgname=crystal
+version=1.0.0
+revision=1
+archs="x86_64* i686*"
+_shardsversion=0.14.1
+_molinilloversion=0.1.0
+_bootstrapversion=1.0.0
+_bootstraprevision=1
+hostmakedepends="which tar llvm11 pkg-config"
+makedepends="gc-devel libatomic_ops pcre-devel libevent-devel libyaml-devel libxml2-devel"
+depends="gc-devel libatomic_ops pcre-devel libevent-devel libyaml-devel libxml2-devel gmp-devel openssl-devel llvm11 gcc pkg-config"
+checkdepends="readline-devel libyaml-devel gmp-devel openssl-devel git"
+short_desc="Crystal Programming Language"
+maintainer="lvmbdv <ata.kuyumcu@protonmail.com>"
+license="Apache-2.0"
+homepage="https://crystal-lang.org/"
+distfiles="
+ https://github.com/crystal-lang/crystal/archive/${version}.tar.gz
+ https://github.com/crystal-lang/shards/archive/v${_shardsversion}.tar.gz
+ https://github.com/crystal-lang/crystal-molinillo/archive/v${_molinilloversion}.tar.gz"
+checksum="6b85c9139a891732c1f10638030635ff9dbe4e6818cad81a5dbd72db40913019
+ 040b080acb4d4d44bfe07897219fdcb7525f783e253d8878d8381bf78f13f328
+ 1ecc7a8bf52a3bfdc0134d4c58f1155ef204a22a3fed151ac2d4ba6a9e9e0a15"
+nocross="FIXME: someone needs to sort out the llvm --cxxflags for cross building"
+_crystalflags="--release --no-debug --progress"
+
+build_options="binary_bootstrap"
+build_options_default="binary_bootstrap"
+desc_option_binary_bootstrap="Bootstrap using precompiled binaries"
+
+if [ "$build_option_binary_bootstrap" ]; then
+	case "$XBPS_MACHINE" in
+	x86_64)
+		distfiles+=" https://github.com/crystal-lang/crystal/releases/download/${_bootstrapversion}/crystal-${_bootstrapversion}-${_bootstraprevision}-linux-x86_64.tar.gz"
+		checksum+=" 00211ca77758e99210ec40b8c5517b086d2ff9909e089400f6d847a95e5689a4"
+		;;
+	x86_64-musl)
+		distfiles+=" https://github.com/crystal-lang/crystal/releases/download/${_bootstrapversion}/crystal-${_bootstrapversion}-${_bootstraprevision}-linux-x86_64.tar.gz"
+		checksum+=" 00211ca77758e99210ec40b8c5517b086d2ff9909e089400f6d847a95e5689a4"
+		;;
+	i686)
+		distfiles+=" https://github.com/crystal-lang/crystal/releases/download/${_bootstrapversion}/crystal-${_bootstrapversion}-${_bootstraprevision}-linux-i686.tar.gz"
+		checksum+=" 90ed246a21a94643153df455e7f6c1d5c102e062f1de1353e9504691b9230e70"
+		;;
+	*)
+		broken="cannot be built on $XBPS_MACHINE"
+		;;
+	esac
+else
+	hostmakedepends+=" crystal"
+fi
+
+do_extract() {
+	rm -Rf ${wrksrc}/shards/lib/molinillo
+	mkdir -p ${wrksrc}/{shards,shards/lib,shards/lib/molinillo,molinillo,$(vopt_if binary_bootstrap bootstrap)}
+	tar xfz ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${version}.tar.gz --strip-components=1 -C ${wrksrc}
+	tar xfz ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${_shardsversion}.tar.gz --strip-components=1 -C ${wrksrc}/shards
+	tar xfz ${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${_molinilloversion}.tar.gz --strip-components=1 -C ${wrksrc}/molinillo
+
+	mv -f ${wrksrc}/molinillo/src/* ${wrksrc}/shards/lib/molinillo
+	if [ "$build_option_binary_bootstrap" ]; then
+		case "$XBPS_MACHINE" in
+		x86_64-musl)
+			tar xf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/crystal-${_bootstrapversion}-${_bootstraprevision}-linux-x86_64.tar.gz \
+				--strip-components=1 --exclude='lib/crystal/lib/libgc.a' -C ${wrksrc}/bootstrap
+			;;
+		*)
+			tar xf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/crystal-${_bootstrapversion}-${_bootstraprevision}-linux-${XBPS_TARGET_MACHINE}.tar.gz \
+				--strip-components=1 -C ${wrksrc}/bootstrap
+			;;
+		esac
+	fi
+}
+
+do_build() {
+	if [ -z ${disable_parallel_build} ] && [ ${XBPS_MAKEJOBS} ]; then
+		_crystalflags="${_crystalflags} --threads ${makejobs:2:4}"
+	fi
+	make ${makejobs} release=1 FLAGS="${_crystalflags}" \
+		CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal" \
+		CRYSTAL_CONFIG_VERSION="${version}" \
+		CRYSTAL_CACHE_DIR="/tmp/crystal" \
+		$(vopt_if binary_bootstrap PATH="${wrksrc}/bootstrap/bin:$PATH")
+	make ${makejobs} docs CRYSTAL_CACHE_DIR="/tmp/crystal"
+
+	cd shards
+	${wrksrc}/bin/crystal build ${_crystalflags} -o bin/shards src/shards.cr
+}
+
+do_check() {
+	export PATH="${wrksrc}/.build:${wrksrc}/bin:/usr/bin:/bin"
+	#make ${makejobs} spec \
+	#	CRYSTAL_CONFIG_VERSION="${version}" \
+	#	CRYSTAL_CACHE_DIR="/tmp/crystal"
+
+	./bin/crystal build --single-module \
+		--exclude-warnings spec/std \
+		--exclude-warnings spec/compiler \
+		-o .build/std_spec spec/std_spec.cr
+
+	cd shards
+	git config --global user.email "void@blackhole.none"
+	git config --global user.name "Void Linux"
+	../bin/crystal spec ./spec/unit/
+	../bin/crystal spec ./spec/integration/
+	#make test
+}
+
+do_install() {
+	vmkdir /usr/bin
+	vmkdir /usr/lib/crystal
+	vmkdir /usr/share/doc/crystal
+	vmkdir /usr/share/doc/crystal/api
+	vmkdir /usr/share/licenses/shards
+
+	vinstall etc/completion.bash 644 \
+		usr/share/bash-completion/completions crystal
+	vinstall etc/completion.zsh 644 usr/share/zsh/site-functions _crystal
+	vcopy samples /usr/share/doc/crystal
+	vcopy docs/* /usr/share/doc/crystal/api
+	vcopy src/* /usr/lib/crystal
+	vbin .build/crystal crystal
+	vman man/crystal.1
+	vbin shards/bin/shards
+	cp shards/LICENSE ${DESTDIR}/usr/share/licenses/shards
+}

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-10-19 10:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 15:07 [PR PATCH] srcpkgs/crystal: update to 1.0.0 mipmip
2021-04-05 15:10 ` ericonr
2021-04-05 15:10 ` [PR REVIEW] " ericonr
2021-04-05 15:16 ` [PR PATCH] [Updated] " mipmip
2021-04-05 15:18 ` [PR REVIEW] " mipmip
2021-07-07  9:14 ` New package: crystal-1.0.0 mfiano
2021-09-11 13:48 ` notramo
2021-09-11 13:48 ` notramo
2022-03-30  5:46 ` notramo
2022-04-01  9:45 ` mipmip
2022-07-01  2:14 ` github-actions
2022-07-05 12:30 ` notramo
2022-10-05  2:13 ` github-actions
2022-10-19  2:14 ` [PR PATCH] [Closed]: " github-actions
2022-10-19 10:46 ` notramo
2022-10-19 10:49 ` paper42

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).