Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pony-0.35.0.ebuild #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions dev-lang/pony/pony-0.35.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright 2014-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

CMAKE_MIN_VERSION=3.11
CMAKE_IN_SOURCE_BUILD=1

inherit cmake-utils git-r3

DESCRIPTION="Compiler for the Pony language"
HOMEPAGE="http://www.ponylang.org/"
EGIT_REPO_URI="https://github.com/ponylang/ponyc"
EGIT_COMMIT="${PV}"

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

RDEPEND="
sys-libs/zlib
vim-syntax? ( app-vim/pony-syntax )"
DEPEND="${RDEPEND}
sys-devel/clang
virtual/pkgconfig"

src_prepare() {
default
sed -i \
-e 's/-Werror//' \
CMakeLists.txt

sed -i \
-e "s/-DCMAKE_C_FLAGS=\"-march=\$(arch) -mtune=\$(tune)\"/-DCMAKE_C_FLAGS=\"${CFLAGS}\"/g" \
-e "s/-DCMAKE_CXX_FLAGS=\"-march=\$(arch) -mtune=\$(tune)\"/-DCMAKE_CXX_FLAGS=\"${CXXFLAGS}\"/g" \
-e 's/ln -s/ln -sr/g' \
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 verbose=yes"

src_configure() {
emake ${common_make_args} build_flags="${MAKEOPTS}" libs
emake ${common_make_args} build_flags="${MAKEOPTS}" configure
}

src_compile() {
emake ${common_make_args} build_flags="${MAKEOPTS}" build
}

src_test() {
emake ${common_make_args} build_flags="${MAKEOPTS}" test
}

src_install() {
emake ${common_make_args} build_flags="${MAKEOPTS}" prefix="${ED}usr" install
}