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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Fri Apr 8 01:31:23 2011 UTC (3 years, 3 months ago) by flameeyes
Branch: MAIN
Changes since 1.3: +30 -13 lines
Patch sparse 0.4.3 to be build-friendlier; fix possible build issue when icc is installed (no revision bump though); fix build with gcc-4.6 (bug #362499); fix dependencies (in particular gtk+:2).

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

1 vapier 1.2 # Copyright 1999-2011 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.2 # $Header: /var/cvsroot/gentoo-x86/sys-devel/sparse/sparse-0.4.3.ebuild,v 1.1 2010/12/09 16:34:54 vapier Exp $
4 vapier 1.1
5     EAPI="2"
6    
7 flameeyes 1.4 inherit eutils multilib flag-o-matic toolchain-funcs
8 vapier 1.1 if [[ ${PV} == "9999" ]] ; then
9     EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/sparse/sparse.git"
10     inherit git
11     fi
12    
13     DESCRIPTION="C semantic parser"
14     HOMEPAGE="http://sparse.wiki.kernel.org/index.php/Main_Page"
15    
16     if [[ ${PV} == "9999" ]] ; then
17     SRC_URI=""
18     #KEYWORDS=""
19     else
20     SRC_URI="mirror://kernel/software/devel/sparse/dist/${P}.tar.bz2"
21     KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
22     fi
23    
24     LICENSE="OSL-1.1"
25     SLOT="0"
26 flameeyes 1.4 IUSE="gtk xml test"
27 vapier 1.3
28 flameeyes 1.4 RDEPEND="gtk? ( x11-libs/gtk+:2 )
29 vapier 1.3 xml? ( dev-libs/libxml2 )"
30     DEPEND="${RDEPEND}
31 flameeyes 1.4 gtk? ( dev-util/pkgconfig )
32     xml? ( dev-util/pkgconfig )"
33 vapier 1.3
34 flameeyes 1.4 src_prepare() {
35     epatch "${FILESDIR}"/${P}-gentoo.patch
36     }
37 vapier 1.1
38 flameeyes 1.4 mymake() {
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 \
48     LIBDIR="/usr/$(get_libdir)" \
49     DESTDIR="${D}" \
50     "$@" \
51     || die
52     }
53    
54     src_compile() {
55     append-flags -fno-strict-aliasing
56    
57     mymake \
58     $(use test && echo all) all-installable
59 vapier 1.1 }
60    
61     src_install() {
62 flameeyes 1.4 mymake install
63 vapier 1.1 dodoc FAQ README
64     }

  ViewVC Help
Powered by ViewVC 1.1.20