From 8029cc3cdcc002d98e46cced54851893ffa3f19c Mon Sep 17 00:00:00 2001 From: Michael Mair-Keimberger Date: Sat, 30 Mar 2024 21:27:54 +0100 Subject: sci-physics/xfoil: EAPI8 bump, fix bug #820623, #725718 Closes: https://bugs.gentoo.org/820623 Closes: https://bugs.gentoo.org/725718 Closes: https://github.com/gentoo/gentoo/pull/36004 Signed-off-by: Michael Mair-Keimberger Signed-off-by: Guilherme Amadio --- sci-physics/xfoil/xfoil-6.99-r1.ebuild | 85 ++++++++++++++++++++++++++++++++++ sci-physics/xfoil/xfoil-6.99.ebuild | 79 ------------------------------- 2 files changed, 85 insertions(+), 79 deletions(-) create mode 100644 sci-physics/xfoil/xfoil-6.99-r1.ebuild delete mode 100644 sci-physics/xfoil/xfoil-6.99.ebuild diff --git a/sci-physics/xfoil/xfoil-6.99-r1.ebuild b/sci-physics/xfoil/xfoil-6.99-r1.ebuild new file mode 100644 index 000000000000..23bffe5c71d6 --- /dev/null +++ b/sci-physics/xfoil/xfoil-6.99-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit fortran-2 flag-o-matic toolchain-funcs + +DESCRIPTION="Design and analysis of subsonic isolated airfoils" +HOMEPAGE="https://web.mit.edu/drela/Public/web/xfoil/" +SRC_URI=" + https://web.mit.edu/drela/Public/web/${PN}/${PN}${PV}.tgz + doc? ( https://web.mit.edu/drela/Public/web/${PN}/dataflow.pdf )" +S="${WORKDIR}/${PN^}" + +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 ) + +src_prepare() { + # fix bug #147033 + [[ $(tc-getFC) == *gfortran ]] && PATCHES+=( "${FILESDIR}"/${PN}-6.96-gfortran.patch ) + default + + # GCC 10 workaround + # bug #722194 + append-fflags $(test-flags-FC -fallow-argument-mismatch) + + 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" \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR) r" \ + RANLIB="$(tc-getRANLIB)" + + local i + for i in blu pplot pxplot xfoil; do + emake -C bin \ + PLTOBJ="../plotlib/libPlt_gSP.a" \ + CFLAGS="${CFLAGS} -DUNDERSCORE" \ + FTNLIB="${LDFLAGS}" \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR) r" \ + RANLIB="$(tc-getRANLIB)" \ + $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 +} diff --git a/sci-physics/xfoil/xfoil-6.99.ebuild b/sci-physics/xfoil/xfoil-6.99.ebuild deleted file mode 100644 index 36047f4e3d56..000000000000 --- a/sci-physics/xfoil/xfoil-6.99.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit fortran-2 flag-o-matic toolchain-funcs - -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 - - # GCC 10 workaround - # bug #722194 - append-fflags $(test-flags-FC -fallow-argument-mismatch) - - 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 -} -- cgit v1.2.3-65-gdbad