summaryrefslogtreecommitdiff
path: root/dev-util
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2015-04-30 02:10:21 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2015-04-30 02:10:21 +0100
commit6a459bb150a584f26272db80cd296223d4e9a5a8 (patch)
treebc74cd42908c251d4d4ba72121ac1ca65daca116 /dev-util
parentprofiles/common: Drop /usr/share/zsh/site-functions (diff)
downloadportage-6a459bb150a584f26272db80cd296223d4e9a5a8.tar.xz
dev-util/mingw64-runtime: Add winpthreads support, bug #548200
Package-Manager: portage-2.2.18
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/mingw64-runtime/ChangeLog5
-rw-r--r--dev-util/mingw64-runtime/Manifest4
-rw-r--r--dev-util/mingw64-runtime/metadata.xml13
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-3.2.0-r1.ebuild109
4 files changed, 131 insertions, 0 deletions
diff --git a/dev-util/mingw64-runtime/ChangeLog b/dev-util/mingw64-runtime/ChangeLog
new file mode 100644
index 00000000..c09f1cc1
--- /dev/null
+++ b/dev-util/mingw64-runtime/ChangeLog
@@ -0,0 +1,5 @@
+*mingw64-runtime-3.2.0-r1 (30 Apr 2015)
+
+ 30 Apr 2015; Bertrand Jacquin <bertrand@jacquin.bzh> +metadata.xml,
+ +mingw64-runtime-3.2.0-r1.ebuild:
+ dev-util/mingw64-runtime: Add winpthreads support, bug #548200
diff --git a/dev-util/mingw64-runtime/Manifest b/dev-util/mingw64-runtime/Manifest
new file mode 100644
index 00000000..cb796272
--- /dev/null
+++ b/dev-util/mingw64-runtime/Manifest
@@ -0,0 +1,4 @@
+DIST mingw-w64-v3.2.0.tar.bz2 7053254 SHA256 78a0de610829a1145ae12c4a29603344963a0b8156ba39a9a31a0e79c3b29142 WHIRLPOOL 99ba5ddaa99c40309d12d75d3953deaf9cc31280ad2446793d1525702963edd1b33e91053e99bdfd06d37980049d30b7fb4e9f3a5358f8277c2fabe587c56037
+EBUILD mingw64-runtime-3.2.0-r1.ebuild 2638 SHA256 4da0c25623dfe1259c24ec5603d414cf6a96518cded51860726b760b8c757ea7 WHIRLPOOL 1bab2b1e0a8bccd9afb40b46f645a8d75e431634d69c9f34b165bd232a6d1ce55649f067dd7fa47a5b4d863768048375fef45f6cf7cd6b30a3f67dc6a0435fd1
+MISC ChangeLog 212 SHA256 46abdfb7fdeac9f6ecc42fc116fcfc098da9430adf2b9a4df0027012af85b20c WHIRLPOOL 2ff009001261e7832eac1edcbe89d38671a642676f07f4e0281d5611d844a14908ed6e13c2ddc156a9fe64d24239eab88891c96ddfde9583793a28f8b2f2d345
+MISC metadata.xml 346 SHA256 30070a17dc83b21c2ddb12fe3bc07bbd173213ffa249e690f5824a5efe037f7f WHIRLPOOL 5317be0252dc8fb58f57138591bc00ed997badd799279bf5cdc80b2173906c64e1ec9320f2c6ac303d062754915a6e5216ae0902af516b162a95df9f23e7da06
diff --git a/dev-util/mingw64-runtime/metadata.xml b/dev-util/mingw64-runtime/metadata.xml
new file mode 100644
index 00000000..5babfac1
--- /dev/null
+++ b/dev-util/mingw64-runtime/metadata.xml
@@ -0,0 +1,13 @@
+<?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='threads'>
+ Add support for winpthreads
+ </flag>
+ </use>
+</pkgmetadata>
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 00000000..e924639f
--- /dev/null
+++ b/dev-util/mingw64-runtime/mingw64-runtime-3.2.0-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/mingw64-runtime/mingw64-runtime-3.2.0-r1.ebuild,v 1.2 2015/02/27 08:11:21 vapier Exp $
+
+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 threads"
+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[@]}"
+
+ if use threads && ! just_headers ; then
+ pushd mingw-w64-libraries/winpthreads >&/dev/null || die
+ # Use crt{begin,end}.o from the WORKDIR
+ _oLDFLAGS="${LDFLAGS}"
+ append-ldflags "-Wc,-B${S}/mingw-w64-crt/lib64"
+
+ CHOST=${CTARGET} econf \
+ --prefix=/usr/${CTARGET} \
+ --includedir=/usr/${CTARGET}/usr/include
+
+ LDFLAGS="${_oLDFLAGS}"
+ popd >&/dev/null || die
+ fi
+}
+
+src_compile() {
+ default
+
+ if use threads && ! just_headers ; then
+ pushd mingw-w64-libraries/winpthreads >&/dev/null || die
+ default
+ popd >&/dev/null || die
+ fi
+}
+
+src_install() {
+ default
+
+ if use threads && ! just_headers ; then
+ pushd mingw-w64-libraries/winpthreads >&/dev/null || die
+ default
+ popd >&/dev/null || die
+ fi
+
+ 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"
+}