/[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 - (show annotations) (download)
Fri Apr 8 01:31:23 2011 UTC (3 years, 5 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 # Copyright 1999-2011 Gentoo Foundation
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.1 2010/12/09 16:34:54 vapier Exp $
4
5 EAPI="2"
6
7 inherit eutils multilib flag-o-matic toolchain-funcs
8 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 IUSE="gtk xml test"
27
28 RDEPEND="gtk? ( x11-libs/gtk+:2 )
29 xml? ( dev-libs/libxml2 )"
30 DEPEND="${RDEPEND}
31 gtk? ( dev-util/pkgconfig )
32 xml? ( dev-util/pkgconfig )"
33
34 src_prepare() {
35 epatch "${FILESDIR}"/${P}-gentoo.patch
36 }
37
38 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 }
60
61 src_install() {
62 mymake install
63 dodoc FAQ README
64 }

  ViewVC Help
Powered by ViewVC 1.1.20