summaryrefslogtreecommitdiff
blob: a6d13615afe258149dd92202368ba734933de4df (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
59
# Copyright 1999-2009 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.7.4-r1.ebuild,v 1.6 2009/03/08 15:16:01 betelgeuse Exp $

EAPI="2"

inherit ruby
USE_RUBY="ruby16 ruby18 ruby19"

MY_P="${P/gd/GD}"
S="${WORKDIR}/${MY_P}"

DESCRIPTION="ruby-gd: an interface to Boutell GD library"
HOMEPAGE="http://tam.0xfa.com/ruby-gd/"
SRC_URI="http://tam.0xfa.com/ruby-gd/${MY_P}-1.tar.gz"
PATCHES=( "${FILESDIR}/ruby-gd-0.7.4-fix-interlace.patch" )

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

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

src_configure() {
	local myconf="${myconf} --enable-gd2_0 --with-xpm"

	if use X; then
		myconf="${myconf} --with-xpm"
	fi

	if use jpeg; then
		myconf="${myconf} --with-jpeg"
	fi

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

	ruby extconf.rb ${myconf} || die
}

# don't use the one from ruby.eclass
src_compile() {
	default
}

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

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