/[gentoo-x86]/app-misc/lcdproc/lcdproc-0.5.0.ebuild
Gentoo

Contents of /app-misc/lcdproc/lcdproc-0.5.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Sep 22 14:13:08 2006 UTC (14 years, 2 months ago) by jokey
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Adding new init.d script for 0.5.0 to fix bug #148513
(Portage version: 2.1.2_pre1)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-misc/lcdproc/lcdproc-0.5.0.ebuild,v 1.3 2006/09/21 03:11:29 mr_bones_ Exp $
4
5 inherit flag-o-matic
6
7 DESCRIPTION="Client/Server suite to drive all kinds of LCD (-like) devices"
8 HOMEPAGE="http://lcdproc.org/"
9 SRC_URI="mirror://sourceforge/lcdproc/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~ppc64 ~x86"
14
15 # general use keywords in first line, drivers in line 2
16 IUSE="doc debug ldap nfs samba usb
17 graphlcd irman lirc ncurses svga ula200 xosd"
18
19 DEPEND="sys-apps/sed
20 >=sys-kernel/linux-headers-2.6.11
21 doc? ( app-text/docbook-sgml-utils )
22 ldap? ( net-nds/openldap )
23 usb? ( dev-libs/libusb )
24
25 graphlcd? ( app-misc/graphlcd-base )
26 irman? ( media-libs/libirman )
27 lirc? ( app-misc/lirc )
28 ncurses? ( sys-libs/ncurses )
29 svga? ( media-libs/svgalib )
30 ula200? ( dev-embedded/libftdi dev-libs/libusb )
31 xosd? ( x11-libs/xosd ) "
32
33 USE_DRIVERS="curses glcdlib irman lirc svga ula200 xosd"
34 EXTRA_DRIVERS="bayrad CFontz CFontz633 CFontzPacket CwLnx \
35 glk hd44780 icp_a106 imon IOWarrior joy lb216 lcdm001 \
36 lcterm ms6931 mtc_s16209x MtxOrb NoritakeVFD pyramid sed1330 \
37 sed1520 serialVFD sli stv5730 t6963 text tyan "
38 ALL_DRIVERS="${USE_DRIVERS} ${EXTRA_DRIVERS}"
39
40
41 # compatibility with 1.4-ebuild format
42 LCDPROC_DRIVERS=${LCDPROC_DRIVERS//,/ }
43
44 # if no drivers or all are set, select the defaults
45 has all ${LCDPROC_DRIVERS} \
46 && LCDPROC_DRIVERS="${EXTRA_DRIVERS}"
47 [ -z "${LCDPROC_DRIVERS}" ] \
48 && LCDPROC_DRIVERS="${EXTRA_DRIVERS}"
49 has none ${LCDPROC_DRIVERS} \
50 && LCDPROC_DRIVERS=""
51
52 pkg_setup() {
53
54 echo
55 einfo "If you are updating from lcdproc-0.4, note that the setup of drivers has changed:"
56 einfo "The drivers curses, glcdlib, irman, lirc, svga, ula200 and xosd are controlled by use flags."
57 einfo "All other drivers are built by default, or in respect to the env variable"
58 einfo "LCDPROC_DRIVERS which can be a space separated list. Example:"
59 einfo " LCDPROC_DRIVERS=\"text CFontz\" emerge lcdproc"
60 einfo "You can also set this variable in your make.conf."
61 echo
62 einfo "Possible choices for LCDPROC_DRIVERS are:"
63 einfo " bayrad CFontz CFontz633 CFontzPacket CwLnx glk hd44780 "
64 einfo " icp_a106 imon IOWarrior joy lb216 lcdm001 lcterm "
65 einfo " ms6931 mtc_s16209x MtxOrb NoritakeVFD pyramid sed1330 "
66 einfo " sed1520 serialVFD sli stv5730 t6963 text tyan"
67 einfo " 'all' if you want to include all drivers (default)."
68 einfo " 'none' will not include any extra drivers."
69 echo
70
71 local FILTERED_DRIVERS
72 for driver in ${LCDPROC_DRIVERS}; do
73 if has ${driver} ${EXTRA_DRIVERS} ; then
74 FILTERED_DRIVERS="${FILTERED_DRIVERS} ${driver}"
75 else
76 eerror "The extra driver '${driver}' is not available or has to be enabled by a USE flag."
77 eerror "Please check your LCDPROC_DRIVERS-variable!"
78 echo
79 fi
80 done
81 LCDPROC_DRIVERS="${FILTERED_DRIVERS}"
82
83 einfo "The following drivers will be built: "
84 echo
85
86 # add use-flag specific drivers to LCDPROC_DRIVERS
87 use graphlcd && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} glcdlib"
88 use irman && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} irman"
89 use lirc && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} lirc"
90 use ncurses && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} curses"
91 use svga && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} svga"
92 use ula200 && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} ula200"
93 use xosd && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} xosd"
94
95 for driver in ${ALL_DRIVERS}; do
96 has ${driver} ${LCDPROC_DRIVERS} \
97 && einfo $driver ;
98 done
99 echo
100
101 has glcdlib ${LCDPROC_DRIVERS} || has all ${LCDPROC_DRIVERS} \
102 && ewarn "Support for glcdlib might not work if you do not manually install" \
103 && ewarn "GLCDprocDriver from http://www.muresan.de/graphlcd/lcdproc/"
104 }
105
106 src_unpack() {
107 unpack ${A}
108 cd "${S}"
109 epatch "${FILESDIR}/${PV}-LCDd-conf-driver-path.patch"
110 }
111
112 src_compile() {
113 # avoid executable stack as mentioned
114 # in http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
115 append-ldflags -Wl,-z,noexecstack
116
117 # convert space separated LCDPROC_DRIVERS to comma separated COMMA_DRIVERS
118 local COMMA_DRIVERS
119 for driver in ${LCDPROC_DRIVERS}; do
120 if [ -z "${COMMA_DRIVERS}" ] ; then
121 COMMA_DRIVERS="${driver}"
122 else
123 COMMA_DRIVERS="${COMMA_DRIVERS},${driver}"
124 fi
125 done
126
127 econf \
128 $(use_enable debug) \
129 $(use_enable ldap) \
130 $(use_enable nfs stat-nfs) \
131 $(use_enable samba stat-smbfs ) \
132 $(use_enable usb libusb) \
133 "--enable-drivers=${COMMA_DRIVERS}" \
134 || die "configure failed"
135
136 if use doc; then
137 cd ${S}/docs/lcdproc-user
138 docbook2html lcdproc-user.docbook
139 fi
140
141 emake || die "make failed"
142 }
143
144 src_install() {
145 dosbin server/LCDd
146 dobin clients/lcdproc/lcdproc clients/lcdexec/lcdexec
147
148 insinto /usr/share/lcdproc/drivers
149 doins server/drivers/*.so
150
151 insinto /usr/share/lcdproc/clients
152 doins clients/examples/*.pl
153 doins clients/metar/lcdmetar.pl
154 doins clients/headlines/lcdheadlines
155
156 insinto /etc
157 doins LCDd.conf
158 doins scripts/lcdproc.conf
159
160 exeinto /etc/init.d
161 doexe ${FILESDIR}/LCDd
162 doexe ${FILESDIR}/lcdproc
163
164 doman docs/*.1 docs/*.8
165 dodoc README CREDITS ChangeLog INSTALL
166 dodoc docs/README.* docs/*.txt
167
168 if use doc; then
169 insinto /usr/share/doc/${PF}/lcdproc-user
170 doins docs/lcdproc-user/*.html
171 fi
172
173 }

  ViewVC Help
Powered by ViewVC 1.1.20