1 |
commit: c2a638225d8afb354709417daf85a187449270e3 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 1 20:26:19 2016 +0000 |
4 |
Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 20:26:19 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=c2a63822 |
7 |
|
8 |
sci-libs/p4est: add live ebuild |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
sci-libs/p4est/p4est-9999.ebuild | 108 +++++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 108 insertions(+) |
14 |
|
15 |
diff --git a/sci-libs/p4est/p4est-9999.ebuild b/sci-libs/p4est/p4est-9999.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..05f4f1b |
18 |
--- /dev/null |
19 |
+++ b/sci-libs/p4est/p4est-9999.ebuild |
20 |
@@ -0,0 +1,108 @@ |
21 |
+# Copyright 1999-2015 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+ |
27 |
+WANT_AUTOMAKE=1.11 |
28 |
+ |
29 |
+inherit autotools-utils toolchain-funcs eutils multilib |
30 |
+ |
31 |
+DESCRIPTION="Scalable Algorithms for Parallel Adaptive Mesh Refinement on Forests of Octrees" |
32 |
+HOMEPAGE="http://www.p4est.org/" |
33 |
+ |
34 |
+if [[ ${PV} = *9999* ]]; then |
35 |
+ inherit git-r3 |
36 |
+ EGIT_REPO_URI="git://github.com/cburstedde/p4est.git" |
37 |
+ SRC_URI="" |
38 |
+ KEYWORDS="" |
39 |
+else |
40 |
+ SRC_URI=" |
41 |
+ https://github.com/cburstedde/p4est/archive/v${PV}.tar.gz -> ${P}.tar.gz |
42 |
+ https://github.com/cburstedde/libsc/archive/v${PV}.tar.gz -> libsc-${PV}.tar.gz" |
43 |
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
44 |
+fi |
45 |
+ |
46 |
+LICENSE="GPL-2+" |
47 |
+SLOT="0" |
48 |
+ |
49 |
+IUSE="debug doc examples mpi romio static-libs +vtk-binary" |
50 |
+REQUIRED_USE="romio? ( mpi )" |
51 |
+ |
52 |
+RDEPEND=" |
53 |
+ >=sci-libs/libsc-1.0[mpi,romio] |
54 |
+ dev-lang/lua:* |
55 |
+ sys-apps/util-linux |
56 |
+ virtual/blas |
57 |
+ virtual/lapack |
58 |
+ mpi? ( virtual/mpi[romio?] )" |
59 |
+ |
60 |
+DEPEND=" |
61 |
+ ${RDEPEND} |
62 |
+ sys-devel/automake:1.11 |
63 |
+ virtual/pkgconfig" |
64 |
+ |
65 |
+DOCS=( AUTHORS NEWS README ) |
66 |
+ |
67 |
+AT_M4DIR="${WORKDIR}/${P}/config ${WORKDIR}/${P}/sc/config" |
68 |
+AUTOTOOLS_AUTORECONF=true |
69 |
+ |
70 |
+src_prepare() { |
71 |
+ # Inject libsc to get all parts of the build system... |
72 |
+ if ! [[ ${PV} = *9999* ]]; then |
73 |
+ rmdir "${S}/sc" || die "rmdir failed" |
74 |
+ mv "${WORKDIR}/libsc-${PV}" "${S}/sc" || die "mv failed" |
75 |
+ fi |
76 |
+ |
77 |
+ # Inject a version number into the build system |
78 |
+ echo "${PV}" > ${S}/.tarball-version |
79 |
+ |
80 |
+ autotools-utils_src_prepare |
81 |
+ |
82 |
+ sed -i \ |
83 |
+ "s/P4EST_SC_DIR\/etc/P4EST_SC_DIR\/share\/libsc/" \ |
84 |
+ "${S}"/configure || die "sed failed" |
85 |
+ |
86 |
+ sed -i \ |
87 |
+ "s/libsc\.la/libsc\.so/" \ |
88 |
+ "${S}"/configure || die "sed failed" |
89 |
+ |
90 |
+} |
91 |
+ |
92 |
+src_configure() { |
93 |
+ # avoid underlinkage |
94 |
+ LDFLAGS="${LDFLAGS} -lsc" |
95 |
+ |
96 |
+ local myeconfargs=( |
97 |
+ $(use_enable debug) |
98 |
+ $(use_enable mpi) |
99 |
+ $(use_enable romio mpiio) |
100 |
+ $(use_enable vtk-binary) |
101 |
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" |
102 |
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" |
103 |
+ --with-sc="${EPREFIX}/usr" |
104 |
+ ) |
105 |
+ autotools-utils_src_configure |
106 |
+} |
107 |
+ |
108 |
+src_install() { |
109 |
+ autotools-utils_src_install |
110 |
+ |
111 |
+ use doc && dodoc -r doc/* |
112 |
+ |
113 |
+ if use examples |
114 |
+ then |
115 |
+ docinto examples |
116 |
+ dodoc -r example/* |
117 |
+ docompress -x /usr/share/doc/${PF}/examples |
118 |
+ else |
119 |
+ # Remove the compiled example binaries in case of -examples: |
120 |
+ rm -r "${ED}"/usr/bin || die "rm failed" |
121 |
+ fi |
122 |
+ |
123 |
+ # Fix up some wrong installation paths: |
124 |
+ dodir /usr/share/p4est |
125 |
+ mv "${ED}"/usr/share/data "${ED}"/usr/share/p4est/data || die "mv failed" |
126 |
+ mv "${ED}"/etc/* "${ED}"/usr/share/p4est || die "mv failed" |
127 |
+ rmdir "${ED}"/etc/ || die "rmdir failed" |
128 |
+} |