summaryrefslogtreecommitdiff
blob: 91c45c08614559ef310f9ababfd1878fcac51769 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/xmingw-w32api/xmingw-w32api-2.5.ebuild,v 1.3 2004/06/25 02:51:46 agriffis Exp $

inherit eutils

MY_P=${P/xmingw-}
RUNTIME=mingw-runtime-3.2
S=${WORKDIR}/${MY_P}

DESCRIPTION="Free headers and libraries for the Win32 API"
HOMEPAGE="http://www.mingw.org"
SRC_URI="mirror://sourceforge/mingw/${RUNTIME}-src.tar.gz
		mirror://sourceforge/mingw/${MY_P}-src.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="x86"
IUSE=""

DEPEND="dev-util/xmingw-binutils
		dev-util/xmingw-gcc"

src_unpack() {
	unpack ${RUNTIME}-src.tar.gz
	unpack ${MY_P}-src.tar.gz
	ln -s ${MY_P} w32api
	ln -s ${RUNTIME} mingw
	epatch ${FILESDIR}/${P}-ocidl.patch
}

src_compile() {
	export PATH=$PATH:/opt/xmingw/bin:/opt/xmingw/i386-mingw32msvc/bin
	unset CFLAGS CXXFLAGS
	RANLIB=i386-mingw32msvc-ranlib \
	AR=i386-mingw32msvc-ar \
	AS=i386-mingw32msvc-as \
	CC=i386-mingw32msvc-gcc \
		./configure \
			--target=i386-mingw32msvc \
			--prefix=/opt/xmingw/i386-mingw32msvc \
			--build=i386-mingw32msvc \
				|| die "configure failed"
	emake || die "emake failed"
}

src_install() {
	make install prefix=${D}/opt/xmingw/i386-mingw32msvc \
		|| die "make install failed"
}