summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-07-08 08:28:49 +0200
committerMichał Górny <mgorny@gentoo.org>2020-07-08 10:25:44 +0200
commitd926d937559101247c83a1bdf25ebf97320d8935 (patch)
treeb2202de5aebc1aeda86e85ec134b47bbaaf1a0de /dev-ml
parentdev-python/lit: Bump to 10.0.1-rc4 (diff)
downloadgentoo-d926d937559101247c83a1bdf25ebf97320d8935.tar.gz
gentoo-d926d937559101247c83a1bdf25ebf97320d8935.tar.bz2
gentoo-d926d937559101247c83a1bdf25ebf97320d8935.zip
dev-ml/llvm-ocaml: Bump to 10.0.1-rc4
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/llvm-ocaml/Manifest1
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-10.0.1_rc4.ebuild115
2 files changed, 116 insertions, 0 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index 567b4adb8518..071f848b4ac9 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -3,4 +3,5 @@ DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff21988870
DIST llvmorg-10.0.1-rc1.tar.gz 120834583 BLAKE2B 64244ebcb6f2c171c9f606e5eb0adff2794f06c9312a0ca627fb79c107c0c898ac242cf4e92523c3265fa717322601d7e3f4d178515fac95d03ee92312082b06 SHA512 f877f66046969a4055b166ad50ef876a9c8ecaf03e2cdd7c8e1a3348eb5f5180f222fa457b1f090a6660282a0d9f7a1d39cf09a04abe0dde0a6e1e10ccf15597
DIST llvmorg-10.0.1-rc2.tar.gz 120883192 BLAKE2B d48f4ccb33691cd4997576a6d20b298455687515164f7d8dfa11ec32e197b58132c6bd549c1214c3b36982ef85e1018d4101e7afecee8d2ab67ad15d68c681bf SHA512 8e363d379a73e38ef570fb03d8243a21f37a48ef579a0f08118af4dac48060c0dc24e2bd8175f04241fa424e49b6c85723d2d3552bbe30dd165fe5fb43493325
DIST llvmorg-10.0.1-rc3.tar.gz 120876192 BLAKE2B c48c7e00b37adaab411a34196b87eb630a997ce56bcc33350a698d6d8e24877844b037735ec44abf80ac4c0a4d5a8682745afce4c44cb806bbe9e2a74d875da1 SHA512 ccb6a5bff336924381def11cdfa9c676351461e293b6250b15c1c6cd7694b99beb3e2f3834e8321a28586da091492cbde689213eb4108c9dbe86724e1ee66949
+DIST llvmorg-10.0.1-rc4.tar.gz 120873659 BLAKE2B 2413fb8af98384e608fab83b91fa826ffe2a7cdeb052eb6a50f253f9fe46ee71c040f210bb2f395d73b0a2772854ccafe2ac2cf1cc7c8405bc988183fa732aea SHA512 8b3f0b794c98956238e5d3d195e3a9cb9c9a40f78e2ed72c767fbeac3e1dbae58cb8132db7d2c8caa891a4d0bf631e2a9afc67f3c37707e9e6b94e2f9aeb77b8
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-10.0.1_rc4.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.1_rc4.ebuild
new file mode 100644
index 000000000000..7cff2bc42841
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.1_rc4.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+inherit cmake llvm llvm.org python-any-r1
+
+DESCRIPTION="OCaml bindings for LLVM"
+HOMEPAGE="https://llvm.org/"
+LLVM_COMPONENTS=( llvm )
+llvm.org_set_globals
+
+# Keep in sync with sys-devel/llvm
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR )
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
+ "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="debug test ${ALL_LLVM_TARGETS[*]}"
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-lang/ocaml-4.00.0:0=
+ dev-ml/ocaml-ctypes:=
+ ~sys-devel/llvm-${PV}:=[${LLVM_TARGET_USEDEPS// /,},debug?]
+ !sys-devel/llvm[ocaml(-)]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-lang/perl
+ dev-ml/findlib
+ test? ( dev-ml/ounit )
+ ${PYTHON_DEPS}"
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${PV%%.*} 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}"
+
+ # disable go bindings
+ -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
+
+ # 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
+}