dev-util/mingw64-runtime: version bump
authorAlon Bar-Lev <alonbl@gentoo.org>
Fri, 14 Aug 2015 07:48:14 +0000 (10:48 +0300)
committerAlon Bar-Lev <alonbl@gentoo.org>
Fri, 14 Aug 2015 07:49:43 +0000 (10:49 +0300)
Package-Manager: portage-2.2.20.1

dev-util/mingw64-runtime/Manifest
dev-util/mingw64-runtime/mingw64-runtime-4.0.4.ebuild [new file with mode: 0644]

index 9911b6f526a6b685c8cc0bacb0eb4eb383b47e99..83e7e652023a46172b46916698e756eea7645cab 100644 (file)
@@ -3,3 +3,4 @@ DIST mingw-w64-v3.0.0.tar.bz2 7012419 SHA256 ffd381a53cb774843667ccdaeb3a23f86be
 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
+DIST mingw-w64-v4.0.4.tar.bz2 10812375 SHA256 89356a0aa8cf9f8b9dc8d92bc8dd01a131d4750c3acb30c6350a406316c42199 SHA512 06de6b592f776676184a9c50c63eb105c82a912965dee5d8217f9b5b325e0258c188f5d7d5e28aaeacf7bad44ce5d36bd837b9f1cbb91358754787738fb15146 WHIRLPOOL ff557b2aff821c1833ab6d5fdade4f256b71cb37e84a476d3e5a4cfe13f60db68c336d7e72f6e3eb13b3d127e1bac2cbfdde160ea2f7016867f10efa6a02914b
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-4.0.4.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-4.0.4.ebuild
new file mode 100644 (file)
index 0000000..f738c15
--- /dev/null
@@ -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}/${PN}-4.0.1-winpthreads.patch"
+       epatch "${FILESDIR}/${PN}-4.0.1-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"
+}