sci-visualization/spyview: Fix 20150124 ebuild
authorGerhard Bräunlich <wippbox@gmx.net>
Mon, 30 Jan 2017 22:01:25 +0000 (23:01 +0100)
committerDavid Seifert <soap@gentoo.org>
Mon, 6 Feb 2017 19:30:13 +0000 (20:30 +0100)
Package-Manager: portage-2.3.3
Closes: https://github.com/gentoo/gentoo/pull/3731

sci-visualization/spyview/files/spyview-20150124-gnuplot_interface_fix.patch [new file with mode: 0644]
sci-visualization/spyview/spyview-20150124.ebuild

diff --git a/sci-visualization/spyview/files/spyview-20150124-gnuplot_interface_fix.patch b/sci-visualization/spyview/files/spyview-20150124-gnuplot_interface_fix.patch
new file mode 100644 (file)
index 0000000..6f15296
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/spyview/Gnuplot_Interface.C
++++ b/spyview/Gnuplot_Interface.C
+@@ -13,6 +13,7 @@
+ #else
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/wait.h>
+ #endif
+ using namespace boost;
index fd110c3518eb8a6e57fc9ca8ea5f0cec366ab003..212779375b23b1c423d4cb1bef918c1b10c0dca5 100644 (file)
@@ -1,10 +1,10 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=6
 
-inherit autotools flag-o-matic eutils multilib
+inherit autotools flag-o-matic
 
 DESCRIPTION="2D and 3D data visualization and analysis program"
 HOMEPAGE="http://nsweb.tn.tudelft.nl/~gsteele/spyview/"
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/gsteele13/spyview/archive/966012afae2fbb77262bd96a7e
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS=""  # no keywords since it doesnt build yet...
+KEYWORDS="~amd64 ~x86"
 IUSE=""
 
 COMMON_DEPEND="
@@ -29,6 +29,8 @@ DEPEND="${COMMON_DEPEND}
 RDEPEND="${COMMON_DEPEND}
        sci-visualization/gnuplot"
 
+PATCHES=( ${FILESDIR}/${P}-gnuplot_interface_fix.patch )
+
 src_unpack() {
        default
        mv -v "${WORKDIR}"/spyview-*/source "${S}" || die
@@ -36,18 +38,17 @@ src_unpack() {
 
 src_prepare() {
        append-cflags $(fltk-config --cflags)
-       append-cxxflags $(fltk-config --cxxflags) -I/usr/include/netpbm
+       append-cxxflags $(fltk-config --cxxflags)
+       append-cppflags -I"${EPREFIX}"/usr/include/netpbm
 
        # append-ldflags $(fltk-config --ldflags)
        # this one leads to an insane amount of warnings
        append-ldflags -L$(dirname $(fltk-config --libs))
 
-       find "${S}" -name Makefile.am -exec sed -i -e 's:-mwindows -mconsole::g' {} + || die
+       while IFS="" read -d $'\0' -r file; do
+               sed -i -e 's:-mwindows -mconsole::g' "$file" || die
+       done < <(find "${S}" -name Makefile.am -print0)
 
        default
        eautoreconf
 }
-
-src_configure() {
-       econf --datadir=/usr/share/spyview --docdir=/usr/share/doc/${PF}
-}