From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 45845138247 for ; Tue, 3 Dec 2013 14:53:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9F515E0BE1; Tue, 3 Dec 2013 14:53:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C91F1E0B6B for ; Tue, 3 Dec 2013 14:53:02 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7FDEB33F436 for ; Tue, 3 Dec 2013 14:53:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 3A7F8E5535 for ; Tue, 3 Dec 2013 14:53:00 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1386055545.f50e31a1de22f65272d98b092b777c641cd36707.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/ X-VCS-Repository: proj/sci X-VCS-Files: sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch sci-mathematics/netgen/files/netgen-5.x-missing-define.patch sci-mathematics/netgen/files/netgen.desktop sci-mathematics/netgen/netgen-5.0.0.ebuild X-VCS-Directories: sci-mathematics/netgen/files/ sci-mathematics/netgen/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: f50e31a1de22f65272d98b092b777c641cd36707 X-VCS-Branch: master Date: Tue, 3 Dec 2013 14:53:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a51135d2-cc69-4397-9ad7-e2dd667f273f X-Archives-Hash: a67f2e6b2cb55584a486bd36fece13fb commit: f50e31a1de22f65272d98b092b777c641cd36707 Author: Christophe Paccolat mycable ch> AuthorDate: Mon Dec 3 13:20:18 2012 +0000 Commit: Justin Lecher gentoo org> CommitDate: Tue Dec 3 07:25:45 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f50e31a1 sci-mathematics/netgen: Version bump --- .../netgen-5.x-compile-against-occ-6.5.x.patch | 28 +++++++ .../netgen/files/netgen-5.x-missing-define.patch | 38 ++++++++++ sci-mathematics/netgen/files/netgen.desktop | 5 +- sci-mathematics/netgen/netgen-5.0.0.ebuild | 88 ++++++++++++++++++++++ 4 files changed, 156 insertions(+), 3 deletions(-) diff --git a/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch b/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch new file mode 100644 index 0000000..ce581ce --- /dev/null +++ b/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch @@ -0,0 +1,28 @@ +--- libsrc/occ/Partition_Spliter.cxx.old 2012-11-14 16:14:39.440625195 +0100 ++++ libsrc/occ/Partition_Spliter.cxx 2012-11-14 16:15:20.035646075 +0100 +@@ -1169,8 +1169,8 @@ + for (; j<=nbj && ok; ++j) { + if (Extrema.IsMin(j)) { + hasMin = Standard_True; +- ok = Extrema.Value(j) <= tol; // V6.3 +- // ok = Extrema.SquareDistance(j) <= tol; // V6.5 ++ // ok = Extrema.Value(j) <= tol; // V6.3 ++ ok = Extrema.SquareDistance(j) <= tol; // V6.5 + } + } + } +--- libsrc/occ/Partition_Inter3d.cxx.old 2012-11-14 16:13:11.149581085 +0100 ++++ libsrc/occ/Partition_Inter3d.cxx 2012-11-14 16:14:20.017615214 +0100 +@@ -243,9 +243,9 @@ + Standard_Integer i, nbExt = anExtPS.NbExt(); + Extrema_POnSurf aPOnSurf; + for (i = 1; i <= nbExt; ++i ) +- if (anExtPS.Value( i ) <= TolE) // V6.3 +- // if (anExtPS.SquareDistance( i ) <= TolE) // V6.5 +- { ++ // if (anExtPS.Value( i ) <= TolE) // V6.3 ++ if (anExtPS.SquareDistance( i ) <= TolE) // V6.5 ++ { + aPOnSurf = anExtPS.Point( i ); + break; + } diff --git a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch new file mode 100644 index 0000000..4ad5c52 --- /dev/null +++ b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch @@ -0,0 +1,38 @@ +--- 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 +@@ -13,6 +13,7 @@ + + //using namespace std; + #include ++#include + #include "Partition_Loop2d.ixx" + + #include "utilities.h" +@@ -210,7 +211,7 @@ + Cc->D1(uc, PC, CTg1); + if (!isForward) CTg1.Reverse(); + +- Standard_Real anglemin = 3 * PI, tolAng = 1.e-8; ++ Standard_Real anglemin = 3 * M_PI, tolAng = 1.e-8; + + // select an edge whose first derivative is most left of CTg1 + // ie an angle between Tg1 and CTg1 is least +@@ -234,7 +235,7 @@ + // -PI < angle < PI + Standard_Real angle = Tg1.Angle(CTg1); + +- if (PI - Abs(angle) <= tolAng) ++ if (M_PI - Abs(angle) <= tolAng) + { + // 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 +@@ -14,6 +14,7 @@ + AC_DISABLE_STATIC + + AC_LANG([C++]) ++AM_PROG_AR + AC_PROG_CXX + AC_PROG_LIBTOOL + LT_INIT diff --git a/sci-mathematics/netgen/files/netgen.desktop b/sci-mathematics/netgen/files/netgen.desktop index 9b48d69..714ba53 100644 --- a/sci-mathematics/netgen/files/netgen.desktop +++ b/sci-mathematics/netgen/files/netgen.desktop @@ -1,9 +1,8 @@ [Desktop Entry] -Encoding=UTF-8 Name=Netgen Comment=3D modeling, Mesh generation. Exec=/usr/bin/netgen Icon=netgen -Terminal=0 +Terminal=false Type=Application -Categories=Graphics;Application; +Categories=Graphics; diff --git a/sci-mathematics/netgen/netgen-5.0.0.ebuild b/sci-mathematics/netgen/netgen-5.0.0.ebuild new file mode 100644 index 0000000..f0588d5 --- /dev/null +++ b/sci-mathematics/netgen/netgen-5.0.0.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit autotools eutils flag-o-matic multilib versionator + +MY_PN=${PN}-mesher +MY_PV=$(get_version_component_range 1-2) +DESCRIPTION="NETGEN is an automatic 3d tetrahedral mesh generator" +HOMEPAGE="http://www.hpfem.jku.at/netgen/" +SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}/${MY_PV}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +KEYWORDS="~amd64 ~x86" +IUSE="-ffmpeg jpeg -mpi opencascade" +SLOT="0" + +DEPEND="dev-tcltk/tix + dev-tcltk/togl:1.7 + virtual/opengl + x11-libs/libXmu + opencascade? ( sci-libs/opencascade ) + ffmpeg? ( media-video/ffmpeg ) + jpeg? ( virtual/jpeg ) + mpi? ( virtual/mpi ) " +RDEPEND="${DEPEND}" +# Note, MPI has not be tested. + +src_prepare() +{ + # Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824 + epatch "${FILESDIR}/${PN}-5.x-compile-against-occ-6.5.x.patch" + epatch "${FILESDIR}/${PN}-5.x-missing-define.patch" + eautoreconf +} + +src_configure() { + # This is not the most clever way to deal with these flags + # but --disable-xxx does not seem to work correcly, so... + sed -i -e 's:-lTogl:-lTogl1.7:' ng/Makefile.am || die + local myconf="--with-togl=/usr/$(get_libdir)/Togl1.7" + + if use opencascade; then + myconf="${myconf} --enable-occ --with-occ=$CASROOT" + append-ldflags -L$CASROOT/lin/$(get_libdir) + fi + + use mpi && myconf="${myconf} --enable-parallel" + use ffmpeg && myconf="${myconf} --enable-ffmpeg" + use jpeg && myconf="${myconf} --enable-jpeglib" + + append-cppflags -I/usr/include/togl-1.7 + + econf \ + ${myconf} + + # This would be the more elegant way: +# econf \ +# $(use_enable opencascade occ) \ +# $(use_with opencascade "occ=$CASROOT") \ +# $(use_enable mpi parallel) \ +# $(use_enable ffmpeg) \ +# $(use_enable jpeg jpeglib) +} + +src_install() { + local NETGENDIR="/usr/share/netgen" + + echo -e "NETGENDIR=${NETGENDIR} \nLDPATH=/usr/$(get_libdir)/Togl1.7" > ./99netgen + doenvd 99netgen + + emake DESTDIR="${D}" install || die "make install failed" + mv "${D}"/usr/bin/{*.tcl,*.ocf} "${D}${NETGENDIR}" + + # Install icon and .desktop for menu entry + doicon "${FILESDIR}"/${PN}.png || die "doicon failed" + domenu "${FILESDIR}"/${PN}.desktop || die "domenu failed" +} + +pkg_postinst() { + elog "Please make sure to update your environment variables:" + elog "env-update && source /etc/profile" + elog "Netgen ebuild is still under development." + elog "Help us improve the ebuild in:" + elog "http://bugs.gentoo.org/show_bug.cgi?id=155424" +}