summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2017-03-06 00:23:43 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2017-03-06 00:23:43 +0300
commit3d656adb54ef2b718e3b14d720ff78ebae5af7d5 (patch)
tree11475822d81c553edac6bbe9a35d3f472fbef216 /sci-physics/xfoil
parentapp-doc/pms: Don't try to install png files since there aren't any. (diff)
downloadgentoo-3d656adb54ef2b718e3b14d720ff78ebae5af7d5.tar.gz
gentoo-3d656adb54ef2b718e3b14d720ff78ebae5af7d5.tar.bz2
gentoo-3d656adb54ef2b718e3b14d720ff78ebae5af7d5.zip
sci-physics/xfoil: version bump
Bug: 556688 Package-Manager: Portage-2.3.3, Repoman-2.3.1 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'sci-physics/xfoil')
-rw-r--r--sci-physics/xfoil/Manifest1
-rw-r--r--sci-physics/xfoil/files/xfoil-6.99-overflow.patch11
-rw-r--r--sci-physics/xfoil/xfoil-6.99.ebuild76
3 files changed, 88 insertions, 0 deletions
diff --git a/sci-physics/xfoil/Manifest b/sci-physics/xfoil/Manifest
index 75de844ff4e9..8d653871e2a7 100644
--- a/sci-physics/xfoil/Manifest
+++ b/sci-physics/xfoil/Manifest
@@ -1,2 +1,3 @@
DIST dataflow.pdf 7654 SHA256 4596c77a3fa24cd334b35c34fcbd0b4f1d9055273c0862643e2d07b5e774aff5 SHA512 1bb5be8e70fca1fa90f28d214140e96a8795c7d82a37f4fe4d68606fa3eb28252913b8fb13eb3e97a3cf05c3001c88dbfcdb8a2f20d4baed5e730770a2d602b1 WHIRLPOOL 8e13137933ae0e8edc2890ccdd0537444d5fa9530e76caefb3701173c7720d2cb68d9073b70e7948a11ed6668dcd64b3685c750f5cef889c31d1506d3788a530
DIST xfoil6.97.tar.gz 3972497 SHA256 293e28e269bd88a62f8b6ba6bf684f16843f6776736e6b77aaa8b6bebc467a81 SHA512 02c0a123fb99fa20de1e3577ca7c6ce00d494058f2ef3ec82e3fdea48901f4346180aea3436e001c5b90401007ccdd5b7e9daa6a96794f0d6b5781a5b36e36e7 WHIRLPOOL 3de5e6c56a906a71b2be1fcf39ea031454c9192b4a649a23aaa889566fea2e92b37239fa6ed90c4b050bdb5759943d0265881f316ecd5b48a06fe4217af36ef7
+DIST xfoil6.99.tgz 4515991 SHA256 5c0250643f52ce0e75d7338ae2504ce7907f2d49a30f921826717b8ac12ebe40 SHA512 6f5bed520826dba2efd1b191b1f90dd810b53d9041cbbaddde09207ba9042f99dd0c9e9aa8b8cdf48767bf2695e328ac8fbd297e1510e53ac10b0f1eea35cfef WHIRLPOOL 88ca7c92fb1335f416577dc7df67e22581a32b56affb234f440b9523122429ad7ad37455e3270461909b0eb3d181013daa3db0e869086e218e2eaf5bf5f4e3ce
diff --git a/sci-physics/xfoil/files/xfoil-6.99-overflow.patch b/sci-physics/xfoil/files/xfoil-6.99-overflow.patch
new file mode 100644
index 000000000000..d35528caa089
--- /dev/null
+++ b/sci-physics/xfoil/files/xfoil-6.99-overflow.patch
@@ -0,0 +1,11 @@
+--- Xfoil/src/xoper.f.orig 2013-12-08 22:21:22.000000000 +0400
++++ Xfoil/src/xoper.f 2017-03-05 23:02:33.214895357 +0300
+@@ -114,7 +114,7 @@
+ C---- don't try to read integers, since might get integer overflow
+ DO I=1, NINPUT
+ IF(ABS(RINPUT(I)) .GT. 2.1E9) THEN
+- IINPUT(I) = 2**30
++ IINPUT(I) = HUGE(0)
+ ELSE
+ IINPUT(I) = INT(RINPUT(I))
+ ENDIF
diff --git a/sci-physics/xfoil/xfoil-6.99.ebuild b/sci-physics/xfoil/xfoil-6.99.ebuild
new file mode 100644
index 000000000000..f50b8bace44a
--- /dev/null
+++ b/sci-physics/xfoil/xfoil-6.99.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit fortran-2
+
+DESCRIPTION="Design and analysis of subsonic isolated airfoils"
+HOMEPAGE="http://raphael.mit.edu/xfoil/"
+SRC_URI="
+ http://web.mit.edu/drela/Public/web/${PN}/${PN}${PV}.tgz
+ doc? ( http://web.mit.edu/drela/Public/web/${PN}/dataflow.pdf )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+RDEPEND="x11-libs/libX11"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-overflow.patch )
+
+S="${WORKDIR}/${PN^}"
+
+src_prepare() {
+ # fix bug #147033
+ [[ $(tc-getFC) == *gfortran ]] && PATCHES+=( "${FILESDIR}"/${PN}-6.96-gfortran.patch )
+ default
+
+ sed \
+ -e '/^FC/d' \
+ -e '/^CC/d' \
+ -e '/^FFLAGS/d' \
+ -e '/^CFLAGS/d' \
+ -e '/INSTALLCMD/d' \
+ -e 's/^\(FFLOPT .*\)/FFLOPT = $(FFLAGS)/g' \
+ -i {bin,plotlib,orrs/bin}/Makefile plotlib/config.make \
+ || die "sed for flags and compilers failed"
+
+ sed \
+ -e "s:/var/local/codes/orrs/osmap.dat:${EPREFIX}/usr/share/xfoil/orrs/osmap.dat:" \
+ -i orrs/src/osmap.f || die "sed osmap.f failed"
+}
+
+src_compile() {
+ emake -C orrs/bin FLG="${FFLAGS}" FTNLIB="${LDFLAGS}" OS
+ pushd orrs >/dev/null || die
+ bin/osgen osmaps_ns.lst || die
+ popd >/dev/null || die
+ emake -C plotlib CFLAGS="${CFLAGS} -DUNDERSCORE"
+
+ local i
+ for i in blu pplot pxplot xfoil; do
+ emake -C bin \
+ PLTOBJ="../plotlib/libPlt_gSP.a" \
+ CFLAGS="${CFLAGS} -DUNDERSCORE" \
+ FTNLIB="${LDFLAGS}" \
+ $i
+ done
+}
+
+src_install() {
+ dobin bin/{blu,pplot,pxplot,xfoil}
+ insinto /usr/share/xfoil/orrs
+ doins orrs/osm*.dat
+
+ local DOCS=( *.txt README )
+ use doc && DOCS+=( "${DISTDIR}"/dataflow.pdf )
+ einstalldocs
+ if use examples; then
+ dodoc -r runs
+ docompress -x /usr/share/doc/${PF}/runs
+ fi
+}