summaryrefslogtreecommitdiff
blob: 165101368dbcd5d9e42fa131ee346c0585519e01 (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
57
58
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-gd/ruby-gd-0.8.0.ebuild,v 1.7 2012/05/01 18:24:03 armin76 Exp $

EAPI="2"
USE_RUBY="ruby18"

RUBY_FAKEGEM_TASK_DOC=""
RUBY_FAKEGEM_TASK_TEST=""

RUBY_FAKEGEM_EXTRADOC="Changes readme.en readme.ja"

inherit ruby-fakegem

DESCRIPTION="ruby-gd: an interface to Boutell GD library"
HOMEPAGE="http://rubyforge.org/projects/ruby-gd/"

RUBY_PATCHES=( "${FILESDIR}/ruby-gd-0.7.4-fix-interlace.patch" )

LICENSE="Ruby"
SLOT="0"
KEYWORDS="amd64 ~ppc ppc64 x86"
IUSE="jpeg truetype X"

DEPEND="
	>=media-libs/gd-2.0[png]
	jpeg? ( virtual/jpeg )
	truetype? ( media-libs/freetype )
	X? ( x11-libs/libX11 )"
RDEPEND="${DEPEND}"

each_ruby_configure() {
	local myconf=""

	if use truetype; then
		myconf="${myconf} --with-ttf --with-freetype"
	fi

	${RUBY} extconf.rb --enable-gd2_0 ${myconf} \
		$(use_with jpeg) \
		$(use_with X xpm) || die
}

each_ruby_compile() {
	emake
}

each_ruby_install() {
	ruby_fakegem_install_gemspec
	emake DESTDIR="${D}" install || die
}

all_ruby_install() {
	dodoc Changes readme.* doc/manual.rd doc/INSTALL.* || die
	dohtml doc/manual.html doc/manual_index.html
	insinto /usr/share/doc/${PF}/sample
	doins sample/*
}