summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-09-17 07:03:45 +0000
committerMike Frysinger <vapier@gentoo.org>2006-09-17 07:03:45 +0000
commit966d1afa0701d141c0dcd7812a7135f624fa2124 (patch)
treed23e20356a6014e04d329a3b2363fea66f36c7ad /dev-util/mingw-runtime/mingw-runtime-3.10.ebuild
parentStable on ppc64; bug #147698 (diff)
downloadgentoo-2-966d1afa0701d141c0dcd7812a7135f624fa2124.tar.gz
gentoo-2-966d1afa0701d141c0dcd7812a7135f624fa2124.tar.bz2
gentoo-2-966d1afa0701d141c0dcd7812a7135f624fa2124.zip
initial import for crossdev based mingw32 toolchain
(Portage version: 2.1.1)
Diffstat (limited to 'dev-util/mingw-runtime/mingw-runtime-3.10.ebuild')
-rw-r--r--dev-util/mingw-runtime/mingw-runtime-3.10.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/dev-util/mingw-runtime/mingw-runtime-3.10.ebuild b/dev-util/mingw-runtime/mingw-runtime-3.10.ebuild
new file mode 100644
index 000000000000..edce0cc437cf
--- /dev/null
+++ b/dev-util/mingw-runtime/mingw-runtime-3.10.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/mingw-runtime/mingw-runtime-3.10.ebuild,v 1.1 2006/09/17 07:03:45 vapier Exp $
+
+# This version does not work as the configure script expects the installed
+# cross-compiler to be able to link binaries ... except we haven't provided
+# any of the crt objects yet so it is impossible to link binaries.
+# Older mingw-runtime packages hacked around the issue, but this version seems
+# to have dropped said hack thus breaking the package.
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit eutils
+
+DESCRIPTION="Free Win32 runtime and import library definitions"
+HOMEPAGE="http://www.mingw.org/"
+SRC_URI="mirror://sourceforge/mingw/${P}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="-*"
+IUSE=""
+
+DEPEND=""
+
+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}
+ cd "${S}"
+ sed -i \
+ -e "/W32API_INCLUDE/s:=.*:='-I /usr/${CTARGET}/usr/include':" \
+ $(find -name configure) || die
+ epatch "${FILESDIR}"/${PN}-3.9-DESTDIR.patch
+}
+
+src_compile() {
+ just_headers && return 0
+
+ strip-unsupported-flags
+ econf \
+ --host=${CTARGET} \
+ --prefix=/usr/${CTARGET} \
+ || die
+ emake || die
+}
+
+src_install() {
+ if just_headers ; then
+ insinto /usr/${CTARGET}/usr/include
+ doins -r include/* || die
+ else
+ emake install DESTDIR="${D}" || die
+ rm -rf "${D}"/usr/${CTARGET}/doc
+ dodoc CONTRIBUTORS ChangeLog README TODO readme.txt
+ fi
+ dosym usr/include /usr/${CTARGET}/sys-include
+}