summaryrefslogtreecommitdiff
blob: 020fa0cad7ee4642d85833ec20f5011c195c3ce3 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/lcdproc/lcdproc-0.4.3-r2.ebuild,v 1.3 2003/06/29 23:17:15 aliz Exp $

SRC_URI="mirror://sourceforge/lcdproc/${P}.tar.gz"
DESCRIPTION="Client/Server suite to drive all kinds of LCD (-like) devices"
HOMEPAGE="http://lcdproc.org/"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86"
IUSE="doc ncurses svga"

DEPEND=">=sys-apps/baselayout-1.6.4
	>=sys-apps/sed-4
	doc? ( >=app-text/docbook-sgml-utils-0.6.11-r2 )
	ncurses? ( >=sys-libs/ncurses-5.3 )
	svga? ( >=media-libs/svgalib-1.4.3 )"

src_unpack() {
	unpack ${A} || die
	cd ${S}

	sed -i "889s:-O3:${CFLAGS}:" configure

	# fix a few bugs ;)
	patch -p2 < ${FILESDIR}/${P}-gentoo.diff || die \
		"Patch #1 failed."
}

src_compile() {

	# By default, all drivers that are supported by the given plattform/hardware
	# are compiled (of course respecting the existing USE flags). If the
	# LCDPROC_DRIVERS environment variable is set to a comma separated list, only
	# the specified drivers will be compiled.
	# Example:
	#
	#   env LCDPROC_DRIVERS="curses,CFontz" emerge lcdproc
	#
	# NOTE: The ebuild still respects your USE variable and will not install any
	# additional packages unless the corresponding USE flag is set!
	# You might have to alter it if e.g. ncurses is normally not part of your
	# USE variable.
	# Example:
	#
	#   env USE="$USE ncurses" LCDPROC_DRIVERS="curses,CFontz" emerge lcdproc

	local myconf

	myconf="--enable-drivers=mtxorb,cfontz,text,lb216,hd44780,joy,irman,lircin,"
	myconf="${myconf}bayrad,glk,stv5730,sed1330,sed1520,lcdm001,t6963"

	use ncurses && myconf="${myconf},curses"
	use svga && myconf="${myconf},svgalib"

	[ x"${LCDPROC_DRIVERS}" = x ] || \
		myconf="--enable-drivers=${LCDPROC_DRIVERS}"

	use samba && myconf="${myconf} --enable-stat-smbfs"
	myconf="${myconf} --enable-stat-nfs"

	econf ${myconf} || die
	emake || die

	if [ `use doc` ]; then
		cd ${S}/docs/lcdproc-user
		docbook2html lcdproc-user.docbook
	fi
}

src_install() {
 	dosbin server/LCDd
 	dobin clients/lcdproc/lcdproc

 	doman docs/lcdproc.1 docs/LCDd.8

 	dodoc README ChangeLog COPYING INSTALL

	if [ `use doc` ]; then
		insinto /usr/share/doc/${PF}/lcdproc-user
		doins docs/lcdproc-user/*.html
	fi

	docinto olddocs
	dodoc docs/README.dg* docs/*.txt

	insinto /usr/share/doc/${PF}/clients/examples
	doins clients/examples/*.pl
	insinto /usr/share/doc/${PF}/clients/headlines
	doins clients/headlines/lcdheadlines

	insinto /etc
	doins LCDd.conf
	doins scripts/lcdproc.conf

 	exeinto /etc/init.d
	doexe ${FILESDIR}/LCDd
	doexe ${FILESDIR}/lcdproc
}