summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-util/mingw64-runtime
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-util/mingw64-runtime')
-rw-r--r--dev-util/mingw64-runtime/Manifest5
-rw-r--r--dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-build.patch88
-rw-r--r--dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-winpthreads.patch86
-rw-r--r--dev-util/mingw64-runtime/metadata.xml19
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-2.0.8.ebuild74
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-3.0.0.ebuild79
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-3.1.0.ebuild79
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-3.2.0-r1.ebuild79
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-4.0.1.ebuild113
9 files changed, 622 insertions, 0 deletions
diff --git a/dev-util/mingw64-runtime/Manifest b/dev-util/mingw64-runtime/Manifest
new file mode 100644
index 00000000000..9911b6f526a
--- /dev/null
+++ b/dev-util/mingw64-runtime/Manifest
@@ -0,0 +1,5 @@
+DIST mingw-w64-v2.0.8.tar.gz 7017057 SHA256 1a5a2c57f90c7f1b5eb8402a52f93de645925a8af62c2cfe748f39ce66008cf4 SHA512 c526bad968c74d86e740862f5e492329b32a1782c69b3a22f7203ac7e38697ba2017f95ed7bf519b737328a92d7c1b4e519f9103d634550f30bdb4a21921303e WHIRLPOOL 913bc444941c4c9c630404847cfb9bb54083fcd366a240e47992d3ee65cfc4c86f340099970243d3d251d5a1e5a00005c09e9d1aecb884256e125155bbcfbd0e
+DIST mingw-w64-v3.0.0.tar.bz2 7012419 SHA256 ffd381a53cb774843667ccdaeb3a23f86be77b0344355e1a5947b3ceb8343c67 SHA512 7fc438908328ae4429f79dfaaae92bc7e88bc0f46517bdebdc3c45b3e8062ff6c27f166eb51103c2d49aae01851d82f33e0b031c8d98198baaeb119e19221989 WHIRLPOOL ea2820ab24dcd6f35fab0404b2bd26273b117731bb25e2e3ef753e9a3a9b6661564605cdae7ed5e6e4f9fc6b3c3d000761fa44afa19f79b5d6deaebca44f709c
+DIST mingw-w64-v3.1.0.tar.bz2 7021162 SHA256 ece7a7e7e1ab5e25d5ce469f8e4de7223696146fffa71c16e2a9b017d0e017d2 SHA512 9f418694aa0f072e2f08766fcee8929ac3022187750028781336243e050495b9709bb9ae87b4a83a8e9d3856478c525d8636277a4c219e282421b269dafa68d8 WHIRLPOOL 90a3a7056df7c4da2e605da1578e65b16e0f831370d8b1d399fed48945828604a94f9402b2d53bc4ca26623f1d34e6c45c862bf1f7590ddf9325fd4a053a18fb
+DIST mingw-w64-v3.2.0.tar.bz2 7053254 SHA256 78a0de610829a1145ae12c4a29603344963a0b8156ba39a9a31a0e79c3b29142 SHA512 dd483bcf7ba0e698a33a0b02a811b181e601cd344b87dafd0f6c477f68efb9a617a4109046fd06735242623f87833cf97688f057583e1378d6d84e7818927593 WHIRLPOOL 99ba5ddaa99c40309d12d75d3953deaf9cc31280ad2446793d1525702963edd1b33e91053e99bdfd06d37980049d30b7fb4e9f3a5358f8277c2fabe587c56037
+DIST mingw-w64-v4.0.1.tar.bz2 10803072 SHA256 89d2524a071b6337dfd9f3b6e6f46d8002b2633f928c833dc4e873a13e045b17 SHA512 a216a09a460c56c29208aee1e1cdb428e856f9c8d59dd399723ccf6d549368f0a13a6aacb046d211ddec7c0a1f1c227d5dd599e4f0c33ba4b6d9c92bd0a7fa1b WHIRLPOOL e021031e2820e918fe0f291624335fadc08641e811f6cf19d45b1586d2ac96c6bff4fb936bcd154a7b48711db9f5faabd27bfdced3a38073b4a20c8471a91915
diff --git a/dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-build.patch b/dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-build.patch
new file mode 100644
index 00000000000..6461b98e504
--- /dev/null
+++ b/dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-build.patch
@@ -0,0 +1,88 @@
+From 67434f57cbb5aba791e9ca973a86859e0736f829 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Mon, 4 May 2015 21:31:10 +0300
+Subject: [PATCH 2/2] build: autoconf: enable multiple tools and libs
+
+this somewhat reduces the error checking, but makes code and usage nicer.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ configure.ac | 55 ++++++++++++-------------------------------------------
+ 1 file changed, 12 insertions(+), 43 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 468d1b1..1b59821 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,32 +56,12 @@ AC_ARG_WITH([libraries],
+ [Build the extra mingw-w64 libs, where ARG is one of libmangle, pseh, winpthreads, or all])],
+ [],
+ [with_libraries=no])
+-AS_CASE([$with_libraries],
+- [yes|all],[
+- with_libraries="libmangle,pseh,winpthreads"
+- with_libraries_winpthreads=yes
+- with_libraries_mangle=yes
+- with_libraries_pseh=yes],
+- [libmangle],[
+- with_libraries="libmangle"
+- with_libraries_winpthreads=no
+- with_libraries_mangle=yes
+- with_libraries_pseh=no],
+- [pseh],[
+- with_libraries="pseh"
+- with_libraries_winpthreads=no
+- with_libraries_mangle=no
+- with_libraries_pseh=yes],
+- [winpthreads],[
+- with_libraries="winpthreads"
+- with_libraries_winpthreads=yes
+- with_libraries_mangle=no
+- with_libraries_pseh=no],
+- [no],[
+- with_libraries_winpthreads=no
+- with_libraries_mangle=no
+- with_libraries_pseh=no],
+- [MW64_OPTION_ERROR([with-libraries])])
++for l in winpthreads mangle pseh; do
++ res=`echo "${with_libraries}" | grep $l > /dev/null && echo yes || echo no`
++ AS_CASE([$with_libraries],
++ [all|yes],[res=yes])
++ AS_VAR_COPY([with_libraries_$l], [res])
++done
+ AM_CONDITIONAL([LIBRARIES_MANGLE],[test "x$with_libraries_mangle" = xyes])
+ AM_CONDITIONAL([LIBRARIES_PSEH],[test "x$with_libraries_pseh" = xyes])
+ AM_CONDITIONAL([LIBRARIES_WINPTHREADS],[test "x$with_libraries_winpthreads" = xyes])
+@@ -96,23 +76,12 @@ AC_ARG_WITH([tools],
+ [Build the extra mingw-w64 tools, where ARG is one of gendef, genidl, or all])],
+ [],
+ [with_tools=no])
+-AS_CASE([$with_tools],
+- [yes|all],[
+- with_tools="gendef,genidl"
+- with_tools_gendef=yes
+- with_tools_genidl=yes],
+- [gendef],[
+- with_tools="gendef"
+- with_tools_gendef=yes
+- with_tools_genidl=no],
+- [genidl],[
+- with_tools="genidl"
+- with_tools_gendef=no
+- with_tools_genidl=yes],
+- [no],[
+- with_tools_gendef=no
+- with_tools_genidl=no],
+- [MW64_OPTION_ERROR([with-tools])])
++for t in gendef genidl; do
++ res=`echo "${with_tools}" | grep $t > /dev/null && echo yes || echo no`
++ AS_CASE([$with_tools],
++ [all|yes],[res=yes])
++ AS_VAR_COPY([with_tools_$t], [res])
++done
+ AM_CONDITIONAL([TOOLS_GENDEF],[test "x$with_tools_gendef" = xyes])
+ AM_CONDITIONAL([TOOLS_GENIDL],[test "x$with_tools_genidl" = xyes])
+ AM_COND_IF([TOOLS_GENDEF],[AC_CONFIG_SUBDIRS([mingw-w64-tools/gendef])])
+--
+2.3.6
+
diff --git a/dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-winpthreads.patch b/dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-winpthreads.patch
new file mode 100644
index 00000000000..0d3e59dc9dd
--- /dev/null
+++ b/dev-util/mingw64-runtime/files/mingw64-runtime-4.0.1-winpthreads.patch
@@ -0,0 +1,86 @@
+From 0adec5d0e1c65fc4ce4f84f3d4bb6738e923e1de Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Mon, 4 May 2015 20:39:52 +0300
+Subject: [PATCH 1/2] build: autoconf: support winpthreads library
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile.am | 6 +++++-
+ configure.ac | 15 +++++++++++++--
+ 2 files changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 26a7606..308b6fd 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,6 +14,10 @@ if LIBRARIES_PSEH
+ MAYBE_LIBRARIES_PSEH = mingw-w64-libraries/pseh
+ endif
+
++if LIBRARIES_WINPTHREADS
++ MAYBE_LIBRARIES_WINPTHREADS = mingw-w64-libraries/winpthreads
++endif
++
+ if TOOLS_GENDEF
+ MAYBE_TOOLS_GENDEF = mingw-w64-tools/gendef
+ endif
+@@ -22,7 +26,7 @@ if TOOLS_GENIDL
+ MAYBE_TOOLS_GENIDL = mingw-w64-tools/genidl
+ endif
+
+-SUBDIRS = $(MAYBE_HEADER) $(MAYBE_CRT) $(MAYBE_LIBRARIES_MANGLE) $(MAYBE_LIBRARIES_PSEH) $(MAYBE_TOOLS_GENDEF) $(MAYBE_TOOLS_GENIDL)
++SUBDIRS = $(MAYBE_HEADER) $(MAYBE_CRT) $(MAYBE_LIBRARIES_MANGLE) $(MAYBE_LIBRARIES_PSEH) $(MAYBE_LIBRARIES_WINPTHREADS) $(MAYBE_TOOLS_GENDEF) $(MAYBE_TOOLS_GENIDL)
+
+ DISTCHECK_CONFIGURE_FLAGS = --with-headers --with-crt --with-libraries=all --with-tools=all
+
+diff --git a/configure.ac b/configure.ac
+index 4bb3926..468d1b1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,30 +53,41 @@ AC_MSG_RESULT([$with_crt])
+ AC_MSG_CHECKING([whether to build the optional libraries])
+ AC_ARG_WITH([libraries],
+ [AS_HELP_STRING([--with-libraries=ARG],
+- [Build the extra mingw-w64 libs, where ARG is one of libmangle, pseh, or all])],
++ [Build the extra mingw-w64 libs, where ARG is one of libmangle, pseh, winpthreads, or all])],
+ [],
+ [with_libraries=no])
+ AS_CASE([$with_libraries],
+ [yes|all],[
+- with_libraries="libmangle,pseh"
++ with_libraries="libmangle,pseh,winpthreads"
++ with_libraries_winpthreads=yes
+ with_libraries_mangle=yes
+ with_libraries_pseh=yes],
+ [libmangle],[
+ with_libraries="libmangle"
++ with_libraries_winpthreads=no
+ with_libraries_mangle=yes
+ with_libraries_pseh=no],
+ [pseh],[
+ with_libraries="pseh"
++ with_libraries_winpthreads=no
+ with_libraries_mangle=no
+ with_libraries_pseh=yes],
++ [winpthreads],[
++ with_libraries="winpthreads"
++ with_libraries_winpthreads=yes
++ with_libraries_mangle=no
++ with_libraries_pseh=no],
+ [no],[
++ with_libraries_winpthreads=no
+ with_libraries_mangle=no
+ with_libraries_pseh=no],
+ [MW64_OPTION_ERROR([with-libraries])])
+ AM_CONDITIONAL([LIBRARIES_MANGLE],[test "x$with_libraries_mangle" = xyes])
+ AM_CONDITIONAL([LIBRARIES_PSEH],[test "x$with_libraries_pseh" = xyes])
++AM_CONDITIONAL([LIBRARIES_WINPTHREADS],[test "x$with_libraries_winpthreads" = xyes])
+ AM_COND_IF([LIBRARIES_MANGLE],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/libmangle])])
+ AM_COND_IF([LIBRARIES_PSEH],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/pseh])])
++AM_COND_IF([LIBRARIES_WINPTHREADS],[AC_CONFIG_SUBDIRS([mingw-w64-libraries/winpthreads])])
+ AC_MSG_RESULT([$with_libraries])
+
+ AC_MSG_CHECKING([whether to build the optional tools])
+--
+2.3.6
+
diff --git a/dev-util/mingw64-runtime/metadata.xml b/dev-util/mingw64-runtime/metadata.xml
new file mode 100644
index 00000000000..b6f2f9e194a
--- /dev/null
+++ b/dev-util/mingw64-runtime/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>toolchain</herd>
+ <use>
+ <flag name="idl">
+ Install idl files.
+ </flag>
+ <flag name="libraries">
+ Build extra libraries.
+ </flag>
+ <flag name="tools">
+ Build extra tools.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mingw-w64</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-2.0.8.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-2.0.8.ebuild
new file mode 100644
index 00000000000..66af6446ede
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-2.0.8.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="http://mingw-w64.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64-v${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crosscompile_opts_headers-only"
+RESTRICT="strip"
+
+S=${WORKDIR}/mingw-w64-v${PV}/mingw-w64-crt
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+just_headers() {
+ use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+ if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
+ die "Invalid configuration"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ find "${WORKDIR}" -type f -exec touch -r . {} +
+}
+
+src_compile() {
+ # install the local headers as the crt step wants latest
+ pushd ../mingw-w64-headers >/dev/null
+ CHOST=${CTARGET} econf --enable-sdk || die
+ emake install DESTDIR="${WORKDIR}/sysroot" || die
+ popd >/dev/null
+
+ just_headers && return 0
+
+ CHOST=${CTARGET} strip-unsupported-flags
+ append-cppflags -isystem "${WORKDIR}/sysroot/usr/${CTARGET}/include"
+ CHOST=${CTARGET} econf || die
+ emake || die
+}
+
+src_install() {
+ insinto /usr/${CTARGET}/usr/include
+ doins -r "${WORKDIR}"/sysroot/usr/${CTARGET}/include/* || die
+ if is_crosscompile ; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+ just_headers && return 0
+
+ emake install DESTDIR="${D}" || die
+ env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ rm -rf "${D}"/usr/doc
+}
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-3.0.0.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-3.0.0.ebuild
new file mode 100644
index 00000000000..b7755236a41
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-3.0.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="http://mingw-w64.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crosscompile_opts_headers-only idl"
+RESTRICT="strip"
+
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+just_headers() {
+ use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+ if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
+ die "Invalid configuration"
+ fi
+}
+
+src_configure() {
+ local extra_conf=()
+
+ if just_headers; then
+ extra_conf+=( --without-crt )
+ else
+ extra_conf+=( --with-crt )
+ fi
+
+ case ${CTARGET} in
+ x86_64*) extra_conf+=( --disable-lib32 --enable-lib64 ) ;;
+ i?86*) extra_conf+=( --enable-lib32 --disable-lib64 ) ;;
+ *) die "Unsupported ${CTARGET}" ;;
+ esac
+
+ CHOST=${CTARGET} strip-unsupported-flags
+ CHOST=${CTARGET} econf \
+ --prefix=/usr/${CTARGET} \
+ --includedir=/usr/${CTARGET}/usr/include \
+ --with-headers \
+ --enable-sdk \
+ $(use_enable idl) \
+ "${extra_conf[@]}"
+}
+
+src_install() {
+ default
+
+ if is_crosscompile ; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+
+ env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ rm -rf "${ED}/usr/share"
+}
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-3.1.0.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-3.1.0.ebuild
new file mode 100644
index 00000000000..b7755236a41
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-3.1.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="http://mingw-w64.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crosscompile_opts_headers-only idl"
+RESTRICT="strip"
+
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+just_headers() {
+ use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+ if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
+ die "Invalid configuration"
+ fi
+}
+
+src_configure() {
+ local extra_conf=()
+
+ if just_headers; then
+ extra_conf+=( --without-crt )
+ else
+ extra_conf+=( --with-crt )
+ fi
+
+ case ${CTARGET} in
+ x86_64*) extra_conf+=( --disable-lib32 --enable-lib64 ) ;;
+ i?86*) extra_conf+=( --enable-lib32 --disable-lib64 ) ;;
+ *) die "Unsupported ${CTARGET}" ;;
+ esac
+
+ CHOST=${CTARGET} strip-unsupported-flags
+ CHOST=${CTARGET} econf \
+ --prefix=/usr/${CTARGET} \
+ --includedir=/usr/${CTARGET}/usr/include \
+ --with-headers \
+ --enable-sdk \
+ $(use_enable idl) \
+ "${extra_conf[@]}"
+}
+
+src_install() {
+ default
+
+ if is_crosscompile ; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+
+ env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ rm -rf "${ED}/usr/share"
+}
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-3.2.0-r1.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-3.2.0-r1.ebuild
new file mode 100644
index 00000000000..b7755236a41
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-3.2.0-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="http://mingw-w64.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crosscompile_opts_headers-only idl"
+RESTRICT="strip"
+
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+just_headers() {
+ use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+ if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
+ die "Invalid configuration"
+ fi
+}
+
+src_configure() {
+ local extra_conf=()
+
+ if just_headers; then
+ extra_conf+=( --without-crt )
+ else
+ extra_conf+=( --with-crt )
+ fi
+
+ case ${CTARGET} in
+ x86_64*) extra_conf+=( --disable-lib32 --enable-lib64 ) ;;
+ i?86*) extra_conf+=( --enable-lib32 --disable-lib64 ) ;;
+ *) die "Unsupported ${CTARGET}" ;;
+ esac
+
+ CHOST=${CTARGET} strip-unsupported-flags
+ CHOST=${CTARGET} econf \
+ --prefix=/usr/${CTARGET} \
+ --includedir=/usr/${CTARGET}/usr/include \
+ --with-headers \
+ --enable-sdk \
+ $(use_enable idl) \
+ "${extra_conf[@]}"
+}
+
+src_install() {
+ default
+
+ if is_crosscompile ; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+
+ env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ rm -rf "${ED}/usr/share"
+}
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-4.0.1.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-4.0.1.ebuild
new file mode 100644
index 00000000000..f0836e69a1c
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-4.0.1.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+WANT_AUTOMAKE="1.15"
+
+inherit autotools flag-o-matic eutils
+
+DESCRIPTION="Free Win64 runtime and import library definitions"
+HOMEPAGE="http://mingw-w64.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crosscompile_opts_headers-only idl libraries tools"
+RESTRICT="strip"
+
+S="${WORKDIR}/mingw-w64-v${PV}"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+just_headers() {
+ use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
+}
+crt_with() {
+ just_headers && echo --without-$1 || echo --with-$1
+}
+crt_use_enable() {
+ just_headers && echo --without-$2 || use_enable "$@"
+}
+crt_use_with() {
+ just_headers && echo --without-$2 || use_with "$@"
+}
+
+pkg_setup() {
+ if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
+ die "Invalid configuration"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-winpthreads.patch"
+ epatch "${FILESDIR}/${P}-build.patch"
+ eautoreconf
+}
+
+src_configure() {
+ CHOST=${CTARGET} strip-unsupported-flags
+
+ if ! just_headers; then
+ mkdir "${WORKDIR}/headers"
+ pushd "${WORKDIR}/headers" > /dev/null
+ CHOST=${CTARGET} "${S}/configure" \
+ --prefix="${T}/tmproot" \
+ --with-headers \
+ --without-crt \
+ || die
+ popd > /dev/null
+ append-cppflags "-I${T}/tmproot/include"
+ fi
+
+ local extra_conf=()
+
+ case ${CTARGET} in
+ x86_64*) extra_conf+=( --disable-lib32 --enable-lib64 ) ;;
+ i?86*) extra_conf+=( --enable-lib32 --disable-lib64 ) ;;
+ *) die "Unsupported ${CTARGET}" ;;
+ esac
+
+ CHOST=${CTARGET} econf \
+ --prefix=/usr/${CTARGET} \
+ --includedir=/usr/${CTARGET}/usr/include \
+ --with-headers \
+ --enable-sdk \
+ $(crt_with crt) \
+ $(crt_use_enable idl) \
+ $(crt_use_with libraries libraries winpthreads,libmangle) \
+ $(crt_use_with tools) \
+ "${extra_conf[@]}"
+}
+
+src_compile() {
+ if ! just_headers; then
+ emake -C "${WORKDIR}/headers" install
+ fi
+ default
+}
+
+src_install() {
+ default
+
+ if is_crosscompile ; then
+ # gcc is configured to look at specific hard-coded paths for mingw #419601
+ dosym usr /usr/${CTARGET}/mingw
+ dosym usr /usr/${CTARGET}/${CTARGET}
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+
+ env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ rm -rf "${ED}/usr/share"
+}