1 |
commit: db2afff9b36650e6316d7d97f425f23a816429cd |
2 |
Author: layman <layman <AT> localhost> |
3 |
AuthorDate: Sat Jul 2 01:47:45 2016 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 2 02:16:36 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=db2afff9 |
7 |
|
8 |
sci-libs/libmed: initial ebuild bump |
9 |
|
10 |
.../libmed/files/libmed-3.1.0-cmake-fortran.patch | 20 +++++++ |
11 |
.../libmed/files/libmed-3.1.0-fix-swig-build.patch | 19 +++++++ |
12 |
sci-libs/libmed/libmed-3.1.0.ebuild | 64 ++++++++++++++++++++++ |
13 |
sci-libs/libmed/metadata.xml | 8 +++ |
14 |
4 files changed, 111 insertions(+) |
15 |
|
16 |
diff --git a/sci-libs/libmed/files/libmed-3.1.0-cmake-fortran.patch b/sci-libs/libmed/files/libmed-3.1.0-cmake-fortran.patch |
17 |
new file mode 100644 |
18 |
index 0000000..490c14a |
19 |
--- /dev/null |
20 |
+++ b/sci-libs/libmed/files/libmed-3.1.0-cmake-fortran.patch |
21 |
@@ -0,0 +1,20 @@ |
22 |
+Make cmake properly disable fortran upon user requirments |
23 |
+ |
24 |
+--- ./CMakeLists.txt.orig 2016-07-01 15:28:57.139304608 +0300 |
25 |
++++ ./CMakeLists.txt 2016-07-01 15:34:22.295899455 +0300 |
26 |
+@@ -8,10 +8,13 @@ |
27 |
+ |
28 |
+ INCLUDE(CheckLanguage) |
29 |
+ CHECK_LANGUAGE(Fortran) |
30 |
+-IF(CMAKE_Fortran_COMPILER) |
31 |
++OPTION (MEDFILE_BUILD_FORTRAN "Build fortran library" ON) |
32 |
++IF(MEDFILE_BUILD_FORTRAN) |
33 |
+ ENABLE_LANGUAGE(Fortran) |
34 |
++ IF(NOT CMAKE_Fortran_COMPILER) |
35 |
++ MESSAGE(FATAL_EROOR "Fortran support was requested but not found") |
36 |
++ ENDIF() |
37 |
+ ELSE() |
38 |
+- MESSAGE(STATUS "No Fortran support") |
39 |
+ ENDIF() |
40 |
+ |
41 |
+ ## Version number |
42 |
|
43 |
diff --git a/sci-libs/libmed/files/libmed-3.1.0-fix-swig-build.patch b/sci-libs/libmed/files/libmed-3.1.0-fix-swig-build.patch |
44 |
new file mode 100644 |
45 |
index 0000000..cd6b230 |
46 |
--- /dev/null |
47 |
+++ b/sci-libs/libmed/files/libmed-3.1.0-fix-swig-build.patch |
48 |
@@ -0,0 +1,19 @@ |
49 |
+Fix wierd typedefs macroses in the header witch made swing to fail |
50 |
+ |
51 |
+diff --git a/include/H5public_extract.h.in b/include/H5public_extract.h.in |
52 |
+index ba07342..28318f4 100644 |
53 |
+--- a/include/H5public_extract.h.in |
54 |
++++ b/include/H5public_extract.h.in |
55 |
+@@ -28,9 +28,9 @@ extern "C" { |
56 |
+ @HDF5_TYPEDEF_HID_T@ |
57 |
+ @HDF5_TYPEDEF_HSIZE_T@ |
58 |
+ |
59 |
+-#typedef int herr_t; |
60 |
+-#typedef int hid_t; |
61 |
+-#typedef unsigned long long hsize_t; |
62 |
++typedef int herr_t; |
63 |
++typedef int hid_t; |
64 |
++typedef unsigned long long hsize_t; |
65 |
+ |
66 |
+ #ifdef __cplusplus |
67 |
+ } |
68 |
|
69 |
diff --git a/sci-libs/libmed/libmed-3.1.0.ebuild b/sci-libs/libmed/libmed-3.1.0.ebuild |
70 |
new file mode 100644 |
71 |
index 0000000..b443f6e |
72 |
--- /dev/null |
73 |
+++ b/sci-libs/libmed/libmed-3.1.0.ebuild |
74 |
@@ -0,0 +1,64 @@ |
75 |
+# Copyright 1999-2016 Gentoo Foundation |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+# $Id$ |
78 |
+ |
79 |
+EAPI=6 |
80 |
+ |
81 |
+FORTRAN_NEEDED=fortran |
82 |
+# NOTE:The build for multiple python versions should be possible but complecated for the build system |
83 |
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} ) |
84 |
+ |
85 |
+inherit eutils toolchain-funcs fortran-2 python-single-r1 cmake-utils |
86 |
+ |
87 |
+MY_P="med-${PV}" |
88 |
+ |
89 |
+DESCRIPTION="A library to store and exchange meshed data or computation results" |
90 |
+HOMEPAGE="http://www.salome-platform.org/" |
91 |
+SRC_URI="http://files.salome-platform.org/Salome/other/${MY_P}.tar.gz" |
92 |
+ |
93 |
+LICENSE="GPL-3 LGPL-3" |
94 |
+SLOT="0" |
95 |
+KEYWORDS="~amd64 ~x86" |
96 |
+IUSE="doc fortran python static-libs test" |
97 |
+ |
98 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
99 |
+RDEPEND=" |
100 |
+ sci-libs/hdf5[fortran=] |
101 |
+ sys-cluster/openmpi[fortran=] |
102 |
+ python? ( ${PYTHON_DEPS} ) |
103 |
+" |
104 |
+DEPEND="${RDEPEND} |
105 |
+ python? ( >=dev-lang/swig-2.0.9:0 ) |
106 |
+" |
107 |
+ |
108 |
+S=${WORKDIR}/${MY_P}_SRC |
109 |
+ |
110 |
+PATCHES=( |
111 |
+ "${FILESDIR}/${P}-cmake-fortran.patch" |
112 |
+ "${FILESDIR}/${P}-fix-swig-build.patch" |
113 |
+) |
114 |
+ |
115 |
+DOCS=( AUTHORS ChangeLog INSTALL README ) |
116 |
+ |
117 |
+pkg_setup() { |
118 |
+ use python && python-single-r1_pkg_setup |
119 |
+ use fortran && fortran-2_pkg_setup |
120 |
+} |
121 |
+ |
122 |
+src_configure() { |
123 |
+ local mycmakeargs=( |
124 |
+ -DMEDFILE_BUILD_FORTRAN="$(usex fortran)" |
125 |
+ -DMEDFILE_BUILD_STATIC_LIBS="$(usex static-libs)" |
126 |
+ -DMEDFILE_INSTALL_DOC="$(usex doc)" |
127 |
+ -DMEDFILE_BUILD_PYTHON="$(usex python)" |
128 |
+ -DMEDFILE_BUILD_TESTS="$(usex test)" |
129 |
+ ) |
130 |
+ |
131 |
+ cmake-utils_src_configure |
132 |
+} |
133 |
+ |
134 |
+src_install() { |
135 |
+ cmake-utils_src_install |
136 |
+ # Prevent test executables being installed |
137 |
+ use test && rm -rf "${D}/usr/bin/"{testc,testf} |
138 |
+} |
139 |
|
140 |
diff --git a/sci-libs/libmed/metadata.xml b/sci-libs/libmed/metadata.xml |
141 |
new file mode 100644 |
142 |
index 0000000..8425c0d |
143 |
--- /dev/null |
144 |
+++ b/sci-libs/libmed/metadata.xml |
145 |
@@ -0,0 +1,8 @@ |
146 |
+<?xml version="1.0" encoding="UTF-8"?> |
147 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
148 |
+<pkgmetadata> |
149 |
+ <maintainer type="project"> |
150 |
+ <email>sci@g.o</email> |
151 |
+ <name>Gentoo Science Project</name> |
152 |
+ </maintainer> |
153 |
+</pkgmetadata> |