From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2B783138330 for ; Fri, 2 Sep 2016 07:38:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C853921C07F; Fri, 2 Sep 2016 07:38:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 35D8021C07F for ; Fri, 2 Sep 2016 07:38:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C4D36340845 for ; Fri, 2 Sep 2016 07:38:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 58866245A for ; Fri, 2 Sep 2016 07:38:19 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1472801831.cd119cad371b2ddd61a50479eacf83e9f7f6efce.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/files/, dev-libs/beignet/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/beignet/Manifest dev-libs/beignet/beignet-1.1.2.ebuild dev-libs/beignet/files/llvm-empty-system-libs.patch dev-libs/beignet/files/llvm-terminfo.patch dev-libs/beignet/files/no-debian-multiarch.patch dev-libs/beignet/files/no-hardcoded-cflags.patch dev-libs/beignet/metadata.xml X-VCS-Directories: dev-libs/beignet/files/ dev-libs/beignet/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: cd119cad371b2ddd61a50479eacf83e9f7f6efce X-VCS-Branch: master Date: Fri, 2 Sep 2016 07:38:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b7fe4f03-dd36-49f1-877c-e25135e4b96e X-Archives-Hash: 13613138579bdf6294aa33aa230495d6 commit: cd119cad371b2ddd61a50479eacf83e9f7f6efce Author: Marek Szuba gentoo org> AuthorDate: Thu Sep 1 09:14:49 2016 +0000 Commit: Marek Szuba gentoo org> CommitDate: Fri Sep 2 07:37:11 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd119cad dev-libs/beignet: new package. An OpenCL implementation for Intel GPUs. Multilib-aware, tested with on amd64 with ABI_X86="32 64". Builds with both stable versions of sys-devel/llvm currently in Portage (3.5.0 and 3.7.1-r3). Tests provided by upstream are not run because they require permissions to access the GPU which the Portage user does not have. Gentoo-Bug: 545924 Package-Manager: portage-2.3.0 dev-libs/beignet/Manifest | 1 + dev-libs/beignet/beignet-1.1.2.ebuild | 96 ++++++++++++++++++++++ .../beignet/files/llvm-empty-system-libs.patch | 11 +++ dev-libs/beignet/files/llvm-terminfo.patch | 20 +++++ dev-libs/beignet/files/no-debian-multiarch.patch | 39 +++++++++ dev-libs/beignet/files/no-hardcoded-cflags.patch | 13 +++ dev-libs/beignet/metadata.xml | 8 ++ 7 files changed, 188 insertions(+) diff --git a/dev-libs/beignet/Manifest b/dev-libs/beignet/Manifest new file mode 100644 index 00000000..b8b6ac7 --- /dev/null +++ b/dev-libs/beignet/Manifest @@ -0,0 +1 @@ +DIST beignet-1.1.2.tar.gz 948241 SHA256 6a8d875afbb5e3c4fc57da1ea80f79abadd9136bfd87ab1f83c02784659f1d96 SHA512 25b7118976c385ad3b9db01afd3c9494ff9d050d44ee4266042abb4215747d8bb5086c06697f754956f562ea2b6e5ec51d51bbd651e8cd7cd0eb14eb8c83fbd4 WHIRLPOOL c3bfb7f4fa3c97bbd202ace868a08dce48753cac547b075e4c30cfff21cffcc5520ef4ef77b4e15fa8574a798f41a920e44503a160a1888e9ee4f2a737b37e82 diff --git a/dev-libs/beignet/beignet-1.1.2.ebuild b/dev-libs/beignet/beignet-1.1.2.ebuild new file mode 100644 index 00000000..2591bc8 --- /dev/null +++ b/dev-libs/beignet/beignet-1.1.2.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 + +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 -> ${P}.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} + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/no-debian-multiarch.patch + "${FILESDIR}"/no-hardcoded-cflags.patch + "${FILESDIR}"/llvm-terminfo.patch + "${FILESDIR}"/llvm-empty-system-libs.patch +) + +DOCS=( + docs/. +) + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]]; then + if [[ $(tc-getCC) == *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" + 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/llvm-empty-system-libs.patch b/dev-libs/beignet/files/llvm-empty-system-libs.patch new file mode 100644 index 00000000..d5e0cd7 --- /dev/null +++ b/dev-libs/beignet/files/llvm-empty-system-libs.patch @@ -0,0 +1,11 @@ +--- a/CMake/FindLLVM.cmake 2015-12-18 06:39:59.000000000 +0000 ++++ b/CMake/FindLLVM.cmake 2016-08-31 15:05:11.210679204 +0000 +@@ -99,7 +99,7 @@ + OUTPUT_VARIABLE LLVM_SYSTEM_LIBS_ORIG + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +-string(REGEX REPLACE " *\n" "" LLVM_SYSTEM_LIBS ${LLVM_SYSTEM_LIBS_ORIG}) ++string(REGEX REPLACE " *\n" "" LLVM_SYSTEM_LIBS "${LLVM_SYSTEM_LIBS_ORIG}") + endif (LLVM_VERSION_NODOT VERSION_GREATER 34) + + macro(add_one_lib name) diff --git a/dev-libs/beignet/files/llvm-terminfo.patch b/dev-libs/beignet/files/llvm-terminfo.patch new file mode 100644 index 00000000..afbbc26 --- /dev/null +++ b/dev-libs/beignet/files/llvm-terminfo.patch @@ -0,0 +1,20 @@ +--- a/backend/src/CMakeLists.txt 2015-12-18 07:40:03.000000000 +0100 ++++ b/backend/src/CMakeLists.txt 2016-08-01 13:44:31.475875150 +0200 +@@ -153,7 +153,7 @@ + + add_library(gbeinterp SHARED gbe_bin_interpreter.cpp) + +-if (LLVM_VERSION_NODOT VERSION_EQUAL 34) ++if (NOT (LLVM_VERSION_NODOT LESS 34)) + find_library(TERMINFO NAMES tinfo ncurses) + if (${TERMINFO} STREQUAL TERMINFO-NOTFOUND) + message(FATAL_ERROR "no libtinfo or libncurses is found in system") +@@ -161,7 +161,7 @@ + target_link_libraries(gbe ${TERMINFO}) + message(STATUS "use ${TERMINFO} as terminal control library") + endif (${TERMINFO} STREQUAL TERMINFO-NOTFOUND) +-endif(LLVM_VERSION_NODOT VERSION_EQUAL 34) ++endif(NOT (LLVM_VERSION_NODOT LESS 34)) + + link_directories (${LLVM_LIBRARY_DIR} ${DRM_LIBDIR}) + diff --git a/dev-libs/beignet/files/no-debian-multiarch.patch b/dev-libs/beignet/files/no-debian-multiarch.patch new file mode 100644 index 00000000..c9aef4d --- /dev/null +++ b/dev-libs/beignet/files/no-debian-multiarch.patch @@ -0,0 +1,39 @@ +--- a/CMakeLists.txt 2015-04-17 04:27:51.000000000 +0200 ++++ b/CMakeLists.txt 2015-05-20 20:59:17.895041760 +0200 +@@ -39,14 +39,9 @@ + + SET(CMAKE_VERBOSE_MAKEFILE "false") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/") +-INCLUDE (GNUInstallDirs OPTIONAL) +-# support old CMake without GNUInstallDirs +-if (NOT CMAKE_INSTALL_FULL_LIBDIR) +- set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib") +- set (BEIGNET_LIBRARY_ARCHITECTURE "") +-else (NOT CMAKE_INSTALL_FULL_LIBDIR) +- set (BEIGNET_LIBRARY_ARCHITECTURE "${CMAKE_LIBRARY_ARCHITECTURE}") +-endif (NOT CMAKE_INSTALL_FULL_LIBDIR) ++ ++set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib") ++set (BEIGNET_LIBRARY_ARCHITECTURE "") + + if (NOT LIB_INSTALL_DIR) + set (LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}") +@@ -55,17 +50,7 @@ + set (BEIGNET_INSTALL_DIR "${LIB_INSTALL_DIR}/beignet/") + endif (NOT BEIGNET_INSTALL_DIR) + +-# allow co-installation of 32- and 64-bit versions: +-# https://wiki.debian.org/Multiarch +-if (BEIGNET_INSTALL_DIR STREQUAL "${CMAKE_INSTALL_PREFIX}/lib/beignet/") +- set (ICD_FILE_NAME "intel-beignet.icd") +-else (BEIGNET_INSTALL_DIR STREQUAL "${CMAKE_INSTALL_PREFIX}/lib/beignet/") +- if (BEIGNET_LIBRARY_ARCHITECTURE STREQUAL "") +- set (ICD_FILE_NAME "intel-beignet.icd") +- else (BEIGNET_LIBRARY_ARCHITECTURE STREQUAL "") +- set (ICD_FILE_NAME "intel-beignet-${BEIGNET_LIBRARY_ARCHITECTURE}.icd") +- endif (BEIGNET_LIBRARY_ARCHITECTURE STREQUAL "") +-endif (BEIGNET_INSTALL_DIR STREQUAL "${CMAKE_INSTALL_PREFIX}/lib/beignet/") ++set (ICD_FILE_NAME "intel-beignet.icd") + + # Force Release with debug info + if (NOT CMAKE_BUILD_TYPE) diff --git a/dev-libs/beignet/files/no-hardcoded-cflags.patch b/dev-libs/beignet/files/no-hardcoded-cflags.patch new file mode 100644 index 00000000..3dd67b7 --- /dev/null +++ b/dev-libs/beignet/files/no-hardcoded-cflags.patch @@ -0,0 +1,13 @@ +--- a/CMakeLists.txt 2016-08-31 17:13:26.000000000 +0000 ++++ b/CMakeLists.txt 2016-08-31 17:00:40.000000000 +0000 +@@ -70,8 +70,8 @@ + 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_C_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof") +-set (CMAKE_C_FLAGS "${CMAKE_C_CXX_FLAGS}") ++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof") ++set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + 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") diff --git a/dev-libs/beignet/metadata.xml b/dev-libs/beignet/metadata.xml new file mode 100644 index 00000000..3e5026e --- /dev/null +++ b/dev-libs/beignet/metadata.xml @@ -0,0 +1,8 @@ + + + + + marecki@gentoo.org + Marek Szuba + +