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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon May 7 09:51:33 2012 UTC (8 years, 6 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bump, remove old, this also fixes bug #359501 by Leho Kraav and jannis and bug #354507 by Markus Lischka.

(Portage version: 2.1.10.57/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20