Skip to content
Permalink
Browse files

Add dev-lang/pony-0.25.0 ebuild (credit: stefantalpalaru)

Keyword ~arm64 also
  • Loading branch information...
sakaki- committed Jan 11, 2019
1 parent e6d5283 commit e10cf8a459ec1b64f7819ea7a3fa5042713087b9
Showing with 72 additions and 0 deletions.
  1. +1 −0 dev-lang/pony/Manifest
  2. +8 −0 dev-lang/pony/metadata.xml
  3. +63 −0 dev-lang/pony/pony-0.25.0.ebuild
@@ -0,0 +1 @@
DIST pony-0.25.0.tar.gz 1378042 BLAKE2B ba20649a57f16fee3ed3230de200e31b067261b82d07a5bf11c5723594c20d0c0050f94a27d050727fbafda50bb764e74ce7d404965d87b1a42a5139b4935dad SHA512 3f284e5eb9020c55837ba3033de87e6cfa494566a86d8e85cd6cd41136b8a85513bd0e2618d7610ee10c0a59485a811e7ee62b398b95bff8c5c99a445a1730d3
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>stefantalpalaru@yahoo.com</email>
<name>Ștefan Talpalaru</name>
</maintainer>
</pkgmetadata>
@@ -0,0 +1,63 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit llvm
LLVM_MAX_SLOT=6

DESCRIPTION="Compiler for the Pony language"
HOMEPAGE="http://www.ponylang.org/"
SRC_URI="https://github.com/ponylang/ponyc/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test vim-syntax"
RESTRICT="strip"

RDEPEND="dev-libs/libpcre2
dev-libs/openssl:=
>=sys-devel/llvm-3.9.1:=
<sys-devel/llvm-7.0.0:=
sys-libs/ncurses:=
sys-libs/zlib
vim-syntax? ( app-vim/pony-syntax )"
DEPEND="${RDEPEND}
virtual/pkgconfig"

S="${WORKDIR}/ponyc-${PV}"

src_prepare() {
default
# bug #457530 means that '-ltinfo' might be needed besides '-lncurses' if a USE flag is enabled
# for sys-libs/ncurses, so we use pkg-config to get the ncurses libs
sed -i \
-e 's/-Werror//' \
-e 's/-O3//' \
-e 's/LINKER_FLAGS =/LINKER_FLAGS = $(LDFLAGS)/' \
-e 's/-march=$(arch)/$(CFLAGS)/' \
-e 's/-mtune=$(tune)//' \
-e 's#ln -sf $(destdir)#ln -sf ../lib/pony/$(tag)#' \
-e "s#-lncurses#$(pkg-config ncurses --libs)#" \
Makefile

gcc_lib_dir="$(gcc-config -L | cut -d ':' -f 1)"
sed -i \
-e "s#/lib/x86_64-linux-gnu#${gcc_lib_dir}#" \
src/libponyc/codegen/genexe.c
}

common_make_args="config=release prefix=\"${D}usr\" verbose=yes default_pic=true"

src_compile() {
emake ${common_make_args}
}

src_test() {
emake ${common_make_args} test
}

src_install() {
emake ${common_make_args} install
}

0 comments on commit e10cf8a

Please sign in to comment.
You can’t perform that action at this time.