From ca9627e70852f6b2e835660df870fe3ab405882d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 1 Sep 2019 00:00:32 +0200 Subject: Initial import --- dev-libs/pocl/Manifest | 6 ++++ .../pocl/files/vendor_opencl_libs_location.epatch | 21 ++++++++++++ dev-libs/pocl/pocl-1.1.ebuild | 25 ++++++++++++++ dev-libs/pocl/pocl-1.2.ebuild | 35 +++++++++++++++++++ dev-libs/pocl/pocl-9999.ebuild | 40 ++++++++++++++++++++++ 5 files changed, 127 insertions(+) create mode 100644 dev-libs/pocl/Manifest create mode 100644 dev-libs/pocl/files/vendor_opencl_libs_location.epatch create mode 100644 dev-libs/pocl/pocl-1.1.ebuild create mode 100644 dev-libs/pocl/pocl-1.2.ebuild create mode 100644 dev-libs/pocl/pocl-9999.ebuild (limited to 'dev-libs/pocl') diff --git a/dev-libs/pocl/Manifest b/dev-libs/pocl/Manifest new file mode 100644 index 0000000..a1b33dc --- /dev/null +++ b/dev-libs/pocl/Manifest @@ -0,0 +1,6 @@ +AUX vendor_opencl_libs_location.epatch 1099 SHA256 1a5d416b3af501566742f29285985e58e1ab7169e76a347cf5007e34fd7c5cfb SHA512 8309619b6a232dab53f9fb40925f6925671a8a40754c7f8626a0edad69e84bcde7c4222513752aa6c7516cd9b65bb0164d816ac76d6c4254563b0f893fda7685 WHIRLPOOL a0488f0c5006ada32e70e0b5de4ed1b0c881f54daaeb600f03df64851e938fc4b8860fcaa65ca00e5d67f359060318b4f9d467780817fe7456766910efcec150 +DIST pocl-1.1.tar.gz 1545659 SHA256 1e8dd0693a88c84937754df947b202871a40545b1b0a97ebefa370b0281c3c53 SHA512 f785d1a8bbceab86ae220c0c78dc81fc292333ac30bc02cf627aca02d9efc9f659d97c26c227e7ba66fa56d8abdcb23df2d100e5bc4d5c670c48646edefa19af WHIRLPOOL a8ec064447922e78ccf555d6267ef9b76fcac962f271a724fb6f2900f51cf37680c1e905e9f9394b293497a249b7fd2e07fcf5f1b676ade0a8889e3aef4038cf +DIST pocl-1.2.tar.gz 1603374 SHA256 0c43e68f336892f3a64cba19beb99d9212f529bedb77f7879c0331450b982d46 SHA512 c765fe02f220f707d2e46edfb2782195dc987bd984aeb7f3d14dd767cd96944ffba85c7276415f7b4471de5d1a9c9a0d3ed4285c1c3955ef581aa935a5a0eaa0 WHIRLPOOL a01a2bb953823aaaeefbf551159e473f3b081bdf7dbb23890652011520525d5f80d2f5ece6e68c08db5bc1c66cdbef45f492675b15de1e0f408545c277d06869 +EBUILD pocl-1.1.ebuild 585 SHA256 321d205aba0fe4c2bb3b7f0d481b3e32f3477b608b480b5c56ca86ef6c923242 SHA512 f6b5f74b2b87185c926dbf5e87c779270604f65f7ec5271936f1bfbe7151f1bd8a42ebfe247ee78f0588eaa56ddc3df28ea2981dc7418189023c9c17f0e4a311 WHIRLPOOL 52668e8110c1e33fc2cd5cb8101f57f89e1fa48bcd10ae31b5e9be564b761393f49383bb2d8eb98c1313b4e8fcba08acc27553cece45bd7db84c30d3e109f5f1 +EBUILD pocl-1.2.ebuild 731 SHA256 275476b21a3a380727642077ede7e4a42d8016d07459e70cd4b5581aec3ad31e SHA512 d6d1d85a32b9cc1cf79f6a6f72c4346b13a8434238facbe2fa90b29807921073e778c3c7b3f430838c926a9a77a36d049d1c54bc6e740c114a0ce2a077e53bb5 WHIRLPOOL d941e5922a3c927e389e8e0f0f1d5a294f8908e7c2575a33f8426ee0f0bc7c759ffd526add81e85ea69af3282fbe02e7f9fec7e9365cb46c1b7c694c69f3163e +EBUILD pocl-9999.ebuild 941 SHA256 dd9219c2be651e9dff6fa28c2df45932c2ca4db4a38902471864c9c95c9cf134 SHA512 d7a80b2b7685d505b66a6f4971a11c1321eac8c062112869d86fa426b4de4f1ce9e655227960362b6f2361bf6f6e46684722291113513514559c27d571bc76db WHIRLPOOL 408e3190f496971bbe63c5e367f72651e2a4679ae29a4270d600ff59733bdf99d145f7917d54bc0a45725941ba43e35d30c43998d67f995f689e79bc0bc7eab4 diff --git a/dev-libs/pocl/files/vendor_opencl_libs_location.epatch b/dev-libs/pocl/files/vendor_opencl_libs_location.epatch new file mode 100644 index 0000000..22fb86c --- /dev/null +++ b/dev-libs/pocl/files/vendor_opencl_libs_location.epatch @@ -0,0 +1,21 @@ +diff -Nurb a/pocl-0.14/CMakeLists.txt b/pocl-0.14/CMakeLists.txt +--- a/CMakeLists.txt 2017-04-05 16:15:40.000000000 +0200 ++++ b/CMakeLists.txt 2017-04-16 23:34:32.422414270 +0200 +@@ -125,7 +125,7 @@ + endif() + + # for libpocl.so +-set(POCL_INSTALL_PUBLIC_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH "POCL public libdir") ++set(POCL_INSTALL_PUBLIC_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/OpenCL/vendors/pocl" CACHE PATH "POCL public libdir") + + # for llvmopencl.so + set(POCL_INSTALL_PRIVATE_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pocl" CACHE PATH "POCL private libdir") +@@ -134,7 +134,7 @@ + if(UNIX AND NOT CMAKE_CROSSCOMPILING AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(POCL_INSTALL_ICD_VENDORDIR "/etc/OpenCL/vendors" CACHE PATH "POCL ICD file destination") + else() +- set(POCL_INSTALL_ICD_VENDORDIR "${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors" CACHE PATH "POCL ICD file destination") ++ set(POCL_INSTALL_ICD_VENDORDIR "${SYSCONFDIR}/etc/OpenCL/vendors" CACHE PATH "POCL ICD file destination") + endif() + + # for kernel-.bc diff --git a/dev-libs/pocl/pocl-1.1.ebuild b/dev-libs/pocl/pocl-1.1.ebuild new file mode 100644 index 0000000..4766d9b --- /dev/null +++ b/dev-libs/pocl/pocl-1.1.ebuild @@ -0,0 +1,25 @@ +EAPI="6" +inherit cmake-utils cmake-multilib versionator + +DESCRIPTION="Portable Computing Language" +HOMEPAGE="http://portablecl.org" + +PV_RC_SEPARATOR_FIXED=$(replace_version_separator '_' '-') +PV_FILE_FORMAT=${PV_RC_SEPARATOR_FIXED^^} +SRC_URI="https://github.com/pocl/pocl/archive/v${PV_FILE_FORMAT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${PV_FILE_FORMAT}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +RDEPEND=">=sys-devel/llvm-3.9 + sys-devel/clang + sys-apps/hwloc + " + +DEPEND="${RDEPEND}" + +PATCHES=("${FILESDIR}/vendor_opencl_libs_location.epatch" +) diff --git a/dev-libs/pocl/pocl-1.2.ebuild b/dev-libs/pocl/pocl-1.2.ebuild new file mode 100644 index 0000000..54f7111 --- /dev/null +++ b/dev-libs/pocl/pocl-1.2.ebuild @@ -0,0 +1,35 @@ +EAPI="6" +inherit cmake-utils cmake-multilib versionator + +DESCRIPTION="Portable Computing Language" +HOMEPAGE="http://portablecl.org" + +PV_RC_SEPARATOR_FIXED=$(replace_version_separator '_' '-') +PV_FILE_FORMAT=${PV_RC_SEPARATOR_FIXED^^} +SRC_URI="https://github.com/pocl/pocl/archive/v${PV_FILE_FORMAT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${PV_FILE_FORMAT}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +RDEPEND=">=sys-devel/llvm-6.0 + sys-devel/clang + sys-apps/hwloc + " + +DEPEND="${RDEPEND}" + +PATCHES=("${FILESDIR}/vendor_opencl_libs_location.epatch" +) + + +src_configure() { + local mycmakeargs=( + "-DENABLE_CUDA=ON" +# "-DENABLE_HSA=ON" + ) + + cmake-multilib_src_configure +} diff --git a/dev-libs/pocl/pocl-9999.ebuild b/dev-libs/pocl/pocl-9999.ebuild new file mode 100644 index 0000000..ae688c4 --- /dev/null +++ b/dev-libs/pocl/pocl-9999.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit git-r3 cmake-utils +#cmake-utils + +DESCRIPTION="PortableCL: opensource implementation of the OpenCL standard" +HOMEPAGE="http://portablecl.org/" +EGIT_REPO_URI="https://github.com/pocl/pocl.git" + +SLOT="0" +LICENSE="MIT" +KEYWORDS="" +IUSE="" + +RDEPEND="dev-libs/ocl-icd + >=sys-devel/llvm-4.0 + >=sys-devel/clang-4.0 + >=sys-apps/hwloc-1.0 + >=app-eselect/eselect-opencl-1.1.0-r4" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +POCL_DIR="/usr/$(get_libdir)/OpenCL/vendors/pocl" + +pkg_pretend() { + # Needs an OpenCL 1.2 ICD, mesa and nvidia are invalid + # Maybe ati works, feel free to add/fix if you can test + if [[ $(eselect opencl show) == 'ocl-icd' ]]; then + einfo "Valid OpenCL ICD set" + else + eerror "Please use a supported ICD:" + eerror "eselect opencl set ocl-icd" + die "OpenCL ICD not set to a supported value" + fi +} + -- cgit v1.2.3