summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-14 23:46:45 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-14 23:46:45 +0100
commit437bd70f28c6d5b2f34cba67ba2bb581025f56ea (patch)
tree2d214076649e4e70ba6eb77af98668deb83ac46e /dev-ml/llvm-ocaml
parent234dc35b5df19cfe20396a10855ce4e70b8b43bc (diff)
gentoo auto-resync : 14:04:2023 - 23:46:45
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_pre20230414.ebuild112
2 files changed, 114 insertions, 0 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index ca96fa56a073..ef9577a5c7ed 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 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.1.src.tar.xz 117990772 BLAKE2B 298189ce6d7245711e5bd3e03fa74d603dda5a458463ca0cb261fe6949290c46a70abbd1ad1c556e08da3adc5df577305e267c1135214b900d78502e39b46bc5 SHA512 98fc11c0ad90d5e5a2cb123b497b89a1583fe7f91b3ff05c335037801ef66cbfab08f6d2eff539f0da238e9685d4bc7a9fb2578e28864fc9e9357b84129cefaa
DIST llvm-project-16.0.1.src.tar.xz.sig 566 BLAKE2B 06c03d789e63ab30bba4c56ba9ec91400d804448482d6a7fd395252b3b9166a5ee7a42a94c2074aa0d1809a3327f993d8932211f3fc05ad281db64c17b2a7094 SHA512 f42db28eb8280db06b1c78fa7a7aaea3a79499cecee1a64ce18c49b90c755b3a78fc93f01d1855887c7918ccc927c3b6147cfc916520f05d4cef65381ca6fe60
+DIST llvm-project-5c60a08c696c0420ddc5fdad5b8e50a7528cb3bf.tar.gz 182291041 BLAKE2B f5997611e0293df515d4494d14895cc8fbe22b536f5c419e4ad7d098acbf2b1046ceb332d865eacdae0b7fa1a77b78090551976835dd1b95b5270c9f6e12e410 SHA512 6cda8e55b4fc70e94838c772c56213c811affda96fb98a03d432348f995a313447d0e0e84533350e1fda3162d82633b260ccd8e3b1d59d3216187b44dc5556fb
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.1.ebuild 2532 BLAKE2B 86820fc96e57f380dbddbe673423362925bbbd52f8fa98e3e8ce8f108c7999e520391db7a076c03351d83c80b662e1edb6a6e0f71a2d9b3aed8445d659eb8e16 SHA512 77e408a5f34d83abebef58df665767be4a059868f77a5e03f4edb29e20a317e4da057b7b6d473d55c9d398e24c389e911cd9153af9934f4b95d1a6b8bc6147ed
EBUILD llvm-ocaml-16.0.2.9999.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
EBUILD llvm-ocaml-17.0.0.9999.ebuild 2516 BLAKE2B 76d79ec543029a6509d80817106cc94f880844269c65d5f648c5fc3623fc837b668cc1f7071cf04fa9cce36f8c7a35b238b553a3f2428f01ad76123fa3e9d6b7 SHA512 d42973449686da7c3e94db660026991293d997ef4705580c01903432fae1a990e96e96100dd8ce27cb7ef126d24e003f4f1be997f5abbecdf273db5b4fde6c4e
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
MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230414.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230414.ebuild
new file mode 100644
index 000000000000..aee649edd10c
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230414.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
+}