Skip to content

Commit

Permalink
sys-devel/flang: initial commit
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.5, Repoman-2.3.1
  • Loading branch information
junghans committed Jun 6, 2017
1 parent 6aecb93 commit 665fe62
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
42 changes: 42 additions & 0 deletions sys-devel/flang/flang-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit cmake-utils git-r3

DESCRIPTION="A Fortran compiler targeting LLVM"
HOMEPAGE="https://github.com/flang-compiler/flang"
EGIT_REPO_URI="git://github.com/flang-compiler/flang.git
https://github.com/flang-compiler/flang.git"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS=""
IUSE=""

DEPEND="=sys-devel/clang-4.0*[flang(-)]"
RDEPEND="${DEPEND}"

src_prepare() {
default

#https://github.com/flang-compiler/flang/pull/88
#https://github.com/flang-compiler/flang/pull/85
sed -e '/set(LLVM_CMAKE_PATH/s/)$/ CACHE PATH "Allow of override"&/' \
-e 's/-Werror//' -i CMakeLists.txt
}

src_configure() {
local -x CC=$(type -p ${CHOST}-clang)
local -x CXX=$(type -p ${CHOST}-clang++)
local -x FC=$(type -p flang)

local mycmakeargs=(
-DTARGET_ARCHITECTURE=$(uname -m) #https://github.com/flang-compiler/flang/pull/83
-DTARGET_OS=$(uname -s) #https://github.com/flang-compiler/flang/pull/86
-DLLVM_CMAKE_PATH="${EPREFIX}"/usr/$(get_libdir)/llvm/4/$(get_libdir)/cmake/llvm
)

cmake-utils_src_configure
}
7 changes: 7 additions & 0 deletions sys-devel/flang/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
</pkgmetadata>

0 comments on commit 665fe62

Please sign in to comment.