From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/pocl/
Date: Sat, 26 Aug 2023 03:51:18 +0000 (UTC) [thread overview]
Message-ID: <1693017781.51d2f2ce2765f3974f89c5618e6a7132ac13f2d9.sam@gentoo> (raw)
commit: 51d2f2ce2765f3974f89c5618e6a7132ac13f2d9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 26 02:43:01 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 26 02:43:01 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51d2f2ce
dev-libs/pocl: add 4.0
Closes: https://bugs.gentoo.org/912675
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/pocl/Manifest | 1 +
dev-libs/pocl/pocl-4.0.ebuild | 112 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 113 insertions(+)
diff --git a/dev-libs/pocl/Manifest b/dev-libs/pocl/Manifest
index 014e89f51635..71518dab3615 100644
--- a/dev-libs/pocl/Manifest
+++ b/dev-libs/pocl/Manifest
@@ -1 +1,2 @@
DIST pocl-3.1.tar.gz 1928607 BLAKE2B 7044a96e361426408fabd973987a0d6956693e3c9095769ee94d7dac47a8841d7489933e94acd22451a1c8a2ca83cb8e6948aebe899b23a8a6080ef1b7b37e9c SHA512 40d17e81d715f6897aa1d97fd02834d45227d9d0bd4c70e76d727f9ad4df675c25b7158a862e20e63810182fdad82a3cb1e454668c3a6422a977e59c8325fa0c
+DIST pocl-4.0.tar.gz 2140919 BLAKE2B 1e9dd4de4824dd4a9e2b0d053d1786062c135d3bf7ca99dc884657b89c651fca6c0f3dedb568439802a58b0bfabc10939ca344b0110ae5fdb31be06f596d2a48 SHA512 3835a9e8fc8562d50a91a11b807cf87a096891f5c27675127b66412eacff2e541b6143b49b4155f43a09f4e53faa062ec20f3b20badeca206ece9f45ad50f26a
diff --git a/dev-libs/pocl/pocl-4.0.ebuild b/dev-libs/pocl/pocl-4.0.ebuild
new file mode 100644
index 000000000000..cce413824dc1
--- /dev/null
+++ b/dev-libs/pocl/pocl-4.0.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_MAX_SLOT=16
+inherit cmake llvm
+
+DESCRIPTION="Portable Computing Language (an implementation of OpenCL)"
+HOMEPAGE="http://portablecl.org https://github.com/pocl/pocl"
+SRC_URI="https://github.com/pocl/pocl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64"
+# TODO: hsa tce
+IUSE="accel +conformance cuda debug examples float-conversion hardening +hwloc memmanager lto test"
+# Tests not yet passing, fragile in Portage environment(?)
+RESTRICT="!test? ( test ) test"
+
+# TODO: add dependencies for cuda
+# Note: No := on LLVM because it pulls in Clang
+# see llvm.eclass for why
+CLANG_DEPS="
+ !cuda? ( <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):= )
+ cuda? ( <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):=[llvm_targets_NVPTX] )
+"
+RDEPEND="
+ dev-libs/libltdl
+ <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):*
+ virtual/opencl
+
+ ${CLANG_DEPS}
+ debug? ( dev-util/lttng-ust:= )
+ hwloc? ( sys-apps/hwloc:=[cuda?] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${CLANG_DEPS}
+ virtual/pkgconfig
+"
+
+llvm_check_deps() {
+ local usedep=$(usev cuda "[llvm_targets_NVPTX]")
+
+ # Clang is used at both build time (executed) and runtime
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}${usedep}" && \
+ has_version -r "sys-devel/clang:${LLVM_SLOT}${usedep}" && \
+ has_version -b "sys-devel/clang:${LLVM_SLOT}${usedep}"
+}
+
+src_configure() {
+ local host_cpu_variants="generic"
+
+ if use amd64 ; then
+ # Use pocl's curated list of CPU variants which should contain a good match for any given amd64 CPU
+ host_cpu_variants="distro"
+ elif use ppc64 ; then
+ # A selection of architectures in which new Altivec / VSX features were added
+ # This attempts to recreate the amd64 "distro" option for ppc64
+ # See discussion in bug #831859
+ host_cpu_variants="pwr10;pwr9;pwr8;pwr7;pwr6;g5;a2;generic"
+ fi
+
+ local mycmakeargs=(
+ -DENABLE_HSA=OFF
+
+ -DENABLE_ICD=ON
+ -DPOCL_ICD_ABSOLUTE_PATH=ON
+ -DPOCL_INSTALL_PUBLIC_LIBDIR="${EPREFIX}/usr/$(get_libdir)/OpenCL/vendors/pocl"
+
+ -DENABLE_IPO=$(usex lto)
+
+ -DENABLE_POCL_BUILDING=ON
+ -DKERNELLIB_HOST_CPU_VARIANTS="${host_cpu_variants}"
+
+ -DSTATIC_LLVM=OFF
+ -DWITH_LLVM_CONFIG=$(get_llvm_prefix -d "${LLVM_MAX_SLOT}")/bin/llvm-config
+
+ -DENABLE_ALMAIF_DEVICE=$(usex accel)
+ -DENABLE_CONFORMANCE=$(usex conformance)
+ -DENABLE_CUDA=$(usex cuda)
+ -DENABLE_HWLOC=$(usex hwloc)
+ -DENABLE_POCL_FLOAT_CONVERSION=$(usex float-conversion)
+ -DHARDENING_ENABLE=$(usex hardening)
+ -DPOCL_DEBUG_MESSAGES=$(usex debug)
+ -DUSE_POCL_MEMMANAGER=$(usex memmanager)
+ -DENABLE_TESTS=$(usex test)
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ export POCL_BUILDING=1
+ export POCL_DEVICES=basic
+ export CTEST_OUTPUT_ON_FAILURE=1
+ export TEST_VERBOSE=1
+
+ # Referenced https://github.com/pocl/pocl/blob/master/.drone.yml
+ # But couldn't seem to get tests working yet
+ cmake_src_test
+}
+
+src_install() {
+ cmake_src_install
+
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${P}/examples
+ fi
+}
next reply other threads:[~2023-08-26 3:51 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 3:51 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-10-13 10:21 [gentoo-commits] repo/gentoo:master commit in: dev-libs/pocl/ Patrick Lauer
2025-09-28 14:26 Patrick Lauer
2025-09-07 8:22 Patrick Lauer
2025-07-12 12:26 Arthur Zamarin
2025-07-12 6:01 Sam James
2025-06-06 2:49 Sam James
2025-02-20 17:21 Patrick Lauer
2024-07-15 1:39 Sam James
2024-07-15 0:20 Sam James
2024-07-08 11:43 Sam James
2024-07-08 11:39 Sam James
2024-01-07 11:38 Michał Górny
2023-09-27 13:29 Arthur Zamarin
2023-09-27 7:21 Sam James
2023-02-27 0:20 Sam James
2023-02-23 20:14 Arthur Zamarin
2023-01-21 6:53 Sam James
2022-12-10 4:48 Sam James
2022-08-08 6:08 Sam James
2022-07-26 4:49 Sam James
2022-07-26 4:49 Sam James
2022-07-24 1:07 Sam James
2022-07-20 5:10 Sam James
2022-04-17 16:44 Sam James
2022-01-03 8:02 Sam James
2022-01-03 7:41 Sam James
2021-10-29 22:44 Sam James
2021-10-13 1:12 Sam James
2021-09-23 6:38 Sam James
2021-09-23 6:36 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1693017781.51d2f2ce2765f3974f89c5618e6a7132ac13f2d9.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox