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

Contents of /app-misc/lcdproc/lcdproc-0.5.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Apr 18 21:10:22 2013 UTC (7 years, 7 months ago) by xmw
Branch: MAIN
CVS Tags: HEAD
Fix IUSE_LCD_DRIVERS alignment (bug 462170), add additional drivers, add IUSE png and truetype.

(Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)

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

  ViewVC Help
Powered by ViewVC 1.1.20