summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-12 23:49:59 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-12 23:49:59 +0100
commit241157fae4eae88cefc48b4644bad8b9e53583dc (patch)
tree21c5bcbe695778c057090452592e3861a780352b /dev-ml/llvm-ocaml
parent229d5601ae2eca4f143dabdfb36406376cf88c03 (diff)
gentoo auto-resync : 12:05:2023 - 23:49:59
Diffstat (limited to 'dev-ml/llvm-ocaml')
-rw-r--r--dev-ml/llvm-ocaml/Manifest2
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230512.ebuild112
2 files changed, 114 insertions, 0 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index e846a7848ba3..14bdd91119c9 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -5,10 +5,12 @@ DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c
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-7d436d56b60b36508b94e39d08761f1405a9c770.tar.gz 183363091 BLAKE2B e0d3520814b3455e33107715697f00d653ad46bb8d8200caf42c42743520f389217ea2e57449bbc2e98126b602b2aa344e4125e4b1f92152f7957a11a9b9a150 SHA512 65a8e30702217e5e1309efe3daeda5115eeb2e8d25238db1fa4e8dcfc729d75655a10b3394f2f70b7e7efb8ea33a31b6e2482065cc81805023101da00584a81e
EBUILD llvm-ocaml-14.0.6.ebuild 2594 BLAKE2B 40fea3429bbf2e22f45598a679d9e5c6fa06343081a3a0a7c238bcbc8c3f270fea924ad57cab4f580adef66fe269eec188e6ed9f46772907063267805b7b51c7 SHA512 da649915c4804091ac68d9011a2370560f71e88952d13975a5f882e2c485d561fa0a5a43c61dd48f196534eae1e10aa6e46a9a9f6959d998ca850128c75a2615
EBUILD llvm-ocaml-15.0.7.ebuild 2598 BLAKE2B 22f3c86bea3a17027f4513685ddb9077800918dbe8dc74dd17e7d8ccfb729c11baf6eb60915d6795170d4dd5ee66b5c19d16653044a0ad7bb34f18161db06848 SHA512 04de6e60fc31644b6e99af4277f5300cdcee1f8e35f9038b490ed7841fd0c92e71bdaa423cdedbc5cccbd219e32857c8d1d0e09dfdfe4919b165ee73670efbfe
EBUILD llvm-ocaml-16.0.3.ebuild 2532 BLAKE2B 86820fc96e57f380dbddbe673423362925bbbd52f8fa98e3e8ce8f108c7999e520391db7a076c03351d83c80b662e1edb6a6e0f71a2d9b3aed8445d659eb8e16 SHA512 77e408a5f34d83abebef58df665767be4a059868f77a5e03f4edb29e20a317e4da057b7b6d473d55c9d398e24c389e911cd9153af9934f4b95d1a6b8bc6147ed
EBUILD llvm-ocaml-16.0.4.9999.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
EBUILD llvm-ocaml-17.0.0.9999.ebuild 2517 BLAKE2B 1d5ca75f0e7b2a163b022e61ffa8d23a0de3f5d6f9f35e28010d2cd74f0cd46e1184359ae4751b4b7b4c33f15688e7405bd9424be13e054a64e9373315b91210 SHA512 70252ca918832aaf4c9069c2f20a484fcd649be55a7a316de57e3ac36e7a8816eb299f415343f6ab0c0040d387225e89c5e75a5b3f43112b13a10f496fc6f0a8
EBUILD llvm-ocaml-17.0.0_pre20230502.ebuild 2517 BLAKE2B 1d5ca75f0e7b2a163b022e61ffa8d23a0de3f5d6f9f35e28010d2cd74f0cd46e1184359ae4751b4b7b4c33f15688e7405bd9424be13e054a64e9373315b91210 SHA512 70252ca918832aaf4c9069c2f20a484fcd649be55a7a316de57e3ac36e7a8816eb299f415343f6ab0c0040d387225e89c5e75a5b3f43112b13a10f496fc6f0a8
+EBUILD llvm-ocaml-17.0.0_pre20230512.ebuild 2517 BLAKE2B 1d5ca75f0e7b2a163b022e61ffa8d23a0de3f5d6f9f35e28010d2cd74f0cd46e1184359ae4751b4b7b4c33f15688e7405bd9424be13e054a64e9373315b91210 SHA512 70252ca918832aaf4c9069c2f20a484fcd649be55a7a316de57e3ac36e7a8816eb299f415343f6ab0c0040d387225e89c5e75a5b3f43112b13a10f496fc6f0a8
MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230512.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230512.ebuild
new file mode 100644
index 000000000000..1e54d201785c
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230512.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=""
+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
+}