/[gentoo-x86]/sys-devel/sparse/sparse-0.4.3.ebuild
Gentoo

Diff of /sys-devel/sparse/sparse-0.4.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-devel/sparse/sparse-0.4.3.ebuild,v 1.3 2011/04/07 04:27:06 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-devel/sparse/sparse-0.4.3.ebuild,v 1.4 2011/04/08 01:31:23 flameeyes Exp $
4 4
5EAPI="2" 5EAPI="2"
6 6
7inherit multilib toolchain-funcs 7inherit eutils multilib flag-o-matic toolchain-funcs
8if [[ ${PV} == "9999" ]] ; then 8if [[ ${PV} == "9999" ]] ; then
9 EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/sparse/sparse.git" 9 EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/sparse/sparse.git"
10 inherit git 10 inherit git
11fi 11fi
12 12
21 KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" 21 KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
22fi 22fi
23 23
24LICENSE="OSL-1.1" 24LICENSE="OSL-1.1"
25SLOT="0" 25SLOT="0"
26IUSE="gtk xml" 26IUSE="gtk xml test"
27 27
28RDEPEND="gtk? ( x11-libs/gtk+ ) 28RDEPEND="gtk? ( x11-libs/gtk+:2 )
29 xml? ( dev-libs/libxml2 )" 29 xml? ( dev-libs/libxml2 )"
30DEPEND="${RDEPEND} 30DEPEND="${RDEPEND}
31 gtk? ( dev-util/pkgconfig )
31 dev-util/pkgconfig" 32 xml? ( dev-util/pkgconfig )"
32
33usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
34 33
35src_prepare() { 34src_prepare() {
36 sed -i \ 35 epatch "${FILESDIR}"/${P}-gentoo.patch
37 -e '/^PREFIX=/s:=.*:=/usr:' \ 36}
37
38mymake() {
39 usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
40
41 emake \
42 V=1 \
43 CC="$(tc-getCC)" \
44 GCC_BASE="$(gcc-config -L | cut -d : -f1)" \
45 HAVE_LIBXML=$(usex xml) \
46 HAVE_GTK2=$(usex gtk) \
47 PREFIX=/usr \
38 -e "/^LIBDIR=/s:/lib:/$(get_libdir):" \ 48 LIBDIR="/usr/$(get_libdir)" \
39 -e '/^CFLAGS =/{s:=:+=:;s:-O2 -finline-functions::}' \ 49 DESTDIR="${D}" \
40 Makefile || die 50 "$@" \
41 export MAKEOPTS+=" V=1 CC=$(tc-getCC) HAVE_GTK2=$(usex gtk) HAVE_LIBXML=$(usex xml)" 51 || die
52}
53
54src_compile() {
55 append-flags -fno-strict-aliasing
56
57 mymake \
58 $(use test && echo all) all-installable
42} 59}
43 60
44src_install() { 61src_install() {
45 emake DESTDIR="${D}" install || die 62 mymake install
46 dodoc FAQ README 63 dodoc FAQ README
47} 64}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20