summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-03 17:26:08 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-03 17:26:08 +0100
commit3cf27339901a7ca15df33f6ea134daa93888d5d0 (patch)
treed0f451df94a8ce90e3e81be8816e5f3ed8e62138 /dev-ml/llvm-ocaml
parentf6a034d922bf54efeaa781fcb5388b325b90d945 (diff)
gentoo auto-resync : 03:05:2023 - 17:26:08
Diffstat (limited to 'dev-ml/llvm-ocaml')
-rw-r--r--dev-ml/llvm-ocaml/Manifest3
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-16.0.3.ebuild112
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index 94de61fcef25..1b97b7a47e61 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -7,6 +7,8 @@ DIST llvm-project-16.0.1.src.tar.xz 117990772 BLAKE2B 298189ce6d7245711e5bd3e03f
DIST llvm-project-16.0.1.src.tar.xz.sig 566 BLAKE2B 06c03d789e63ab30bba4c56ba9ec91400d804448482d6a7fd395252b3b9166a5ee7a42a94c2074aa0d1809a3327f993d8932211f3fc05ad281db64c17b2a7094 SHA512 f42db28eb8280db06b1c78fa7a7aaea3a79499cecee1a64ce18c49b90c755b3a78fc93f01d1855887c7918ccc927c3b6147cfc916520f05d4cef65381ca6fe60
DIST llvm-project-16.0.2.src.tar.xz 117995768 BLAKE2B b329b2b123428f3a966a96f074a75520f07d12fc13ec755403cff2346b23195e6a0c05ca9e789b4cf5b4b3557a922bd41d8dffb6056ee33fbbf2b81001511fae SHA512 4ca76aaaca8812a06a94071e7444a3213d85dca51ea86f6125f854776f69a3e088a92d0621e3911e526f280b35bfb778fb3742c6010d3ed1eba605c08720377c
DIST llvm-project-16.0.2.src.tar.xz.sig 566 BLAKE2B 8243748ac27e4eec3cc011371e179e19f1005336f07d956fd358f649d1429c8d0ea22ecc376b1dec9fe3db971467ad1dd63e97bb089885d0e1994eeab26b6fd7 SHA512 dbe9367a259954a38f2369b2f226726162090227f1a5ae8c8809eaae47cad7b3b26c754633e6e5c54cacd6360a504d7ba4c659d9232c1648388d657a2aaad10c
+DIST llvm-project-16.0.3.src.tar.xz 117998136 BLAKE2B 6117586a117c30515e9a5623ab91d29ba65d33c8041274de0ecdbce08ae4fe1c8c3b120db9ca625f42fdbb2301537b4ffe8f7add701c178282be4f583fa0c8ca SHA512 2eb5eca1cbee92a499d7fba5729b61f31186353bc0545b17eefa300cf2b27c8d9a2f307443b2c1c9fe1b0ba412abf5143fdd4d25aaeb33d975a9a834221d7602
+DIST llvm-project-16.0.3.src.tar.xz.sig 566 BLAKE2B bbd96268b006fecffd7402452ae7559bd2ea42c7b771999f58893a48d66b1b056b476a7022c70e2ab8f11dba8318ccc141f97a05ece3b9ed3b4405a6890b0c3a SHA512 cdd5e1c2a252ba58f9b7f8687d6cf9a330c188988707bd72f4632a8158a2db9ac180b3936da99b87e7e99886c39cb8517ebbb04b7d1be198e76964e31ec8dc58
DIST llvm-project-52882de0e641487329c9e093a90ea3dad01842c8.tar.gz 182953335 BLAKE2B 98682729992d73202e35b540d5d0d87e2acf44e4ab6896a0b6f9ac4a7423f55ad370ae1d7e919a6c86dc7f138a66890ac89b852b03305612d248ab567833f8be SHA512 3685aff0f648e9b477e1e01edebe4799498c21587e2ed5577e2fdef98bb21ea215e206606a11692fbb93a0989fd59fd324faff2c4d97b7afca0851b53f123f05
DIST llvm-project-5c60a08c696c0420ddc5fdad5b8e50a7528cb3bf.tar.gz 182291041 BLAKE2B f5997611e0293df515d4494d14895cc8fbe22b536f5c419e4ad7d098acbf2b1046ceb332d865eacdae0b7fa1a77b78090551976835dd1b95b5270c9f6e12e410 SHA512 6cda8e55b4fc70e94838c772c56213c811affda96fb98a03d432348f995a313447d0e0e84533350e1fda3162d82633b260ccd8e3b1d59d3216187b44dc5556fb
DIST llvm-project-5ea158077ec9ca50857ede5cbb0b27c61663fd55.tar.gz 182543024 BLAKE2B 32f5a9ddaa6c7e283d97256d7bd68634f2f8ed6d7167e743ba8076809ea1a3a7159f9ccc56a6e5a8838481cade07389669d8a35b17b5922da0cbef04c80131f8 SHA512 3d180c04ef39adbc9c6ee485e21cdf63fde362f0a22026b00a6d3eba6243e4c8e96fc088335f31051e54f4546d62569131a671d2e655ea735d597361f5732827
@@ -15,6 +17,7 @@ EBUILD llvm-ocaml-15.0.7.ebuild 2598 BLAKE2B 22f3c86bea3a17027f4513685ddb9077800
EBUILD llvm-ocaml-16.0.1.ebuild 2532 BLAKE2B 86820fc96e57f380dbddbe673423362925bbbd52f8fa98e3e8ce8f108c7999e520391db7a076c03351d83c80b662e1edb6a6e0f71a2d9b3aed8445d659eb8e16 SHA512 77e408a5f34d83abebef58df665767be4a059868f77a5e03f4edb29e20a317e4da057b7b6d473d55c9d398e24c389e911cd9153af9934f4b95d1a6b8bc6147ed
EBUILD llvm-ocaml-16.0.2.ebuild 2532 BLAKE2B 86820fc96e57f380dbddbe673423362925bbbd52f8fa98e3e8ce8f108c7999e520391db7a076c03351d83c80b662e1edb6a6e0f71a2d9b3aed8445d659eb8e16 SHA512 77e408a5f34d83abebef58df665767be4a059868f77a5e03f4edb29e20a317e4da057b7b6d473d55c9d398e24c389e911cd9153af9934f4b95d1a6b8bc6147ed
EBUILD llvm-ocaml-16.0.3.9999.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
+EBUILD llvm-ocaml-16.0.3.ebuild 2532 BLAKE2B 86820fc96e57f380dbddbe673423362925bbbd52f8fa98e3e8ce8f108c7999e520391db7a076c03351d83c80b662e1edb6a6e0f71a2d9b3aed8445d659eb8e16 SHA512 77e408a5f34d83abebef58df665767be4a059868f77a5e03f4edb29e20a317e4da057b7b6d473d55c9d398e24c389e911cd9153af9934f4b95d1a6b8bc6147ed
EBUILD llvm-ocaml-17.0.0.9999.ebuild 2517 BLAKE2B 1d5ca75f0e7b2a163b022e61ffa8d23a0de3f5d6f9f35e28010d2cd74f0cd46e1184359ae4751b4b7b4c33f15688e7405bd9424be13e054a64e9373315b91210 SHA512 70252ca918832aaf4c9069c2f20a484fcd649be55a7a316de57e3ac36e7a8816eb299f415343f6ab0c0040d387225e89c5e75a5b3f43112b13a10f496fc6f0a8
EBUILD llvm-ocaml-17.0.0_pre20230325.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
EBUILD llvm-ocaml-17.0.0_pre20230414.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-16.0.3.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-16.0.3.ebuild
new file mode 100644
index 000000000000..d5f0179fb951
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-16.0.3.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake llvm llvm.org python-any-r1
+
+DESCRIPTION="OCaml bindings for LLVM"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-lang/ocaml-4.00.0:0=
+ dev-ml/ocaml-ctypes:=
+ ~sys-devel/llvm-${PV}:=[debug?]
+ !sys-devel/llvm[ocaml(-)]
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ dev-ml/findlib
+ >=dev-util/cmake-3.16
+"
+
+LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_USE_TARGETS=llvm
+llvm.org_set_globals
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=OFF
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DLLVM_LINK_LLVM_DYLIB=ON
+ -DLLVM_OCAML_OUT_OF_TREE=ON
+
+ # cheap hack: LLVM combines both anyway, and the only difference
+ # is that the former list is explicitly verified at cmake time
+ -DLLVM_TARGETS_TO_BUILD=""
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DLLVM_BUILD_TESTS=$(usex test)
+
+ # disable various irrelevant deps and settings
+ -DLLVM_ENABLE_FFI=OFF
+ -DLLVM_ENABLE_TERMINFO=OFF
+ -DHAVE_HISTEDIT_H=NO
+ -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
+ -DLLVM_ENABLE_EH=ON
+ -DLLVM_ENABLE_RTTI=ON
+
+ -DLLVM_HOST_TRIPLE="${CHOST}"
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+
+ # TODO: ocamldoc
+ )
+
+ use test && mycmakeargs+=(
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ # also: custom rules for OCaml do not work for CPPFLAGS
+ use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ local llvm_libdir=$(llvm-config --libdir)
+ # an ugly hack; TODO: figure out a way to pass -L to ocaml...
+ cd "${BUILD_DIR}/${libdir}" || die
+ ln -s "${llvm_libdir}"/*.so . || die
+
+ if use test; then
+ local llvm_bindir=$(llvm-config --bindir)
+ # Force using system-installed tools.
+ sed -i -e "/llvm_tools_dir/s@\".*\"@\"${llvm_bindir}\"@" \
+ "${BUILD_DIR}"/test/lit.site.cfg.py || die
+ fi
+}
+
+src_compile() {
+ cmake_build ocaml_all
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-llvm-bindings-ocaml
+}
+
+src_install() {
+ DESTDIR="${D}" \
+ cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die
+
+ dodoc bindings/ocaml/README.txt
+}