aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Prosser <dpross1100@msn.com>2016-12-29 13:03:34 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-12-31 08:22:15 +0700
commit2d8dca281f67481bac79e58d2a8b394f8559fafd (patch)
tree38c424e4479232012174b0f985def9c52a88ca5a
parent30be0fc06647205979987ab5e1f0dc310d40a359 (diff)
academic/xfoil: Added (program for design and analysis of airfoils).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--academic/xfoil/Makefile_patches/Makefile.orrs.patch30
-rw-r--r--academic/xfoil/Makefile_patches/Makefile.xfoil.patch149
-rw-r--r--academic/xfoil/Makefile_patches/config.make.plotlib.patch25
-rw-r--r--academic/xfoil/README7
-rw-r--r--academic/xfoil/slack-desc19
-rw-r--r--academic/xfoil/xfoil.SlackBuild109
-rw-r--r--academic/xfoil/xfoil.info10
-rw-r--r--academic/xfoil/xoper.f.patch61
8 files changed, 410 insertions, 0 deletions
diff --git a/academic/xfoil/Makefile_patches/Makefile.orrs.patch b/academic/xfoil/Makefile_patches/Makefile.orrs.patch
new file mode 100644
index 0000000000000..32be02f168a47
--- /dev/null
+++ b/academic/xfoil/Makefile_patches/Makefile.orrs.patch
@@ -0,0 +1,30 @@
+--- orrs/bin/Makefile 2011-04-03 12:27:46.000000000 -0400
++++ orrs/bin/Makefile.orrs 2016-09-12 20:36:36.000000000 -0400
+@@ -1,25 +1,12 @@
+
+ SRC = ../src
+-PLTOBJ = /home/codes/Xplot/libPlt.a
+
+ #========================================
+ # Default compiler flags
+-FC = f77
+-FLG = -O
++FC = gfortran
++FLG = -O2 -fdefault-real-8
+ PLTLIB = -lX11
+ FTNLIB =
+-
+-#========================================
+-# Uncomment for Intel Fortran Compiler
+-FC = ifort
+-FLG = -O -fpe0 -CB
+-PLTLIB = -L/usr/X11R6/lib -lX11
+-FTNLIB =
+-
+-# Additional IFC stuff needed on MIT's Athena system
+-#FC = ifc
+-#FTNLIB = -Vaxlib /usr/lib/C-ctype.o /usr/lib/C_name.o /usr/lib/ctype-info.o
+-
+ #========================================
+
+
diff --git a/academic/xfoil/Makefile_patches/Makefile.xfoil.patch b/academic/xfoil/Makefile_patches/Makefile.xfoil.patch
new file mode 100644
index 0000000000000..e8e0b413e3e5a
--- /dev/null
+++ b/academic/xfoil/Makefile_patches/Makefile.xfoil.patch
@@ -0,0 +1,149 @@
+--- bin/Makefile 2013-11-19 00:23:37.000000000 -0500
++++ bin/Makefile.xfoil 2016-09-12 22:42:05.000000000 -0400
+@@ -4,10 +4,7 @@
+ # M.Drela
+ #*********************************************************
+
+-
+-SHELL = sh
+-BINDIR = /home/codes/bin/
+-#BINDIR = .
++BINDIR = $(DESTDIR)/usr/bin
+
+ PROGS = xfoil pplot pxplot
+
+@@ -33,104 +30,39 @@
+ OSOBJ = frplot.o ntcalc.o osmap.o getosfile.o
+
+ ##----------------------------------------------------
+-PLTOBJ = ../plotlib/libPlt.a
++PLTOBJ = ../plotlib/libPlt_gDP.a
+
+ # Use this if you have a copy of the plotlib as a system library
+ #PLTOBJ = -lPlt
+
+ # The extra location arg here is for Linux which places X libs in /usr/X11R6
+-PLTLIB = -L/usr/X11R6/lib -lX11
++PLTLIB = -lX11
+
+ ###================================================
+ ### Default compilers and flags
+ ### FFLOPT used for xsolve.f
+-FC = f77
+-FFLAGS = -O
+-FFLOPT = -O
+-INSTALLCMD = install -s
+-
+-CC = cc
+-CFLAGS = -O -DUNDERSCORE
+-
+-##--------------------------
+
+-# Uncomment flags for desired machine...
++CC = gcc
++CFLAGS = -O2 -DUNDERSCORE
+
+ ##--------------------------
+-### DEC Alpha with OSF and DEC f77/f90 compiler
+-#FC = f77
+-#FFLAGS = -fast -O4 -tune host
+-#FFLOPT = -fast -O4 -tune host
+-#FFLOPT = -fast -O5 -tune host -unroll 3
+-# Debug flags
+-#FFLAGS = -O0 -g
+-#FFLOPT = -fast -O4 -tune host
+-##--------------------------
+-### SGI setup
+-#FC = f77
+-#FFLAGS = -O2 -static
+-#FFLOPT = -O2 -static
+-##--------------------------
+-## Uncomment for RS/6000
+-#FFLAGS = -O -qextname
+-#FFLOPT = -O -qextname
+-##--------------------------
+-## Uncomment for HP-9000
+-#FFLAGS = -O +ppu
+-#FFLOPT = -O +ppu
+-#FTNLIB = -U77
+-##--------------------------
+-### Absoft Linux f77
+-#FC = f77
+-#FFLAGS = -O -f -s -W -B108 -N34
+-#FFLOPT = -O -f -s -W -B108 -N34
+-##--------------------------
+-### f2c/gcc compiler driver
+-#FC = fort77
+-#FFLAGS = -O2 -fomit-frame-pointer
+-#FFLOPT = -O2 -fomit-frame-pointer
+-##--------------------------
+-### GNU g77
+-#FC = g77
+-#FFLAGS = -O3 -fomit-frame-pointer
+-#FFLOPT = -O3 -fomit-frame-pointer
+-# Debug flags (symbols, array bounds)
+-#FC = g77
+-#FFLAGS = -g -O0 -C
+-##--------------------------
+-### GNU gfortran
+-#FC = gfortran
+-#FFLAGS = -O3 -fomit-frame-pointer
+-#FFLOPT = -O3 -fomit-frame-pointer
+-# Debug flags (symbols, array bounds)
+-#FFLAGS = -g -O0 -fbounds-check
+-#FFLOPT = -g -O0 -fbounds-check
+-#
+-### Double precision option
+-#FFLAGS = -O3 -fdefault-real-8
+-#FFLOPT = -O3 -fdefault-real-8
+-#FFLAGS = -O3 -fdefault-real-8 -fbounds-check
+-#FFLOPT = -O3 -fdefault-real-8 -fbounds-check
+-# Debug flags (symbols, array bounds)
+-#FFLAGS = -g -O0 -C
+-##--------------------------
+ ### Gfortran
+ FC = gfortran
+ CHK =
+-CHK = -fbounds-check -finit-real=inf -ffpe-trap=invalid,zero
++#CHK = -fbounds-check -finit-real=inf -ffpe-trap=invalid,zero,denormal
+ DBL = -fdefault-real-8
+-FFLAGS = -O $(CHK) $(DBL)
+-FFLOPT = -O $(CHK) $(DBL)
++FFLAGS = -O2 $(CHK) $(DBL)
++FFLOPT = -O2 $(CHK) $(DBL)
+ FTNLIB =
+
+ PLTOBJ = ../plotlib/libPlt_gDP.a
+
+
+-
+ all: $(PROGS)
+
+ install:
+- $(INSTALLCMD) $(PROGS) $(BINDIR)
++ install -d -m 0755 $(BINDIR)
++ install -m 0755 $(PROGS) $(BINDIR)
+
+ clean:
+ -/bin/rm $(PROGS)
+@@ -141,20 +73,15 @@
+
+ xfoil: $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ)
+ $(FC) -o xfoil $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
+- $(INSTALLCMD) xfoil $(BINDIR)
+
+ pxplot: $(PXPLOTOBJ) $(XUTILOBJ)
+ $(FC) -o pxplot $(PXPLOTOBJ) $(XUTILOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
+- $(INSTALLCMD) pxplot $(BINDIR)
+
+ pplot: $(PPLOTOBJ) $(XUTILOBJ)
+ $(FC) -o pplot $(PPLOTOBJ) $(XUTILOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
+- $(INSTALLCMD) pplot $(BINDIR)
+
+ blu: blu.o profil.o
+ $(FC) -o blu blu.o profil.o
+- $(INSTALLCMD) blu $(BINDIR)
+-
+
+ blu.o: $(SRC)/blu.f
+ $(FC) -c $(FFLAGS) $(SRC)/blu.f
diff --git a/academic/xfoil/Makefile_patches/config.make.plotlib.patch b/academic/xfoil/Makefile_patches/config.make.plotlib.patch
new file mode 100644
index 0000000000000..991c2f0b3ea28
--- /dev/null
+++ b/academic/xfoil/Makefile_patches/config.make.plotlib.patch
@@ -0,0 +1,25 @@
+--- plotlib/config.make 2013-10-06 19:32:13.000000000 -0400
++++ plotlib/config.make.plotlib 2016-09-11 21:45:12.000000000 -0400
+@@ -7,7 +7,7 @@
+
+
+ # Set library name
+-PLTLIB = libPlt_gSP.a
++PLTLIB = libPlt_gDP.a
+
+ # Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
+ # This should work for most of the "unix" fortran compilers
+@@ -15,10 +15,10 @@
+
+ FC = gfortran
+ CC = gcc
+-#DP = -fdefault-real-8
++DP = -fdefault-real-8
+
+-FFLAGS = -m64 -O2 $(DP)
+-CFLAGS = -m64 -O2 $(DEFINE) -I/usr/X11/include
++FFLAGS = -O2 $(DP)
++CFLAGS = -O2 $(DEFINE) -I/usr/X11/include
+ AR = ar r
+ RANLIB = ranlib
+ LINKLIB = -L/usr/X11R6/lib -lX11
diff --git a/academic/xfoil/README b/academic/xfoil/README
new file mode 100644
index 0000000000000..c9bb85dfeaf09
--- /dev/null
+++ b/academic/xfoil/README
@@ -0,0 +1,7 @@
+XFOIL is an interactive program for the design and analysis of subsonic isolated
+airfoils. It consists of a collection of menu-driven routines which perform
+various useful functions, such as viscous (or inviscid) analysis of an existing
+airfoil, airfoil design and redesign by interactive modification of surface
+speed distributions or geometric parameters, blending of airfoils, writing and
+reading of airfoil coordinates and polar save files, and plotting of geometry,
+pressure distributions, and multiple polars.
diff --git a/academic/xfoil/slack-desc b/academic/xfoil/slack-desc
new file mode 100644
index 0000000000000..ca843a5512a52
--- /dev/null
+++ b/academic/xfoil/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+xfoil: xfoil (interactive program for design and analysis of airfoils)
+xfoil:
+xfoil: XFOIL is an interactive program for the design and analysis of
+xfoil: subsonic isolated airfoils. It consists of a collection of
+xfoil: menu-driven routines which perform various useful functions, such as
+xfoil: viscous (or inviscid) analysis of an existing airfoil, design and
+xfoil: redesign by interactive modification of surface speed distributions
+xfoil: or geometric parameters, blending airfoils, plotting, saving, and
+xfoil: reading geometry and polars.
+xfoil:
+xfoil: Homepage: http://web.mit.edu/drela/Public/web/xfoil/
diff --git a/academic/xfoil/xfoil.SlackBuild b/academic/xfoil/xfoil.SlackBuild
new file mode 100644
index 0000000000000..16775a30640de
--- /dev/null
+++ b/academic/xfoil/xfoil.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Slackware build script for xfoil
+
+# Copyright 2016 Daniel Prosser, Lexington Park, MD
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=xfoil
+VERSION=${VERSION:-6.99}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf Xfoil
+tar xvf $CWD/$PRGNAM$VERSION.tgz
+cd Xfoil
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i '101s/\/home\/codes\/orrs\/osmapDP.dat/\/tmp\/SBo\/Xfoil\/orrs\/osmapDP.dat/' orrs/src/osmap.f # Correct path to osmapDP.dat
+sed -i '660 a \ BACKSPACE(LU)' src/iopol.f # Avoid write errors with new gfortran
+patch -p0 < $CWD/xoper.f.patch # Get rid of hard-coded debugging output
+
+# Patches to create correct Makefiles
+patch -p0 < $CWD/Makefile_patches/Makefile.orrs.patch
+patch -p0 < $CWD/Makefile_patches/config.make.plotlib.patch
+patch -p0 < $CWD/Makefile_patches/Makefile.xfoil.patch
+
+cd orrs
+ cd bin
+ make osgen
+ make osmap.o
+ cd ..
+cd ..
+cd plotlib
+ make libPlt_gDP.a
+cd -
+cd bin
+ make xfoil
+ make pplot
+ make pxplot
+ make install DESTDIR="$PKG"
+cd -
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README xfoil_doc.txt sessions.txt version_notes.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/academic/xfoil/xfoil.info b/academic/xfoil/xfoil.info
new file mode 100644
index 0000000000000..a7de540747f56
--- /dev/null
+++ b/academic/xfoil/xfoil.info
@@ -0,0 +1,10 @@
+PRGNAM="xfoil"
+VERSION="6.99"
+HOMEPAGE="http://web.mit.edu/drela/Public/web/xfoil/"
+DOWNLOAD="http://web.mit.edu/drela/Public/web/xfoil/xfoil6.99.tgz"
+MD5SUM="8d6270fc4341d299a426b3ad41be9cc4"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Daniel Prosser"
+EMAIL="dpross1100@msn.com"
diff --git a/academic/xfoil/xoper.f.patch b/academic/xfoil/xoper.f.patch
new file mode 100644
index 0000000000000..cff6f6fd30297
--- /dev/null
+++ b/academic/xfoil/xoper.f.patch
@@ -0,0 +1,61 @@
+--- src/xoper.f 2013-12-08 13:21:22.000000000 -0500
++++ src.xoper.f.new 2016-09-15 20:50:03.000000000 -0400
+@@ -3064,32 +3064,32 @@
+ ione = int( (fnum-float(10*iten)) / 0.99999 )
+ idec = int( (fnum-float(10*iten)-float(ione)) / 0.09999 )
+
+- fname = char(iten+izero)
+- & // char(ione+izero)
+- & // char(idec+izero) // '.bl'
+- lu = 44
+- open(lu,file=fname,status='unknown')
+- rewind(lu)
+- write(lu,'(a,a)')
+- &'# s ue H P K ',
+- &' x -m du/dx'
+-c 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890
+- do ibl = 2, iblte(is)
+- iblm = max( ibl-1 , 2 )
+- iblp = min( ibl+1 , iblte(is) )
+- i = ipan(ibl ,is)
+- hk = dstr(ibl,is) / thet(ibl,is)
+- ddef = dstr(ibl,is)*uedg(ibl,is)
+- pdef = thet(ibl,is)*uedg(ibl,is)**2
+- edef = tstr(ibl,is)*uedg(ibl,is)**3 * 0.5
+- duds = (uedg(iblp,is)-uedg(iblm,is))
+- & / (xssi(iblp,is)-xssi(iblm,is))
+- dpds = -ddef*duds
+- write(lu,9977)
+- & xssi(ibl,is), uedg(ibl,is), hk, pdef, edef, x(i), dpds
+- 9977 format(1x, 3f11.4, 2f11.6, f11.3, e14.6 )
+- enddo
+- close(lu)
++c fname = char(iten+izero)
++c & // char(ione+izero)
++c & // char(idec+izero) // '.bl'
++c lu = 44
++c open(lu,file=fname,status='unknown')
++c rewind(lu)
++c write(lu,'(a,a)')
++c &'# s ue H P K ',
++c &' x -m du/dx'
++cc 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890
++c do ibl = 2, iblte(is)
++c iblm = max( ibl-1 , 2 )
++c iblp = min( ibl+1 , iblte(is) )
++c i = ipan(ibl ,is)
++c hk = dstr(ibl,is) / thet(ibl,is)
++c ddef = dstr(ibl,is)*uedg(ibl,is)
++c pdef = thet(ibl,is)*uedg(ibl,is)**2
++c edef = tstr(ibl,is)*uedg(ibl,is)**3 * 0.5
++c duds = (uedg(iblp,is)-uedg(iblm,is))
++c & / (xssi(iblp,is)-xssi(iblm,is))
++c dpds = -ddef*duds
++c write(lu,9977)
++c & xssi(ibl,is), uedg(ibl,is), hk, pdef, edef, x(i), dpds
++c 9977 format(1x, 3f11.4, 2f11.6, f11.3, e14.6 )
++c enddo
++c close(lu)
+
+
+