1 |
commit: 70c86f141899974ebead3d3372ef6d6aa87ddd2c |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 30 14:58:30 2018 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 30 14:59:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70c86f14 |
7 |
|
8 |
sci-libs/xdmf2: Fix build with CMake 3.12+ |
9 |
|
10 |
Package-Manager: Portage-2.3.47, Repoman-2.3.10 |
11 |
|
12 |
.../xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch | 14 ++++ |
13 |
sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild | 78 ++++++++++++++++++++++ |
14 |
2 files changed, 92 insertions(+) |
15 |
|
16 |
diff --git a/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch b/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..14e74bb6108 |
19 |
--- /dev/null |
20 |
+++ b/sci-libs/xdmf2/files/xdmf2-1.0_p141226-cmake-3.12.patch |
21 |
@@ -0,0 +1,14 @@ |
22 |
+--- a/CMakeLists.txt 2018-08-30 17:49:07.777815386 +0300 |
23 |
++++ b/CMakeLists.txt 2018-08-30 17:49:49.276706955 +0300 |
24 |
+@@ -6,6 +6,11 @@ |
25 |
+ cmake_policy(SET CMP0015 NEW) |
26 |
+ endif (POLICY CMP0015) |
27 |
+ |
28 |
++# Needed for CMake 2.12+ |
29 |
++if(POLICY CMP0077) |
30 |
++ cmake_policy(SET CMP0077 NEW) |
31 |
++endif() |
32 |
++ |
33 |
+ if(MSVC10) |
34 |
+ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}) |
35 |
+ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}) |
36 |
|
37 |
diff --git a/sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild b/sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild |
38 |
new file mode 100644 |
39 |
index 00000000000..205807de8ad |
40 |
--- /dev/null |
41 |
+++ b/sci-libs/xdmf2/xdmf2-1.0_p141226-r3.ebuild |
42 |
@@ -0,0 +1,78 @@ |
43 |
+# Copyright 1999-2018 Gentoo Foundation |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+EAPI=6 |
47 |
+ |
48 |
+PYTHON_COMPAT=( python2_7 ) |
49 |
+ |
50 |
+inherit cmake-utils flag-o-matic python-single-r1 |
51 |
+ |
52 |
+DESCRIPTION="eXtensible Data Model and Format" |
53 |
+HOMEPAGE="http://xdmf.org/index.php/Main_Page" |
54 |
+SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz" |
55 |
+ |
56 |
+SLOT="0" |
57 |
+LICENSE="VTK" |
58 |
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux" |
59 |
+IUSE="doc python test" |
60 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
61 |
+ |
62 |
+RDEPEND=" |
63 |
+ dev-libs/boost:= |
64 |
+ sci-libs/hdf5:= |
65 |
+ dev-libs/libxml2:2 |
66 |
+ python? ( ${PYTHON_DEPS} ) |
67 |
+ " |
68 |
+ |
69 |
+DEPEND="${RDEPEND} |
70 |
+ doc? ( app-doc/doxygen ) |
71 |
+ python? ( dev-lang/swig:0 ) |
72 |
+" |
73 |
+ |
74 |
+PATCHES=( |
75 |
+ "${FILESDIR}"/${P}-module.patch |
76 |
+ "${FILESDIR}"/${P}-cannot-find-hdf5-bug-591302.patch |
77 |
+ "${FILESDIR}"/${P}-cmake-3.12.patch |
78 |
+) |
79 |
+ |
80 |
+pkg_setup() { |
81 |
+ use python && python-single-r1_pkg_setup && python_export |
82 |
+} |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ if use python; then |
86 |
+ local _site=$(python_get_sitedir) |
87 |
+ sed \ |
88 |
+ -e "/DESTINATION/s:python:${_site##${EPREFIX}/usr/$(get_libdir)/}:g" \ |
89 |
+ -i CMakeLists.txt || die |
90 |
+ fi |
91 |
+ |
92 |
+ sed \ |
93 |
+ -e "/DESTINATION/s:lib:$(get_libdir):g" \ |
94 |
+ -e "/INSTALL/s:lib:$(get_libdir):g" \ |
95 |
+ -i CMakeLists.txt core/CMakeLists.txt || die |
96 |
+ cmake-utils_src_prepare |
97 |
+} |
98 |
+ |
99 |
+src_configure() { |
100 |
+ # bug 619604 |
101 |
+ append-cxxflags -std=c++14 |
102 |
+ |
103 |
+ local mycmakeargs=( |
104 |
+ -DBUILD_SHARED_LIBS=1 |
105 |
+ -DXDMF_BUILD_DOCUMENTATION=$(usex doc) |
106 |
+ -DBUILD_TESTING=$(usex test) |
107 |
+ -DXDMF_WRAP_PYTHON=$(usex python) |
108 |
+# -DXDMF_WRAP_JAVA=$(usex java) |
109 |
+ ) |
110 |
+ cmake-utils_src_configure |
111 |
+} |
112 |
+ |
113 |
+src_install() { |
114 |
+ cmake-utils_src_install |
115 |
+ dosym XdmfConfig.cmake /usr/share/cmake/Modules/${PN}Config.cmake |
116 |
+ |
117 |
+ # need to byte-compile 'XdmfCore.py' and 'Xdmf.py' |
118 |
+ # as the CMake build system does not compile them itself |
119 |
+ use python && python_optimize "${D%/}$(python_get_sitedir)" |
120 |
+} |