Skip to content

Commit

Permalink
dev-lang/crystal: bump up to 0.31.1
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <[email protected]>
  • Loading branch information
Sergei Trofimovich committed Sep 30, 2019
1 parent a8ae9b8 commit 826b2a9
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev-lang/crystal/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ DIST crystal-0.30.1.tar.gz 2153037 BLAKE2B e5cb2d49688aba75f684ea9fea7e6b0e85eb1
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
DIST crystal-0.31.1-1-linux-i686.tar.gz 28667084 BLAKE2B 50964072d9335f96effce812cd261760dd308ee50628a47e2694f0a34b6dce210d5a00b978b0537bcd24cc2fc6dd82637c05dc0596ba0322e1297b97ea14bc78 SHA512 2353d10bce6983459afae526b516290eba44e2d6b5943911b8da657a36a0bbd422bd4efe61f2205e178355a2898e90ac9927c64ffba1e8edae4615a01ea9ad40
DIST crystal-0.31.1-1-linux-x86_64.tar.gz 26998394 BLAKE2B 37ecfe9f130b1e9e52686c52474fcef599a348a7d9f1885c3fe41302a1d6d760ada5a153978397c7ec43b2bb4442bb3fc1c2f8d5eed9b4141858455673170544 SHA512 433ac13f9f541dd5b58c1db5e063e23058a87ed325cabc0a4165c42edf18a5f9f126ea4e1d9627357d47c5e3f392131e1f7aab22c34dce3b02e3fdca49658b5b
DIST crystal-0.31.1.tar.gz 2191156 BLAKE2B 072e14fed34cc411cd6d9a57b8c5184e5974257869ef41f9bd12401ab473186f699bfbac438af97dd8e4e8cf749ebdbf35050882e9dc14be75392d50763902a8 SHA512 d44ce5653aa2877d85685bd897888cd7675eb02897363f71627ac19589447889af8e73a1d8acb2108e0356939cd515022fd2b92d019014714428d92666ad0f37
121 changes: 121 additions & 0 deletions dev-lang/crystal/crystal-0.31.1.ebuild
Original file line number Diff line number Diff line change
@@ -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 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}
}

0 comments on commit 826b2a9

Please sign in to comment.