summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2017-01-25 15:50:30 +0100
committerMarek Szuba <marecki@gentoo.org>2017-01-25 15:51:07 +0100
commit40454aa7ee06f6f6bab999d9a23a29a3c2cce096 (patch)
tree79dec7680bc9c1d3f797609dd7c27ae523481792 /dev-libs/beignet
parentdev-php/twig: new version 1.31.0. (diff)
downloadgentoo-40454aa7ee06f6f6bab999d9a23a29a3c2cce096.tar.gz
gentoo-40454aa7ee06f6f6bab999d9a23a29a3c2cce096.tar.bz2
gentoo-40454aa7ee06f6f6bab999d9a23a29a3c2cce096.zip
dev-libs/beignet: bump to 1.3.0
Features optional OpenCL 2.0 support on Skylake and newer architectures (mostly experimental, with large parts still simulated in software rather than delegated to the GPU), moreover Python scripts executed at build time are now python3-compatible. Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-libs/beignet')
-rw-r--r--dev-libs/beignet/Manifest1
-rw-r--r--dev-libs/beignet/beignet-1.3.0.ebuild105
-rw-r--r--dev-libs/beignet/files/beignet-1.3.0-ocl20_no_platform_check.patch21
-rw-r--r--dev-libs/beignet/files/beignet-1.3.0-oclicd_optional_gentoo.patch23
-rw-r--r--dev-libs/beignet/metadata.xml2
5 files changed, 152 insertions, 0 deletions
diff --git a/dev-libs/beignet/Manifest b/dev-libs/beignet/Manifest
index a004d8bcddba..5319fe670ac7 100644
--- a/dev-libs/beignet/Manifest
+++ b/dev-libs/beignet/Manifest
@@ -1,3 +1,4 @@
DIST beignet-1.1.2-source.tar.gz 948241 SHA256 6a8d875afbb5e3c4fc57da1ea80f79abadd9136bfd87ab1f83c02784659f1d96 SHA512 25b7118976c385ad3b9db01afd3c9494ff9d050d44ee4266042abb4215747d8bb5086c06697f754956f562ea2b6e5ec51d51bbd651e8cd7cd0eb14eb8c83fbd4 WHIRLPOOL c3bfb7f4fa3c97bbd202ace868a08dce48753cac547b075e4c30cfff21cffcc5520ef4ef77b4e15fa8574a798f41a920e44503a160a1888e9ee4f2a737b37e82
DIST beignet-1.2.0-source.tar.gz 1076674 SHA256 fc7af19efb7596b04510d26c558a576eba3e95e1ef86fd6951213c6a4bf58bff SHA512 f6c0de7d6a301352125d53c843d8c4a9728526b06b215093424720e7c17eb99f8cfc4b70c61e035d5cb36ca7666c6e772fe0d7818d91421104fa1ed350d637f1 WHIRLPOOL 9ac0195b16ff0ed186dbc5e0bfb6ee3027d0426d7e2401238b69b934a010d365eb6941cd80e3650e600cbcac8d31f819e2adb67452394b07a903aad72c1e11d7
DIST beignet-1.2.1-source.tar.gz 1080590 SHA256 b74eb03534a12b86a896cdbd8209b072c8a38e7af456195793a498428a7ac81f SHA512 f0d0d0590be1624928d9ee1a0666f49d908eff1ee9c1a7a28c4e680523419e544f607899bcfdae7f4ce5d32d411739afb481c0c22383db4a7381ccc71326e7f2 WHIRLPOOL 74bb72220e865406100a232fd8755b37746acf3616adbc7c66389a7a7ef3d7ca959ea1234d167091161019c1c3fc0fb9b877fc70af695bd2d2bb232c83725322
+DIST beignet-1.3.0-source.tar.gz 1133643 SHA256 63d98b4fe8fba3dbc0299d29fef84560625e5ac51b16b8fed453021d4afb5cd5 SHA512 7eb3c8bca484462787a6b4d360059b63608305b171e33078f1b65dcbcbf6831bcca95e762af3f4f0b9c99449c7d607e63ea138149b9f3a854d7017df927aa7ee WHIRLPOOL cbaa92f67a5f53b3d3243dd08c9a680c734b732601667a40ba147023fa96c0b4f78794f76011ab172c66265ad4bf0eddd5b6b301fc0a67790dc3d30c23d7ec83
diff --git a/dev-libs/beignet/beignet-1.3.0.ebuild b/dev-libs/beignet/beignet-1.3.0.ebuild
new file mode 100644
index 000000000000..e06da218c71a
--- /dev/null
+++ b/dev-libs/beignet/beignet-1.3.0.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+CMAKE_BUILD_TYPE="Release"
+
+inherit python-any-r1 cmake-multilib flag-o-matic toolchain-funcs
+
+DESCRIPTION="OpenCL implementation for Intel GPUs"
+HOMEPAGE="https://01.org/beignet"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE="ocl-icd ocl20"
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.freedesktop.org/beignet"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
+ S=${WORKDIR}/Beignet-${PV}-Source
+fi
+
+COMMON="${PYTHON_DEPS}
+ media-libs/mesa
+ sys-devel/clang
+ ocl20? ( >=sys-devel/llvm-3.9 >=sys-devel/llvm-3.6 )
+ >=x11-libs/libdrm-2.4.70[video_cards_intel]
+ x11-libs/libXext
+ x11-libs/libXfixes"
+RDEPEND="${COMMON}
+ app-eselect/eselect-opencl"
+DEPEND="${COMMON}
+ ${PYTHON_DEPS}
+ ocl-icd? ( dev-libs/ocl-icd )
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/no-debian-multiarch.patch
+ "${FILESDIR}"/${P}-ocl20_no_platform_check.patch
+ "${FILESDIR}"/${P}-oclicd_optional_gentoo.patch
+ "${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
+ "${FILESDIR}"/llvm-terminfo.patch
+)
+
+DOCS=(
+ docs/.
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if tc-is-gcc; then
+ if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
+ eerror "Compilation with gcc older than 4.6 is not supported"
+ die "Too old gcc found."
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ python_setup
+}
+
+src_prepare() {
+ # See Bug #593968
+ append-flags -fPIC
+
+ cmake-utils_src_prepare
+ # We cannot run tests because they require permissions to access
+ # the hardware, and building them is very time-consuming.
+ cmake_comment_add_subdirectory utests
+}
+
+multilib_src_configure() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${VENDOR_DIR}"
+ -DOCLICD_COMPAT=$(usex ocl-icd)
+ -DENABLE_OPENCL_20=$(usex ocl20)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ cmake-utils_src_install
+
+ insinto /etc/OpenCL/vendors/
+ echo "${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
+ doins "${PN}-${ABI}.icd"
+
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
+}
diff --git a/dev-libs/beignet/files/beignet-1.3.0-ocl20_no_platform_check.patch b/dev-libs/beignet/files/beignet-1.3.0-ocl20_no_platform_check.patch
new file mode 100644
index 000000000000..d7cd8ed72381
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.3.0-ocl20_no_platform_check.patch
@@ -0,0 +1,21 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -215,18 +215,6 @@
+
+ OPTION(ENABLE_OPENCL_20 "Enable opencl 2.0 support" OFF)
+ IF (ENABLE_OPENCL_20)
+- Find_Program(LSPCI lspci)
+- IF (NOT LSPCI)
+- MESSAGE(FATAL_ERROR "Looking for lspci - not found")
+- ENDIF (NOT LSPCI)
+- EXECUTE_PROCESS(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/GetGenID.sh"
+- RESULT_VARIABLE SUPPORT_OCL20_DEVICE
+- OUTPUT_VARIABLE PCI_ID_NOT_USED)
+-
+- IF (NOT SUPPORT_OCL20_DEVICE EQUAL 1)
+- MESSAGE(FATAL_ERROR "Only SKL and newer devices support OpenCL 2.0 now, your device don't support.")
+- ENDIF (NOT SUPPORT_OCL20_DEVICE EQUAL 1)
+-
+ IF (NOT HAVE_DRM_INTEL_BO_SET_SOFTPIN)
+ MESSAGE(FATAL_ERROR "Please update libdrm to version 2.4.66 or later to enable OpenCL 2.0.")
+ ENDIF (NOT HAVE_DRM_INTEL_BO_SET_SOFTPIN)
diff --git a/dev-libs/beignet/files/beignet-1.3.0-oclicd_optional_gentoo.patch b/dev-libs/beignet/files/beignet-1.3.0-oclicd_optional_gentoo.patch
new file mode 100644
index 000000000000..b51af1617173
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.3.0-oclicd_optional_gentoo.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -197,17 +197,15 @@
+ ENDIF(EGL_FOUND)
+ ENDIF(ENABLE_GL_SHARING)
+
++OPTION(OCLICD_COMPAT "OCL ICD compatibility mode" ON)
++IF(OCLICD_COMPAT)
+ Find_Package(OCLIcd)
+ IF(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - found")
+- configure_file (
+- "intel-beignet.icd.in"
+- "${ICD_FILE_NAME}"
+- )
+- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION /etc/OpenCL/vendors)
+ ELSE(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - not found")
+ ENDIF(OCLIcd_FOUND)
++ENDIF(OCLICD_COMPAT)
+
+ Find_Package(PythonInterp)
+
diff --git a/dev-libs/beignet/metadata.xml b/dev-libs/beignet/metadata.xml
index 27418e8288f7..917f7f9527a5 100644
--- a/dev-libs/beignet/metadata.xml
+++ b/dev-libs/beignet/metadata.xml
@@ -8,5 +8,7 @@
<use>
<flag name="ocl-icd">Enable compatibility with the
<pkg>dev-libs/ocl-icd</pkg> OpenCL ICD loader</flag>
+ <flag name="ocl20">Enable experimental OpenCL 2.0 support on Skylake
+ and newer architectures</flag>
</use>
</pkgmetadata>