commit:     8364a7f7e72f15a19b19d6e1d5f7d00e2a2748df
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  7 15:07:06 2015 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Mon Sep  7 15:08:46 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8364a7f7

sys-libs/libomp: initial import

Thanks Jeremi Piotrowski <jeremi.piotrowski <AT> gmail.com> in bug #559582
for the research and initial ebuild

Package-Manager: portage-2.2.20.1

 sys-libs/libomp/Manifest                           |  1 +
 .../files/libomp-3.7.0-no_compat_symlinks.patch    | 17 +++++++
 .../libomp/files/libomp-3.7.0-os_detection.patch   | 19 ++++++++
 sys-libs/libomp/libomp-3.7.0.ebuild                | 54 ++++++++++++++++++++++
 sys-libs/libomp/metadata.xml                       |  9 ++++
 5 files changed, 100 insertions(+)

diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
new file mode 100644
index 0000000..6599e4c
--- /dev/null
+++ b/sys-libs/libomp/Manifest
@@ -0,0 +1 @@
+DIST openmp-3.7.0.src.tar.xz 2251108 SHA256 
8d8a224e5689596a35652fda87e4be29853c4b85fbc7a6562019badfad779f2a SHA512 
70862733fbfe934cb676291d21855b4b52dfb8d5a38690551bc623777381f9fec2a567bc6f55d7122a3be862d170ac1abd6fe0e95e334006469e8c11f28d4402
 WHIRLPOOL 
432732b64b3ba5570f6914fcfed11813524350cce3096dae885d73579bae5cd85ea64ec51405b64adab6ff72b2c835ef639c0f14b7652defdfb8510dbd3b072b

diff --git a/sys-libs/libomp/files/libomp-3.7.0-no_compat_symlinks.patch 
b/sys-libs/libomp/files/libomp-3.7.0-no_compat_symlinks.patch
new file mode 100644
index 0000000..c8b56e2
--- /dev/null
+++ b/sys-libs/libomp/files/libomp-3.7.0-no_compat_symlinks.patch
@@ -0,0 +1,17 @@
+diff -Naur openmp-3.7.0.src.orig/runtime/src/CMakeLists.txt 
openmp-3.7.0.src/runtime/src/CMakeLists.txt
+--- openmp-3.7.0.src.orig/runtime/src/CMakeLists.txt   2015-07-15 
23:41:36.000000000 +0200
++++ openmp-3.7.0.src/runtime/src/CMakeLists.txt        2015-09-05 
23:41:17.105242541 +0200
+@@ -288,13 +288,6 @@
+   endforeach()
+ else()
+   install(TARGETS omp LIBRARY DESTINATION lib${LIBOMP_LIBDIR_SUFFIX})
+-  # Create aliases (symlinks) of the library for backwards compatibility
+-  set(LIBOMP_ALIASES "libgomp;libiomp5")
+-  foreach(alias IN LISTS LIBOMP_ALIASES)
+-    install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E 
create_symlink \"${LIBOMP_LIB_FILE}\"
+-      \"${alias}${CMAKE_SHARED_LIBRARY_SUFFIX}\" WORKING_DIRECTORY
+-      \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})")
+-  endforeach()
+ endif()
+ install(
+   FILES

diff --git a/sys-libs/libomp/files/libomp-3.7.0-os_detection.patch 
b/sys-libs/libomp/files/libomp-3.7.0-os_detection.patch
new file mode 100644
index 0000000..a0b2aad
--- /dev/null
+++ b/sys-libs/libomp/files/libomp-3.7.0-os_detection.patch
@@ -0,0 +1,19 @@
+diff -Naur openmp-3.7.0.src.orig/runtime/tools/lib/Uname.pm 
openmp-3.7.0.src/runtime/tools/lib/Uname.pm
+--- openmp-3.7.0.src.orig/runtime/tools/lib/Uname.pm   2015-01-19 
19:29:35.000000000 +0100
++++ openmp-3.7.0.src/runtime/tools/lib/Uname.pm        2015-09-04 
19:30:25.821746740 +0200
+@@ -236,15 +236,6 @@
+         $bulk =~ m{^DISTRIB_ID\s*=\s*(.*?)\s*$}m
+             or runtime_error( "$release: There is no DISTRIB_ID:", $bulk, 
"(eof)" );
+         $values{ operating_system_name } = $1;
+-        $bulk =~ m{^DISTRIB_RELEASE\s*=\s*(.*?)\s*$}m
+-            or runtime_error( "$release: There is no DISTRIB_RELEASE:", 
$bulk, "(eof)" );
+-        $values{ operating_system_release } = $1;
+-        $bulk =~ m{^DISTRIB_CODENAME\s*=\s*(.*?)\s*$}m
+-            or runtime_error( "$release: There is no DISTRIB_CODENAME:", 
$bulk, "(eof)" );
+-        $values{ operating_system_codename } = $1;
+-        $bulk =~ m{^DISTRIB_DESCRIPTION\s*="?\s*(.*?)"?\s*$}m
+-            or runtime_error( "$release: There is no DISTRIB_DESCRIPTION:", 
$bulk, "(eof)" );
+-        $values{ operating_system_description } = $1;
+     } else {
+         # Oops. lsb-release is missed or not informative. Try other *-release 
files.
+         $release = "/etc/system-release";

diff --git a/sys-libs/libomp/libomp-3.7.0.ebuild 
b/sys-libs/libomp/libomp-3.7.0.ebuild
new file mode 100644
index 0000000..f3ea505
--- /dev/null
+++ b/sys-libs/libomp/libomp-3.7.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+
+inherit cmake-utils multilib-minimal
+
+MY_P=openmp-${PV}
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="http://openmp.llvm.org";
+SRC_URI="http://llvm.org/releases/${PV}/${MY_P}.src.tar.xz";
+
+LICENSE="UoI-NCSA"
+SLOT="0/3.7"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}.src"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-os_detection.patch
+       "${FILESDIR}"/${P}-no_compat_symlinks.patch
+       )
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]]; then
+               if ! test-flag-CXX -std=c++11; then
+                       eerror "${P} requires C++11-capable C++ compiler. Your 
current compiler"
+                       eerror "does not seem to support -std=c++11 option. 
Please upgrade your compiler"
+                       eerror "to gcc-4.7 or an equivalent version supporting 
C++11."
+                       die "Currently active compiler does not support 
-std=c++11"
+               fi
+       fi
+}
+
+multilib_src_configure() {
+       local libdir="$(get_libdir)"
+       local mycmakeargs=( "-DLIBOMP_LIBDIR_SUFFIX=${libdir#lib}" )
+       cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+       cmake-utils_src_compile
+}
+
+multilib_src_install() {
+       cmake-utils_src_install
+}

diff --git a/sys-libs/libomp/metadata.xml b/sys-libs/libomp/metadata.xml
new file mode 100644
index 0000000..5c00ac4
--- /dev/null
+++ b/sys-libs/libomp/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer>
+               <email>voyag...@gentoo.org</email>
+               <name>Bernard Cafarelli</name>
+       </maintainer>
+       <longdescription>The OpenMP subproject of LLVM is intended to contain 
all of the components required to build an executing OpenMP program that are 
outside the compiler itself.</longdescription>
+</pkgmetadata>

Reply via email to