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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jun 4 20:37:58 2007 UTC (13 years, 6 months ago) by rbu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Added automake dependancy. Without it installed, lcdproc wouldn't link its usb drivers correctly.
(Portage version: 2.1.2.7)

1 # Copyright 1999-2007 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.2.ebuild,v 1.1 2007/05/06 21:26:27 rbu Exp $
4
5 inherit eutils multilib
6
7 DESCRIPTION="Client/Server suite to drive all kinds of LCD (-like) devices"
8 HOMEPAGE="http://lcdproc.org/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
10 mirror://gentoo/${P}-patches.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
15
16 IUSE="doc debug nfs samba seamless-hbars usb lirc irman joystick"
17
18 # The following array holds the USE_EXPANDed keywords
19 IUSE_LCD_DEVICES=(ncurses bayrad cfontz cfontz633 cfontzpacket
20 cwlinux eyeboxone g15 graphlcd glk
21 hd44780 icpa106 imon iowarrior
22 lb216 lcdm001 lcterm
23 md8800 ms6931 mtcs16209x mtxorb noritakevfd
24 pyramid sed1330 sed1520 serialvfd sli
25 stv5730 svga t6963 text tyan
26 ula200 xosd ea65 picolcd serialpos )
27
28 # Iterate through the array and add the lcd_devices_* that we support
29 NUM_DEVICES=${#IUSE_LCD_DEVICES[@]}
30 index=0
31 while [ "${index}" -lt "${NUM_DEVICES}" ] ; do
32 IUSE="${IUSE} lcd_devices_${IUSE_LCD_DEVICES[${index}]}"
33 let "index = ${index} + 1"
34 done
35
36 RDEPEND="
37 usb? ( dev-libs/libusb )
38 lirc? ( app-misc/lirc )
39 irman? ( media-libs/libirman )
40
41 lcd_devices_graphlcd? ( app-misc/graphlcd-base app-misc/glcdprocdriver )
42 lcd_devices_g15? ( dev-libs/libg15 >=dev-libs/libg15render-1.1.1 )
43 lcd_devices_ncurses? ( sys-libs/ncurses )
44 lcd_devices_svga? ( media-libs/svgalib )
45 lcd_devices_ula200? ( >=dev-embedded/libftdi-0.7 dev-libs/libusb )
46 lcd_devices_xosd? ( x11-libs/xosd x11-libs/libX11 x11-libs/libXext )
47 lcd_devices_cfontzpacket? ( dev-libs/libusb )
48 lcd_devices_cwlinux? ( dev-libs/libusb )
49 lcd_devices_pyramid? ( dev-libs/libusb )
50 lcd_devices_picolcd? ( dev-libs/libusb )"
51 DEPEND="${RDEPEND}
52 doc? ( app-text/xmlto )"
53 RDEPEND="${RDEPEND}
54 lcd_devices_g15? ( app-misc/g15daemon )"
55
56 pkg_setup() {
57 if [ -n "${LCDPROC_DRIVERS}" ] ; then
58 ewarn "Setting the drivers to compile via LCDPROC_DRIVERS is not supported anymore."
59 ewarn "Please use LCD_DEVICES now and see emerge -pv output for the options."
60 fi
61 }
62
63 src_unpack() {
64 unpack ${A}
65 cd "${S}"
66
67 epatch "${WORKDIR}/${P}-patches/${PV}-picolcd.patch"
68
69 sed -i "79s:server/drivers:/usr/$(get_libdir)/lcdproc:" LCDd.conf
70 einfo "Patching LCDd.conf to use DriverPath=/usr/$(get_libdir)/lcdproc/"
71 }
72
73 src_compile() {
74 # This array contains the driver names required by configure --with-drivers=
75 # The positions must be the same as the corresponding use_expand flags
76 local DEVICE_DRIVERS=(curses bayrad CFontz CFontz633 CFontzPacket
77 CwLnx EyeboxOne g15 glcdlib glk
78 hd44780 icp_a106 imon IOWarrior
79 lb216 lcdm001 lcterm
80 MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD
81 pyramid sed1330 sed1520 serialVFD sli
82 stv5730 svga t6963 text tyan
83 ula200 xosd ea65 picolcd serialPOS)
84
85 # Generate comma separated list of drivers
86 COMMA_DRIVERS=""
87 FIRST_DRIVER=""
88 local index=0
89
90 while [ "${index}" -lt "${NUM_DEVICES}" ] ; do
91 if use "lcd_devices_${IUSE_LCD_DEVICES[${index}]}" ; then
92 append-driver "${DEVICE_DRIVERS[${index}]}"
93 fi
94 let "index = ${index} + 1"
95 done
96
97 # Append the not-lcd-drivers (input)
98 use lirc && append-driver "lirc"
99 use irman && append-driver "irman"
100 use joystick && append-driver "joy"
101
102 if [ -z "${COMMA_DRIVERS}" ] ; then
103 ewarn "You are compiling LCDd without support for any LCD drivers at all."
104 else
105 # Patch the config to contain a driver that is actually installed instead of the default
106 elog "Compiling the following drivers for LCDd: ${COMMA_DRIVERS}"
107 elog "Setting Driver=${FIRST_DRIVER} in LCDd.conf"
108 sed -i "44s:curses:${FIRST_DRIVER}:" LCDd.conf
109 fi
110
111 local ENABLEUSB
112 if use lcd_devices_cfontzpacket || use lcd_devices_cwlinux || use lcd_devices_pyramid; then
113 ENABLEUSB="--enable-libusb"
114 else
115 ENABLEUSB="$(use_enable usb libusb)"
116 fi
117
118 econf \
119 $(use_enable debug) \
120 $(use_enable nfs stat-nfs) \
121 $(use_enable samba stat-smbfs ) \
122 $(use_enable seamless-hbars) \
123 ${ENABLEUSB} \
124 "--enable-drivers=${COMMA_DRIVERS}" \
125 || die "configure failed"
126
127 emake || die "make failed"
128
129 if use doc; then
130 ebegin "Creating user documentation"
131 cd ${S}/docs/lcdproc-user
132 xmlto html lcdproc-user.docbook
133 eend $?
134
135 ebegin "Creating dev documentation"
136 cd ${S}/docs/lcdproc-dev
137 xmlto html lcdproc-dev.docbook
138 eend $?
139 fi
140 }
141
142 append-driver() {
143 [[ -z $* ]] && return 0
144 if [ -z "${COMMA_DRIVERS}" ] ; then
145 # First in the list
146 COMMA_DRIVERS="$*"
147 FIRST_DRIVER="$*"
148 else
149 # Second, third, ... include a comma at the front
150 COMMA_DRIVERS="${COMMA_DRIVERS},$*"
151 fi
152 return 0
153 }
154
155 src_install() {
156 emake DESTDIR="${D}" install || die "make install failed"
157
158 # move example clients installed to /usr/bin
159 rm -f "${D}"/usr/bin/{tail,lcdmetar,iosock,fortune,x11amp}.pl
160 insinto /usr/share/lcdproc/clients
161 doins clients/examples/*.pl
162 doins clients/metar/
163
164 newinitd "${FILESDIR}/0.5.1-LCDd.initd" LCDd
165 newinitd "${FILESDIR}/0.5.1-lcdproc.initd" lcdproc
166
167 dodoc README CREDITS ChangeLog INSTALL TODO
168 dodoc docs/README.* docs/*.txt
169
170 if use doc; then
171 insinto /usr/share/doc/${PF}/lcdproc-user
172 doins docs/lcdproc-user/*.html
173 insinto /usr/share/doc/${PF}/lcdproc-dev
174 doins docs/lcdproc-dev/*.html
175 fi
176 }
177
178 pkg_postinst() {
179 ewarn "IMPORTANT: Please update your /etc/LCDd.conf"
180 ewarn "As of lcdproc-0.5.1-r2, the DriverPath changed from /usr/share/lcdproc to /usr/$(get_libdir)/lcdproc ."
181 }

  ViewVC Help
Powered by ViewVC 1.1.20