From 68a32bc9fda17e8a546c0bba9d113c4c4659f6bb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 6 Apr 2024 18:30:39 +0100 Subject: gentoo auto-resync : 06:04:2024 - 18:30:38 --- dev-ml/llvm-ocaml/Manifest | 2 + .../llvm-ocaml-19.0.0_pre20240404.ebuild | 107 +++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 dev-ml/llvm-ocaml/llvm-ocaml-19.0.0_pre20240404.ebuild (limited to 'dev-ml/llvm-ocaml') diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest index e13055dc52d1..797d277224e8 100644 --- a/dev-ml/llvm-ocaml/Manifest +++ b/dev-ml/llvm-ocaml/Manifest @@ -1,3 +1,4 @@ +DIST llvm-project-12735916bd3a63aa9f316af8eebfe9420cfec489.tar.gz 208645973 BLAKE2B 4a64dcaa15cb592634eceb384ecfc11173dbf0285402c32be2b8056374bb8ecef8fa1055fbe353a0836c84b75736cc05f3a14428bc431c18362cfaa7bf96a50a SHA512 ee42f7db322c84dfae3c67ffcfff2ee8d56d6bd4a0412b6bd4f8952ac1da4d57d18fa38011fe514631363b4cc143327be887792dd2e9562942261c99e655d948 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.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7 @@ -13,4 +14,5 @@ EBUILD llvm-ocaml-17.0.6.ebuild 2510 BLAKE2B 129a25c76d02640a151bd2ba8b1542e34bc EBUILD llvm-ocaml-18.1.3.ebuild 2466 BLAKE2B da2561431f2a593490fb3d20f208e69d97c1d8f95ef4d47681d2bdbea6f9f10bc470930787bf566bd052c49a5b4b8b9fc5f6b60bc837fadd0ae61e95e36c28da SHA512 9d3e85045503ba47be049d7b9edd464f4b2ea5828a63f289fa5129e1c1a2a308278ec22c396d2fba374bf457c1556df31c7d28ca5c237283ceeb5319fbd546dd EBUILD llvm-ocaml-19.0.0.9999.ebuild 2439 BLAKE2B bb0e88a5e695bdee92c2a6af929944f78ddb799f9efad1de86151a997e3b8c0bc099920b80aa5400fe072022b0a21767dd3187144c450dbdc859e0ae2591bd23 SHA512 4409ff11250d3d75f80508b2dcdcdd7571df68a7ebd33b8f08f4334415335674f1019fd7af56bda3254a28fa725cff394956b08b5de9176a2722bd020949a219 EBUILD llvm-ocaml-19.0.0_pre20240330.ebuild 2439 BLAKE2B bb0e88a5e695bdee92c2a6af929944f78ddb799f9efad1de86151a997e3b8c0bc099920b80aa5400fe072022b0a21767dd3187144c450dbdc859e0ae2591bd23 SHA512 4409ff11250d3d75f80508b2dcdcdd7571df68a7ebd33b8f08f4334415335674f1019fd7af56bda3254a28fa725cff394956b08b5de9176a2722bd020949a219 +EBUILD llvm-ocaml-19.0.0_pre20240404.ebuild 2439 BLAKE2B bb0e88a5e695bdee92c2a6af929944f78ddb799f9efad1de86151a997e3b8c0bc099920b80aa5400fe072022b0a21767dd3187144c450dbdc859e0ae2591bd23 SHA512 4409ff11250d3d75f80508b2dcdcdd7571df68a7ebd33b8f08f4334415335674f1019fd7af56bda3254a28fa725cff394956b08b5de9176a2722bd020949a219 MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685 diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-19.0.0_pre20240404.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-19.0.0_pre20240404.ebuild new file mode 100644 index 000000000000..879c30db0807 --- /dev/null +++ b/dev-ml/llvm-ocaml/llvm-ocaml-19.0.0_pre20240404.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake llvm.org llvm-utils python-any-r1 + +DESCRIPTION="OCaml bindings for LLVM" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0/${PV}" +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 +" + +LLVM_COMPONENTS=( llvm cmake third-party ) +LLVM_USE_TARGETS=llvm +llvm.org_set_globals + +src_configure() { + llvm_prepend_path "${LLVM_MAJOR}" + + 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 +} -- cgit v1.2.3