summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraur2015-09-04 23:07:43 +0200
committeraur2015-09-04 23:07:43 +0200
commite57c65fa02b95d781a8e437d952b5f8b9d363d4d (patch)
treec91c3194f94a090e60af2ae7695c6ccd6aaadb6b
downloadaur-e57c65fa02b95d781a8e437d952b5f8b9d363d4d.tar.gz
Initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD54
-rw-r--r--xfoil-build.patch178
-rw-r--r--xfoil-osmap.patch11
-rw-r--r--xfoil-overflow.patch11
5 files changed, 276 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5a0f7a70497f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = xfoil
+ pkgdesc = Program for design and analysis of subsonic airfoils.
+ pkgver = 6.99
+ pkgrel = 1
+ url = http://web.mit.edu/drela/Public/web/xfoil/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gcc-fortran
+ depends = gcc-libs
+ depends = libx11
+ source = http://web.mit.edu/drela/Public/web/xfoil/xfoil6.99.tgz
+ source = xfoil-overflow.patch
+ source = xfoil-osmap.patch
+ source = xfoil-build.patch
+ md5sums = 8d6270fc4341d299a426b3ad41be9cc4
+ md5sums = f5f7d8cb268bf44546464636635109bc
+ md5sums = a4ad193f796e9de52596057d03e5b703
+ md5sums = 3f5445c409c7bca00ef22adedcaa61cf
+
+pkgname = xfoil
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8d1514f52eca
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Contributor: pfm <vorticity@mail.ru>
+
+pkgname=xfoil
+pkgver=6.99
+pkgrel=1
+pkgdesc="Program for design and analysis of subsonic airfoils."
+arch=('i686' 'x86_64')
+url="http://web.mit.edu/drela/Public/web/xfoil/"
+license=('GPL2')
+depends=('gcc-libs' 'libx11')
+makedepends=('gcc-fortran')
+source=("http://web.mit.edu/drela/Public/web/xfoil/$pkgname$pkgver.tgz"
+ "xfoil-overflow.patch"
+ "xfoil-osmap.patch"
+ "xfoil-build.patch")
+
+md5sums=('8d6270fc4341d299a426b3ad41be9cc4'
+ 'f5f7d8cb268bf44546464636635109bc'
+ 'a4ad193f796e9de52596057d03e5b703'
+ '3f5445c409c7bca00ef22adedcaa61cf')
+
+build() {
+ cd "$srcdir/Xfoil"
+
+ patch -Np1 -i ../xfoil-overflow.patch
+ patch -Np1 -i ../xfoil-osmap.patch
+ patch -Np1 -i ../xfoil-build.patch
+
+ cd "$srcdir/Xfoil/orrs/bin"
+ make -f Makefile_DP FTNLIB="${LDFLAGS}" OS
+ cd "$srcdir/Xfoil/orrs"
+ bin/osgen osmaps_ns.lst
+
+ cd "$srcdir/Xfoil/plotlib"
+ make CFLAGS="${CFLAGS} -DUNDERSCORE"
+
+ cd "$srcdir/Xfoil/bin"
+ make -f Makefile_gfortran \
+ CFLAGS="${CFLAGS} -DUNDERSCORE" \
+ FTNLIB="${LDFLAGS}"
+}
+
+package() {
+ install -m755 -d ${pkgdir}/usr/bin
+ install -m755 -d ${pkgdir}/usr/share/xfoil/{doc,orrs}
+
+ install -m755 ${srcdir}/Xfoil/bin/{xfoil,pplot,pxplot} \
+ ${pkgdir}/usr/bin
+
+ install -m644 ${srcdir}/Xfoil/orrs/osmap.dat \
+ ${pkgdir}/usr/share/xfoil/orrs
+ install -m644 ${srcdir}/Xfoil/xfoil_doc.txt \
+ ${pkgdir}/usr/share/xfoil/doc
+} \ No newline at end of file
diff --git a/xfoil-build.patch b/xfoil-build.patch
new file mode 100644
index 000000000000..7b54bbba1fc8
--- /dev/null
+++ b/xfoil-build.patch
@@ -0,0 +1,178 @@
+diff -aur Xfoil/bin/Makefile_gfortran Xfoil.patched/bin/Makefile_gfortran
+--- Xfoil/bin/Makefile_gfortran 2012-03-07 06:33:23.000000000 +0100
++++ Xfoil.patched/bin/Makefile_gfortran 2014-03-23 00:42:38.124566013 +0100
+@@ -39,7 +39,7 @@
+ #PLTOBJ = -lPlt
+
+ # The extra location arg here is for Linux which places X libs in /usr/X11R6
+-PLTLIB = -L/usr/X11R6/lib -lX11
++PLTLIB = -L/usr/lib -lX11
+
+ ###================================================
+ ### Default compilers and flags
+@@ -49,8 +49,8 @@
+ FFLOPT = -O
+ INSTALLCMD = install -s
+
+-CC = cc
+-CFLAGS = -O -DUNDERSCORE
++CC = gcc
++CFLAGS = -O2 -DUNDERSCORE
+
+ ##--------------------------
+
+@@ -119,11 +119,11 @@
+ CHK =
+ #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
++PLTOBJ = ../plotlib/libPlt.a
+
+
+
+@@ -133,23 +133,23 @@
+ $(INSTALLCMD) $(PROGS) $(BINDIR)
+
+ clean:
+- -/bin/rm $(PROGS)
+- -/bin/rm $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ) $(PPLOTOBJ) $(PXPLOTOBJ)
++ -/bin/rm -f $(PROGS)
++ -/bin/rm -f $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ) $(PPLOTOBJ) $(PXPLOTOBJ)
+ # -/bin/rm *.o
+
+
+
+ xfoil: $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ)
+ $(FC) -o xfoil $(XFOILOBJ) $(XUTILOBJ) $(OSOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
+- $(INSTALLCMD) xfoil $(BINDIR)
++# $(INSTALLCMD) xfoil $(BINDIR)
+
+ pxplot: $(PXPLOTOBJ) $(XUTILOBJ)
+ $(FC) -o pxplot $(PXPLOTOBJ) $(XUTILOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
+- $(INSTALLCMD) pxplot $(BINDIR)
++# $(INSTALLCMD) pxplot $(BINDIR)
+
+ pplot: $(PPLOTOBJ) $(XUTILOBJ)
+ $(FC) -o pplot $(PPLOTOBJ) $(XUTILOBJ) $(PLTOBJ) $(PLTLIB) $(FTNLIB)
+- $(INSTALLCMD) pplot $(BINDIR)
++# $(INSTALLCMD) pplot $(BINDIR)
+
+ blu: blu.o profil.o
+ $(FC) -o blu blu.o profil.o
+diff -aur Xfoil/orrs/bin/Makefile_DP Xfoil.patched/orrs/bin/Makefile_DP
+--- Xfoil/orrs/bin/Makefile_DP 2007-04-05 23:29:35.000000000 +0200
++++ Xfoil.patched/orrs/bin/Makefile_DP 2014-03-23 00:57:11.408901597 +0100
+@@ -4,23 +4,26 @@
+
+ #========================================
+ # Default compiler flags
+-FC = f77
+-FLG = -O -r8
++FC = gfortran
++FLG = -O2 -fdefault-real-8
+ PLTLIB = -lX11
+ FTNLIB =
+
+ #========================================
+ # Uncomment for Intel Fortran Compiler
+-FC = ifort
+-FLG = -O -r8
+-PLTLIB = -L/usr/X11R6/lib -lX11
+-FTNLIB =
++#FC = ifort
++#FLG = -O -r8
++#PLTLIB = -L/usr/X11R6/lib -lX11
++#FTNLIB =
+
+ #========================================
+
+
+ OS: osgen osmap.o
+
++clean:
++ /bin/rm -f *.o osgen
++
+
+ osgen: osgen.o io.o spline.o getarg0.o
+ $(FC) -o osgen osgen.o io.o spline.o getarg0.o $(FTNLIB)
+diff -aur Xfoil/plotlib/config.make.gfortranDP Xfoil.patched/plotlib/config.make.gfortranDP
+--- Xfoil/plotlib/config.make.gfortranDP 2013-07-02 17:19:37.000000000 +0200
++++ Xfoil.patched/plotlib/config.make.gfortranDP 2014-03-23 00:34:26.911190434 +0100
+@@ -7,7 +7,7 @@
+
+
+ # Set library name
+-PLTLIB = libPlt_gDP.a
++PLTLIB = libPlt.a
+
+ # Some fortrans need trailing underscores in C interface symbols (see Xwin.c)
+ # This should work for most of the "unix" fortran compilers
+@@ -17,9 +17,9 @@
+ CC = gcc
+ DP = -fdefault-real-8
+
+-FFLAGS = -m64 -O2 $(DP)
+-CFLAGS = -m64 -O2 $(DEFINE) -I/usr/X11/include
++FFLAGS = -O2 -fno-range-check $(DP)
++CFLAGS = -O2 $(DEFINE)
+ AR = ar r
+ RANLIB = ranlib
+-LINKLIB = -L/usr/X11R6/lib -lX11
++LINKLIB = -L/usr/lib -lX11
+
+diff -aur Xfoil/plotlib/examples/Makefile Xfoil.patched/plotlib/examples/Makefile
+--- Xfoil/plotlib/examples/Makefile 2012-12-18 22:39:58.000000000 +0100
++++ Xfoil.patched/plotlib/examples/Makefile 2014-03-23 00:36:10.099992850 +0100
+@@ -30,7 +30,7 @@
+ ### This line includes your compiler/make options
+ ### with definitions for compiler and flags
+
+-include ../config.make
++include ../config.make.gfortranDP
+
+ ###================================================
+
+@@ -52,9 +52,9 @@
+ test: $(PROGS)
+
+ clean:
+- -/bin/rm *.o
+- -/bin/rm $(PROGS)
+- -/bin/rm plot*.ps
++ -/bin/rm -f *.o
++ -/bin/rm -f $(PROGS)
++ -/bin/rm -f plot*.ps
+
+
+
+diff -aur Xfoil/plotlib/Makefile Xfoil.patched/plotlib/Makefile
+--- Xfoil/plotlib/Makefile 2012-12-17 05:10:15.000000000 +0100
++++ Xfoil.patched/plotlib/Makefile 2014-03-23 00:34:45.561576536 +0100
+@@ -68,7 +68,7 @@
+
+ ###-------------------------------------------------------------------------
+ ### Set compiler, compiler flags, name of output object library
+-include ./config.make
++include ./config.make.gfortranDP
+
+
+ ###-------------------------------------------------------------------------
+@@ -90,9 +90,9 @@
+ $(RANLIB) $(INSTALLDIR)/$(PLTLIB)
+
+ clean:
+- -/bin/rm $(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC)
+- -/bin/rm $(PLTLIB)
+- -/bin/rm plot*.ps
++ -/bin/rm -f $(OBJ) $(OBJOLD) $(OBJ3D) $(OBJMISC)
++ -/bin/rm -f $(PLTLIB)
++ -/bin/rm -f plot*.ps
+ (cd examples; make clean)
+
+
diff --git a/xfoil-osmap.patch b/xfoil-osmap.patch
new file mode 100644
index 000000000000..7b6c64860b5d
--- /dev/null
+++ b/xfoil-osmap.patch
@@ -0,0 +1,11 @@
+--- Xfoil/orrs/src/osmap.f 2011-05-05 04:49:00.000000000 +0200
++++ Xfoil.patched/orrs/src/osmap.f 2014-03-18 01:03:33.873592773 +0100
+@@ -98,7 +98,7 @@
+ C
+ C---- set OSFILE to match the absolute OS database filename
+ CHARACTER*128 OSFILE
+- DATA OSFILE / '/home/codes/orrs/osmapDP.dat' /
++ DATA OSFILE / '/usr/share/xfoil/orrs/osmap.dat' /
+ ccc DATA OSFILE / '/home/codes/orrs/osmap.dat' /
+ c
+ c DATA OSFILE
diff --git a/xfoil-overflow.patch b/xfoil-overflow.patch
new file mode 100644
index 000000000000..a72765de54ab
--- /dev/null
+++ b/xfoil-overflow.patch
@@ -0,0 +1,11 @@
+--- Xfoil/src/xoper.f 2013-12-08 19:21:22.000000000 +0100
++++ Xfoil.patched/src/xoper.f 2014-03-18 00:33:37.018130085 +0100
+@@ -114,7 +114,7 @@
+ C---- don't try to read integers, since might get integer overflow
+ DO I=1, NINPUT
+ IF(ABS(RINPUT(I)) .GT. 2.1E9) THEN
+- IINPUT(I) = 2**30
++ IINPUT(I) = HUGE(0)
+ ELSE
+ IINPUT(I) = INT(RINPUT(I))
+ ENDIF