# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 : ${CMAKE_MAKEFILE_GENERATOR:=ninja} # (needed due to CMAKE_BUILD_TYPE != Gentoo) CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python2_7 ) inherit cmake-utils eapi7-ver flag-o-matic multilib-minimal \ multiprocessing pax-utils python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )" # Keep in sync with CMakeLists.txt ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 NVPTX PowerPC Sparc SystemZ X86 XCore ) ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) # Additional licenses: # 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. # 2. ARM backend: LLVM Software Grant by ARM. # 3. MD5 code: public-domain. # 4. Tests (not installed): # a. gtest: BSD. # b. YAML tests: MIT. LICENSE="UoI-NCSA rc BSD public-domain llvm_targets_ARM? ( LLVM-Grant )" SLOT="$(ver_cut 1)" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml kernel_Darwin ${ALL_LLVM_TARGETS[*]}" RESTRICT="!test? ( test )" RDEPEND=" sys-libs/zlib:0= exegesis? ( dev-libs/libpfm:= ) gold? ( >=sys-devel/binutils-2.22:*[cxx] ) libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) xar? ( app-arch/xar ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )" # configparser-3.2 breaks the build (3.3 or none at all are fine) DEPEND="${RDEPEND} dev-lang/perl || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) ) kernel_Darwin? ( =sys-devel/binutils-apple-5.1 ) doc? ( dev-python/sphinx ) gold? ( sys-libs/binutils-libs ) libffi? ( virtual/pkgconfig ) !!