summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-18 01:46:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-18 01:46:36 +0100
commit81ab1a4db30480fdfb51d6e784b0f3ad9bbe2432 (patch)
tree5c2bb8712bddd53ef4c66cd7179cc7840e8c778f /dev-ml/llvm-ocaml
parent59fb6ea4eff116f078307a57217645762b78aba7 (diff)
gentoo auto-resync : 18:06:2023 - 01:46:36
Diffstat (limited to 'dev-ml/llvm-ocaml')
-rw-r--r--dev-ml/llvm-ocaml/Manifest4
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-17.0.0.9999.ebuild2
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230615.ebuild112
3 files changed, 116 insertions, 2 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index 811f12c06fd1..c814ad8e0968 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -1,3 +1,4 @@
+DIST llvm-project-0e08374abb2c61a3ae5c24d5f60be3b548da9778.tar.gz 191661586 BLAKE2B 05e5328d8eb9972bd6399e8c0f5ab241a78e6591e63ee520180c4ff154df432ad96f49ddc615a2208f69ffbec539b201fffeaf4906011b7a961cbc3860126ffa SHA512 1d4429ecb2292e419ed6172cf251ba4a1448ed51424552ac48a159d0e3d3414777f7821382d1839b56f0c906fb0a147b1df4eecb071f8a5c11b0fc1d0d40d339
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
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
@@ -11,6 +12,7 @@ EBUILD llvm-ocaml-14.0.6.ebuild 2594 BLAKE2B 40fea3429bbf2e22f45598a679d9e5c6fa0
EBUILD llvm-ocaml-15.0.7.ebuild 2598 BLAKE2B 22f3c86bea3a17027f4513685ddb9077800918dbe8dc74dd17e7d8ccfb729c11baf6eb60915d6795170d4dd5ee66b5c19d16653044a0ad7bb34f18161db06848 SHA512 04de6e60fc31644b6e99af4277f5300cdcee1f8e35f9038b490ed7841fd0c92e71bdaa423cdedbc5cccbd219e32857c8d1d0e09dfdfe4919b165ee73670efbfe
EBUILD llvm-ocaml-16.0.5.ebuild 2532 BLAKE2B 86820fc96e57f380dbddbe673423362925bbbd52f8fa98e3e8ce8f108c7999e520391db7a076c03351d83c80b662e1edb6a6e0f71a2d9b3aed8445d659eb8e16 SHA512 77e408a5f34d83abebef58df665767be4a059868f77a5e03f4edb29e20a317e4da057b7b6d473d55c9d398e24c389e911cd9153af9934f4b95d1a6b8bc6147ed
EBUILD llvm-ocaml-16.0.6.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.9999.ebuild 2518 BLAKE2B 73efb3edd502e713d1ed57d5387532ed7b4dd10831b705339eecd8c5df936ee31ff02f877ad36e0b30564f9837ec8c9535bfcbfc41af01ccaae1e4149e5a574e SHA512 42f7cbba2c706ae1c8198d1e2c1ef4771baa631d2cae65ce957c7ad726a7c43d79ce278c39813781ac72ee7c527543514c1b895b5db24f172893b8796210877f
EBUILD llvm-ocaml-17.0.0_pre20230609.ebuild 2517 BLAKE2B 1d5ca75f0e7b2a163b022e61ffa8d23a0de3f5d6f9f35e28010d2cd74f0cd46e1184359ae4751b4b7b4c33f15688e7405bd9424be13e054a64e9373315b91210 SHA512 70252ca918832aaf4c9069c2f20a484fcd649be55a7a316de57e3ac36e7a8816eb299f415343f6ab0c0040d387225e89c5e75a5b3f43112b13a10f496fc6f0a8
+EBUILD llvm-ocaml-17.0.0_pre20230615.ebuild 2518 BLAKE2B 73efb3edd502e713d1ed57d5387532ed7b4dd10831b705339eecd8c5df936ee31ff02f877ad36e0b30564f9837ec8c9535bfcbfc41af01ccaae1e4149e5a574e SHA512 42f7cbba2c706ae1c8198d1e2c1ef4771baa631d2cae65ce957c7ad726a7c43d79ce278c39813781ac72ee7c527543514c1b895b5db24f172893b8796210877f
MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0.9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0.9999.ebuild
index 1e54d201785c..7499a8afc1dd 100644
--- a/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0.9999.ebuild
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0.9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit cmake llvm llvm.org python-any-r1
DESCRIPTION="OCaml bindings for LLVM"
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230615.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230615.ebuild
new file mode 100644
index 000000000000..7499a8afc1dd
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230615.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_{10..12} )
+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
+}