summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ml/llvm-ocaml')
-rw-r--r--dev-ml/llvm-ocaml/Manifest3
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-17.0.5.ebuild112
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index caff792cdae2..28e914dc28b6 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -7,11 +7,14 @@ DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43
DIST llvm-project-167b598648dfcee2f23426bfa972e53f8ac16722.tar.gz 201158314 BLAKE2B 908d42b0148f04eeab8d05d46736c570ffdea7d66273aa428375f944deaaf1c0ca885ef0fbe04588d838e4f831ff9823365f9df700f9e9de08c700f0135f2e59 SHA512 7da16df850245ba70e4ddf318a0e7322ed68b076337325c3d3702bb428358d11137b6254051cc6a34d047789f107fd96065cd169c9b2684f78b3a54c4f566a78
DIST llvm-project-17.0.4.src.tar.xz 127828636 BLAKE2B bd91ef7f07e085b935500b056f75ab792d13e7f33825df36e85e7988f313a4f3fbb1b4c854615a5e437a97ad552838eb1be5098194f281ba1279330156dd6a38 SHA512 6703eede8013e7e5733fbd7b527757166d5698f52e239522fb320717430c88696309038501d22fe384b016b330bd92126a2c0ba88b0258c3f092801e3800b7a3
DIST llvm-project-17.0.4.src.tar.xz.sig 438 BLAKE2B e417c14d0af8c2f13eccec7a42d0e4d5a6a834d7a3d31061b9f56f7e880cd982c2b1e84322bcf8f6a3d3167519c31f16c7acb8fc725ab5b453f467a196ca2688 SHA512 4e79bb1d2b41289c092d4ec2759d7cfd4f12df8d107f9510aa9e2354691e7f878e3929b2b50e29fd6c65bd5a3aa13baf6b791847c1cd99817adbf59700cf2bdd
+DIST llvm-project-17.0.5.src.tar.xz 127842560 BLAKE2B 2d657ff14ad2dc932a5cdc6605ad30cba8e22ed8f4adb5ed53bfd9b5b654496023df9eb895f9691e98bba6b6a341b81d8a17361daf81ce4c3cd6a2b3602cd90e SHA512 793b63aa875b6d02e3a2803815cc9361b76c9ab1506967e18630fc3d6811bf51c73f53c51d148a5fc72e87e35dc2b88cb18b48419939c436451fe65c5a326022
+DIST llvm-project-17.0.5.src.tar.xz.sig 438 BLAKE2B d65bfe2816c49a4b3dda2c70fe5ca6a6b7e922338219e7a62b2f33082d88b700781e184f2b3b0758c1d46825cf369ddd6f8824f3be8d8f3a70a88cfbc06bba45 SHA512 509a61434471463459d3ec837e3f3cce662650d4e72ffc7d28fbeb0d5cfe92d5b1dc4fa568e40f48757b1e708de793bc157de7225ac15a00221191e6c1e660d9
DIST llvm-project-83888a5404d46667647fe36d6fa510d075ed57ea.tar.gz 200867834 BLAKE2B 20f5afa071089852abfdcc316e5db77681afe0fdb189a515d7724a0abaf1c545f37ba4b946414c7b8afca62636107bd4e1c7c99d8ba6a514bb413b13f5f634b0 SHA512 4cd7680a227388382076d5735a97a379546f5bdde33272a5a3d317d98c2847e34917dd38a3cfb3f1f677f6d9a9b2163b29f89dd9c4b92506f5be34a3072e0509
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.4.ebuild 2533 BLAKE2B 598e42d89fce0b0a85a01b41166de25343dd6da9a6b422ff9f35f0cf515b759f85a180c25108df9ffbd8b773daad310851f05a11489e0af423c13a09b16c4585 SHA512 10809b6cdc64d70d9976a694123102de10804f65a5a9ea1e051638929c31e343f64388340307b500acd760ebbc2187ac6340336c39d6ae1280c34c5de5ce386d
+EBUILD llvm-ocaml-17.0.5.ebuild 2533 BLAKE2B 598e42d89fce0b0a85a01b41166de25343dd6da9a6b422ff9f35f0cf515b759f85a180c25108df9ffbd8b773daad310851f05a11489e0af423c13a09b16c4585 SHA512 10809b6cdc64d70d9976a694123102de10804f65a5a9ea1e051638929c31e343f64388340307b500acd760ebbc2187ac6340336c39d6ae1280c34c5de5ce386d
EBUILD llvm-ocaml-18.0.0.9999.ebuild 2506 BLAKE2B 2fbeb9ebff375b4c4e1822a55bf09533f3a89ff7605c4641b56f863b7ec2e697072db0bfd983f64b7629754a15e5ae97e9171923af99653761660b47327dca00 SHA512 982f934cedee3aa837db349968410c685fcdd45b539b578b86da5258a0691576840e3e446d0dd1751681ff6a0e117c70348e8ddb829b16d055189e71b322a135
EBUILD llvm-ocaml-18.0.0_pre20231104.ebuild 2506 BLAKE2B 2fbeb9ebff375b4c4e1822a55bf09533f3a89ff7605c4641b56f863b7ec2e697072db0bfd983f64b7629754a15e5ae97e9171923af99653761660b47327dca00 SHA512 982f934cedee3aa837db349968410c685fcdd45b539b578b86da5258a0691576840e3e446d0dd1751681ff6a0e117c70348e8ddb829b16d055189e71b322a135
EBUILD llvm-ocaml-18.0.0_pre20231111.ebuild 2506 BLAKE2B 2fbeb9ebff375b4c4e1822a55bf09533f3a89ff7605c4641b56f863b7ec2e697072db0bfd983f64b7629754a15e5ae97e9171923af99653761660b47327dca00 SHA512 982f934cedee3aa837db349968410c685fcdd45b539b578b86da5258a0691576840e3e446d0dd1751681ff6a0e117c70348e8ddb829b16d055189e71b322a135
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-17.0.5.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.5.ebuild
new file mode 100644
index 000000000000..a496042b570e
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-17.0.5.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="~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
+}