diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2017-03-06 00:23:43 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2017-03-06 00:23:43 +0300 |
commit | 3d656adb54ef2b718e3b14d720ff78ebae5af7d5 (patch) | |
tree | 11475822d81c553edac6bbe9a35d3f472fbef216 /sci-physics/xfoil/xfoil-6.99.ebuild | |
parent | app-doc/pms: Don't try to install png files since there aren't any. (diff) | |
download | gentoo-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/xfoil-6.99.ebuild')
-rw-r--r-- | sci-physics/xfoil/xfoil-6.99.ebuild | 76 |
1 files changed, 76 insertions, 0 deletions
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 +} |