Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/
Date: Wed, 03 Jan 2018 22:22:34
Message-Id: 1515018103.b6d16a44660c2eb239bf9463157624e1bc1345d3.mgorny@gentoo
1 commit: b6d16a44660c2eb239bf9463157624e1bc1345d3
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 3 21:52:56 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 3 22:21:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6d16a44
7
8 sys-libs/libomp: Add a live ebuild for 6.0 branch
9
10 sys-libs/libomp/libomp-6.0.9999.ebuild | 88 ++++++++++++++++++++++++++++++++++
11 1 file changed, 88 insertions(+)
12
13 diff --git a/sys-libs/libomp/libomp-6.0.9999.ebuild b/sys-libs/libomp/libomp-6.0.9999.ebuild
14 new file mode 100644
15 index 00000000000..9988d0c2289
16 --- /dev/null
17 +++ b/sys-libs/libomp/libomp-6.0.9999.ebuild
18 @@ -0,0 +1,88 @@
19 +# Copyright 1999-2018 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +
22 +EAPI=6
23 +
24 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
25 +# (needed due to CMAKE_BUILD_TYPE != Gentoo)
26 +CMAKE_MIN_VERSION=3.7.0-r1
27 +PYTHON_COMPAT=( python2_7 )
28 +
29 +inherit cmake-multilib git-r3 linux-info python-any-r1
30 +
31 +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
32 +HOMEPAGE="https://openmp.llvm.org"
33 +SRC_URI=""
34 +EGIT_REPO_URI="https://git.llvm.org/git/openmp.git
35 + https://github.com/llvm-mirror/openmp.git"
36 +EGIT_BRANCH="release_60"
37 +
38 +# Additional licenses:
39 +# - MIT-licensed Intel code,
40 +# - LLVM Software Grant from Intel.
41 +
42 +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
43 +SLOT="0"
44 +KEYWORDS=""
45 +IUSE="hwloc ompt test"
46 +RESTRICT="!test? ( test )"
47 +
48 +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
49 +# tests:
50 +# - dev-python/lit provides the test runner
51 +# - sys-devel/llvm provide test utils (e.g. FileCheck)
52 +# - sys-devel/clang provides the compiler to run tests
53 +DEPEND="${RDEPEND}
54 + dev-lang/perl
55 + test? (
56 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
57 + sys-devel/llvm
58 + >=sys-devel/clang-3.9.0
59 + )"
60 +
61 +# least intrusive of all
62 +CMAKE_BUILD_TYPE=RelWithDebInfo
63 +
64 +CONFIG_CHECK="~!SCHED_PDS"
65 +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
66 +
67 +python_check_deps() {
68 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
69 +}
70 +
71 +pkg_pretend() {
72 + linux-info_pkg_setup
73 +}
74 +
75 +pkg_setup() {
76 + linux-info_pkg_setup
77 + use test && python-any-r1_pkg_setup
78 +}
79 +
80 +multilib_src_configure() {
81 + local libdir="$(get_libdir)"
82 + local mycmakeargs=(
83 + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
84 + -DLIBOMPTARGET_LIBDIR_SUFFIX="${libdir#lib}"
85 +
86 + -DLIBOMP_USE_HWLOC=$(usex hwloc)
87 + -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
88 + # do not install libgomp.so & libiomp5.so aliases
89 + -DLIBOMP_INSTALL_ALIASES=OFF
90 + # disable unnecessary hack copying stuff back to srcdir
91 + -DLIBOMP_COPY_EXPORTS=OFF
92 + -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")"
93 + )
94 + use test && mycmakeargs+=(
95 + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
96 + -DLLVM_LIT_ARGS="-vv"
97 + )
98 + cmake-utils_src_configure
99 +}
100 +
101 +multilib_src_test() {
102 + # respect TMPDIR!
103 + local -x LIT_PRESERVES_TMP=1
104 +
105 + cmake-utils_src_make check-libomp
106 +}