[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2019-09-24 Thread Sergei Trofimovich
commit: 1d37f836b1438b18f433a8c83724ffad0bf91f90
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Sep 24 19:12:22 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Sep 24 19:17:23 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d37f836

dev-lang/crystal: bump up to 0.31.0

Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich  gentoo.org>

 dev-lang/crystal/Manifest  |   3 +
 dev-lang/crystal/crystal-0.31.0.ebuild | 121 +
 .../crystal/files/crystal-0.31.0-verbose.patch |   7 ++
 3 files changed, 131 insertions(+)

diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index 1a98a93bcc5..282ef378f8f 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -10,3 +10,6 @@ DIST crystal-0.30.0.tar.gz 2151397 BLAKE2B 
8b32d12e6f45d18c5ef23dce0520d76690762
 DIST crystal-0.30.1-1-linux-i686.tar.gz 31972575 BLAKE2B 
75350799d836110448f56a7b0f49ad27fdeef0f1da169cc15b411482649538e48c3895b169a1deb4c5691f97329ad70a126396425fd096f0dbd83db7e989e4b2
 SHA512 
9ede9ed7522a82270d91c316b9b98d8ab2d497def2432b99e2d2f21175e978b5b984df92c9637b4600ef27b6e84bd7bc7a5a1b227b17538804a1bc52dabdf84a
 DIST crystal-0.30.1-1-linux-x86_64.tar.gz 30166159 BLAKE2B 
b58e69f9f00e15c3b6e7e259179903f6f210f463c89b8d50a99b1a7d413092585afddf94cac3a461c041c3d91301aac8e61dbab37282a29f781a34367a1d9ddb
 SHA512 
31f06163951fb6ede70eb41f6047c96a74293754bba360b428bf162b1661eed47f8b426327f074f3523ae16b073e8ae5f5e0e6b36ebf83031fa5a0b414b41648
 DIST crystal-0.30.1.tar.gz 2153037 BLAKE2B 
e5cb2d49688aba75f684ea9fea7e6b0e85eb124f55bf00472595ba83bedd50a8042c5b3c40358254c3fdec3bce2f351ca5e6d385a7841d33f44b934844fd89b1
 SHA512 
62ddb0dc45385d52d7fdd593f85ec4bef2451aa9a48aabe0115ffe8cfe820e6665b2d51d097339fe931d8599bb6c62c7ddfcaae36a199db0726df4e246af6eab
+DIST crystal-0.31.0-1-linux-i686.tar.gz 28656362 BLAKE2B 
032e276ee12978fdf1e4d59c1cab680ba6c67b23479820edf16d0957e4ec5f054c49775a719f601766477808898bebb4eb64a2e77c413fba28f4f9f50d25f73c
 SHA512 
bafd566c000f190c9fc7cf327411e1683cda5ea7bd4f2e09660749c99ec661997d1e7b1076ea3624bfa8f2a6432bd283a170efaa17a4988c8bb7195eaa41f872
+DIST crystal-0.31.0-1-linux-x86_64.tar.gz 26985093 BLAKE2B 
f9d663cab6ee81abd941dbf528b25efd0a2d2a5d7cc21fa56456b7f9720e85d297d13c254c9a5b392dc3f054535ea4131d6ec7f43f6ac6621fd19ed2453e475b
 SHA512 
f2d0ee26d01432fe0f2d2e5c847f88d4f58d2498d4f7769fa29817a172012628d5c63702c09451de54a154e8e2bb78709379f4d695773d999ca8e32bd559b65a
+DIST crystal-0.31.0.tar.gz 2190452 BLAKE2B 
126da5d787feea3c4d12f496321f9b16257f96cbdc9f3290b1bca8d8a5902d3a0a65e9b9d5e28c4ccd791f0fcc0139321251dcc775a926a6271be480111d251d
 SHA512 
c5a276c7b098bc863087449328326a54186ddc1c269b90a8d94d9133feaa001398d0272c6ff48e1376d3d8a276a074f50ef67ca4e2bc27cbfd0dfd0f952efd8f

diff --git a/dev-lang/crystal/crystal-0.31.0.ebuild 
b/dev-lang/crystal/crystal-0.31.0.ebuild
new file mode 100644
index 000..b67566686cd
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.31.0.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
+
+BV=${PV}-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org;
+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
 )
+   x86? ( 
https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz
 )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+RESTRICT=test # not stable for day-to-day runs
+
+LLVM_MAX_SLOT=8
+
+# dev-libs/boehm-gc[static-libs] dependency problem,  check the issue: 
https://github.com/manastech/crystal/issues/1382
+DEPEND="
+   sys-devel/llvm:${LLVM_MAX_SLOT}
+   dev-libs/boehm-gc[static-libs,threads]
+   dev-libs/libatomic_ops
+   dev-libs/libevent
+   dev-libs/libpcre
+   sys-libs/libunwind
+   dev-libs/pcl
+   dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+   xml? ( dev-libs/libxml2 )
+   yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-0.31.0-verbose.patch
+   "${FILESDIR}"/${PN}-0.26.1-gentoo-tests-sandbox.patch
+   "${FILESDIR}"/${PN}-0.27.0-extra-spec-flags.patch
+   #"${FILESDIR}"/${PN}-0.27.0-max-age-0-test.patch
+   "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix.patch
+   "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix-2.patch
+   "${FILESDIR}"/${PN}-0.29.0-no-usr-lib.patch
+)
+
+src_prepare() {
+   default
+
+   use blocking-stdio-hack && eapply 
"${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+   local 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2019-06-14 Thread Sergei Trofimovich
commit: 97b0a4930485e541668b01a239b4e2c5e63f07fa
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Jun 14 07:14:46 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Jun 14 18:32:03 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97b0a493

dev-lang/crystal: drop /usr/lib hardcoding

Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Sergei Trofimovich  gentoo.org>

 dev-lang/crystal/crystal-0.29.0-r1.ebuild  | 124 +
 .../crystal/files/crystal-0.29.0-no-usr-lib.patch  |  14 +++
 2 files changed, 138 insertions(+)

diff --git a/dev-lang/crystal/crystal-0.29.0-r1.ebuild 
b/dev-lang/crystal/crystal-0.29.0-r1.ebuild
new file mode 100644
index 000..44419942b72
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.29.0-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
+
+BV=0.29.0-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org;
+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
 )
+   x86? ( 
https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz
 )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+RESTRICT=test # not stable for day-to-day runs
+
+# Not compatible with llvm-7 or llvm-8
+LLVM_MAX_SLOT=6
+
+# dev-libs/boehm-gc[static-libs] dependency problem,  check the issue: 
https://github.com/manastech/crystal/issues/1382
+DEPEND="
+   sys-devel/llvm:${LLVM_MAX_SLOT}
+   dev-libs/boehm-gc[static-libs,threads]
+   dev-libs/libatomic_ops
+   dev-libs/libevent
+   dev-libs/libpcre
+   sys-libs/libunwind
+   dev-libs/pcl
+   dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+   xml? ( dev-libs/libxml2 )
+   yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-0.27.1-verbose.patch
+   "${FILESDIR}"/${PN}-0.26.1-gentoo-tests-sandbox.patch
+   "${FILESDIR}"/${PN}-0.26.1-gentoo-tests-network-sandbox-3.patch
+   "${FILESDIR}"/${PN}-0.27.0-extra-spec-flags.patch
+   #"${FILESDIR}"/${PN}-0.27.0-max-age-0-test.patch
+   "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix.patch
+   "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix-2.patch
+   "${FILESDIR}"/${PN}-0.27.0-tcp-server-test.patch
+   "${FILESDIR}"/${PN}-0.29.0-no-usr-lib.patch
+)
+
+src_prepare() {
+   default
+
+   use blocking-stdio-hack && eapply 
"${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+   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
+
+   emake \
+   $(usex debug "" release=1) \
+   progress=true \
+   stats=1 \
+   threads=$(makeopts_jobs) \
+   verbose=1 \
+   \
+   CC=$(tc-getCC) \
+   CXX=$(tc-getCXX) \
+   AR=$(tc-getAR) \
+   \
+   PATH="${bootstrap_path}:${PATH}" \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV} \
+   CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+   use doc && emake docs
+}
+
+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 spec \
+   $(usex debug "" release=1) \
+   progress=true \
+   stats=1 \
+   threads=$(makeopts_jobs) \
+   verbose=1 \
+   \
+   CC=$(tc-getCC) \
+   CXX=$(tc-getCXX) \
+   AR=$(tc-getAR) \
+   \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV} \
+   \
+   "EXTRA_SPEC_FLAGS=${EXTRA_SPEC_FLAGS}"
+}
+
+src_install() {
+   insinto /usr/$(get_libdir)/crystal
+   doins -r src/.
+   dobin .build/crystal
+
+   insinto /usr/share/zsh/site-functions
+   newins etc/completion.zsh _crystal
+
+   use examples && dodoc -r samples
+
+   if use doc ; then
+   docinto api
+   dodoc -r docs/.
+   fi
+
+   newbashcomp etc/completion.bash ${PN}
+}

diff --git a/dev-lang/crystal/files/crystal-0.29.0-no-usr-lib.patch 
b/dev-lang/crystal/files/crystal-0.29.0-no-usr-lib.patch
new file mode 100644
index 000..15f2ac75c09
--- 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2018-11-10 Thread Sergei Trofimovich
commit: 4aaa3e8bdd96de853891cfe7e9c9254ed33c2dce
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Nov 10 11:35:59 2018 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Nov 10 11:36:13 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aaa3e8b

dev-lang/crystal: add EXTRA_SPEC_FLAGS variable

This allows running only individual crystal tests
in src_test() phase. Useful to quickly debug single test:
USE=debug EXTRA_SPEC_FLAGS='-e parse_set_cookie' emerge -1 crystal

Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich  gentoo.org>

 dev-lang/crystal/crystal-0.27.0.ebuild   |  8 +++-
 dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch | 11 +++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/dev-lang/crystal/crystal-0.27.0.ebuild 
b/dev-lang/crystal/crystal-0.27.0.ebuild
index 71778f6c2c1..b7dcd5f70cf 100644
--- a/dev-lang/crystal/crystal-0.27.0.ebuild
+++ b/dev-lang/crystal/crystal-0.27.0.ebuild
@@ -43,6 +43,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.25.0-verbose.patch
"${FILESDIR}"/${PN}-0.26.1-gentoo-tests-sandbox.patch
"${FILESDIR}"/${PN}-0.26.1-gentoo-tests-network-sandbox-3.patch
+   "${FILESDIR}"/${PN}-0.27.0-extra-spec-flags.patch
 )
 
 src_prepare() {
@@ -77,6 +78,9 @@ src_compile() {
 }
 
 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 spec \
$(usex debug "" release=1) \
progress=true \
@@ -89,7 +93,9 @@ src_test() {
AR=$(tc-getAR) \
\
CRYSTAL_PATH=src \
-   CRYSTAL_CONFIG_VERSION=${PV}
+   CRYSTAL_CONFIG_VERSION=${PV} \
+   \
+   "EXTRA_SPEC_FLAGS=${EXTRA_SPEC_FLAGS}"
 }
 
 src_install() {

diff --git a/dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch 
b/dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch
new file mode 100644
index 000..bd86c13a78a
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.27.0-extra-spec-flags.patch
@@ -0,0 +1,11 @@
+Allow injecting additional arguments to test suite.
+Useful to be able to run small subset of individual
+test suite:
+
+make spec EXTRA_SPEC_FLAGS='-e parse_set_cookie'
+
+--- a/Makefile
 b/Makefile
+@@ -31 +31 @@ override FLAGS += $(if $(release),--release )$(if 
$(stats),--stats )$(if $(progr
+-SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output 
$(junit_output) )
++SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output 
$(junit_output) )$(EXTRA_SPEC_FLAGS)



[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2018-06-11 Thread Sergei Trofimovich
commit: f25410efa1255c22a5192c3c165bebdde354eddf
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Jun 11 12:55:42 2018 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Jun 11 13:24:13 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f25410ef

dev-lang/crystal: bump up to 0.25.0

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-lang/crystal/Manifest  |   3 +
 dev-lang/crystal/crystal-0.25.0.ebuild | 104 +
 .../crystal/files/crystal-0.25.0-verbose.patch |   9 ++
 3 files changed, 116 insertions(+)

diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index 37b521c56f6..6f848b551cd 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -3,4 +3,7 @@ DIST crystal-0.23.0-1-linux-x86_64.tar.gz 18729061 BLAKE2B 
bfca07702b2f7c7d6b11a
 DIST crystal-0.23.1-patchset.tar.bz2 7268 BLAKE2B 
135990ac9f1a225f169dbc5bb6034d2194d9fc917954764564d68afec09af703382743965a801c9ce54a5866af60847b4c4fc0b9daf2cf5ea99052fbeb771b2a
 SHA512 
68896fc5d1772eeb3dd263f1615fc8031a63d0f3eebca1feb35165adf14a610157302541c84cbc9031a3070fd5566ffe88ad03a8c523f55980520e5614b00b89
 DIST crystal-0.23.1.tar.gz 1646650 BLAKE2B 
3105a683e61835d1e514d5d403b00d3dfae01100a9862d6346c45201c5fb6cba879255469652463719998e976afc495ee9fd4f14f829a709f832cd323cfc2b3b
 SHA512 
06ee0d45cc79cc343d04c346e9cd47b6e4ebc79bf21833662f268f9604f7d2080f7696824e1959de341539f801ae8f898fe1d7b18e4c75378d4eb191878668d5
 DIST crystal-0.24.1.tar.gz 1744210 BLAKE2B 
e3a49a75f42e734753b369f1ad22db011b3af055acb0886b74151281480015c19b079cfc7246070c96e45942e51ed47d183606906bef8f2a0e6786ec7b39dbc8
 SHA512 
f27b64922eaff45228d9cc16bb229528e523500b8f64a3b4a5ed0584445bebf7812457e17952d0eabac2869ee259949bb12fbc80d60a6aa717307a80932345b8
+DIST crystal-0.24.2-1-linux-i686.tar.gz 17667007 BLAKE2B 
73104ce088e161f03a7b4a191bb6dcdd86d0c65fe4058bb81f1177c6b7162aa48ca7732fbb410de8d3c9ca58830774913acdad9a89d8420a62e6526ecd309a2a
 SHA512 
af0019fa1d140e653812a5d8a4fbb129ccf5d66ae55aa1a4e94ec3166058eb47abd2dd429a9d72a4baad4a6032abdaafc07bc22ca6380ac85e9d1c7168d7bf5d
+DIST crystal-0.24.2-1-linux-x86_64.tar.gz 35022853 BLAKE2B 
5b101a27fef0dfbbf61920d826689a45f400c28afe7383320b69f8887512bcab65cbfe8a2cf35b0c598b06083d1ea5e338f4e2b910db03226ba05195483e4c89
 SHA512 
21d8e7fc34fc24ccb7e8e2c7aade0c3d6fe17e385f0f00534bb91e886788da0b27ff8276b634f7ae13d6342c7e22c6acd609562bcf1af8fddfdee5e256e1bcf0
 DIST crystal-0.24.2.tar.gz 1745462 BLAKE2B 
8f3d5cf9e274558a5622aae44c6f7d54d0b3042d08810ddc650f181b91a536a3d0cc2d8fa726b677cce1f8a946319a55b803823596cef0d4d3e63832bfcea720
 SHA512 
db9fb973eeb2bc72ef91bb894b7c5aea73e727ff46e739aa431d68e556238f346a688a7a43de284afb4667b49366afce3ca423a523bea521180fa8f19ba6862d
+DIST crystal-0.25.0.tar.gz 1957613 BLAKE2B 
4c2467e39a9bc6745b74c00f755490a2f726e775c2a0d15562af27d2a6771c95c44f79e6b59ad45f61a59566529854d75c980c55a6886538fa98663879477258
 SHA512 
20f2864919c7710e5aee8112e1c6ab54a2e50b244ac63d374edfed41ab659b11c062f76dbfc38e763a08bdbea9e0a39f3b5cac5e00bf453be3a31d3b0a023917

diff --git a/dev-lang/crystal/crystal-0.25.0.ebuild 
b/dev-lang/crystal/crystal-0.25.0.ebuild
new file mode 100644
index 000..2dbfe3e736d
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.25.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
+
+BV=0.24.2
+BV_AMD64=${BV}-1-linux-x86_64
+BV_X86=${BV}-1-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org;
+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
 )
+   x86? ( 
https://github.com/crystal-lang/crystal/releases/download/${BV}/crystal-${BV_X86}.tar.gz
 )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+LLVM_MAX_SLOT=6
+
+# dev-libs/boehm-gc[static-libs] dependency problem,  check the issue: 
https://github.com/manastech/crystal/issues/1382
+DEPEND="
+   sys-devel/llvm:${LLVM_MAX_SLOT}
+   dev-libs/boehm-gc[static-libs,threads]
+   dev-libs/libatomic_ops
+   dev-libs/libevent
+   dev-libs/libpcre
+   sys-libs/libunwind
+   dev-libs/pcl
+   dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+   xml? ( dev-libs/libxml2 )
+   yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-0.25.0-verbose.patch
+   "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-sandbox.patch
+   "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-network-sandbox.patch
+)
+
+src_prepare() {
+   default
+
+   use blocking-stdio-hack && eapply 
"${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+   emake \
+   $(usex debug "" 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2018-03-15 Thread Sergei Trofimovich
commit: 775d10604baa00e1ffd0d5bf232348c3990ec4e9
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Mar 15 23:32:58 2018 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Mar 15 23:33:14 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=775d1060

dev-lang/crystal: disable tests that interfere with gentoo's sandbox

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-lang/crystal/crystal-0.24.2.ebuild |  2 ++
 ...ystal-0.24.2-gentoo-tests-network-sandbox.patch | 33 +++
 .../crystal-0.24.2-gentoo-tests-sandbox.patch  | 37 ++
 3 files changed, 72 insertions(+)

diff --git a/dev-lang/crystal/crystal-0.24.2.ebuild 
b/dev-lang/crystal/crystal-0.24.2.ebuild
index 4a403f10264..84884cb69fb 100644
--- a/dev-lang/crystal/crystal-0.24.2.ebuild
+++ b/dev-lang/crystal/crystal-0.24.2.ebuild
@@ -40,6 +40,8 @@ RDEPEND="${DEPEND}
 
 PATCHES=(
"${FILESDIR}"/${PN}-0.24.0-verbose-LDFLAGS.patch
+   "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-sandbox.patch
+   "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-network-sandbox.patch
 )
 
 src_prepare() {

diff --git 
a/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch 
b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch
new file mode 100644
index 000..12565c1d839
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch
@@ -0,0 +1,33 @@
+diff --git a/spec/std/socket_spec.cr b/spec/std/socket_spec.cr
+index 0caa51a..f21b3b3 100644
+--- a/spec/std/socket_spec.cr
 b/spec/std/socket_spec.cr
+@@ -537,13 +537,15 @@ describe TCPSocket do
+ end
+   end
+ 
+-  it "fails when host doesn't exist" do
++  # gentoo's FEATURES=network-sandbox blocks DNS
++  pending "fails when host doesn't exist" do
+ expect_raises(Socket::Error, /No address/i) do
+   TCPSocket.new("doesnotexist.example.org.", 12345)
+ end
+   end
+ 
+-  it "fails (rather than segfault on darwin) when host doesn't exist and port 
is 0" do
++  # gentoo's FEATURES=network-sandbox blocks DNS
++  pending "fails (rather than segfault on darwin) when host doesn't exist and 
port is 0" do
+ expect_raises(Socket::Error, /No address/i) do
+   TCPSocket.new("doesnotexist.example.org.", 0)
+ end
+@@ -634,7 +636,9 @@ describe UDPSocket do
+ client.close
+   end
+ 
+-  it "broadcasts messages" do
++  # gentoo's FEATURES=network-sandbox blocks external network:
++  #   connect: Network is unreachable
++  pending "broadcasts messages" do
+ port = free_udp_socket_port
+ 
+ client = UDPSocket.new(Socket::Family::INET)

diff --git a/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch 
b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch
new file mode 100644
index 000..4bd779a834c
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch
@@ -0,0 +1,37 @@
+diff --git a/spec/std/file_spec.cr b/spec/std/file_spec.cr
+index 4a08b7d..cb1b28c 100644
+--- a/spec/std/file_spec.cr
 b/spec/std/file_spec.cr
+@@ -1026,7 +1026,8 @@ describe "File" do
+   end
+ end
+ 
+-it "raises if file cannot be accessed" do
++# On linux it's "Permission denied", not "Operation not permitted"
++pending "raises if file cannot be accessed" do
+   expect_raises Errno, "Operation not permitted" do
+ File.touch("/bin/ls")
+   end
+diff --git a/spec/std/process_spec.cr b/spec/std/process_spec.cr
+index 4a36f18..0cd63a8 100644
+--- a/spec/std/process_spec.cr
 b/spec/std/process_spec.cr
+@@ -115,14 +115,16 @@ describe Process do
+   end
+ 
+   describe "environ" do
+-it "clears the environment" do
++#gentoo's sandbox keeps sandbox environment
++pending "clears the environment" do
+   value = Process.run("env", clear_env: true) do |proc|
+ proc.output.gets_to_end
+   end
+   value.should eq("")
+ end
+ 
+-it "sets an environment variable" do
++#gentoo's sandbox keeps sandbox environment
++pending "sets an environment variable" do
+   env = {"FOO" => "bar"}
+   value = Process.run("env", clear_env: true, env: env) do |proc|
+ proc.output.gets_to_end



[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2017-12-21 Thread Sergei Trofimovich
commit: 79befda71b90ef39452393601b92151b111dee16
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Dec 21 10:26:41 2017 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Dec 21 10:26:41 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79befda7

dev-lang/crystal: bump up to 0.24.1

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 dev-lang/crystal/Manifest  |   1 +
 dev-lang/crystal/crystal-0.24.1.ebuild | 100 +
 .../files/crystal-0.24.0-verbose-LDFLAGS.patch |   9 ++
 3 files changed, 110 insertions(+)

diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index 29524660167..48f140e3eb3 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -2,3 +2,4 @@ DIST crystal-0.23.0-1-linux-i686.tar.gz 18498501 BLAKE2B 
7a8e4e5a2b1425b6effe0a6
 DIST crystal-0.23.0-1-linux-x86_64.tar.gz 18729061 BLAKE2B 
bfca07702b2f7c7d6b11aac864475316cabe86bdba90b1819ecd5cb45769b2b7fd9fb4c9f80e46301785209cc5b35fe39bf689163b9376a32b24f8a685a6281b
 SHA512 
6a4e427b4ab3c3be6efcfaee5c1a19eff04eaf00db949d1e1ba8f29c3277affe96a7aba4273d93fd05251453d5b5b937aa792bc448ff2f6d6aa7f2b17d175f75
 DIST crystal-0.23.1-patchset.tar.bz2 7268 BLAKE2B 
135990ac9f1a225f169dbc5bb6034d2194d9fc917954764564d68afec09af703382743965a801c9ce54a5866af60847b4c4fc0b9daf2cf5ea99052fbeb771b2a
 SHA512 
68896fc5d1772eeb3dd263f1615fc8031a63d0f3eebca1feb35165adf14a610157302541c84cbc9031a3070fd5566ffe88ad03a8c523f55980520e5614b00b89
 DIST crystal-0.23.1.tar.gz 1646650 BLAKE2B 
3105a683e61835d1e514d5d403b00d3dfae01100a9862d6346c45201c5fb6cba879255469652463719998e976afc495ee9fd4f14f829a709f832cd323cfc2b3b
 SHA512 
06ee0d45cc79cc343d04c346e9cd47b6e4ebc79bf21833662f268f9604f7d2080f7696824e1959de341539f801ae8f898fe1d7b18e4c75378d4eb191878668d5
+DIST crystal-0.24.1.tar.gz 1744210 BLAKE2B 
e3a49a75f42e734753b369f1ad22db011b3af055acb0886b74151281480015c19b079cfc7246070c96e45942e51ed47d183606906bef8f2a0e6786ec7b39dbc8
 SHA512 
f27b64922eaff45228d9cc16bb229528e523500b8f64a3b4a5ed0584445bebf7812457e17952d0eabac2869ee259949bb12fbc80d60a6aa717307a80932345b8

diff --git a/dev-lang/crystal/crystal-0.24.1.ebuild 
b/dev-lang/crystal/crystal-0.24.1.ebuild
new file mode 100644
index 000..5436a7888dd
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.24.1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 multiprocessing toolchain-funcs
+
+BV=0.23.0-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org;
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> 
${P}.tar.gz
+   amd64? ( 
https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz
 )
+   x86? ( 
https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz
 )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem,  check the issue: 
https://github.com/manastech/crystal/issues/1382
+DEPEND="
+   sys-devel/llvm:5
+   dev-libs/boehm-gc[static-libs,threads]
+   dev-libs/libatomic_ops
+   dev-libs/libevent
+   dev-libs/libpcre
+   sys-libs/libunwind
+   dev-libs/pcl
+   dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+   xml? ( dev-libs/libxml2 )
+   yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-0.24.0-verbose-LDFLAGS.patch
+)
+
+src_prepare() {
+   default
+
+   use blocking-stdio-hack && eapply 
"${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+   emake \
+   $(usex debug "" release=1) \
+   progress=true \
+   stats=1 \
+   threads=$(makeopts_jobs) \
+   verbose=1 \
+   \
+   CC=$(tc-getCC) \
+   CXX=$(tc-getCXX) \
+   AR=$(tc-getAR) \
+   \
+   PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV} \
+   CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+   use doc && emake doc
+}
+
+src_test() {
+   emake spec \
+   $(usex debug "" release=1) \
+   progress=true \
+   stats=1 \
+   threads=$(makeopts_jobs) \
+   verbose=1 \
+   \
+   CC=$(tc-getCC) \
+   CXX=$(tc-getCXX) \
+   AR=$(tc-getAR) \
+   \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+   insinto /usr/$(get_libdir)/crystal
+   doins -r src/.
+   dobin .build/crystal
+
+   insinto 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2017-04-22 Thread Sergei Trofimovich
commit: 82450758e28ce3fe436dfe3851d9171f783c2f20
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Apr 22 10:23:59 2017 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Apr 22 10:23:59 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82450758

dev-lang/crystal: drop old

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-lang/crystal/Manifest  |  5 --
 dev-lang/crystal/crystal-0.20.4-r1.ebuild  | 68 ---
 dev-lang/crystal/crystal-0.20.5-r1.ebuild  | 84 ---
 dev-lang/crystal/crystal-0.20.5-r2.ebuild  | 92 --
 dev-lang/crystal/crystal-0.20.5.ebuild | 68 ---
 dev-lang/crystal/crystal-0.21.0.ebuild | 91 -
 dev-lang/crystal/files/crystal-0.20.5-AR.patch |  9 ---
 7 files changed, 417 deletions(-)

diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index 6a809dd7462..35cdba803b4 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -1,8 +1,3 @@
-DIST crystal-0.20.4-1-linux-i686.tar.gz 17176550 SHA256 
93e7df2bea3220728987a49a2f93d1c615e2ccae63843e0259a5d891c53a0b80 SHA512 
c66dd5e417a1875af8ba7b763201cc41f97db9a321a8246607c625d3a447b73fa454c3373e69cd4bcd0ab6a1890cb8a988d0925e44e966e423136736852e10f3
 WHIRLPOOL 
937af1b3e4c7be0b95e4f33de472d3250a3725d7bf4ee8189fa9b4bfdd9e7963a3b0721f552e61f50a593e8d22d0635bd22ab917e3989d848dd6797b5154f858
-DIST crystal-0.20.4-1-linux-x86_64.tar.gz 1773 SHA256 
cdc11c30235f8bd3b89e1fc13b56838f99d585715fb66563d6599026f5393e37 SHA512 
4f443c6e50962f5d7629ea6b3066443b5521cc58066bd944a5f61a1fb4dcd2593b09f71099d2fc86e64c167aa52d8cd566518f8bec30cc7294e03deb1910cf7c
 WHIRLPOOL 
08026df37fefc8d8c3a4d9d9fdd397efbb453b6f2944778f413694d8d9433c62e5837db25caeba1540124aa4cad6847fca1d71f1b148990a09cbb850e6d9500c
-DIST crystal-0.20.4.tar.gz 1537577 SHA256 
fd099f278b71bbb5cad1927c93933d1feba554fbf8f6f4ab9165f535765f5e31 SHA512 
1ded5cf104314b6b8b76fa519ec87a913a40a8bdb82445fe78b3f942567abe8c354cefcdd360c365e0c9f0756fc0e4819eec681584c11f94c9838e9a61ec89fe
 WHIRLPOOL 
f51185267fd2152e7acbb0528cabf17c973e763db3cb097c13ec805cee44f191f9054bb2dfbfa6b885dab850c7a24ae722b0c238c7ba8d1296de1e06060ebba9
-DIST crystal-0.20.5.tar.gz 1550878 SHA256 
ee1e5948c6e662ccb1e62671cf2c91458775b559b23d74ab226dc2a2d23f7707 SHA512 
cb27ad485f5bf51307541901a230f635e1b3922f3802fc4db0a8746c7aa3399940791f9ec7d7e71325af5c93e8928f4a94b30a25d87e7ed45fa77661ddd876f0
 WHIRLPOOL 
7d1d2011b6319ebf50ba10935e3d55b5320d0e2bdf3fe00ace16aef74a740449968c1230d7ccb5033d8ef0ef222fd323ad226bed15a0573d666d8fae05caffef
-DIST crystal-0.21.0.tar.gz 1584649 SHA256 
4dd01703f5304a0eda7f02fc362fba27ba069666097c0f921f8a3ee58808779c SHA512 
35c1c770c1771c1b1ee32d14bbf749ab42dd0c2adf3bec59ad26474513e2f8d53a792dd478cb2a3b6127e69adc4326191cb65fd1e7a2d6f79610abc7eb34e4db
 WHIRLPOOL 
e71eb5dc8ec89c879d4f62b008f9e2ac6f6dd3041488c3f03ca08f0109e46f9d1aae8b03424a3e15f8035f271b7cb6288bf9268314dc6ece52d70c5b0678cde6
 DIST crystal-0.21.1-1-linux-i686.tar.gz 18825516 SHA256 
8ab875309aa71d4501995e834850d40538fb66dd9890024ed812777f83085f48 SHA512 
790043db666d7f65a3cc9e68511eb8fa03c352d2ca044bb38995ca4ab37b731bf612bf36d6efecd7a1763b22930c67315d0ae3b2e087c1a40ac209564492b5b9
 WHIRLPOOL 
642e4a6ec71cb33042c1dc0da11cd5e231b58f46afc77aa754bc0fa7d8d5104c4c0625b214d4bd48ad62ef6ad6eaeb33ba3e6040ebabb4a37f5fb20f399ae063
 DIST crystal-0.21.1-1-linux-x86_64.tar.gz 18930207 SHA256 
e8a7489aba888cc0deec61e9bda5dd27ab600edb102afc17fa11582b90960875 SHA512 
ed7860c93e25546e8df311851b6b9a3abf44e6046cf4cb3208555db80d63afc0ce45fdfdb1833f67f2e62f9a6b2d015ba5674d9273d572de15d7515aa481ae1f
 WHIRLPOOL 
c70cad45911e5ac4fd62ad42d13507280feccfbae46e682eb5eec81ec49de67e49f7384ad7d127a2d8624c4a1b4a425aded4a2f3a0b6b59025b31f0415864e95
 DIST crystal-0.21.1.tar.gz 1586701 SHA256 
eb93de3b388641fd2a09a2d10ab9fe40a58148d888fc48e4583a86ee1ddb1085 SHA512 
1deaf696b715efee841b0a07a1dca9e5fad31896a7fbfe8ed69a3fb2dc72cc71c38d003c660ab61c4ab3dcb9e0e2687e714a78ada55b51b42da0e0a0411c2208
 WHIRLPOOL 
1eaacc4d50b1f5cc0237f9413f54d8cd12837edc348a287951d1cb6a03f3ce29130407ccb9a462dab72f04c369eccf595231127c6aae4c716a8c9f92da36290e

diff --git a/dev-lang/crystal/crystal-0.20.4-r1.ebuild 
b/dev-lang/crystal/crystal-0.20.4-r1.ebuild
deleted file mode 100644
index 06a004d2d29..000
--- a/dev-lang/crystal/crystal-0.20.4-r1.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-BV=0.20.4-1
-BV_AMD64=${BV}-linux-x86_64
-BV_X86=${BV}-linux-i686
-
-DESCRIPTION="The Crystal Programming Language"
-HOMEPAGE="http://crystal-lang.org;
-SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> 
${P}.tar.gz
-   amd64? ( 
https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz
 )
-   x86? ( 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2017-01-28 Thread Sergei Trofimovich
commit: 46ea9d6b8f435e53e09a1381ccc83c4afd904b75
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Jan 28 13:36:49 2017 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Jan 28 13:36:59 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46ea9d6b

dev-lang/crystal: respect LDFLAGS, new USE=debug for quick builds

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/crystal/crystal-0.20.5-r2.ebuild  | 93 ++
 .../crystal/files/crystal-0.20.5-LDFLAGS.patch |  9 +++
 dev-lang/crystal/metadata.xml  |  3 +
 3 files changed, 105 insertions(+)

diff --git a/dev-lang/crystal/crystal-0.20.5-r2.ebuild 
b/dev-lang/crystal/crystal-0.20.5-r2.ebuild
new file mode 100644
index ..d550e2a
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.20.5-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit multiprocessing toolchain-funcs
+
+BV=0.20.4-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="http://crystal-lang.org;
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> 
${P}.tar.gz
+   amd64? ( 
https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz
 )
+   x86? ( 
https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz
 )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem,  check the issue: 
https://github.com/manastech/crystal/issues/1382
+DEPEND="
+   >=sys-devel/llvm-3.9.0
+   dev-libs/boehm-gc[static-libs,threads]
+   dev-libs/libatomic_ops
+   dev-libs/libevent
+   dev-libs/libpcre
+   sys-libs/libunwind
+   dev-libs/pcl
+   dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+   xml? ( dev-libs/libxml2 )
+   yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+   "${FILESDIR}"/${P}-AR.patch
+   "${FILESDIR}"/${P}-verbose.patch
+   "${FILESDIR}"/${P}-LDFLAGS.patch
+)
+
+src_compile() {
+   emake \
+   $(usex debug "" release=1) \
+   stats=1 \
+   threads=$(makeopts_jobs) \
+   verbose=1 \
+   \
+   CC=$(tc-getCC) \
+   CXX=$(tc-getCXX) \
+   AR=$(tc-getAR) \
+   \
+   PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV} \
+   CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+   use doc && emake doc
+}
+
+src_test() {
+   emake spec \
+   $(usex debug "" release=1) \
+   stats=1 \
+   threads=$(makeopts_jobs) \
+   verbose=1 \
+   \
+   CC=$(tc-getCC) \
+   CXX=$(tc-getCXX) \
+   AR=$(tc-getAR) \
+   \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+   insinto /usr/$(get_libdir)/crystal
+   doins -r src/.
+   dobin .build/crystal
+
+   insinto /usr/share/zsh/site-functions
+   newins etc/completion.zsh _crystal
+
+   use examples && dodoc -r samples
+
+   if use doc ; then
+   docinto api
+   dodoc -r doc/.
+   fi
+}

diff --git a/dev-lang/crystal/files/crystal-0.20.5-LDFLAGS.patch 
b/dev-lang/crystal/files/crystal-0.20.5-LDFLAGS.patch
new file mode 100644
index ..42970a8
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.20.5-LDFLAGS.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile b/Makefile
+index fa71479..d316bbc 100644
+--- a/Makefile
 b/Makefile
+@@ -24,3 +24,3 @@ SOURCES := $(shell find src -name '*.cr')
+ SPEC_SOURCES := $(shell find spec -name '*.cr')
+-FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if 
$(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose )
++FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if 
$(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose 
)$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )
+ VERBOSE := $(if $(verbose),-v )

diff --git a/dev-lang/crystal/metadata.xml b/dev-lang/crystal/metadata.xml
index e8be383..80b55be 100644
--- a/dev-lang/crystal/metadata.xml
+++ b/dev-lang/crystal/metadata.xml
@@ -19,6 +19,9 @@
disallowing certain dynamic aspects of Ruby.


+   
+   Build each module as a separate object file. Speeds 
build up.
+   

Use the dev-libs/libyaml library to enable 
Crystal yaml
module



[gentoo-commits] repo/gentoo:master commit in: dev-lang/crystal/, dev-lang/crystal/files/

2017-01-28 Thread Sergei Trofimovich
commit: ef80935bdf6325a68ed25e5a94ae602227402cd2
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Jan 28 12:26:38 2017 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Jan 28 12:48:22 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef80935b

dev-lang/crystal: respect CC/CXX/AR/MAKEOPTS, bug #607468

While at it enabled a few verbosity flags to make
build slightly more chatty.

Reported-by: Michał Górny
Bug: https://bugs.gentoo.org/607468

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/crystal/crystal-0.20.5-r1.ebuild  | 85 ++
 dev-lang/crystal/files/crystal-0.20.5-AR.patch |  9 +++
 .../crystal/files/crystal-0.20.5-verbose.patch |  9 +++
 3 files changed, 103 insertions(+)

diff --git a/dev-lang/crystal/crystal-0.20.5-r1.ebuild 
b/dev-lang/crystal/crystal-0.20.5-r1.ebuild
new file mode 100644
index ..347af38
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.20.5-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit multiprocessing toolchain-funcs
+
+BV=0.20.4-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="http://crystal-lang.org;
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> 
${P}.tar.gz
+   amd64? ( 
https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz
 )
+   x86? ( 
https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz
 )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc examples +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem,  check the issue: 
https://github.com/manastech/crystal/issues/1382
+DEPEND="
+   >=sys-devel/llvm-3.9.0
+   dev-libs/boehm-gc[static-libs,threads]
+   dev-libs/libatomic_ops
+   dev-libs/libevent
+   dev-libs/libpcre
+   sys-libs/libunwind
+   dev-libs/pcl
+   dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+   xml? ( dev-libs/libxml2 )
+   yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+   "${FILESDIR}"/${P}-AR.patch
+   "${FILESDIR}"/${P}-verbose.patch
+)
+
+src_compile() {
+   emake \
+   release=1 \
+   stats=1 \
+   threads=$(makeopts_jobs) \
+   verbose=1 \
+   \
+   CC=$(tc-getCC) \
+   CXX=$(tc-getCXX) \
+   AR=$(tc-getAR) \
+   \
+   PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV} \
+   CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+   use doc && emake doc
+}
+
+src_test() {
+   emake spec \
+   verbose=1 \
+   \
+   CRYSTAL_PATH=src \
+   CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+   insinto /usr/$(get_libdir)/crystal
+   doins -r src/.
+   dobin .build/crystal
+
+   insinto /usr/share/zsh/site-functions
+   newins etc/completion.zsh _crystal
+
+   use examples && dodoc -r samples
+
+   if use doc ; then
+   docinto api
+   dodoc -r doc/.
+   fi
+}

diff --git a/dev-lang/crystal/files/crystal-0.20.5-AR.patch 
b/dev-lang/crystal/files/crystal-0.20.5-AR.patch
new file mode 100644
index ..950bc23
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.20.5-AR.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile b/Makefile
+index dc675a0..1f53d40 100644
+--- a/Makefile
 b/Makefile
+@@ -118,3 +118,3 @@ $(LLVM_EXT_OBJ): $(LLVM_EXT_DIR)/llvm_ext.cc
+ $(LIB_CRYSTAL_TARGET): $(LIB_CRYSTAL_OBJS)
+-  ar -rcs $@ $^
++  $(AR) -rcs $@ $^
+ 

diff --git a/dev-lang/crystal/files/crystal-0.20.5-verbose.patch 
b/dev-lang/crystal/files/crystal-0.20.5-verbose.patch
new file mode 100644
index ..6a0a301
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.20.5-verbose.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile b/Makefile
+index 1f53d40..fa71479 100644
+--- a/Makefile
 b/Makefile
+@@ -24,3 +24,3 @@ SOURCES := $(shell find src -name '*.cr')
+ SPEC_SOURCES := $(shell find spec -name '*.cr')
+-FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if 
$(threads),--threads $(threads) )$(if $(debug),-d )
++FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if 
$(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose )
+ VERBOSE := $(if $(verbose),-v )