summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-18 18:31:43 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-18 18:31:43 +0000
commitcd0d9000770337b445051f1852fe3971ceb7a6e2 (patch)
tree49c82dbb14c2d960e04e7482bdefe6ed2d53a173 /dev-ml/llvm-ocaml
parent12c505f7fcc9ddc89e96ed178df05aceec162d92 (diff)
gentoo auto-resync : 18:03:2023 - 18:31:42
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.0.ebuild112
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index e3167f9c72f1..8c7998030ab3 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -2,6 +2,8 @@ DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.0.src.tar.xz 117933476 BLAKE2B fa09cd8f647ce0daf5a7eae9ac03b99594a9b3193b12065f43f9a6731875243f2f5b354136bcadcb31622b246054e94f880eec3dab0bcd6ae89973fa9dca845c SHA512 3f040abc1b03205693824aeff2ee6efb0cff25fe04bd5265141c093f294655a1f3fcda73cab9c57cbed7523c8f186a7e2484afce0792c55e90e3fb80450fabb7
+DIST llvm-project-16.0.0.src.tar.xz.sig 566 BLAKE2B daba130aa5662fbf7cc2e7aa8fa6b64f9cb355a72330f7a01a21b86389c6f2f85ae93de19ff08ba3f1cfe2834d9a2b7648bdf659caba3afdb2a0d13984774a54 SHA512 38e2449dce20cfbf813d1a9a68b36807722ac8ebb5ee07360fa215b2de8534d2329d3e41cfc3ed33e59e36714b94a6683a6d8077950bcf0037973492e0820fb3
DIST llvm-project-16.0.0rc3.src.tar.xz 117914548 BLAKE2B 18ffa35eb73c7cc4626d7b6b7b30aade7171ee2e17fb8d72e79a67185e809f611fefa4cfef17e5cd16822a5a70de2222534dc9f146fc53987eb49ff6a9d98c18 SHA512 d14e5e5ec984a0dc0292a2d27440398b3e32f120c1579517054dcb1a05dbc4ac5f1c6d078a3d6ef8597a71af6f22863868680a972a571839dcd573418b4a4697
DIST llvm-project-16.0.0rc3.src.tar.xz.sig 566 BLAKE2B 43683d2d7b266a847516f71412bf6236a355462430330fc0da1d624fb8dfbc98bfc982d367baee74d5b4964a9e82e7a4a6ea84bdcff3996d246932f516cced1a SHA512 61adc4dc3eb5a4c11a7f96f9267ff37895e5845a08d48a609a03a2696c1b6bca5af5861a6f28de936c48e6d621bf282170589187f2cb593a912b9078300cf47c
DIST llvm-project-16.0.0rc4.src.tar.xz 117930024 BLAKE2B 55cf032ad3ba52d2af0942fe1c627319ae95b466122d04b24a917c33e29139fae546d92c375715600190c02426b798803ead0ab7a97d86960cf98fca80e8815c SHA512 8d628205c5b93fe6683b67b97b5c7f98bae945bd87cccebcdac00ddd4362108bd171f077a5196242be0fb909c795592b34bfa1c96c50a744fb68f287fd9781cc
@@ -11,6 +13,7 @@ DIST llvm-project-4bf004e07e2b9d6e04e3f33e1b02628c679de664.tar.gz 180304467 BLAK
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.0.9999.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
+EBUILD llvm-ocaml-16.0.0.ebuild 2532 BLAKE2B 86820fc96e57f380dbddbe673423362925bbbd52f8fa98e3e8ce8f108c7999e520391db7a076c03351d83c80b662e1edb6a6e0f71a2d9b3aed8445d659eb8e16 SHA512 77e408a5f34d83abebef58df665767be4a059868f77a5e03f4edb29e20a317e4da057b7b6d473d55c9d398e24c389e911cd9153af9934f4b95d1a6b8bc6147ed
EBUILD llvm-ocaml-16.0.0_rc3.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
EBUILD llvm-ocaml-16.0.0_rc4.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
EBUILD llvm-ocaml-17.0.0.9999.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-16.0.0.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-16.0.0.ebuild
new file mode 100644
index 000000000000..d5f0179fb951
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-16.0.0.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
+}