summaryrefslogtreecommitdiff
blob: f8d6c045b439d540b72acf51433359ae61c26bc6 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="library to handle different link cables for TI calculators"
HOMEPAGE="http://lpg.ticalc.org/prj_tilp/"
SRC_URI="mirror://sourceforge/gtktiemu/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="nls pam_console"

DEPEND=">=dev-libs/glib-2
	dev-libs/libusb
	nls? ( sys-devel/gettext )"

RDEPEND=">=dev-libs/glib-2
	dev-libs/libusb
	pam_console? ( || ( sys-auth/pam_console <sys-libs/pam-0.99 ) )
	nls? ( virtual/libintl )"

S=${WORKDIR}/libticables

pkg_setup() {
	if use pam_console && has_version <sys-libs/pam-0.99 && ! built_with_use sys-libs/pam pam_console ; then
		eerror "You need to build pam with pam_console support"
		eerror "Please remerge sys-libs/pam with USE=pam_console"
		die "pam without pam_console detected"
	fi
}

src_compile() {
	econf $(use_enable nls) || die "econf failed"
	emake || die "emake failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc AUTHORS LOGO NEWS README ChangeLog docs/api.txt
	dohtml docs/html/*
	if use pam_console; then
		insinto /etc/udev/rules.d
		doins "${FILESDIR}"/60-libticables.rules
		insinto /etc/security/console.perms.d
		doins "${FILESDIR}"/60-libticables.perms
	fi
}

pkg_postinst() {
	elog "Please read /usr/share/doc/${PF}/README.gz"
	elog "if you encounter any problem with a link cable"
}