/[gentoo-x86]/dev-util/w32api/w32api-3.14.ebuild
Gentoo

Contents of /dev-util/w32api/w32api-3.14.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Tue May 8 20:06:36 2012 UTC (2 years, 4 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Use $D, not $ED, since this is EAPI=0 #414909 by M8R-u38wij.

(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)

1 vapier 1.3 # Copyright 1999-2012 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.4 # $Header: /var/cvsroot/gentoo-x86/dev-util/w32api/w32api-3.14.ebuild,v 1.3 2012/05/03 02:33:54 vapier Exp $
4 vapier 1.1
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 eutils flag-o-matic
14    
15     MY_P="${P}-mingw32"
16     DESCRIPTION="Free Win32 runtime and import library definitions"
17     HOMEPAGE="http://www.mingw.org/"
18     SRC_URI="mirror://sourceforge/mingw/${MY_P}-src.tar.gz"
19    
20     LICENSE="BSD"
21     SLOT="0"
22 vapier 1.2 KEYWORDS="amd64 ~ppc ~sparc x86"
23 vapier 1.1 IUSE="crosscompile_opts_headers-only"
24     RESTRICT="strip"
25    
26     DEPEND=""
27    
28     S=${WORKDIR}/${MY_P}
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; do not emerge this directly"
37     fi
38     }
39    
40     src_compile() {
41     just_headers && return 0
42    
43     CHOST=${CTARGET} strip-unsupported-flags
44     econf \
45     --host=${CTARGET} \
46     --prefix=/usr/${CTARGET}/usr
47     emake || die
48     }
49    
50     src_install() {
51     if just_headers ; then
52     insinto /usr/${CTARGET}/usr/include
53     doins -r include/* || die
54     else
55     emake install DESTDIR="${D}" || die
56     env -uRESTRICT CHOST=${CTARGET} prepallstrip
57     dodoc CONTRIBUTIONS ChangeLog README.w32api TODO
58 vapier 1.3
59     # Make sure diff cross-compilers don't collide #414075
60 vapier 1.4 mv "${D}"/usr/share/doc/{${PF},${CTARGET}-${PF}} || die
61 vapier 1.1 fi
62     }

  ViewVC Help
Powered by ViewVC 1.1.20