dev-util/intel-graphics-compiler: bump to version 1.0.4 and EAPI-7
authorMarek Szuba <marecki@gentoo.org>
Fri, 24 May 2019 10:31:46 +0000 (11:31 +0100)
committerMarek Szuba <marecki@gentoo.org>
Fri, 24 May 2019 10:33:20 +0000 (11:33 +0100)
Moreover, explicitly reject the use of gcc-9+ because they are known to
fail.

Bug: https://bugs.gentoo.org/685790
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

dev-util/intel-graphics-compiler/Manifest
dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4.ebuild [new file with mode: 0644]

index 74cb134a495df1264a48d5953498c8cf22b1ce4b..7c277441e4682a468e43c9cf534901c9f88e7882 100644 (file)
@@ -1 +1,2 @@
 DIST intel-graphics-compiler-1.0.3.tar.gz 6721202 BLAKE2B 2934778e931a4b38a239ede5944757cc42c0a965e700ba471272ba8e9ca08b1c1c790c920ed6896a870985b1d2819a182a9aaf5a5a8cbfc13038ecd7cf1def1e SHA512 c0c0cc21263b71bc57aed43a3e8bd641ea7853db0a574823a70abb592a69b7f8a9f426e88e7fddea4cf6a14de44e064f80abcfa3ea709701e5003e0d4b7adfb0
+DIST intel-graphics-compiler-1.0.4.tar.gz 6720515 BLAKE2B 2f9ac9a2435bac785b6a9f3cb8c63eb570ee1a87eca9682fa1c09363f5da3b258e22ad1c5b1628a1537b36afb7c6f6e66f2052b31ef7fdff0bc43cf67fad55ba SHA512 0b748b33c4c1822d8fb159dbbbeb35f0573d3eb464e3be0a94771069e47a019d6cbe878d2d2a1969ec87b051d62ff2f77db88b02238e9a74d8f62fc71f07e264
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4.ebuild
new file mode 100644 (file)
index 0000000..2a30895
--- /dev/null
@@ -0,0 +1,45 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib llvm toolchain-funcs
+
+DESCRIPTION="LLVM-based OpenCL compiler targetting Intel Gen graphics hardware"
+HOMEPAGE="https://github.com/intel/intel-graphics-compiler"
+SRC_URI="https://github.com/intel/${PN}/archive/igc-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+COMMON="sys-devel/llvm:8=[${MULTILIB_USEDEP}]
+       dev-libs/opencl-clang:8=[${MULTILIB_USEDEP}]"
+DEPEND="${COMMON}"
+RDEPEND="${COMMON}"
+
+LLVM_MAX_SLOT=8
+
+S="${WORKDIR}"/${PN}-igc-${PV}
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != "binary" ]]; then
+               if tc-is-gcc && [[ $(gcc-major-version) -ge 9 ]]; then
+                       # Bug #685790
+                       eerror "Compilation with gcc-9+ is not supported yet. Switch to an older version and try again."
+                       die "Tried to use too new gcc."
+               fi
+       fi
+}
+
+multilib_src_configure() {
+       local mycmakeargs=(
+               -DCCLANG_BUILD_INTREE_LLVM=OFF
+               -DCMAKE_LIBRARY_PATH=$(get_llvm_prefix)/$(get_libdir)
+               -DIGC_OPTION__FORCE_SYSTEM_LLVM=ON
+               -DIGC_PREFERRED_LLVM_VERSION=8
+               # Until a new official release of opencl-clang
+               -DCOMMON_CLANG_LIBRARY_NAME=common_clang
+       )
+       cmake-utils_src_configure
+}