1 |
commit: 1e164de0ccd35a043fc51681478fd44d5abbe35c |
2 |
Author: Michael Hammer <michael <AT> derhammer <DOT> net> |
3 |
AuthorDate: Wed Feb 8 10:13:01 2012 +0000 |
4 |
Commit: Kacper Kowalik <xarthisius <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 8 10:22:21 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1e164de0 |
7 |
|
8 |
Added gmsh-2.5.0-r1 to work with libpng-1.5. I also removed the 'png' and 'zlib' use flage as the two libraries are hard included in upstream code |
9 |
|
10 |
Signed-off-by: Kacper Kowalik (Xarthisius) <xarthisius.kk <AT> gmail.com> |
11 |
|
12 |
--- |
13 |
sci-libs/gmsh/files/gmsh-2.5.0-libpng-1.5.patch | 10 +++ |
14 |
sci-libs/gmsh/gmsh-2.5.0-r1.ebuild | 96 +++++++++++++++++++++++ |
15 |
2 files changed, 106 insertions(+), 0 deletions(-) |
16 |
|
17 |
diff --git a/sci-libs/gmsh/files/gmsh-2.5.0-libpng-1.5.patch b/sci-libs/gmsh/files/gmsh-2.5.0-libpng-1.5.patch |
18 |
new file mode 100644 |
19 |
index 0000000..7920d99 |
20 |
--- /dev/null |
21 |
+++ b/sci-libs/gmsh/files/gmsh-2.5.0-libpng-1.5.patch |
22 |
@@ -0,0 +1,10 @@ |
23 |
+--- a/Graphics/gl2png.cpp |
24 |
++++ b/Graphics/gl2png.cpp |
25 |
+@@ -16,6 +16,7 @@ |
26 |
+ #else |
27 |
+ |
28 |
+ #include <png.h> |
29 |
++#include <zlib.h> |
30 |
+ |
31 |
+ #ifndef png_jmpbuf |
32 |
+ # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) |
33 |
|
34 |
diff --git a/sci-libs/gmsh/gmsh-2.5.0-r1.ebuild b/sci-libs/gmsh/gmsh-2.5.0-r1.ebuild |
35 |
new file mode 100644 |
36 |
index 0000000..2f9f1ab |
37 |
--- /dev/null |
38 |
+++ b/sci-libs/gmsh/gmsh-2.5.0-r1.ebuild |
39 |
@@ -0,0 +1,96 @@ |
40 |
+# Copyright 1999-2012 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+# $Header: $ |
43 |
+ |
44 |
+EAPI=3 |
45 |
+ |
46 |
+inherit cmake-utils flag-o-matic fortran-2 toolchain-funcs |
47 |
+ |
48 |
+DESCRIPTION="A three-dimensional finite element mesh generator with built-in pre- and post-processing facilities" |
49 |
+HOMEPAGE="http://www.geuz.org/gmsh/" |
50 |
+SRC_URI="http://www.geuz.org/gmsh/src/${P}-source.tgz" |
51 |
+ |
52 |
+## gmsh comes with its own copies of (at least) metis, netgen and tetgen, therefore inform the user of their special licenses |
53 |
+LICENSE="GPL-3 free-noncomm" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~amd64 ~x86" |
56 |
+## cgns is not compiling ATM, maybe fix cgns lib first |
57 |
+IUSE="blas cgns chaco doc examples jpeg lua med metis mpi netgen opencascade petsc taucs tetgen X" |
58 |
+ |
59 |
+RDEPEND="virtual/fortran |
60 |
+ X? ( x11-libs/fltk:1 ) |
61 |
+ blas? ( virtual/blas virtual/lapack sci-libs/fftw:3.0 ) |
62 |
+ cgns? ( sci-libs/cgnslib ) |
63 |
+ jpeg? ( virtual/jpeg ) |
64 |
+ lua? ( dev-lang/lua ) |
65 |
+ med? ( >=sci-libs/med-2.3.4 ) |
66 |
+ opencascade? ( sci-libs/opencascade ) |
67 |
+ petsc? ( sci-mathematics/petsc ) |
68 |
+ mpi? ( virtual/mpi[cxx] ) |
69 |
+ taucs? ( sci-libs/taucs )" |
70 |
+ |
71 |
+# taucs needs metis enabled. |
72 |
+# Wait for the REQUIRED_USE syntax in EAPI4. |
73 |
+# http://www.gentoo.org/proj/en/council/meeting-logs/20101130-summary.txt |
74 |
+ |
75 |
+DEPEND="${RDEPEND} |
76 |
+ dev-util/cmake |
77 |
+ media-libs/libpng |
78 |
+ sys-libs/zlib |
79 |
+ doc? ( virtual/latex-base )" |
80 |
+ |
81 |
+S=${WORKDIR}/${P}-source |
82 |
+ |
83 |
+pkg_setup() { |
84 |
+ fortran-2_pkg_setup |
85 |
+} |
86 |
+ |
87 |
+src_unpack() { |
88 |
+ unpack ${A} |
89 |
+ cd "${S}" |
90 |
+ epatch "${FILESDIR}/${P}-libpng-1.5.patch" |
91 |
+} |
92 |
+ |
93 |
+src_configure() { |
94 |
+ local mycmakeargs="" |
95 |
+ |
96 |
+ use blas && \ |
97 |
+ mycmakeargs="${mycmakeargs} |
98 |
+ -DCMAKE_Fortran_COMPILER=$(tc-getF77)" |
99 |
+ |
100 |
+ mycmakeargs="${mycmakeargs} |
101 |
+ $(cmake-utils_use_enable blas BLAS_LAPACK) |
102 |
+ $(cmake-utils_use_enable cgns CGNS) |
103 |
+ $(cmake-utils_use_enable chaco CHACO) |
104 |
+ $(cmake-utils_use_enable X FLTK) |
105 |
+ $(cmake-utils_use_enable X FL_TREE) |
106 |
+ $(cmake-utils_use_enable X GRAPHICS) |
107 |
+ $(cmake-utils_use_enable med MED) |
108 |
+ $(cmake-utils_use_enable metis METIS) |
109 |
+ $(cmake-utils_use_enable netgen NETGEN) |
110 |
+ $(cmake-utils_use_enable taucs TAUCS) |
111 |
+ $(cmake-utils_use_enable tetgen TETGEN) |
112 |
+ $(cmake-utils_use_enable opencascade OCC) |
113 |
+ $(cmake-utils_use_enable petsc PETSC)" |
114 |
+# $(cmake-utils_use_enable tetgen TETGEN_NEW) |
115 |
+ |
116 |
+ cmake-utils_src_configure ${mycmakeargs} \ |
117 |
+ || die "cmake configuration failed" |
118 |
+} |
119 |
+ |
120 |
+src_install() { |
121 |
+ cmake-utils_src_install |
122 |
+ |
123 |
+ # TODO: tutorials get installed twice ATM |
124 |
+ if use doc ; then |
125 |
+ cd "${CMAKE_BUILD_DIR}" |
126 |
+ emake pdf || die "failed to build documentation" |
127 |
+ cd "${S}" |
128 |
+ dodoc doc/texinfo/gmsh.pdf |
129 |
+ fi |
130 |
+ |
131 |
+ if use examples ; then |
132 |
+ insinto /usr/share/doc/${PF} |
133 |
+ doins -r demos tutorial || die "failed to install examples" |
134 |
+ fi |
135 |
+} |