diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-12-03 16:17:22 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-12-03 16:17:22 +0000 |
commit | 4cd2370bed609c118b6edfde5d3f116e5c35b897 (patch) | |
tree | ec58f2c41f49754e41521d5ebc9dce4597ddd0a5 /dev-ml/llvm-ocaml | |
parent | f443475c824b4b5c086e6d040961cb35ad81bc60 (diff) |
gentoo resync : 03.12.2017
Diffstat (limited to 'dev-ml/llvm-ocaml')
-rw-r--r-- | dev-ml/llvm-ocaml/Manifest | 6 | ||||
-rw-r--r-- | dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild | 122 |
2 files changed, 126 insertions, 2 deletions
diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest index eed410f03025..d6b3db3865f8 100644 --- a/dev-ml/llvm-ocaml/Manifest +++ b/dev-ml/llvm-ocaml/Manifest @@ -1,7 +1,9 @@ -DIST llvm-4.0.1.src.tar.xz 21065652 SHA256 da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51 SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d WHIRLPOOL 1626ff270f7ce4801d02a0797b227fda9314ff5c0c01d653111599e9a4d2854c4d9edc3c698a7abee8d79d6bce8b18dc619fbced3c07ca610d44a248d65830cc -DIST llvm-5.0.0.src.tar.xz 23411980 SHA256 e35dcbae6084adcf4abb32514127c5eabd7d63b733852ccdb31e06f1373136da SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a WHIRLPOOL 6a99edbdc3e6726dc8ff9126b110fd7560faac46601407722e6dd80b5d894ff242521dc8fda7f4d879de83dac51c65645a37224f7e8def0d8d2f1e564b0531bb +DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d +DIST llvm-5.0.0.src.tar.xz 23411980 BLAKE2B bc3d8b75b766c83912252b51d6b57c8151c9d83415eff7bc771923d35138ed253a788d6c8e0a384c5e78ce1a1065f10d66ef5004df163b4c3b0c6274bb3aa6b7 SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a +DIST llvm-5.0.1rc2.src.tar.xz 23508164 BLAKE2B 3594d1658310a99787b4ff6f85aa8dd12a0405464bcb095ba4f205ce5b4ed3240a8ae1bef726ff98aba61ae5c8f8c10eeb8e415320d210af60f9e74bff7a8d5c SHA512 0a156e3949d22304b5e173dc9a3628161dff2798ad67924341c11494544350ef3a35a3ebb6ec8e7223b2407ce47cf12dafa6de8c006c5799a620e35a86c30b1b 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_rc2.ebuild 2970 BLAKE2B ffebe636169b3c921835424e959d80b11f5d9a8242928c7b0299bbdcfb3ad0b8a92389833cbb2cf7eb3febbdd6a5b3124f7c9b093826710ff7f20d62a877ab0e SHA512 2585819b265321c37116c7092d51c7bdc8048e1589c199838e41d5e93785e45de48f68aa9a16e55370cd4241d01801b13ff7e79d0b6018f6a7637b195b07aeef EBUILD llvm-ocaml-5.0.9999.ebuild 2996 BLAKE2B 8a356cce59ac416f0782de5f6c5aa6bf79e384833b2830fe8a589e5f4a2c79fdaf7c2a1468fb9f2bae2e13e034d1ae85637c40880b4b040437e9cd3b71d4b06d SHA512 3052cb71cd89f80641cf4010905b7895732092e1eda9ef04b89bdb3fb9f54ee71e20be0efc93663abd31caef024203250145a2d283ce3bf9e420ced5c941fba4 EBUILD llvm-ocaml-9999.ebuild 3281 BLAKE2B 9f211c2813dd932581b45f98d896da14f1a8696cb8b121f868f385c6bde6d9bee3f787523e9a2dd45dc586a5ab209055f74d955452fff4bfc3d0d5d0cbf89b4d SHA512 6a1a8f7143e22aff798bf4312e0d408f4c0c2761b9eb1a67f35119f89c36d770d51bb80aa74fd26c9b40e6aed3edc85ef40d8e27bda3a716b6cdcc04b9783b59 MISC metadata.xml 216 BLAKE2B fe5e49887842aa513fbf1f2e09bed09a884d531fd21bdaeb2d389e8bf590b6c0e7063f0af98f66e2db129308ab0f0804ba327c3c752bbb4c900c59ac109d99aa SHA512 3485598147c953e72e1785693a489a7e7d73d59620b76054db9c0ce95d8bfa0e8ffec29da7f7a9d73a32e5b77eac07ca3306c56a972dc57fd89d477edaebf3d5 diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild new file mode 100644 index 000000000000..8d1eba230aff --- /dev/null +++ b/dev-ml/llvm-ocaml/llvm-ocaml-5.0.1_rc2.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2017 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 llvm python-any-r1 + +MY_P=llvm-${PV/_/}.src +DESCRIPTION="OCaml bindings for LLVM" +HOMEPAGE="https://llvm.org/" +SRC_URI="http://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz" + +# Keep in sync with sys-devel/llvm +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC Sparc SystemZ X86 XCore ) +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[*]}" + +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[*]} )" + +S=${WORKDIR}/${MY_P} + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +pkg_setup() { + LLVM_MAX_SLOT=${PV%%.*} 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 + -DLLVM_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 + ) + + # 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 || 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 +} |