summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Bräunlich <wippbox@gmx.net>2016-11-12 16:44:25 +0100
committerDavid Seifert <soap@gentoo.org>2016-11-13 22:48:30 +0100
commit0901cd7e3583035b2ec33cde89b4bdcd4c0bdb40 (patch)
tree1081ada57a4e6a333730af2b1f1020e714f69709 /sci-physics/xfoil/xfoil-6.97-r1.ebuild
parentsci-physics/bullet: Version bump to 2.85, EAPI bump 5 -> 6 (diff)
downloadgentoo-0901cd7e3583035b2ec33cde89b4bdcd4c0bdb40.tar.gz
gentoo-0901cd7e3583035b2ec33cde89b4bdcd4c0bdb40.tar.bz2
gentoo-0901cd7e3583035b2ec33cde89b4bdcd4c0bdb40.zip
sci-physics/xfoil: EAPI bump 4 -> 6
Package-Manager: portage-2.3.0 Closes: https://github.com/gentoo/gentoo/pull/2826 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-physics/xfoil/xfoil-6.97-r1.ebuild')
-rw-r--r--sci-physics/xfoil/xfoil-6.97-r1.ebuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/sci-physics/xfoil/xfoil-6.97-r1.ebuild b/sci-physics/xfoil/xfoil-6.97-r1.ebuild
new file mode 100644
index 000000000000..d835141c8af3
--- /dev/null
+++ b/sci-physics/xfoil/xfoil-6.97-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 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}.tar.gz
+ 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 '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
+ popd >/dev/null || die
+ emake -C plotlib CFLAGS="${CFLAGS} -DUNDERSCORE"
+
+ local i
+ for i in xfoil pplot pxplot; do
+ emake -C bin \
+ PLTOBJ="../plotlib/libPlt.a" \
+ CFLAGS="${CFLAGS} -DUNDERSCORE" \
+ FTNLIB="${LDFLAGS}" \
+ $i
+ done
+}
+
+src_install() {
+ dobin bin/{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
+}