From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F0CD9138351 for ; Thu, 30 Jan 2020 20:51:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0FFC9E089C; Thu, 30 Jan 2020 20:51:35 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DFCCCE089C for ; Thu, 30 Jan 2020 20:51:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9AFFD34E5A0 for ; Thu, 30 Jan 2020 20:51:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E4FBD10B for ; Thu, 30 Jan 2020 20:51:31 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1580417477.7db46d9c14a7861364bad78076c8fb0fb2664abd.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/llvm-ocaml/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ml/llvm-ocaml/Manifest dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc1.ebuild X-VCS-Directories: dev-ml/llvm-ocaml/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 7db46d9c14a7861364bad78076c8fb0fb2664abd X-VCS-Branch: master Date: Thu, 30 Jan 2020 20:51:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fc057287-4182-4e8c-a73c-41f85b1556ef X-Archives-Hash: 6b39a81a7cae446c38c081f461d24999 commit: 7db46d9c14a7861364bad78076c8fb0fb2664abd Author: Michał Górny gentoo org> AuthorDate: Thu Jan 30 20:42:29 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Jan 30 20:51:17 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7db46d9c dev-ml/llvm-ocaml: Bump to 10.0.0_rc1 Signed-off-by: Michał Górny gentoo.org> dev-ml/llvm-ocaml/Manifest | 1 + dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc1.ebuild | 126 +++++++++++++++++++++++++ 2 files changed, 127 insertions(+) diff --git a/dev-ml/llvm-ocaml/Manifest b/dev-ml/llvm-ocaml/Manifest index b3c965e40eb..0034fe2d7c1 100644 --- a/dev-ml/llvm-ocaml/Manifest +++ b/dev-ml/llvm-ocaml/Manifest @@ -1,3 +1,4 @@ DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16 +DIST llvmorg-10.0.0-rc1.tar.gz 120755822 BLAKE2B a729d37d96ba498cb865c6f708734dccb796b2caabb69167b9aa3b0e12c788f2a5980a048b99d5603da3d26af909fb31f406b4f4743cabae56c45f829a7bf695 SHA512 27137fc700971147c00ded6787eaae9f0bcf98c938fe227a5a559b38d983736f3d086f4ff6772d802c5f48a7d97a97c293261e4af88fcb5a720693b9cb5a4f02 DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc1.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc1.ebuild new file mode 100644 index 00000000000..b9f6124e6f0 --- /dev/null +++ b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0_rc1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_{6,7}} ) +inherit cmake-utils llvm llvm.org multiprocessing 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}" + +# 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=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 + -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;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" + ) + + # 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 +}