summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSchala2015-06-08 20:45:35 -0700
committerSchala2015-06-08 20:45:35 -0700
commit4ef09fb587a512fb61d9bb4be9918f1bd87ef637 (patch)
tree07f3bb0c59b0b17b311ee2858f452a663ce3ea95
downloadaur-4ef09fb587a512fb61d9bb4be9918f1bd87ef637.tar.gz
init
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD60
-rw-r--r--mingw-w64-tools-2.0.999-s390.patch63
-rw-r--r--mingw-w64-tools-2.0.999-widl-includedir.patch22
4 files changed, 166 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ed399e20c44
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = mingw-w64-tools
+ pkgdesc = MinGW-w64 utilities
+ pkgver = 4.0.2
+ pkgrel = 1
+ url = http://mingw-w64.sourceforge.net
+ arch = i686
+ arch = x86_64
+ groups = mingw-w64
+ license = GPL3
+ license = LGPL2
+ options = !libtool
+ options = !emptydirs
+ source = http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v4.0.2.tar.bz2
+ source = mingw-w64-tools-2.0.999-s390.patch
+ source = mingw-w64-tools-2.0.999-widl-includedir.patch
+ md5sums = bb6404499342e02447b7c49f47b06b5e
+ md5sums = 85a915187d7092c659a56fca102da04c
+ md5sums = e448767d2af073c99795f72bc4e1700c
+
+pkgname = mingw-w64-tools
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ffff312aeca
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+pkgname=mingw-w64-tools
+pkgver=4.0.2
+_pkgver=${pkgver/rc/-rc}
+pkgrel=1
+pkgdesc="MinGW-w64 utilities"
+arch=(i686 x86_64)
+url="http://mingw-w64.sourceforge.net"
+license=("GPL3" "LGPL2")
+groups=(mingw-w64)
+options=(!libtool !emptydirs)
+source=("http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v${_pkgver}.tar.bz2"
+"mingw-w64-tools-2.0.999-s390.patch"
+"mingw-w64-tools-2.0.999-widl-includedir.patch")
+md5sums=('bb6404499342e02447b7c49f47b06b5e'
+ '85a915187d7092c659a56fca102da04c'
+ 'e448767d2af073c99795f72bc4e1700c')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}/mingw-w64-v$_pkgver"
+ patch -p2 -i ../mingw-w64-tools-2.0.999-s390.patch
+ patch -p1 -i ../mingw-w64-tools-2.0.999-widl-includedir.patch
+}
+
+build() {
+ cd "${srcdir}"
+ mkdir -p "${srcdir}"/gendef-build && cd "${srcdir}"/gendef-build
+ "${srcdir}"/mingw-w64-v${_pkgver}/mingw-w64-tools/gendef/configure --prefix=/usr
+ make
+ mkdir -p "${srcdir}"/genidl-build && cd "${srcdir}"/genidl-build
+ "${srcdir}"/mingw-w64-v${_pkgver}/mingw-w64-tools/genidl/configure --prefix=/usr
+ make
+ mkdir -p "${srcdir}"/genpeimg-build && cd "${srcdir}"/genpeimg-build
+ "${srcdir}"/mingw-w64-v${_pkgver}/mingw-w64-tools/genpeimg/configure --prefix=/usr
+ make
+ for _arch in ${_architectures}; do
+ mkdir -p "${srcdir}"/widl-${_arch}-build && cd "${srcdir}"/widl-${_arch}-build
+ "${srcdir}"/mingw-w64-v${_pkgver}/mingw-w64-tools/widl/configure --prefix=/usr --target=${_arch} \
+ --program-prefix="${_arch}-"
+ make
+ done
+}
+
+package() {
+ cd "${srcdir}/gendef-build"
+ make DESTDIR="${pkgdir}" install
+ cd ../genidl-build
+ make DESTDIR="${pkgdir}" install
+ cd ../genpeimg-build
+ make DESTDIR="${pkgdir}" install
+ for _arch in ${_architectures}; do
+ cd ../widl-${_arch}-build
+ make DESTDIR="${pkgdir}" install
+ done
+ install -Dm644 "${srcdir}/mingw-w64-v${_pkgver}/mingw-w64-tools/gendef/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.gendef"
+ install -m644 "${srcdir}/mingw-w64-v${_pkgver}/mingw-w64-tools/genidl/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.genidl"
+ install -m644 "${srcdir}/mingw-w64-v${_pkgver}/mingw-w64-tools/genpeimg/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.genpeimg"
+
+}
diff --git a/mingw-w64-tools-2.0.999-s390.patch b/mingw-w64-tools-2.0.999-s390.patch
new file mode 100644
index 00000000000..06c5926657f
--- /dev/null
+++ b/mingw-w64-tools-2.0.999-s390.patch
@@ -0,0 +1,63 @@
+diff -up mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h.s390 mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h
+--- mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h.s390 2012-01-24 11:11:33.000000000 +0100
++++ mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/basetsd.h 2012-03-28 14:18:17.000000000 +0200
+@@ -36,7 +36,7 @@
+ * 64-bit.
+ */
+
+-#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || defined(__aarch64__)) && !defined(_WIN64)
++#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || defined(__aarch64__) || defined(__s390x__)) && !defined(_WIN64)
+ #define _WIN64
+ #endif
+
+@@ -305,6 +305,10 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY
+ # undef WORDS_BIGENDIAN
+ # undef BITFIELDS_BIGENDIAN
+ # undef ALLOW_UNALIGNED_ACCESS
++#elif defined(__s390__)
++# define WORDS_BIGENDIAN
++# define BITFIELDS_BIGENDIAN
++# define ALLOW_UNALIGNED_ACCESS
+ #elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl)
+ # error Unknown CPU architecture!
+ #endif
+diff -up mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h.s390 mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h
+--- mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h.s390 2012-01-24 11:11:33.000000000 +0100
++++ mingw-w64-v2.0.999/mingw/mingw-w64-tools/widl/include/winnt.h 2012-03-28 14:20:07.000000000 +0200
+@@ -1910,6 +1910,36 @@ typedef struct _CONTEXT
+
+ #endif /* __powerpc__ */
+
++#ifdef __s390__
++
++/*
++ * FIXME:
++ *
++ * There is no official CONTEXT structure defined for the S/390
++ * architecture, so I just made one up.
++ *
++ * This structure is completely dummy, made just to build widl.
++ *
++ */
++
++#define CONTEXT_S390 0x10000000
++
++#define CONTEXT_CONTROL (CONTEXT_S390 | 0x00000001)
++#define CONTEXT_FLOATING_POINT (CONTEXT_S390 | 0x00000002)
++#define CONTEXT_INTEGER (CONTEXT_S390 | 0x00000004)
++
++#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
++
++#define EXCEPTION_READ_FAULT 0
++#define EXCEPTION_WRITE_FAULT 1
++#define EXCEPTION_EXECUTE_FAULT 8
++
++typedef struct _CONTEXT
++{
++} CONTEXT;
++
++#endif /* __s390__ */
++
+ #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
+ #error You need to define a CONTEXT for your CPU
+ #endif
diff --git a/mingw-w64-tools-2.0.999-widl-includedir.patch b/mingw-w64-tools-2.0.999-widl-includedir.patch
new file mode 100644
index 00000000000..d84811b4cf9
--- /dev/null
+++ b/mingw-w64-tools-2.0.999-widl-includedir.patch
@@ -0,0 +1,22 @@
+--- a/mingw-w64-tools/widl/Makefile.am 2012-11-14 03:19:32.000000000 -0600
++++ b/mingw-w64-tools/widl/Makefile.am 2014-01-01 19:23:41.000000000 -0600
+@@ -56,7 +56,7 @@ widl_SOURCES = src/widl.h \
+ include/winnls.h \
+ include/winnt.rh
+
+-widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(includedir)/../$(target)/include\"
++widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(prefix)/$(target)/sys-root/mingw/include\"
+ widl_CFLAGS = -O3 -g -Wall -Wformat -Wpacked -Wmissing-declarations -Wimplicit-function-declaration -Wmissing-prototypes -Wstrict-aliasing=2
+
+ DISTCHECK_CONFIGURE_FLAGS = --host=$(host) --target=$(target)
+--- a/mingw-w64-tools/widl/Makefile.in 2012-11-14 03:19:32.000000000 -0600
++++ b/mingw-w64-tools/widl/Makefile.in 2014-01-01 19:24:08.137423600 -0600
+@@ -282,7 +282,7 @@ widl_SOURCES = src/widl.h \
+ include/winnls.h \
+ include/winnt.rh
+
+-widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(includedir)/../$(target)/include\"
++widl_CPPFLAGS = -I$(top_srcdir)/include -DDEFAULT_INCLUDE_DIR=\"$(prefix)/$(target)/sys-root/mingw/include\"
+ widl_CFLAGS = -O3 -g -Wall -Wformat -Wpacked -Wmissing-declarations -Wimplicit-function-declaration -Wmissing-prototypes -Wstrict-aliasing=2
+ DISTCHECK_CONFIGURE_FLAGS = --host=$(host) --target=$(target)
+ all: all-am