summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2016-09-16 09:27:02 +0200
committerMarek Szuba <marecki@gentoo.org>2016-09-16 09:30:10 +0200
commit3e110393b28c0219ccf70338d4e7bca81fa85b89 (patch)
tree3e5a466dc2abb66134634b8852e941d29eaf1ac9 /dev-libs/beignet
parentdev-ruby/mongo: drop ruby19 (diff)
downloadgentoo-3e110393b28c0219ccf70338d4e7bca81fa85b89.tar.gz
gentoo-3e110393b28c0219ccf70338d4e7bca81fa85b89.tar.bz2
gentoo-3e110393b28c0219ccf70338d4e7bca81fa85b89.zip
dev-libs/beignet: version bump to 1.2.0
Gentoo-Bug: 593596 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.2.0.ebuild96
-rw-r--r--dev-libs/beignet/files/beignet-1.2.0_no-hardcoded-cflags.patch12
3 files changed, 109 insertions, 0 deletions
diff --git a/dev-libs/beignet/Manifest b/dev-libs/beignet/Manifest
index 459031629d98..556d8804f6bb 100644
--- a/dev-libs/beignet/Manifest
+++ b/dev-libs/beignet/Manifest
@@ -1 +1,2 @@
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
diff --git a/dev-libs/beignet/beignet-1.2.0.ebuild b/dev-libs/beignet/beignet-1.2.0.ebuild
new file mode 100644
index 000000000000..0814fe1e3710
--- /dev/null
+++ b/dev-libs/beignet/beignet-1.2.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_BUILD_TYPE="Release"
+
+inherit python-any-r1 cmake-multilib toolchain-funcs
+
+DESCRIPTION="OpenCL implementation for Intel GPUs"
+HOMEPAGE="https://01.org/beignet"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+
+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
+ >=sys-devel/llvm-3.5
+ x11-libs/libdrm[video_cards_intel]
+ x11-libs/libXext
+ x11-libs/libXfixes"
+RDEPEND="${COMMON}
+ app-eselect/eselect-opencl"
+DEPEND="${COMMON}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/no-debian-multiarch.patch
+ "${FILESDIR}"/${P}_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() {
+ 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}"
+ )
+
+ 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.2.0_no-hardcoded-cflags.patch b/dev-libs/beignet/files/beignet-1.2.0_no-hardcoded-cflags.patch
new file mode 100644
index 000000000000..3f9875930b50
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.2.0_no-hardcoded-cflags.patch
@@ -0,0 +1,12 @@
+--- a/CMakeLists.txt 2016-08-30 10:06:31.000000000 +0000
++++ b/CMakeLists.txt 2016-09-16 06:55:28.975772954 +0000
+@@ -89,8 +89,7 @@
+ elseif (COMPILER STREQUAL "ICC")
+ set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -wd2928 -Wall -fPIC -fstrict-aliasing -fp-model fast -msse4.1 -Wl,-E")
+ endif ()
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof")
+-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_CXX_FLAGS}")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof")
+ set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DGBE_DEBUG=1")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG -DGBE_DEBUG=0")