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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jul 29 16:19:03 2012 UTC (8 years, 4 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
Drop sparc keywords

(Portage version: 2.1.11.5/cvs/Linux ia64)

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

  ViewVC Help
Powered by ViewVC 1.1.20