# Copyright 2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 DESCRIPTION="The GHDL VHDL simulator." HOMEPAGE="http://ghdl.free.fr/" SRC_URI=" https://github.com/ghdl/ghdl/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="gnat_2016 gnat_2017 +gnat_2018" DEPEND=" gnat_2016? ( dev-lang/gnat-gpl:4.9.4 ) gnat_2017? ( dev-lang/gnat-gpl:6.3.0 ) gnat_2018? ( dev-lang/gnat-gpl:7.3.1 ) sys-devel/llvm " RDEPEND="${DEPEND}" BDEPEND="" REQUIRED_USE="^^ ( gnat_2016 gnat_2017 gnat_2018 )" PATCHES=( "${FILESDIR}"/ghdl_configuration.patch ) src_configure() { if use gnat_2016; then GCC_PV=4.9.4 elif use gnat_2017; then GCC_PV=6.3.0 elif use gnat_2018; then GCC_PV=7.3.1 else eerror "Not sure what USE flags got here, but you must specify gnat_x" die fi GNATMAKE="gnatmake-${GCC_PV}" econf --with-llvm-config }