summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-12-21 10:04:41 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2017-12-21 10:13:19 +0000
commitc0192cdd4f44c25ba6d7c3261a48b522ba4a5ca5 (patch)
treeda24e9f83376a2c13d366ffc665e79e0a0f59f61 /dev-lang/crystal
parentapp-i18n/man-pages-ja: partially revert a03e0fb34eabf5a41a. (diff)
downloadgentoo-c0192cdd4f44c25ba6d7c3261a48b522ba4a5ca5.tar.gz
gentoo-c0192cdd4f44c25ba6d7c3261a48b522ba4a5ca5.tar.bz2
gentoo-c0192cdd4f44c25ba6d7c3261a48b522ba4a5ca5.zip
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
Diffstat (limited to 'dev-lang/crystal')
-rw-r--r--dev-lang/crystal/crystal-0.23.1.ebuild4
-rw-r--r--dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch20
-rw-r--r--dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch9
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 41f26d88e363..c1b0b8859244 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 000000000000..07b7dba7be65
--- /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 000000000000..35eace15dae0
--- /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) )