From 5772eab78c27d5409ea9e818a12abc9f686e7319 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 22 Jul 2023 14:50:54 +0100 Subject: gentoo auto-resync : 22:07:2023 - 14:50:54 --- dev-ml/llvm-ocaml/Manifest | 2 + .../llvm-ocaml-17.0.0_pre20230722.ebuild | 112 +++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230722.ebuild (limited to 'dev-ml/llvm-ocaml') diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest index 77d7652e5ec4..9870d81df86e 100644 --- a/dev-ml/llvm-ocaml/Manifest +++ b/dev-ml/llvm-ocaml/Manifest @@ -6,10 +6,12 @@ DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db3659 DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447 DIST llvm-project-3cd3f11c174baa001b337b88c7a6507eb5705cf2.tar.gz 194446197 BLAKE2B ba2ac8334f90fddfd9b8f97abd2f77bd1f1ad00c97f2b7daf6b799fe49755a9bd07e017e93cc634163ad7499e70d886556715e26e9d7ed9017018861c3522735 SHA512 b12d02a7b4df08e8decf99ac86875bef72ff2fa546699e7a94bfd2b2ad1e1256aec66185f9e2f7c2f5d06b1eeb3faae44a2c457b33e5c7416d3bd9921759b39d DIST llvm-project-5ae7fde004cbc640c2f60207791ac36574e5f5c6.tar.gz 193410766 BLAKE2B 50287f1ad41a895040934f8f19fd8aa2e91065b930ab14125dbbc3977273655d11482b6229577c11a8ad2bdd854ca109449b603bbc2e30cee20e95e4fe11e8b7 SHA512 f24f7a3b0661d2d4533b24c295c114817aff22c8f1d473ffa639cee547d31502719f8e1be4f25b970d450ecb9dcaa809c0e12b1bb380774f52cda82a4769d7bc +DIST llvm-project-5f1a388a11ae67c2e5d7a4d1fe45e369a393c572.tar.gz 194911977 BLAKE2B d7277591ddca0046dcc244f591732440a6c63c06557d96d18792c2544797a3bcea4af241ad1e9c0106a9751f52bfbcec0544020cc20874e8c64a31a8055d07d0 SHA512 b38aed6a21a3dd4325faf45475b843dcebab89d8ad9683e0f7699701f9645fa9467e032b822473c53a3242930d681caba9dd9530560636cf093108640470bbbe 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.6.ebuild 2533 BLAKE2B 598e42d89fce0b0a85a01b41166de25343dd6da9a6b422ff9f35f0cf515b759f85a180c25108df9ffbd8b773daad310851f05a11489e0af423c13a09b16c4585 SHA512 10809b6cdc64d70d9976a694123102de10804f65a5a9ea1e051638929c31e343f64388340307b500acd760ebbc2187ac6340336c39d6ae1280c34c5de5ce386d EBUILD llvm-ocaml-17.0.0.9999.ebuild 2518 BLAKE2B 73efb3edd502e713d1ed57d5387532ed7b4dd10831b705339eecd8c5df936ee31ff02f877ad36e0b30564f9837ec8c9535bfcbfc41af01ccaae1e4149e5a574e SHA512 42f7cbba2c706ae1c8198d1e2c1ef4771baa631d2cae65ce957c7ad726a7c43d79ce278c39813781ac72ee7c527543514c1b895b5db24f172893b8796210877f EBUILD llvm-ocaml-17.0.0_pre20230705.ebuild 2518 BLAKE2B 73efb3edd502e713d1ed57d5387532ed7b4dd10831b705339eecd8c5df936ee31ff02f877ad36e0b30564f9837ec8c9535bfcbfc41af01ccaae1e4149e5a574e SHA512 42f7cbba2c706ae1c8198d1e2c1ef4771baa631d2cae65ce957c7ad726a7c43d79ce278c39813781ac72ee7c527543514c1b895b5db24f172893b8796210877f EBUILD llvm-ocaml-17.0.0_pre20230717.ebuild 2518 BLAKE2B 73efb3edd502e713d1ed57d5387532ed7b4dd10831b705339eecd8c5df936ee31ff02f877ad36e0b30564f9837ec8c9535bfcbfc41af01ccaae1e4149e5a574e SHA512 42f7cbba2c706ae1c8198d1e2c1ef4771baa631d2cae65ce957c7ad726a7c43d79ce278c39813781ac72ee7c527543514c1b895b5db24f172893b8796210877f +EBUILD llvm-ocaml-17.0.0_pre20230722.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_pre20230722.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230722.ebuild new file mode 100644 index 000000000000..7499a8afc1dd --- /dev/null +++ b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.0_pre20230722.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 +} -- cgit v1.2.3