/[gentoo-x86]/dev-util/mingw64-runtime/mingw64-runtime-2.0.7.ebuild
Gentoo

Contents of /dev-util/mingw64-runtime/mingw64-runtime-2.0.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Sep 9 18:16:49 2014 UTC (5 years, 1 month ago) by alonbl
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Cleanup old

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key BF20DC51)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/mingw64-runtime/mingw64-runtime-2.0.7.ebuild,v 1.1 2013/02/18 19:52:50 vapier Exp $
4
5 export CBUILD=${CBUILD:-${CHOST}}
6 export CTARGET=${CTARGET:-${CHOST}}
7 if [[ ${CTARGET} == ${CHOST} ]] ; then
8 if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
9 export CTARGET=${CATEGORY/cross-}
10 fi
11 fi
12
13 inherit flag-o-matic eutils
14
15 DESCRIPTION="Free Win64 runtime and import library definitions"
16 HOMEPAGE="http://mingw-w64.sourceforge.net/"
17 SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64-v${PV}.tar.gz"
18
19 LICENSE="BSD"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22 IUSE="crosscompile_opts_headers-only"
23 RESTRICT="strip"
24
25 S=${WORKDIR}/mingw-w64-v${PV}/mingw-w64-crt
26
27 is_crosscompile() {
28 [[ ${CHOST} != ${CTARGET} ]]
29 }
30 just_headers() {
31 use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
32 }
33
34 pkg_setup() {
35 if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
36 die "Invalid configuration"
37 fi
38 }
39
40 src_unpack() {
41 unpack ${A}
42 find "${WORKDIR}" -type f -exec touch -r . {} +
43 }
44
45 src_compile() {
46 # install the local headers as the crt step wants latest
47 pushd ../mingw-w64-headers >/dev/null
48 CHOST=${CTARGET} econf --enable-sdk || die
49 emake install DESTDIR="${WORKDIR}/sysroot" || die
50 popd >/dev/null
51
52 just_headers && return 0
53
54 CHOST=${CTARGET} strip-unsupported-flags
55 append-cppflags -isystem "${WORKDIR}/sysroot/usr/${CTARGET}/include"
56 CHOST=${CTARGET} econf || die
57 emake || die
58 }
59
60 src_install() {
61 insinto /usr/${CTARGET}/usr/include
62 doins -r "${WORKDIR}"/sysroot/usr/${CTARGET}/include/* || die
63 if is_crosscompile ; then
64 # gcc is configured to look at specific hard-coded paths for mingw #419601
65 dosym usr /usr/${CTARGET}/mingw
66 dosym usr /usr/${CTARGET}/${CTARGET}
67 dosym usr/include /usr/${CTARGET}/sys-include
68 fi
69 just_headers && return 0
70
71 emake install DESTDIR="${D}" || die
72 env -uRESTRICT CHOST=${CTARGET} prepallstrip
73 rm -rf "${D}"/usr/doc
74 }

  ViewVC Help
Powered by ViewVC 1.1.20