commit:     4d95b430ff43296f6e3669a2411f548cd5b332d8
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 10 07:17:47 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Apr 10 07:17:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4d95b430

dev-lang/opencilk: add 2.1

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 dev-lang/opencilk/Manifest            |  3 ++
 dev-lang/opencilk/opencilk-2.1.ebuild | 82 +++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/dev-lang/opencilk/Manifest b/dev-lang/opencilk/Manifest
index b8af72dabd..8d37bb588f 100644
--- a/dev-lang/opencilk/Manifest
+++ b/dev-lang/opencilk/Manifest
@@ -1,3 +1,6 @@
 DIST opencilk-cheetah-1.1.tar.gz 197399 BLAKE2B 
d0fda6b85ff893d246cee7000298cc061902fa8b8abdf635fdefb291c922849a60b69a245e22d591630d0bfd6f7ad904d13a8c0229f08465ac0f97faee89541a
 SHA512 
5ac6aa993133ca3dbd1e3d500b2af78e4c768dbb0fbdf65abde714a5a026348e513adf42c306382c34f9d2a7b77b8744039c47735f0b1c87993814bd14872c81
+DIST opencilk-cheetah-2.1.tar.gz 139245 BLAKE2B 
c7fb78b46506b53f61770e6e0be01547217bba9d9bfbcdcb12668752ad02b08674ad92c4e2e3397ed74039eac59585ca0c68869fb6ce0e4c0a85cf345e443884
 SHA512 
b631eb6ce1c329626ea68acf5c02b94b30a0b21fa696eec884ddae9b3182697bf70e316e836dd94ecddbe92767ed8708d9767b8a1aec9ed16fc0d15df44f150e
 DIST opencilk-productivity-tools-1.1.tar.gz 192982 BLAKE2B 
51ca3e476ffd632b760c9b2fc64f425740e6a13e3c0cadd4ad30119a936816e1f81199cb0ba239d7e7043aa81750be72147f6dd59196f5cd515c78b71470c927
 SHA512 
5d0416db99c382b27fe0b86f7a06da81178114c800b80b9a6394714d82408fdc2c146d65d58a9c2f923a33347007eb24e139b7f194bac633f9672200635886f8
+DIST opencilk-productivity-tools-2.1.tar.gz 224128 BLAKE2B 
d5a76a3ebaec93308cac01e0a99d7ff8a1abc07378fcbdd5b4cb7f802535c8b5ca39e761dd14a3e3414799b82cc7cd109852b6fc9938a995960ab7b5c20a9663
 SHA512 
2957e9ad723fc1aa1345ac2fd4e53ecd720811dfca12910295bda86b0b93cf42727854cb4decbf6c7699c860fa895401cb722d461f658dffce6d2975aabb1bac
 DIST opencilk-project-1.1.tar.gz 137875544 BLAKE2B 
f9297175cb09f13c6daffbf51c7506fc2efbb4e75f84e8ce1a65c985aed3c0cb10a099a010b7b9612fb442bff0cf8ce41295111bea8c182c11e472b5be08fd7d
 SHA512 
341220f0b638376e2668c136c42490560ce3b87d3fb5aea6c23e4c0eb90f3ce7a11f811d1c31c18366985a4c874bd5387f8cc05e748a4fba31634bc572816513
+DIST opencilk-project-2.1.tar.gz 183270741 BLAKE2B 
5db809a6a6ff8faebf0627e895a28983f914d816d6f3b932ebc8edbbe0ac39f319d9eadee499a1d30915689e752d9c99d83c36c86fcc0bed03beb5f3ef73dd63
 SHA512 
e9095218f517ae76c3614109e53a6c760a3286e32553f536c1d3fb2c70d687a1b0fcb95fb8bbe093670b93e245e101db1ac132f268f0e914a2a7b9a038480325

diff --git a/dev-lang/opencilk/opencilk-2.1.ebuild 
b/dev-lang/opencilk/opencilk-2.1.ebuild
new file mode 100644
index 0000000000..1f4195b10a
--- /dev/null
+++ b/dev-lang/opencilk/opencilk-2.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="The OpenCilk concurrency platform for parallel programming"
+HOMEPAGE="https://opencilk.org/";
+
+SRC_URI="
+       
https://github.com/OpenCilk/opencilk-project/archive/refs/tags/opencilk/v${PV}.tar.gz
 -> ${PN}-project-${PV}.tar.gz
+       
https://github.com/OpenCilk/cheetah/archive/refs/tags/opencilk/v${PV}.tar.gz -> 
${PN}-cheetah-${PV}.tar.gz
+       
https://github.com/OpenCilk/productivity-tools/archive/refs/tags/opencilk/v${PV}.tar.gz
 -> ${PN}-productivity-tools-${PV}.tar.gz
+"
+
+# Since opencilk-project is a fork of LLVM 12, this lists the licenses
+# of LLVM 12, while opencilk-project states that it us under "MIT with
+# the OpenCilk Addendum", which basically states that you can
+# distributed it under the LLVM licences. I am also not sure if OpenCilk
+# is able to change the license of LLVM (which source code they use),
+# hence this needs more investigation and we only list t he LLVM 12
+# licenses, because those definetly are correct.
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+MY_POSTFIX="${PN}-v${PV}"
+S="${WORKDIR}/${PN}-project-${MY_POSTFIX}"
+CMAKE_USE_DIR="${S}/llvm"
+
+RDEPEND="
+       dev-libs/libxml2
+       sys-libs/ncurses:=
+       sys-libs/zlib
+"
+
+src_prepare() {
+       local -A symlinks
+       symlinks["${S}/cheetah"]="${WORKDIR}/cheetah-${MY_POSTFIX}"
+       symlinks["${S}/cilktools"]="${WORKDIR}/productivity-tools-${MY_POSTFIX}"
+
+       local link target
+       for link in "${!symlinks[@]}"; do
+               target="${symlinks[${link}]}"
+               ln -rs "${target}" "${link}" || die
+       done
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local libdir=$(get_libdir)
+       local mycmakeargs=(
+               -DLLVM_ENABLE_PROJECTS="clang;compiler-rt"
+               -DLLVM_ENABLE_RUNTIMES="cheetah;cilktools"
+               -DLLVM_TARGETS_TO_BUILD=host
+               -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+               -DCMAKE_INSTALL_PREFIX="${EPREFIX}/opt/${P}"
+               -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+               -DBUILD_SHARED_LIBS=OFF
+               -DLLVM_HOST_TRIPLE="${CHOST}"
+       )
+       cmake_src_configure
+}
+
+src_compile() {
+       # It appears there is a missing dependency declaration in OpenCilk's
+       # cmake build where llvm-link not getting build, leading to
+       # LLVM_LINK-NOTFOUND spilling into the make/ninja generator
+       # files. Ensure that llvm-link is always build.
+       cmake_build llvm-link
+
+       cmake_build
+}
+
+src_install() {
+       cmake_src_install
+       # Do not install man pages which may conflict with llvm/clang/etc.
+       rm "${ED}/usr/share/man/man1/scan-build.1" || die
+}

Reply via email to