aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2020-02-18 13:40:11 +0100
committerMilan P. Stanić <mps@arvanta.net>2020-04-09 16:11:41 +0000
commitd01a00b807c6fc4144d6065194671a55b0d869b6 (patch)
treec376d298879f360c1680e5657b07fb743868606d
parentdcf91afaa341990298cb1c9c9a8d546490b1e37d (diff)
community/crystal: upgrade to 0.32.1
disable build on aarch64, details about this can be found in Alpine issue number #11017 fixes: #11017 remove disable-specs-using-GB2312-encoding.patch, not needed anymore add fix-std-http-cookie-exp.patch as workaround for http cookie spec test, should be reported upstream build with llvm8 modernize APKBUILD
-rw-r--r--community/crystal/APKBUILD34
-rw-r--r--community/crystal/disable-specs-using-GB2312-encoding.patch282
-rw-r--r--community/crystal/fix-std-http-cookie-exp.patch11
3 files changed, 23 insertions, 304 deletions
diff --git a/community/crystal/APKBUILD b/community/crystal/APKBUILD
index 1e9ec103f7e..8f20fbc7d72 100644
--- a/community/crystal/APKBUILD
+++ b/community/crystal/APKBUILD
@@ -2,13 +2,13 @@
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=crystal
-pkgver=0.31.1
-pkgrel=2
-_bootver=0.30.1
-_llvmver=5
+pkgver=0.32.1
+pkgrel=0
+_bootver=0.31.1
+_llvmver=8
pkgdesc="The Crystal Programming Language"
url="https://crystal-lang.org/"
-arch="x86_64 aarch64"
+arch="x86_64" # aarch64 disabled, details in #11017
license="Apache-2.0"
depends="gc-dev libatomic_ops libevent-dev libevent-static gcc gmp-dev pcre-dev"
checkdepends="openssl-dev libxml2-dev readline-dev tzdata yaml-dev zlib-dev"
@@ -19,11 +19,10 @@ subpackages="$pkgname-doc
"
source="$pkgname-$pkgver.tar.gz::https://github.com/crystal-lang/$pkgname/archive/$pkgver.tar.gz
https://dev.alpinelinux.org/archive/crystal/crystal-$_bootver-x86_64-alpine-linux-musl.tar.gz
- https://dev.alpinelinux.org/archive/crystal/crystal-$_bootver-aarch64-alpine-linux-musl.tar.gz
- disable-specs-using-GB2312-encoding.patch
fix-spec-std-kernel-spec.cr.patch
fix-std-xml-spec.cr.patch
fix-version-string.patch
+ fix-std-http-cookie-exp.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -60,7 +59,6 @@ snapshot() {
prepare() {
default_prepare
- cd "$builddir"
cat > Makefile.local <<-EOF
progress = 1
@@ -72,26 +70,20 @@ prepare() {
}
build() {
- cd "$builddir"
-
make crystal \
CRYSTAL_CONFIG_PATH="lib:$_shardsdir:$_coredir" \
PATH="$srcdir/$pkgname-$_bootver-$CBUILD/bin:$PATH" \
- LLVM_CONFIG="llvm5-config" \
+ LLVM_CONFIG="llvm$_llvmver-config" \
release=1 \
static=${BUILD_STATIC:-}
}
check() {
- cd "$builddir"
-
- make spec LLVM_CONFIG="llvm5-config" PATH=".build:$PATH" \
+ make spec LLVM_CONFIG="llvm$_llvmver-config" PATH=".build:$PATH" \
SPEC_FLAGS="--no-color --verbose"
}
package() {
- cd "$builddir"
-
install -D -m 755 .build/crystal "$pkgdir"/usr/bin/crystal
install -D -m 644 man/crystal.1 "$pkgdir"/usr/share/man/man1/crystal.1
@@ -117,15 +109,13 @@ zshcomp() {
depends=""
install_if="$pkgname=$pkgver-r$pkgrel zsh"
- cd "$builddir"
install -D -m 644 etc/completion.zsh \
"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}
-sha512sums="d44ce5653aa2877d85685bd897888cd7675eb02897363f71627ac19589447889af8e73a1d8acb2108e0356939cd515022fd2b92d019014714428d92666ad0f37 crystal-0.31.1.tar.gz
-e9684b0e8687f98569a9ca23e4a77a615e8c95dd0117b9e003882a427f64083becc6146ae83e8290572b5e228b6c7260a1e013b2c2ce59a2c814ba0caa788f43 crystal-0.30.1-x86_64-alpine-linux-musl.tar.gz
-f50f1fd9e536d6e54b81610f0f9e010336eb946c6301ad97aa3454e3a54cfec94513fc83856184f6b0ae60c332c1f928c8fbced90414774c3a2aec6d09a8bd79 crystal-0.30.1-aarch64-alpine-linux-musl.tar.gz
-269976fbc990dde075769e651c9fac6e7e0b39681e55cbd067c6d2a790c58a096bdc9981f62ae69b5217623025ba768daa63bc5316bd8ddd18192d88839aedcb disable-specs-using-GB2312-encoding.patch
+sha512sums="d83575f4c7953054824f13516cdc04bd7576bf7165754d96a9f4970e2a6cbf779b4db6806d3eeac465ed0c223c203ef95fc3bda70d1ef9f7c96ec96cd076283d crystal-0.32.1.tar.gz
+2fc7384bc58a04c559ab38a8b284ce9e7475c57a03b59928c6d884fb79cc620f930b83268f82dfa7f107477eac5befbcc8081b2f41b2214172d1f320e7495f37 crystal-0.31.1-x86_64-alpine-linux-musl.tar.gz
ee1d81b40a9b15b2abfecbc61a1ef830700cc5613f9d2626722e8393633ed5d40329ac1fc2813b08b66c689876d3bd8a9f949a22beeda572ea3d4753f58417a8 fix-spec-std-kernel-spec.cr.patch
dabfb0ca7859785dd1ed75f5eaea7a7c25b09a61d7c9c81f4cbac4ece7dc475d531ce9fd6d1002db9ec5d7067051ea34fd77ab590c2c733034f430c89229cfa9 fix-std-xml-spec.cr.patch
-1bb7d649841a7b0f66fdebbb75647ef8958ce7fb3437f0a6303ad21750af79becdcad87ddcf9353d48d466495a6c5837171b571a46412fd746c741296a67ad93 fix-version-string.patch"
+1bb7d649841a7b0f66fdebbb75647ef8958ce7fb3437f0a6303ad21750af79becdcad87ddcf9353d48d466495a6c5837171b571a46412fd746c741296a67ad93 fix-version-string.patch
+4fd246be702982a012c3092e1742a5b80566b6d43888f9c09b25c27efcb56f5417a77234b5d36ebdcf89c5ad3a0571ca717ab26ed833c05497a4bf12328fcf17 fix-std-http-cookie-exp.patch"
diff --git a/community/crystal/disable-specs-using-GB2312-encoding.patch b/community/crystal/disable-specs-using-GB2312-encoding.patch
deleted file mode 100644
index 74d244cca85..00000000000
--- a/community/crystal/disable-specs-using-GB2312-encoding.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-From 774c93390cfa5af0675b398b308f90cd692b4af6 Mon Sep 17 00:00:00 2001
-From: Jakub Jirutka <jakub@jirutka.cz>
-Date: Mon, 26 Mar 2018 02:20:06 +0200
-Subject: [PATCH] Disable specs using GB2312 encoding on musl
-
-Musl libc does not support GB2312 encoding.
-
-Fixes #3976
-
-Upstream-Issue: https://github.com/crystal-lang/crystal/pull/5867
----
- spec/std/io/buffered_spec.cr | 19 ++++---
- spec/std/io/io_spec.cr | 133 +++++++++++++++++++++++--------------------
- spec/std/string_spec.cr | 41 ++++++-------
- 3 files changed, 104 insertions(+), 89 deletions(-)
-
-diff --git a/spec/std/io/buffered_spec.cr b/spec/std/io/buffered_spec.cr
-index 1e4d4a473f..6e34c994ea 100644
---- a/spec/std/io/buffered_spec.cr
-+++ b/spec/std/io/buffered_spec.cr
-@@ -374,15 +374,18 @@ describe "IO::Buffered" do
- end
- end
-
-- it "gets big GB2312 string" do
-- str = ("你好我是人\n" * 1000).encode("GB2312")
-- base_io = IO::Memory.new(str)
-- io = BufferedWrapper.new(base_io)
-- io.set_encoding("GB2312")
-- 1000.times do
-- io.gets(chomp: false).should eq("你好我是人\n")
-+ # Musl does not support GB2312 encoding.
-+ {% unless flag?(:musl) %}
-+ it "gets big GB2312 string" do
-+ str = ("你好我是人\n" * 1000).encode("GB2312")
-+ base_io = IO::Memory.new(str)
-+ io = BufferedWrapper.new(base_io)
-+ io.set_encoding("GB2312")
-+ 1000.times do
-+ io.gets(chomp: false).should eq("你好我是人\n")
-+ end
- end
-- end
-+ {% end %}
-
- it "reads char" do
- str = "x\nHello world" + ("1234567890" * 1000)
-diff --git a/spec/std/io/io_spec.cr b/spec/std/io/io_spec.cr
-index 01e829c800..946bfa70ac 100644
---- a/spec/std/io/io_spec.cr
-+++ b/spec/std/io/io_spec.cr
-@@ -550,16 +550,19 @@ describe IO do
- end
- end
-
-- it "gets big GB2312 string" do
-- 2.times do
-- str = ("你好我是人\n" * 1000).encode("GB2312")
-- io = SimpleIOMemory.new(str)
-- io.set_encoding("GB2312")
-- 1000.times do
-- io.gets.should eq("你好我是人")
-+ # Musl does not support GB2312 encoding.
-+ {% unless flag?(:musl) %}
-+ it "gets big GB2312 string" do
-+ 2.times do
-+ str = ("你好我是人\n" * 1000).encode("GB2312")
-+ io = SimpleIOMemory.new(str)
-+ io.set_encoding("GB2312")
-+ 1000.times do
-+ io.gets.should eq("你好我是人")
-+ end
- end
- end
-- end
-+ {% end %}
-
- it "does gets on unicode with char and limit without off-by-one" do
- io = SimpleIOMemory.new("test\nabc".encode("UCS-2LE"))
-@@ -635,51 +638,54 @@ describe IO do
- io.read_utf8_byte.should be_nil
- end
-
-- it "reads utf8" do
-- io = IO::Memory.new("你".encode("GB2312"))
-- io.set_encoding("GB2312")
-+ # Musl does not support GB2312 encoding.
-+ {% unless flag?(:musl) %}
-+ it "reads utf8" do
-+ io = IO::Memory.new("你".encode("GB2312"))
-+ io.set_encoding("GB2312")
-
-- buffer = uninitialized UInt8[1024]
-- bytes_read = io.read_utf8(buffer.to_slice) # => 3
-- bytes_read.should eq(3)
-- buffer.to_slice[0, bytes_read].to_a.should eq("你".bytes)
-- end
-+ buffer = uninitialized UInt8[1024]
-+ bytes_read = io.read_utf8(buffer.to_slice) # => 3
-+ bytes_read.should eq(3)
-+ buffer.to_slice[0, bytes_read].to_a.should eq("你".bytes)
-+ end
-
-- it "raises on incomplete byte sequence" do
-- io = SimpleIOMemory.new("好".byte_slice(0, 1))
-- io.set_encoding("GB2312")
-- expect_raises ArgumentError, "Incomplete multibyte sequence" do
-- io.read_char
-+ it "raises on incomplete byte sequence" do
-+ io = SimpleIOMemory.new("好".byte_slice(0, 1))
-+ io.set_encoding("GB2312")
-+ expect_raises ArgumentError, "Incomplete multibyte sequence" do
-+ io.read_char
-+ end
- end
-- end
-
-- it "says invalid byte sequence" do
-- io = SimpleIOMemory.new(Slice.new(1, 140_u8))
-- io.set_encoding("GB2312")
-- expect_raises ArgumentError, "Invalid multibyte sequence" do
-- io.read_char
-+ it "says invalid byte sequence" do
-+ io = SimpleIOMemory.new(Slice.new(1, 140_u8))
-+ io.set_encoding("GB2312")
-+ expect_raises ArgumentError, "Invalid multibyte sequence" do
-+ io.read_char
-+ end
- end
-- end
-
-- it "skips invalid byte sequences" do
-- string = String.build do |str|
-- str.write "好".encode("GB2312")
-- str.write_byte 140_u8
-- str.write "是".encode("GB2312")
-+ it "skips invalid byte sequences" do
-+ string = String.build do |str|
-+ str.write "好".encode("GB2312")
-+ str.write_byte 140_u8
-+ str.write "是".encode("GB2312")
-+ end
-+ io = SimpleIOMemory.new(string)
-+ io.set_encoding("GB2312", invalid: :skip)
-+ io.read_char.should eq('好')
-+ io.read_char.should eq('是')
-+ io.read_char.should be_nil
- end
-- io = SimpleIOMemory.new(string)
-- io.set_encoding("GB2312", invalid: :skip)
-- io.read_char.should eq('好')
-- io.read_char.should eq('是')
-- io.read_char.should be_nil
-- end
-
-- it "says invalid 'invalid' option" do
-- io = SimpleIOMemory.new
-- expect_raises ArgumentError, "Valid values for `invalid` option are `nil` and `:skip`, not :foo" do
-- io.set_encoding("GB2312", invalid: :foo)
-+ it "says invalid 'invalid' option" do
-+ io = SimpleIOMemory.new
-+ expect_raises ArgumentError, "Valid values for `invalid` option are `nil` and `:skip`, not :foo" do
-+ io.set_encoding("GB2312", invalid: :foo)
-+ end
- end
-- end
-+ {% end %}
-
- it "says invalid encoding" do
- io = SimpleIOMemory.new("foo")
-@@ -803,28 +809,31 @@ describe IO do
- slice.should eq("hi-123-45.67".encode("UCS-2LE"))
- end
-
-- it "raises on invalid byte sequence" do
-- io = SimpleIOMemory.new
-- io.set_encoding("GB2312")
-- expect_raises ArgumentError, "Invalid multibyte sequence" do
-- io.print "ñ"
-+ # Musl does not support GB2312 encoding.
-+ {% unless flag?(:musl) %}
-+ it "raises on invalid byte sequence" do
-+ io = SimpleIOMemory.new
-+ io.set_encoding("GB2312")
-+ expect_raises ArgumentError, "Invalid multibyte sequence" do
-+ io.print "ñ"
-+ end
- end
-- end
-
-- it "skips on invalid byte sequence" do
-- io = SimpleIOMemory.new
-- io.set_encoding("GB2312", invalid: :skip)
-- io.print "ñ"
-- io.print "foo"
-- end
-+ it "skips on invalid byte sequence" do
-+ io = SimpleIOMemory.new
-+ io.set_encoding("GB2312", invalid: :skip)
-+ io.print "ñ"
-+ io.print "foo"
-+ end
-
-- it "raises on incomplete byte sequence" do
-- io = SimpleIOMemory.new
-- io.set_encoding("GB2312")
-- expect_raises ArgumentError, "Incomplete multibyte sequence" do
-- io.print "好".byte_slice(0, 1)
-+ it "raises on incomplete byte sequence" do
-+ io = SimpleIOMemory.new
-+ io.set_encoding("GB2312")
-+ expect_raises ArgumentError, "Incomplete multibyte sequence" do
-+ io.print "好".byte_slice(0, 1)
-+ end
- end
-- end
-+ {% end %}
-
- it "says invalid encoding" do
- io = SimpleIOMemory.new
-diff --git a/spec/std/string_spec.cr b/spec/std/string_spec.cr
-index 6fbdebc7d0..761398fb8f 100644
---- a/spec/std/string_spec.cr
-+++ b/spec/std/string_spec.cr
-@@ -2285,35 +2285,38 @@ describe "String" do
- end
- end
-
-- it "raises if illegal byte sequence" do
-- expect_raises ArgumentError, "Invalid multibyte sequence" do
-- "ñ".encode("GB2312")
-+ # Musl does not support GB2312 encoding.
-+ {% unless flag?(:musl) %}
-+ it "raises if illegal byte sequence" do
-+ expect_raises ArgumentError, "Invalid multibyte sequence" do
-+ "ñ".encode("GB2312")
-+ end
- end
-- end
-
-- it "doesn't raise on invalid byte sequence" do
-- "好ñ是".encode("GB2312", invalid: :skip).to_a.should eq([186, 195, 202, 199])
-- end
-+ it "doesn't raise on invalid byte sequence" do
-+ "好ñ是".encode("GB2312", invalid: :skip).to_a.should eq([186, 195, 202, 199])
-+ end
-
-- it "raises if incomplete byte sequence" do
-- expect_raises ArgumentError, "Incomplete multibyte sequence" do
-- "好".byte_slice(0, 1).encode("GB2312")
-+ it "raises if incomplete byte sequence" do
-+ expect_raises ArgumentError, "Incomplete multibyte sequence" do
-+ "好".byte_slice(0, 1).encode("GB2312")
-+ end
- end
-- end
-
-- it "doesn't raise if incomplete byte sequence" do
-- ("好".byte_slice(0, 1) + "是").encode("GB2312", invalid: :skip).to_a.should eq([202, 199])
-- end
-+ it "doesn't raise if incomplete byte sequence" do
-+ ("好".byte_slice(0, 1) + "是").encode("GB2312", invalid: :skip).to_a.should eq([202, 199])
-+ end
-+
-+ it "decodes with skip" do
-+ bytes = Bytes[186, 195, 140, 202, 199]
-+ String.new(bytes, "GB2312", invalid: :skip).should eq("好是")
-+ end
-+ {% end %}
-
- it "decodes" do
- bytes = "Hello".encode("UTF-16LE")
- String.new(bytes, "UTF-16LE").should eq("Hello")
- end
--
-- it "decodes with skip" do
-- bytes = Bytes[186, 195, 140, 202, 199]
-- String.new(bytes, "GB2312", invalid: :skip).should eq("好是")
-- end
- end
-
- it "inserts" do
diff --git a/community/crystal/fix-std-http-cookie-exp.patch b/community/crystal/fix-std-http-cookie-exp.patch
new file mode 100644
index 00000000000..b25da460102
--- /dev/null
+++ b/community/crystal/fix-std-http-cookie-exp.patch
@@ -0,0 +1,11 @@
+--- a/spec/std/http/cookie_spec.cr 2019-12-18 15:49:14.000000000 +0100
++++ b/spec/std/http/cookie_spec.cr 2020-02-18 12:07:51.036417255 +0100
+@@ -218,7 +218,7 @@
+ parse_set_cookie("bla=1; max-age=1").expired?.should eq false
+ end
+
+- it "not expired" do
++ pending "not expired" do
+ parse_set_cookie("bla=1; expires=Thu, 01 Jan 2020 00:00:00 -0000").expired?.should eq false
+ end
+