summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxantares2015-06-08 22:45:28 +0200
committerxantares2015-06-08 22:45:28 +0200
commit635b45d0cde2b882bdbb1521cce22bbeca96b07e (patch)
tree34257006f5ba985e8bc149aa25f0dd71ac662c7b
downloadaur-635b45d0cde2b882bdbb1521cce22bbeca96b07e.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD49
-rw-r--r--libf2c-1.patch59
3 files changed, 128 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a22b4d85e67e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = mingw-w64-f2c
+ pkgdesc = Fortran to C code translator (mingw-w64)
+ pkgver = 1.0
+ pkgrel = 1
+ url = http://www.netlib.org/f2c/index.html
+ arch = any
+ license = custom
+ makedepends = mingw-w64-gcc
+ depends = mingw-w64-crt
+ noextract = libf2c.zip
+ options = !buildflags
+ options = !strip
+ options = staticlibs
+ source = http://www.netlib.org/f2c/libf2c.zip
+ source = libf2c-1.patch
+ sha256sums = 5dff29c58b428fa00cd36b1220e2d71b9882a658fdec1aa094fb7e6e482d6765
+ sha256sums = 87094ca646b67339bcb8faef5d400249e4abf744086398788d15c17f306eda36
+
+pkgname = mingw-w64-f2c
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..537aa25eb808
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+
+pkgname=mingw-w64-f2c
+pkgver=1.0
+pkgrel=1
+pkgdesc='Fortran to C code translator (mingw-w64)'
+url='http://www.netlib.org/f2c/index.html'
+license=('custom')
+arch=('any')
+depends=('mingw-w64-crt')
+makedepends=('mingw-w64-gcc')
+options=('!buildflags' '!strip' 'staticlibs')
+source=("http://www.netlib.org/f2c/libf2c.zip" libf2c-1.patch)
+noextract=("libf2c.zip")
+sha256sums=('5dff29c58b428fa00cd36b1220e2d71b9882a658fdec1aa094fb7e6e482d6765'
+ '87094ca646b67339bcb8faef5d400249e4abf744086398788d15c17f306eda36')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}"
+
+ # zipbomb
+ rm -rf libf2c
+ mkdir -p libf2c && pushd libf2c
+ unzip "${srcdir}"/libf2c.zip
+
+ # mxe patch
+ patch -p1 -i "${srcdir}"/libf2c-1.patch
+}
+
+build() {
+ cd "${srcdir}"
+ for _arch in ${_architectures}; do
+ cp -r libf2c build-${_arch} && pushd build-${_arch}
+ make -f makefile.u CC=${_arch}-gcc AR=${_arch}-ar LD=${_arch}-ld RANLIB=${_arch}-ranlib CFLAGS='-O -DUSE_CLOCK'
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "$srcdir/build-${_arch}"
+ install -Dm644 f2c.h "${pkgdir}"/usr/${_arch}/include/f2c.h
+ install -Dm644 libf2c.a "${pkgdir}"/usr/${_arch}/lib/libf2c.a
+ #${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
+
diff --git a/libf2c-1.patch b/libf2c-1.patch
new file mode 100644
index 000000000000..2446e2ae41bf
--- /dev/null
+++ b/libf2c-1.patch
@@ -0,0 +1,59 @@
+This file is part of MXE.
+See index.html for further information.
+
+diff -ur libf2c.orig/makefile.u libf2c/makefile.u
+--- libf2c.orig/makefile.u 2012-05-04 01:39:36.000000000 +1000
++++ libf2c/makefile.u 2012-05-04 01:45:30.000000000 +1000
+@@ -20,7 +20,7 @@
+ # compile, then strip unnecessary symbols
+ .c.o:
+ $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
+- ld -r -x -o $*.xxx $*.o
++ $(LD) -r -x -o $*.xxx $*.o
+ mv $*.xxx $*.o
+ ## Under Solaris (and other systems that do not understand ld -x),
+ ## omit -x in the ld line above.
+@@ -72,8 +72,8 @@
+ all: f2c.h signal1.h sysdep1.h libf2c.a
+
+ libf2c.a: $(OFILES)
+- ar r libf2c.a $?
+- -ranlib libf2c.a
++ $(AR) r libf2c.a $?
++ -$(RANLIB) libf2c.a
+
+ ## Shared-library variant: the following rule works on Linux
+ ## systems. Details are system-dependent. Under Linux, -fPIC
+@@ -123,7 +123,7 @@
+
+ install: libf2c.a
+ cp libf2c.a $(LIBDIR)
+- -ranlib $(LIBDIR)/libf2c.a
++ -$(RANLIB) $(LIBDIR)/libf2c.a
+
+ clean:
+ rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
+@@ -182,12 +182,6 @@
+ xwsne.o: lio.h
+ xwsne.o: fmt.h
+
+-arith.h: arithchk.c
+- $(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
+- $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
+- ./a.out >arith.h
+- rm -f a.out arithchk.o
+-
+ check:
+ xsum Notice README abort_.c arithchk.c backspac.c c_abs.c c_cos.c \
+ c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c close.c comptry.bat \
+
+diff -urN tmp-libf2c.orig/arith.h tmp-libf2c/arith.h
+--- tmp-libf2c.orig/arith.h 1970-01-01 10:00:00.000000000 +1000
++++ tmp-libf2c/arith.h 2012-05-04 01:16:16.000000000 +1000
+@@ -0,0 +1,5 @@
++#define IEEE_8087
++#define Arith_Kind_ASL 1
++#define Double_Align
++#define QNaN0 0x0
++#define QNaN1 0xfff80000
++