commit: 5fe163f16c48e49e7dbcce805fd177df657e9cf7 Author: Justin Lecher <jlec <AT> gentoo <DOT> org> AuthorDate: Mon Feb 22 08:36:11 2016 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Mon Feb 22 08:36:31 2016 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5fe163f1
sci-mathematics/netgen: Amend patches for -p1 * Use PATCHES=() * Convert myconf to array * Prune .la files * Add missing SLOT operators Package-Manager: portage-2.2.27 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> .../netgen/files/netgen-5.x-missing-define.patch | 8 ++-- .../files/netgen-5.x-occ-stl-api-change.patch | 4 +- sci-mathematics/netgen/netgen-5.3.1.ebuild | 45 ++++++++++++---------- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch index 4ad5c52..d9d8f99 100644 --- a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch +++ b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch @@ -1,5 +1,5 @@ ---- libsrc/occ/Partition_Loop2d.cxx.orig 2012-11-14 21:16:22.876287910 +0100 -+++ libsrc/occ/Partition_Loop2d.cxx 2012-11-14 21:22:30.909650554 +0100 +--- a/libsrc/occ/Partition_Loop2d.cxx 2012-11-14 21:16:22.876287910 +0100 ++++ b/libsrc/occ/Partition_Loop2d.cxx 2012-11-14 21:22:30.909650554 +0100 @@ -13,6 +13,7 @@ //using namespace std; @@ -26,8 +26,8 @@ { // an angle is too close to PI; assure that an angle sign really // reflects an edge position: +PI - an edge is worst, ---- configure.ac.orig 2012-11-15 14:55:45.048938870 +0100 -+++ configure.ac 2012-11-15 14:55:12.545923777 +0100 +--- a/configure.ac 2012-11-15 14:55:45.048938870 +0100 ++++ b/configure.ac 2012-11-15 14:55:12.545923777 +0100 @@ -14,6 +14,7 @@ AC_DISABLE_STATIC 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 index 05f3a54..0452d6b 100644 --- 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 @@ -1,5 +1,5 @@ ---- libsrc/occ/occgeom.cpp 2014-08-29 11:54:03.000000000 +0200 -+++ libsrc/occ/occgeom.cpp 2016-02-12 21:14:49.258982206 +0100 +--- a/libsrc/occ/occgeom.cpp 2014-08-29 11:54:03.000000000 +0200 ++++ b/libsrc/occ/occgeom.cpp 2016-02-12 21:14:49.258982206 +0100 @@ -149,7 +149,7 @@ for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild index 9aac92d..b3f383d 100644 --- a/sci-mathematics/netgen/netgen-5.3.1.ebuild +++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -18,8 +18,8 @@ KEYWORDS="~amd64 ~x86" IUSE="-ffmpeg jpeg -mpi opencascade openmp" DEPEND=" - dev-lang/tcl - dev-lang/tk + dev-lang/tcl:0 + dev-lang/tk:0 dev-tcltk/tix dev-tcltk/togl:1.7 virtual/opengl @@ -32,19 +32,22 @@ DEPEND=" RDEPEND="${DEPEND}" # Note, MPI has not be tested. -src_prepare() { - default +PATCHES=( # Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824 - epatch "${FILESDIR}/${PN}-5.x-missing-define.patch" + "${FILESDIR}"/${PN}-5.x-missing-define.patch # Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_metis.patch - epatch "${FILESDIR}/${PN}-5.x-metis-fixes.patch" - epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch" + "${FILESDIR}"/${PN}-5.x-metis-fixes.patch + "${FILESDIR}"/${PN}-5.x-occ-stl-api-change.patch # Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.1_build.patch - epatch "${FILESDIR}/${PN}-5.x-makefiles-fixes.patch" + "${FILESDIR}"/${PN}-5.x-makefiles-fixes.patch # Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch - epatch "${FILESDIR}/${PN}-5.x-fedora-fixes.patch" - epatch "${FILESDIR}/${PN}-5.x-includes-fixes.patch" - epatch "${FILESDIR}/${PN}-5.x-parallelmetis4-fix.patch" + "${FILESDIR}"/${PN}-5.x-fedora-fixes.patch + "${FILESDIR}"/${PN}-5.x-includes-fixes.patch + "${FILESDIR}"/${PN}-5.x-parallelmetis4-fix.patch +) + +src_prepare() { + default if use mpi; then export CC=mpicc export CXX=mpic++ @@ -58,14 +61,12 @@ src_prepare() { src_configure() { # This is not the most clever way to deal with these flags # but --disable-xxx does not seem to work correcly, so... - local myconf="--with-togl=/usr/$(get_libdir)/Togl1.7" + local myconf=( --with-togl=/usr/$(get_libdir)/Togl1.7 ) - if use !openmp; then - myconf="${myconf} --disable-openmp" - fi + myconf+=( $(use_enable openmp) ) if use opencascade; then - myconf="${myconf} --enable-occ --with-occ=$CASROOT" + myconf+=( --enable-occ --with-occ=$CASROOT ) append-ldflags -L$CASROOT/$(get_libdir) fi if use mpi; then @@ -74,16 +75,16 @@ src_configure() { ewarn "MPI has not been tested, you should probably deactivate the mpi use flag" ewarn "" ewarn "*************************************************************************" - myconf="${myconf} --enable-parallel" + myconf+=( --enable-parallel ) append-cppflags -I/usr/include/metis append-ldflags -L/usr/$(get_libdir)/openmpi/ fi - use ffmpeg && myconf="${myconf} --enable-ffmpeg" - use jpeg && myconf="${myconf} --enable-jpeglib" + use ffmpeg && myconf+=( --enable-ffmpeg ) + use jpeg && myconf+=( --enable-jpeglib ) append-cppflags -I/usr/include/togl-1.7 econf \ - ${myconf} + ${myconf[@]} # This would be the more elegant way: # econf \ @@ -106,6 +107,8 @@ src_install() { # Install icon and .desktop for menu entry doicon "${FILESDIR}"/${PN}.png domenu "${FILESDIR}"/${PN}.desktop + + prune_libtool_files } pkg_postinst() {