1 |
commit: 55732526debdc9d3edb53298e7f159cf404f0baa |
2 |
Author: Kacper Kowalik (Xarthisius) <xarthisius.kk <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Feb 8 10:48:38 2012 +0000 |
4 |
Commit: Kacper Kowalik <xarthisius <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 8 10:48:38 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=55732526 |
7 |
|
8 |
[sci-libs/gmsh] bump to EAPI4 for required use, removed unused call to flag-o-matic.eclass, shorten description, fix dependencies on libpng and zlib, remove redundant dependency on cmake, use PATCHES instead of calling src_unpack, mycmakeargs is now bash array, remove obsolete dies, compile doc during src_compile |
9 |
|
10 |
--- |
11 |
sci-libs/gmsh/gmsh-2.5.0-r1.ebuild | 58 +++++++++++++++--------------------- |
12 |
1 files changed, 24 insertions(+), 34 deletions(-) |
13 |
|
14 |
diff --git a/sci-libs/gmsh/gmsh-2.5.0-r1.ebuild b/sci-libs/gmsh/gmsh-2.5.0-r1.ebuild |
15 |
index 2f9f1ab..16b4c6b 100644 |
16 |
--- a/sci-libs/gmsh/gmsh-2.5.0-r1.ebuild |
17 |
+++ b/sci-libs/gmsh/gmsh-2.5.0-r1.ebuild |
18 |
@@ -2,11 +2,11 @@ |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
# $Header: $ |
21 |
|
22 |
-EAPI=3 |
23 |
+EAPI=4 |
24 |
|
25 |
-inherit cmake-utils flag-o-matic fortran-2 toolchain-funcs |
26 |
+inherit cmake-utils fortran-2 toolchain-funcs |
27 |
|
28 |
-DESCRIPTION="A three-dimensional finite element mesh generator with built-in pre- and post-processing facilities" |
29 |
+DESCRIPTION="3D finite element mesh generator with built-in pre- and post-processing facilities" |
30 |
HOMEPAGE="http://www.geuz.org/gmsh/" |
31 |
SRC_URI="http://www.geuz.org/gmsh/src/${P}-source.tgz" |
32 |
|
33 |
@@ -18,6 +18,8 @@ KEYWORDS="~amd64 ~x86" |
34 |
IUSE="blas cgns chaco doc examples jpeg lua med metis mpi netgen opencascade petsc taucs tetgen X" |
35 |
|
36 |
RDEPEND="virtual/fortran |
37 |
+ media-libs/libpng |
38 |
+ sys-libs/zlib |
39 |
X? ( x11-libs/fltk:1 ) |
40 |
blas? ( virtual/blas virtual/lapack sci-libs/fftw:3.0 ) |
41 |
cgns? ( sci-libs/cgnslib ) |
42 |
@@ -27,38 +29,23 @@ RDEPEND="virtual/fortran |
43 |
opencascade? ( sci-libs/opencascade ) |
44 |
petsc? ( sci-mathematics/petsc ) |
45 |
mpi? ( virtual/mpi[cxx] ) |
46 |
- taucs? ( sci-libs/taucs )" |
47 |
- |
48 |
-# taucs needs metis enabled. |
49 |
-# Wait for the REQUIRED_USE syntax in EAPI4. |
50 |
-# http://www.gentoo.org/proj/en/council/meeting-logs/20101130-summary.txt |
51 |
+ taucs? ( sci-libs/taucs ) |
52 |
+ " |
53 |
|
54 |
DEPEND="${RDEPEND} |
55 |
- dev-util/cmake |
56 |
- media-libs/libpng |
57 |
- sys-libs/zlib |
58 |
doc? ( virtual/latex-base )" |
59 |
|
60 |
S=${WORKDIR}/${P}-source |
61 |
|
62 |
-pkg_setup() { |
63 |
- fortran-2_pkg_setup |
64 |
-} |
65 |
+PATCHES=( "${FILESDIR}/${P}-libpng-1.5.patch" ) |
66 |
|
67 |
-src_unpack() { |
68 |
- unpack ${A} |
69 |
- cd "${S}" |
70 |
- epatch "${FILESDIR}/${P}-libpng-1.5.patch" |
71 |
-} |
72 |
+REQUIRED_USE="taucs? ( metis )" |
73 |
|
74 |
src_configure() { |
75 |
- local mycmakeargs="" |
76 |
- |
77 |
use blas && \ |
78 |
- mycmakeargs="${mycmakeargs} |
79 |
- -DCMAKE_Fortran_COMPILER=$(tc-getF77)" |
80 |
+ myargs="-DCMAKE_Fortran_COMPILER=$(tc-getF77)" |
81 |
|
82 |
- mycmakeargs="${mycmakeargs} |
83 |
+ mycmakeargs=( |
84 |
$(cmake-utils_use_enable blas BLAS_LAPACK) |
85 |
$(cmake-utils_use_enable cgns CGNS) |
86 |
$(cmake-utils_use_enable chaco CHACO) |
87 |
@@ -71,26 +58,29 @@ src_configure() { |
88 |
$(cmake-utils_use_enable taucs TAUCS) |
89 |
$(cmake-utils_use_enable tetgen TETGEN) |
90 |
$(cmake-utils_use_enable opencascade OCC) |
91 |
- $(cmake-utils_use_enable petsc PETSC)" |
92 |
+ $(cmake-utils_use_enable petsc PETSC) |
93 |
+ ${myargs} |
94 |
+ ) |
95 |
# $(cmake-utils_use_enable tetgen TETGEN_NEW) |
96 |
|
97 |
- cmake-utils_src_configure ${mycmakeargs} \ |
98 |
- || die "cmake configuration failed" |
99 |
+ cmake-utils_src_configure |
100 |
+} |
101 |
+ |
102 |
+src_compile() { |
103 |
+ cmake-utils_src_compile |
104 |
+ if use doc ; then |
105 |
+ emake pdf -C "${CMAKE_BUILD_DIR}" |
106 |
+ fi |
107 |
} |
108 |
|
109 |
src_install() { |
110 |
cmake-utils_src_install |
111 |
|
112 |
# TODO: tutorials get installed twice ATM |
113 |
- if use doc ; then |
114 |
- cd "${CMAKE_BUILD_DIR}" |
115 |
- emake pdf || die "failed to build documentation" |
116 |
- cd "${S}" |
117 |
- dodoc doc/texinfo/gmsh.pdf |
118 |
- fi |
119 |
+ use doc && dodoc doc/texinfo/gmsh.pdf |
120 |
|
121 |
if use examples ; then |
122 |
insinto /usr/share/doc/${PF} |
123 |
- doins -r demos tutorial || die "failed to install examples" |
124 |
+ doins -r demos tutorial |
125 |
fi |
126 |
} |