From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9CE0139083 for ; Thu, 21 Dec 2017 10:13:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 031F9E0FA9; Thu, 21 Dec 2017 10:13:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C7AA8E0FA9 for ; Thu, 21 Dec 2017 10:13:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2B75233BE18 for ; Thu, 21 Dec 2017 10:13:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9EA64AD5A for ; Thu, 21 Dec 2017 10:13:23 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1513851199.c0192cdd4f44c25ba6d7c3261a48b522ba4a5ca5.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/files/, dev-lang/crystal/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/crystal/crystal-0.23.1.ebuild dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch X-VCS-Directories: dev-lang/crystal/files/ dev-lang/crystal/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: c0192cdd4f44c25ba6d7c3261a48b522ba4a5ca5 X-VCS-Branch: master Date: Thu, 21 Dec 2017 10:13:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e0fa81a0-dc3e-4fc5-9be7-5edfa9c9c2f7 X-Archives-Hash: 4d32f79cd25802e191e6209e7fd186e0 commit: c0192cdd4f44c25ba6d7c3261a48b522ba4a5ca5 Author: Sergei Trofimovich gentoo org> AuthorDate: Thu Dec 21 10:04:41 2017 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Thu Dec 21 10:13:19 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0192cdd Revert "dev-lang/crystal: [QA] Move patches to a distfile" This reverts commit e4e28b774ec066428e0116b94af8baad3e95c559. There is no policy about patches in distfiles: https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Policies dev-lang/crystal/crystal-0.23.1.ebuild | 4 ++-- .../files/crystal-0.22.0-blocking-stdio-hack.patch | 20 ++++++++++++++++++++ .../files/crystal-0.23.0-verbose-LDFLAGS.patch | 9 +++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/dev-lang/crystal/crystal-0.23.1.ebuild b/dev-lang/crystal/crystal-0.23.1.ebuild index 41f26d88e36..c1b0b885924 100644 --- a/dev-lang/crystal/crystal-0.23.1.ebuild +++ b/dev-lang/crystal/crystal-0.23.1.ebuild @@ -38,14 +38,14 @@ RDEPEND="${DEPEND} " PATCHES=( - "${WORKDIR}"/${P}-patchset/${PN}-0.23.0-verbose-LDFLAGS.patch + "${FILESDIR}"/${PN}-0.23.0-verbose-LDFLAGS.patch "${WORKDIR}"/${P}-patchset/${PN}-0.23.1-llvm-5.patch ) src_prepare() { default - use blocking-stdio-hack && eapply "${WORKDIR}"/${P}-patchset/${PN}-0.22.0-blocking-stdio-hack.patch + use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch } src_compile() { diff --git a/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch b/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch new file mode 100644 index 00000000000..07b7dba7be6 --- /dev/null +++ b/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch @@ -0,0 +1,20 @@ +Workaround tty corruption in crystal. + +Patch restores blocking mode of file desriptors +in exchange of potential runtime deadlocks +when dealing with stdio. + +Reported-by: Renich Bon Ciric +Bug: https://github.com/crystal-lang/crystal/issues/2065 +Bug: https://bugs.gentoo.org/616256 +diff --git a/src/compiler/crystal/stdio.cr b/src/compiler/crystal/stdio.cr +new file mode 100644 +index 000000000..e65f65089 +--- /dev/null ++++ b/src/compiler/crystal/stdio.cr +@@ -0,0 +1,5 @@ ++module Crystal ++ STDIN.blocking = true ++ STDOUT.blocking=true ++ STDERR.blocking = true ++end diff --git a/dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch b/dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch new file mode 100644 index 00000000000..35eace15dae --- /dev/null +++ b/dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch @@ -0,0 +1,9 @@ +diff --git a/Makefile b/Makefile +index eff69e5..5c0c024 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,3 +28,3 @@ SOURCES := $(shell find src -name '*.cr') + SPEC_SOURCES := $(shell find spec -name '*.cr') +-FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d ) ++FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" ) + SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )