1 |
commit: 5fe163f16c48e49e7dbcce805fd177df657e9cf7 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 22 08:36:11 2016 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 22 08:36:31 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5fe163f1 |
7 |
|
8 |
sci-mathematics/netgen: Amend patches for -p1 |
9 |
|
10 |
* Use PATCHES=() |
11 |
* Convert myconf to array |
12 |
* Prune .la files |
13 |
* Add missing SLOT operators |
14 |
|
15 |
Package-Manager: portage-2.2.27 |
16 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
17 |
|
18 |
.../netgen/files/netgen-5.x-missing-define.patch | 8 ++-- |
19 |
.../files/netgen-5.x-occ-stl-api-change.patch | 4 +- |
20 |
sci-mathematics/netgen/netgen-5.3.1.ebuild | 45 ++++++++++++---------- |
21 |
3 files changed, 30 insertions(+), 27 deletions(-) |
22 |
|
23 |
diff --git a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch |
24 |
index 4ad5c52..d9d8f99 100644 |
25 |
--- a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch |
26 |
+++ b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch |
27 |
@@ -1,5 +1,5 @@ |
28 |
---- libsrc/occ/Partition_Loop2d.cxx.orig 2012-11-14 21:16:22.876287910 +0100 |
29 |
-+++ libsrc/occ/Partition_Loop2d.cxx 2012-11-14 21:22:30.909650554 +0100 |
30 |
+--- a/libsrc/occ/Partition_Loop2d.cxx 2012-11-14 21:16:22.876287910 +0100 |
31 |
++++ b/libsrc/occ/Partition_Loop2d.cxx 2012-11-14 21:22:30.909650554 +0100 |
32 |
@@ -13,6 +13,7 @@ |
33 |
|
34 |
//using namespace std; |
35 |
@@ -26,8 +26,8 @@ |
36 |
{ |
37 |
// an angle is too close to PI; assure that an angle sign really |
38 |
// reflects an edge position: +PI - an edge is worst, |
39 |
---- configure.ac.orig 2012-11-15 14:55:45.048938870 +0100 |
40 |
-+++ configure.ac 2012-11-15 14:55:12.545923777 +0100 |
41 |
+--- a/configure.ac 2012-11-15 14:55:45.048938870 +0100 |
42 |
++++ b/configure.ac 2012-11-15 14:55:12.545923777 +0100 |
43 |
@@ -14,6 +14,7 @@ |
44 |
AC_DISABLE_STATIC |
45 |
|
46 |
|
47 |
diff --git a/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch b/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch |
48 |
index 05f3a54..0452d6b 100644 |
49 |
--- a/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch |
50 |
+++ b/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch |
51 |
@@ -1,5 +1,5 @@ |
52 |
---- libsrc/occ/occgeom.cpp 2014-08-29 11:54:03.000000000 +0200 |
53 |
-+++ libsrc/occ/occgeom.cpp 2016-02-12 21:14:49.258982206 +0100 |
54 |
+--- a/libsrc/occ/occgeom.cpp 2014-08-29 11:54:03.000000000 +0200 |
55 |
++++ b/libsrc/occ/occgeom.cpp 2016-02-12 21:14:49.258982206 +0100 |
56 |
@@ -149,7 +149,7 @@ |
57 |
|
58 |
for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) |
59 |
|
60 |
diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
61 |
index 9aac92d..b3f383d 100644 |
62 |
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild |
63 |
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
64 |
@@ -1,4 +1,4 @@ |
65 |
-# Copyright 1999-2015 Gentoo Foundation |
66 |
+# Copyright 1999-2016 Gentoo Foundation |
67 |
# Distributed under the terms of the GNU General Public License v2 |
68 |
# $Id$ |
69 |
|
70 |
@@ -18,8 +18,8 @@ KEYWORDS="~amd64 ~x86" |
71 |
IUSE="-ffmpeg jpeg -mpi opencascade openmp" |
72 |
|
73 |
DEPEND=" |
74 |
- dev-lang/tcl |
75 |
- dev-lang/tk |
76 |
+ dev-lang/tcl:0 |
77 |
+ dev-lang/tk:0 |
78 |
dev-tcltk/tix |
79 |
dev-tcltk/togl:1.7 |
80 |
virtual/opengl |
81 |
@@ -32,19 +32,22 @@ DEPEND=" |
82 |
RDEPEND="${DEPEND}" |
83 |
# Note, MPI has not be tested. |
84 |
|
85 |
-src_prepare() { |
86 |
- default |
87 |
+PATCHES=( |
88 |
# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824 |
89 |
- epatch "${FILESDIR}/${PN}-5.x-missing-define.patch" |
90 |
+ "${FILESDIR}"/${PN}-5.x-missing-define.patch |
91 |
# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_metis.patch |
92 |
- epatch "${FILESDIR}/${PN}-5.x-metis-fixes.patch" |
93 |
- epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch" |
94 |
+ "${FILESDIR}"/${PN}-5.x-metis-fixes.patch |
95 |
+ "${FILESDIR}"/${PN}-5.x-occ-stl-api-change.patch |
96 |
# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.1_build.patch |
97 |
- epatch "${FILESDIR}/${PN}-5.x-makefiles-fixes.patch" |
98 |
+ "${FILESDIR}"/${PN}-5.x-makefiles-fixes.patch |
99 |
# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch |
100 |
- epatch "${FILESDIR}/${PN}-5.x-fedora-fixes.patch" |
101 |
- epatch "${FILESDIR}/${PN}-5.x-includes-fixes.patch" |
102 |
- epatch "${FILESDIR}/${PN}-5.x-parallelmetis4-fix.patch" |
103 |
+ "${FILESDIR}"/${PN}-5.x-fedora-fixes.patch |
104 |
+ "${FILESDIR}"/${PN}-5.x-includes-fixes.patch |
105 |
+ "${FILESDIR}"/${PN}-5.x-parallelmetis4-fix.patch |
106 |
+) |
107 |
+ |
108 |
+src_prepare() { |
109 |
+ default |
110 |
if use mpi; then |
111 |
export CC=mpicc |
112 |
export CXX=mpic++ |
113 |
@@ -58,14 +61,12 @@ src_prepare() { |
114 |
src_configure() { |
115 |
# This is not the most clever way to deal with these flags |
116 |
# but --disable-xxx does not seem to work correcly, so... |
117 |
- local myconf="--with-togl=/usr/$(get_libdir)/Togl1.7" |
118 |
+ local myconf=( --with-togl=/usr/$(get_libdir)/Togl1.7 ) |
119 |
|
120 |
- if use !openmp; then |
121 |
- myconf="${myconf} --disable-openmp" |
122 |
- fi |
123 |
+ myconf+=( $(use_enable openmp) ) |
124 |
|
125 |
if use opencascade; then |
126 |
- myconf="${myconf} --enable-occ --with-occ=$CASROOT" |
127 |
+ myconf+=( --enable-occ --with-occ=$CASROOT ) |
128 |
append-ldflags -L$CASROOT/$(get_libdir) |
129 |
fi |
130 |
if use mpi; then |
131 |
@@ -74,16 +75,16 @@ src_configure() { |
132 |
ewarn "MPI has not been tested, you should probably deactivate the mpi use flag" |
133 |
ewarn "" |
134 |
ewarn "*************************************************************************" |
135 |
- myconf="${myconf} --enable-parallel" |
136 |
+ myconf+=( --enable-parallel ) |
137 |
append-cppflags -I/usr/include/metis |
138 |
append-ldflags -L/usr/$(get_libdir)/openmpi/ |
139 |
fi |
140 |
- use ffmpeg && myconf="${myconf} --enable-ffmpeg" |
141 |
- use jpeg && myconf="${myconf} --enable-jpeglib" |
142 |
+ use ffmpeg && myconf+=( --enable-ffmpeg ) |
143 |
+ use jpeg && myconf+=( --enable-jpeglib ) |
144 |
append-cppflags -I/usr/include/togl-1.7 |
145 |
|
146 |
econf \ |
147 |
- ${myconf} |
148 |
+ ${myconf[@]} |
149 |
|
150 |
# This would be the more elegant way: |
151 |
# econf \ |
152 |
@@ -106,6 +107,8 @@ src_install() { |
153 |
# Install icon and .desktop for menu entry |
154 |
doicon "${FILESDIR}"/${PN}.png |
155 |
domenu "${FILESDIR}"/${PN}.desktop |
156 |
+ |
157 |
+ prune_libtool_files |
158 |
} |
159 |
|
160 |
pkg_postinst() { |