1 # Contributor: pfm <nl081130@yahoo.de>
2 # Based on the Gentoo ebuild: http://gentoo-portage.com/sci-physics/xfoil
7 pkgdesc="Program for design and analysis of subsonic airfoils."
9 url="http://web.mit.edu/drela/Public/web/xfoil/"
11 depends=('gcc-libs' 'libx11')
12 makedepends=('gcc-fortran' 'sed' 'patch')
13 source=("http://web.mit.edu/drela/Public/web/xfoil/$pkgname$pkgver.tar.gz" \
14 "xfoil-6.96-gfortran.patch" "xfoil-6.97-overflow.patch")
15 md5sums=('b9ce001ed838be880262c75038d489c5'
16 'b66e0eab1473537c7813111fe856b693'
17 '6c993590ae3303b7e59968115682e01d')
25 patch -Np0 -i ../xfoil-6.96-gfortran.patch || return 1
26 patch -Np0 -i ../xfoil-6.97-overflow.patch || return 1
33 -e 's/^\(FFLOPT .*\)/FFLOPT = $(FFLAGS)/g' \
34 {bin,plotlib,orrs/bin}/Makefile plotlib/config.make \
37 -e 's:/var/local/codes/orrs/osmap.dat:/usr/share/xfoil/orrs/osmap.dat:' \
38 orrs/src/osmap.f || return 1
40 export FC="${_FORTRANC}" F77="${_FORTRANC}"
42 cd "$srcdir/Xfoil/orrs/bin"
43 make FLG="${FFLAGS}" FTNLIB="${LDFLAGS}" OS || return 1
44 cd "$srcdir/Xfoil/orrs"
45 bin/osgen osmaps_ns.lst || return 1
46 cd "$srcdir/Xfoil/plotlib"
47 make CFLAGS="${CFLAGS} -DUNDERSCORE" || return 1
48 cd "$srcdir/Xfoil/bin"
49 for i in xfoil pplot pxplot; do
51 PLTOBJ="../plotlib/libPlt.a" \
52 CFLAGS="${CFLAGS} -DUNDERSCORE" \
57 install -d $pkgdir/usr/bin
58 install -d $pkgdir/usr/share/xfoil/{doc,orrs}
60 cd "$srcdir/Xfoil/bin"
61 install -m755 xfoil $pkgdir/usr/bin
62 install -m755 pplot $pkgdir/usr/bin
63 install -m755 pxplot $pkgdir/usr/bin
65 cd "$srcdir/Xfoil/orrs"
66 install -m644 osm*.dat $pkgdir/usr/share/xfoil/orrs
69 install -m644 xfoil_doc.txt $pkgdir/usr/share/xfoil/doc