summaryrefslogtreecommitdiff
blob: 85f7af8346f2c0ba8416813810d8375d992dba13 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdw/cdw-0.2.0.ebuild,v 1.2 2004/06/24 21:32:45 agriffis Exp $

MY_P=${PN}-${PV/_/-}
S="${WORKDIR}/${MY_P}"
DESCRIPTION="gtk2 and ncurses-based console frontend to cdrecord and mkisofs"
HOMEPAGE="http://cdw.sourceforge.net"
SRC_URI="mirror://sourceforge/cdw/${PN}-${PV/_/-}.tar.gz"

KEYWORDS="~x86"
LICENSE="GPL-2"
SLOT="0"

IUSE="nls gtk oggvorbis mysql encode"

RDEPEND="virtual/cdrtools"
DEPEND="sys-libs/ncurses
	sys-libs/zlib
	nls? ( sys-devel/gettext )
	gtk? ( >=x11-libs/gtk+-2
			>=dev-libs/glib-2
			dev-util/pkgconfig )
	oggvorbis? ( media-libs/libvorbis )
	mysql? ( dev-db/mysql )
	encode? ( media-sound/lame )"

src_compile() {
	local myconf

	use oggvorbis \
		&& myconf="${myconf} --with-oggenc=/usr/bin/oggenc" \
		|| myconf="${myconf} `use_with oggvorbis oggenc`"

	use encode \
		&& myconf="${myconf} --with-lame=/usr/bin/lame" \
		|| myconf="${myconf} `use_with encode lame`"

	econf \
		--disable-dependency-tracking \
		${myconf} \
		`use_enable nls` \
		`use_enable gtk gui` || die
	emake -j1 || die "emake failed"
}

src_install() {
	einstall || die

	dodoc AUTHORS ChangeLog NEWS THANKS \
		doc/{KNOWN_BUGS,README*,default.conf} || die "dodoc failed"

	if has_version 'dev-db/mysql'; then
		insinto /usr/share/${PF}/
		doins doc/cdw.sql || die "doins failed"
	fi

	# clean up the docs installed with make install
	rm -rf ${D}/usr/share/doc/${PN}
}

pkg_postinst() {
	if has_version 'dev-db/mysql'; then
		echo
		einfo "You have chosen, either by selecting 'USE=mysql' or maybe"
		einfo "because have installed 'dev-db/mysql' before, to install Disk"
		einfo "Catalog support. You will have a new tool called cdwdic."
		echo
		einfo "The directory /usr/share/${PF}/"
		einfo "contains a cdw.sql file. You must install this to your system"
		einfo "for using the Disk Catalog. The installation process is very"
		einfo "simple, you can find the instructions in"
		einfo "/usr/share/doc/${PF}/README.gz"
	fi
}