summaryrefslogtreecommitdiff
path: root/dev-ml/llvm-ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-04 18:55:01 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-04 18:55:01 +0000
commit423d21dcfee183cc4b04d29c1621615e8c30f834 (patch)
tree23bd6110b9a77b8d679b5ab60fb7663b8627f698 /dev-ml/llvm-ocaml
parent81e4fbcb846ed1cabdad699c0029b166dd7273b7 (diff)
gentoo resync : 04.01.2018
Diffstat (limited to 'dev-ml/llvm-ocaml')
-rw-r--r--dev-ml/llvm-ocaml/Manifest1
-rw-r--r--dev-ml/llvm-ocaml/llvm-ocaml-6.0.9999.ebuild132
2 files changed, 133 insertions, 0 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest
index 27a93c309889..7088e9d43f25 100644
--- a/dev-ml/llvm-ocaml/Manifest
+++ b/dev-ml/llvm-ocaml/Manifest
@@ -4,5 +4,6 @@ DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412
EBUILD llvm-ocaml-4.0.1.ebuild 2800 BLAKE2B 2d8d5a7d6c13eaece0f0b98251bb28b5cd2c8257c2057a00810cce6e1f76ce0f1caca21e9ee00419bf335098a32dc7d748699f8032fd54e4e5cf843889129e3d SHA512 9684444e4c92601e7654520fb13f563f7c9f886f9f50363f470b023801d14179c542fdc1fc5a519ce73b33774f7a2180b1109f03eb43d7035a79ed2e5387e08e
EBUILD llvm-ocaml-5.0.0.ebuild 3229 BLAKE2B 6dd2314ea4ce32df5e3a05078558f06f637b6268c66d499cc9b1e3de10f5ae358d02881e101e50d821e3a2757d846fe65abe6ba468cffc2547ba6c85ee6cb7c1 SHA512 39b3cee9d7bb63d5974af7ff3237d283c551f37c6f43da20c901404ef01c6d144bbacf25e8eb4b4d8687d0106ebe3c74894957c719f129ad0a54b41ef8f49e07
EBUILD llvm-ocaml-5.0.1.ebuild 2984 BLAKE2B 723a1e859c8e35f2ece65cc8dd6fdd4ef13017fa0ea8ded0c2c1e343a996828194097389b6db5fb2fd5f6c62fcfb9f443e72def7c6549037ae51816c3c7d9f64 SHA512 ba6033dab81c3abd7d9fe2e664b229cfa7f2674193287794ac1cf106a31f35db8d31795362787567d6f0703cdd216f36af3997055c594301dc29e93bd7336615
+EBUILD llvm-ocaml-6.0.9999.ebuild 3333 BLAKE2B a1e3cf761fbc592f00365a59503be1f34f306e479252b98d8e0e401b54fe90d0158a1aae44450531b5d3d18f7a0afa4c2fec9906a9c6f8cab4262b098b6f8388 SHA512 b08840d261d14f723fc5b53a92f965addcf7784be6fe9e0c5e07d42d14d99c7796f5f238f26773c59077cc532ebd3a1391ae6944254457e5e05d957568f401c2
EBUILD llvm-ocaml-9999.ebuild 3308 BLAKE2B 28ac6de002f774524e9bd84745d4415dd363a1b4ee352bbebb29c2e3288a9fbf0341a680389abaf00e252e8c520646fa4016ffb513210eb01896ac682e28a8e7 SHA512 328db9dadbebdc81cf3507219cf2c5e0f67c01aae1a5d2800b99395c02fade988fe3db735e703dcb480ece75ebf1deb8d2a1b6ae3495d21b1e1a3b0ec71d87e1
MISC metadata.xml 216 BLAKE2B fe5e49887842aa513fbf1f2e09bed09a884d531fd21bdaeb2d389e8bf590b6c0e7063f0af98f66e2db129308ab0f0804ba327c3c752bbb4c900c59ac109d99aa SHA512 3485598147c953e72e1785693a489a7e7d73d59620b76054db9c0ce95d8bfa0e8ffec29da7f7a9d73a32e5b77eac07ca3306c56a972dc57fd89d477edaebf3d5
diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-6.0.9999.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-6.0.9999.ebuild
new file mode 100644
index 000000000000..b8960469aed8
--- /dev/null
+++ b/dev-ml/llvm-ocaml/llvm-ocaml-6.0.9999.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils git-r3 llvm python-any-r1
+
+DESCRIPTION="OCaml bindings for LLVM"
+HOMEPAGE="https://llvm.org/"
+SRC_URI=""
+EGIT_REPO_URI="https://git.llvm.org/git/llvm.git
+ https://github.com/llvm-mirror/llvm.git"
+EGIT_BRANCH="release_60"
+
+# Keep in sync with sys-devel/llvm
+ALL_LLVM_EXPERIMENTAL_TARGETS=( AVR Nios2 RISCV WebAssembly )
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore
+ "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="UoI-NCSA"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="debug test ${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(-)]"
+# configparser-3.2 breaks the build (3.3 or none at all are fine)
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ dev-ml/findlib
+ test? ( dev-ml/ounit )
+ !!<dev-python/configparser-3.3.0.2
+ ${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ || ( ${ALL_LLVM_TARGETS[*]} )"
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+pkg_setup() {
+ llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Python is needed to run tests using lit
+ python_setup
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+
+ -DBUILD_SHARED_LIBS=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
+ -DWITH_POLLY=OFF
+ -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="-vv"
+ )
+
+ # 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-utils_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-utils_src_compile ocaml_all
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ cmake-utils_src_make check-llvm-bindings-ocaml
+}
+
+src_install() {
+ DESTDIR="${D}" \
+ cmake -P "${BUILD_DIR}"/bindings/ocaml/cmake_install.cmake || die
+
+ dodoc bindings/ocaml/README.txt
+}