1 |
commit: 5ec3233859aac528082c693381300f5b237c4a91 |
2 |
Author: Grégory Salvan <apieum <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Feb 11 18:24:57 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=5ec32338 |
7 |
|
8 |
added netgen-5.3.1 ebuild and patch for metis |
9 |
|
10 |
.../netgen/files/netgen-5.x-metis-numflag.patch | 21 +++++ |
11 |
sci-mathematics/netgen/netgen-5.3.1.ebuild | 89 ++++++++++++++++++++++ |
12 |
2 files changed, 110 insertions(+) |
13 |
|
14 |
diff --git a/sci-mathematics/netgen/files/netgen-5.x-metis-numflag.patch b/sci-mathematics/netgen/files/netgen-5.x-metis-numflag.patch |
15 |
new file mode 100644 |
16 |
index 0000000..4c32304 |
17 |
--- /dev/null |
18 |
+++ b/sci-mathematics/netgen/files/netgen-5.x-metis-numflag.patch |
19 |
@@ -0,0 +1,21 @@ |
20 |
+diff -uwrN ./netgen-5.3.1/libsrc/meshing/parallelmesh.cpp netgen-5.3.1.ORIG/libsrc/meshing/parallelmesh.cpp |
21 |
+--- ./netgen-5.3.1/libsrc/meshing/parallelmesh.cpp 2016-02-11 19:12:14.474185736 +0100 |
22 |
++++ netgen-5.3.1.ORIG/libsrc/meshing/parallelmesh.cpp 2014-08-29 11:54:05.000000000 +0200 |
23 |
+@@ -1318,7 +1318,7 @@ |
24 |
+ idxtype *xadj, * adjacency, *v_weights = NULL, *e_weights = NULL; |
25 |
+ |
26 |
+ int weightflag = 0; |
27 |
+- int numflag = 0; |
28 |
++ // int numflag = 0; |
29 |
+ int nparts = ntasks - 1; |
30 |
+ |
31 |
+ int options[5]; |
32 |
+@@ -1485,7 +1485,7 @@ |
33 |
+ idxtype *v_weights = NULL, *e_weights = NULL; |
34 |
+ |
35 |
+ int weightflag = 0; |
36 |
+- int numflag = 0; |
37 |
++ // int numflag = 0; |
38 |
+ int nparts = ntasks - 1; |
39 |
+ |
40 |
+ int edgecut; |
41 |
|
42 |
diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
43 |
new file mode 100644 |
44 |
index 0000000..8a2f60b |
45 |
--- /dev/null |
46 |
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
47 |
@@ -0,0 +1,89 @@ |
48 |
+# Copyright 1999-2015 Gentoo Foundation |
49 |
+# Distributed under the terms of the GNU General Public License v2 |
50 |
+# $Id$ |
51 |
+ |
52 |
+EAPI=5 |
53 |
+ |
54 |
+inherit autotools eutils flag-o-matic multilib versionator |
55 |
+ |
56 |
+MY_PN=${PN}-mesher |
57 |
+MY_PV=$(get_version_component_range 1-2) |
58 |
+DESCRIPTION="NETGEN is an automatic 3d tetrahedral mesh generator" |
59 |
+HOMEPAGE="http://www.hpfem.jku.at/netgen/" |
60 |
+SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}/${MY_PV}/${P}.tar.gz" |
61 |
+ |
62 |
+SLOT="0" |
63 |
+LICENSE="LGPL-2.1" |
64 |
+KEYWORDS="~amd64 ~x86" |
65 |
+IUSE="-ffmpeg jpeg -mpi opencascade" |
66 |
+ |
67 |
+DEPEND=" |
68 |
+ dev-tcltk/tix |
69 |
+ dev-tcltk/togl:1.7 |
70 |
+ virtual/opengl |
71 |
+ x11-libs/libXmu |
72 |
+ opencascade? ( sci-libs/opencascade:* ) |
73 |
+ ffmpeg? ( media-video/ffmpeg ) |
74 |
+ jpeg? ( virtual/jpeg:0= ) |
75 |
+ mpi? ( virtual/mpi ( || ( sci-libs/parmetis sci-libs/metis ) ) ) " |
76 |
+RDEPEND="${DEPEND}" |
77 |
+# Note, MPI has not be tested. |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ # Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824 |
81 |
+ epatch "${FILESDIR}/${PN}-5.x-missing-define.patch" |
82 |
+ epatch "${FILESDIR}/${PN}-5.x-metis-numflag.patch" |
83 |
+ eautoreconf |
84 |
+} |
85 |
+ |
86 |
+src_configure() { |
87 |
+ # This is not the most clever way to deal with these flags |
88 |
+ # but --disable-xxx does not seem to work correcly, so... |
89 |
+ sed -i -e 's:-lTogl:-lTogl1.7:' ng/Makefile.am || die |
90 |
+ local myconf="--with-togl=/usr/$(get_libdir)/Togl1.7" |
91 |
+ |
92 |
+ if use opencascade; then |
93 |
+ myconf="${myconf} --enable-occ --with-occ=$CASROOT" |
94 |
+ append-ldflags -L$CASROOT/lin/$(get_libdir) |
95 |
+ fi |
96 |
+ if use mpi; then |
97 |
+ myconf="${myconf} --enable-parallel" |
98 |
+ append-cppflags -I/usr/include/metis |
99 |
+ fi |
100 |
+ use ffmpeg && myconf="${myconf} --enable-ffmpeg" |
101 |
+ use jpeg && myconf="${myconf} --enable-jpeglib" |
102 |
+ append-cppflags -I/usr/include/togl-1.7 |
103 |
+ |
104 |
+ econf \ |
105 |
+ ${myconf} |
106 |
+ |
107 |
+ # This would be the more elegant way: |
108 |
+# econf \ |
109 |
+# $(use_enable opencascade occ) \ |
110 |
+# $(use_with opencascade "occ=$CASROOT") \ |
111 |
+# $(use_enable mpi parallel) \ |
112 |
+# $(use_enable ffmpeg) \ |
113 |
+# $(use_enable jpeg jpeglib) |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ local NETGENDIR="/usr/share/netgen" |
118 |
+ |
119 |
+ echo -e "NETGENDIR=${NETGENDIR} \nLDPATH=/usr/$(get_libdir)/Togl1.7" > ./99netgen |
120 |
+ doenvd 99netgen |
121 |
+ |
122 |
+ default |
123 |
+ mv "${D}"/usr/bin/{*.tcl,*.ocf} "${D}${NETGENDIR}" || die |
124 |
+ |
125 |
+ # Install icon and .desktop for menu entry |
126 |
+ doicon "${FILESDIR}"/${PN}.png |
127 |
+ domenu "${FILESDIR}"/${PN}.desktop |
128 |
+} |
129 |
+ |
130 |
+pkg_postinst() { |
131 |
+ elog "Please make sure to update your environment variables:" |
132 |
+ elog "env-update && source /etc/profile" |
133 |
+ elog "Netgen ebuild is still under development." |
134 |
+ elog "Help us improve the ebuild in:" |
135 |
+ elog "http://bugs.gentoo.org/show_bug.cgi?id=155424" |
136 |
+} |