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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Nov 1 16:29:07 2009 UTC (11 years, 1 month ago) by rbu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
+  Add docbook-xml-dtd as direct dependency, version bump to final. Thanks to
+  Samuli Suominen, bug #273214.
(Portage version: 2.1.7.1/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_pre1.ebuild,v 1.3 2009/06/13 10:38:47 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 RDEPEND="${RDEPEND}
63 lcd_devices_g15? ( app-misc/g15daemon )"
64
65 pkg_setup() {
66 if [ -n "${LCDPROC_DRIVERS}" ] ; then
67 ewarn "Setting the drivers to compile via LCDPROC_DRIVERS is not supported anymore."
68 ewarn "Please use LCD_DEVICES now and see emerge -pv output for the options."
69 fi
70 }
71
72 src_prepare() {
73 sed -i "79s:server/drivers:/usr/$(get_libdir)/lcdproc:" LCDd.conf
74 einfo "Patching LCDd.conf to use DriverPath=/usr/$(get_libdir)/lcdproc/"
75 }
76
77 src_configure() {
78 # This array contains the driver names required by configure --with-drivers=
79 # The positions must be the same as the corresponding use_expand flags
80 local DEVICE_DRIVERS=(curses bayrad CFontz CFontz633 CFontzPacket
81 CwLnx EyeboxOne g15 glcdlib glk
82 hd44780 icp_a106 imon imonlcd IOWarrior
83 lb216 lcdm001 lcterm
84 MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD
85 pyramid sed1330 sed1520 serialVFD sli
86 stv5730 svga t6963 text tyan
87 ula200 xosd ea65 picolcd serialPOS
88 i2500vfd irtrans lis shuttleVFD )
89
90 # Generate comma separated list of drivers
91 COMMA_DRIVERS=""
92 FIRST_DRIVER=""
93 local index=0
94
95 while [ "${index}" -lt "${NUM_DEVICES}" ] ; do
96 if use "lcd_devices_${IUSE_LCD_DEVICES[${index}]}" ; then
97 append-driver "${DEVICE_DRIVERS[${index}]}"
98 fi
99 let "index = ${index} + 1"
100 done
101
102 # Append the not-lcd-drivers (input)
103 use lirc && append-driver "lirc"
104 use irman && append-driver "irman"
105 use joystick && append-driver "joy"
106
107 if [ -z "${COMMA_DRIVERS}" ] ; then
108 ewarn "You are compiling LCDd without support for any LCD drivers at all."
109 else
110 # Patch the config to contain a driver that is actually installed instead of the default
111 elog "Compiling the following drivers for LCDd: ${COMMA_DRIVERS}"
112 elog "Setting Driver=${FIRST_DRIVER} in LCDd.conf"
113 sed -i "44s:curses:${FIRST_DRIVER}:" LCDd.conf
114 fi
115
116 local EXTRA_CONF
117 if use lcd_devices_cfontzpacket || use lcd_devices_cwlinux || use lcd_devices_pyramid || \
118 use lcd_devices_picolcd || use lcd_devices_lis || use lcd_devices_shuttlevfd ; then
119 EXTRA_CONF="--enable-libusb"
120 else
121 EXTRA_CONF="$(use_enable usb libusb)"
122 fi
123
124 if use lcd_devices_ula200 || use lcd_devices_i2500vfd || use lcd_devices_lis ; then
125 EXTRA_CONF="${EXTRA_CONF} --enable-libftdi"
126 else
127 EXTRA_CONF="${EXTRA_CONF} $(use_enable ftdi libftdi)"
128 fi
129
130 econf \
131 $(use_enable debug) \
132 $(use_enable nfs stat-nfs) \
133 $(use_enable samba stat-smbfs ) \
134 $(use_enable seamless-hbars) \
135 ${EXTRA_CONF} \
136 "--enable-drivers=${COMMA_DRIVERS}" \
137 || die "configure failed"
138 }
139
140 src_compile() {
141 default
142
143 if use doc; then
144 ebegin "Creating user documentation"
145 cd "${S}"/docs/lcdproc-user
146 xmlto html --skip-validation lcdproc-user.docbook
147 eend $?
148
149 ebegin "Creating dev documentation"
150 cd "${S}"/docs/lcdproc-dev
151 xmlto html --skip-validation lcdproc-dev.docbook
152 eend $?
153 fi
154 }
155
156 append-driver() {
157 [[ -z $* ]] && return 0
158 if [ -z "${COMMA_DRIVERS}" ] ; then
159 # First in the list
160 COMMA_DRIVERS="$*"
161 FIRST_DRIVER="$*"
162 else
163 # Second, third, ... include a comma at the front
164 COMMA_DRIVERS="${COMMA_DRIVERS},$*"
165 fi
166 return 0
167 }
168
169 src_install() {
170 emake DESTDIR="${D}" install || die "make install failed"
171
172 # move example clients installed to /usr/bin
173 rm -f "${D}"/usr/bin/{tail,lcdmetar,iosock,fortune,x11amp}.pl
174 insinto /usr/share/lcdproc/clients
175 doins clients/examples/*.pl
176 doins clients/metar/
177
178 newinitd "${FILESDIR}/0.5.1-LCDd.initd" LCDd
179 newinitd "${FILESDIR}/0.5.2-r2-lcdproc.initd" lcdproc
180
181 dodoc README CREDITS ChangeLog INSTALL TODO
182
183 if use doc; then
184 insinto /usr/share/doc/${PF}/lcdproc-user
185 doins docs/lcdproc-user/*.html
186 insinto /usr/share/doc/${PF}/lcdproc-dev
187 doins docs/lcdproc-dev/*.html
188 fi
189 }

  ViewVC Help
Powered by ViewVC 1.1.20