Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 543954 | Differences between
and this patch

Collapse All | Expand All

(-)mingw64-runtime-3.2.0-r1.ebuild (-9 / +44 lines)
Lines 12-18 if [[ ${CTARGET} == ${CHOST} ]] ; then Link Here
12
	fi
12
	fi
13
fi
13
fi
14
14
15
inherit flag-o-matic eutils
15
MULTIBUILD_VARIANTS=( headers )
16
WANT_AUTOMAKE="1.15"
17
18
inherit autotools flag-o-matic eutils
16
19
17
DESCRIPTION="Free Win64 runtime and import library definitions"
20
DESCRIPTION="Free Win64 runtime and import library definitions"
18
HOMEPAGE="http://mingw-w64.sourceforge.net/"
21
HOMEPAGE="http://mingw-w64.sourceforge.net/"
Lines 21-27 SRC_URI="mirror://sourceforge/mingw-w64/ Link Here
21
LICENSE="BSD"
24
LICENSE="BSD"
22
SLOT="0"
25
SLOT="0"
23
KEYWORDS="~amd64 ~x86"
26
KEYWORDS="~amd64 ~x86"
24
IUSE="crosscompile_opts_headers-only idl"
27
IUSE="crosscompile_opts_headers-only idl libraries tools"
25
RESTRICT="strip"
28
RESTRICT="strip"
26
29
27
S="${WORKDIR}/mingw-w64-v${PV}"
30
S="${WORKDIR}/mingw-w64-v${PV}"
Lines 32-37 is_crosscompile() { Link Here
32
just_headers() {
35
just_headers() {
33
	use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
36
	use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
34
}
37
}
38
crt_with() {
39
	just_headers && echo --without-$1 || echo --with-$1
40
}
41
crt_use_enable() {
42
	just_headers && echo --without-$2 || use_enable $*
43
}
44
crt_use_with() {
45
	just_headers && echo --without-$2 || use_with $*
46
}
35
47
36
pkg_setup() {
48
pkg_setup() {
37
	if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
49
	if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
Lines 39-69 pkg_setup() { Link Here
39
	fi
51
	fi
40
}
52
}
41
53
54
src_prepare() {
55
	epatch "${FILESDIR}/${P}-winpthreads.patch"
56
	epatch "${FILESDIR}/${P}-build.patch"
57
	eautoreconf
58
}
59
42
src_configure() {
60
src_configure() {
43
	local extra_conf=()
61
	CHOST=${CTARGET} strip-unsupported-flags
44
62
45
	if just_headers; then
63
	if ! just_headers; then
46
		extra_conf+=( --without-crt )
64
		mkdir "${T}/headers"
47
	else
65
		pushd "${T}/headers"
48
		extra_conf+=( --with-crt )
66
		CHOST=${CTARGET} "${S}/configure" \
67
			--prefix="${T}/tmproot" \
68
			--with-headers \
69
			--without-crt \
70
			|| die
71
		popd
72
		append-cppflags "-I${T}/tmproot/include"
49
	fi
73
	fi
50
74
75
	local extra_conf=()
76
51
	case ${CTARGET} in
77
	case ${CTARGET} in
52
	x86_64*) extra_conf+=( --disable-lib32 --enable-lib64 ) ;;
78
	x86_64*) extra_conf+=( --disable-lib32 --enable-lib64 ) ;;
53
	i?86*) extra_conf+=( --enable-lib32 --disable-lib64 ) ;;
79
	i?86*) extra_conf+=( --enable-lib32 --disable-lib64 ) ;;
54
	*) die "Unsupported ${CTARGET}" ;;
80
	*) die "Unsupported ${CTARGET}" ;;
55
	esac
81
	esac
56
82
57
	CHOST=${CTARGET} strip-unsupported-flags
58
	CHOST=${CTARGET} econf \
83
	CHOST=${CTARGET} econf \
59
		--prefix=/usr/${CTARGET} \
84
		--prefix=/usr/${CTARGET} \
60
		--includedir=/usr/${CTARGET}/usr/include \
85
		--includedir=/usr/${CTARGET}/usr/include \
61
		--with-headers \
86
		--with-headers \
62
		--enable-sdk \
87
		--enable-sdk \
63
		$(use_enable idl) \
88
		$(crt_with crt) \
89
		$(crt_use_enable idl) \
90
		$(crt_use_with libraries libraries winpthreads,libmangle) \
91
		$(crt_use_with tools) \
64
		"${extra_conf[@]}"
92
		"${extra_conf[@]}"
65
}
93
}
66
94
95
src_compile() {
96
	if ! just_headers; then
97
		emake -C "${T}/headers" install
98
	fi
99
	default
100
}
101
67
src_install() {
102
src_install() {
68
	default
103
	default
69
104

Return to bug 543954