summaryrefslogtreecommitdiff
blob: 789ef372fcb4141c752a78af57a31d0cd92b12e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/syck/syck-0.55-r2.ebuild,v 1.1 2006/09/06 09:34:12 yuval Exp $

RUBY_OPTIONAL="yes"
inherit flag-o-matic distutils ruby

IUSE="python ruby"
DESCRIPTION="Syck is an extension for reading and writing YAML swiftly in popular scripting languages."
HOMEPAGE="http://whytheluckystiff.net/syck/"
SRC_URI="http://rubyforge.org/frs/download.php/4492/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="sys-libs/glibc
		ruby? ( dev-lang/ruby
			dev-ruby/racc
		)
		python? ( dev-lang/python )
	!=dev-libs/syck-0.55-r1"
RDEPEND="${DEPEND}"

src_compile() {
	append-flags -fPIC
	econf
	emake

	if use python; then
		pushd ext/python
		distutils_src_compile
		popd
	fi

	if use ruby; then
		pushd ext/ruby
		ruby_econf
		ruby_emake
		popd
	fi
}

src_install() {
	einstall

	if use python; then
		pushd ext/python
		distutils_src_install
		popd
	fi

	if use ruby; then
		pushd ext/ruby
		ruby_einstall
		popd
	fi
}