commit:     98360e1133890d34d9b90a762a2651bdc7cabb64
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May  3 16:35:21 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May  5 15:27:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98360e11

sys-libs/libomp: Bump to 5.0.2

 sys-libs/libomp/Manifest            |  1 +
 sys-libs/libomp/libomp-5.0.2.ebuild | 90 +++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index a956d3da7c5..cbc1e1e8a31 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -1,3 +1,4 @@
 DIST openmp-4.0.1.src.tar.xz 2275240 BLAKE2B 
e63cf670c4cd2678afc4d7b96be85c3d157bf91a69510f980d9a0a07f61b449b22ff28d63753f32e63afedb4a7077c662a633f689a660b5047a83bcf1fb7f009
 SHA512 
0b737dde832c5907a0cac41fe1d594b61e85dd405eee42b39f09233db62b44543204ccc775e52e2981f9c9f0683b234526e288a3a7a04f712280fb3a575abcaf
 DIST openmp-5.0.1.src.tar.xz 2075472 BLAKE2B 
a4da4726a17dc0fd083e11fe1bebf446978137aa4453000e8fea950021fff091a818246f0817dd60ce67353d3f7d75ab8fec2b9e955389d9c94e195945efda50
 SHA512 
4493b918fd83ef26e2b3f3429d1b00d722328e4c9697ac7625a390834f6e88ada8e5b02ce0ecb4771129207b1b81a9d171f4599ab9388762a3c6db0afc499ff4
+DIST openmp-5.0.2.src.tar.xz 2081560 BLAKE2B 
fbe41c6aaf4c8e961253609a598bec531ab4685cd8c307ab2528b9d7553eaa38122ee02a2c4d481454f9233c062b3a24bb174a182702a183907a3d15a10a9655
 SHA512 
511895ca6049c17de81ad86c39dcb940a7c1a793005e16d33e58d72ad47f62b8cb61003c234a7544a88e79f25d2c86e9df834f90d37ccbd4b47f71c369e90437
 DIST openmp-6.0.0.src.tar.xz 2272360 BLAKE2B 
2fbbdbbd0262ac3161446a4e7a3079131254f962a5397a94913abff024ba3f66affe419c58fb0f6ab602e338a277ab2befbc4386eaf6d4c11aa4a9713315d562
 SHA512 
9dfb070a3fae883985e3c8cd357c21a2144b433824139e288d4d3c774dd9cf3f7949978976012b08c644cd4a04be8c65a810c2f33d66eee05d3d980e61413a06

diff --git a/sys-libs/libomp/libomp-5.0.2.ebuild 
b/sys-libs/libomp/libomp-5.0.2.ebuild
new file mode 100644
index 00000000000..2a0817f288f
--- /dev/null
+++ b/sys-libs/libomp/libomp-5.0.2.ebuild
@@ -0,0 +1,90 @@
+# 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-multilib linux-info python-any-r1
+
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="https://openmp.llvm.org";
+SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz";
+
+# Additional licenses:
+# - MIT-licensed Intel code,
+# - LLVM Software Grant from Intel.
+
+LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x64-macos"
+IUSE="hwloc kernel_linux ompt test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
+# tests:
+# - dev-python/lit provides the test runner
+# - sys-devel/llvm provide test utils (e.g. FileCheck)
+# - sys-devel/clang provides the compiler to run tests
+DEPEND="${RDEPEND}
+       dev-lang/perl
+       test? (
+               $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+               sys-devel/llvm
+               >=sys-devel/clang-3.9.0
+       )"
+
+S=${WORKDIR}/openmp-${PV/_/}.src
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+python_check_deps() {
+       has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+kernel_pds_check() {
+       if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+               local CONFIG_CHECK="~!SCHED_PDS"
+               local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+               check_extra_config
+       fi
+}
+
+pkg_pretend() {
+       kernel_pds_check
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+       local libdir="$(get_libdir)"
+       local mycmakeargs=(
+               -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
+               -DLIBOMP_USE_HWLOC=$(usex hwloc)
+               -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+               # do not install libgomp.so & libiomp5.so aliases
+               -DLIBOMP_INSTALL_ALIASES=OFF
+               # disable unnecessary hack copying stuff back to srcdir
+               -DLIBOMP_COPY_EXPORTS=OFF
+               -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")"
+       )
+       cmake-utils_src_configure
+}
+
+multilib_src_test() {
+       # respect TMPDIR!
+       local -x LIT_PRESERVES_TMP=1
+
+       cmake-utils_src_make check-libomp
+}

Reply via email to