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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Apr 18 21:10:22 2013 UTC (7 years, 7 months ago) by xmw
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
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="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 # TODO: Unknown CFontz633 has been removed, check if this change was appropriate.
85 local DEVICE_DRIVERS=(curses bayrad CFontz CFontzPacket
86 CwLnx EyeboxOne g15 glcdlib glk
87 hd44780 icp_a106 imon imonlcd IOWarrior
88 lb216 lcdm001 lcterm
89 MD8800 mdm166a ms6931 mtc_s16209x MtxOrb NoritakeVFD
90 pyramid sed1330 sed1520 serialVFD sli
91 stv5730 SureElec svga t6963 text tyan
92 ula200 xosd ea65 picolcd serialPOS
93 i2500vfd irtrans lis shuttleVFD )
94
95 # Generate comma separated list of drivers
96 COMMA_DRIVERS=""
97 FIRST_DRIVER=""
98 local index=0
99
100 while [ "${index}" -lt "${NUM_DEVICES}" ] ; do
101 if use "lcd_devices_${IUSE_LCD_DEVICES[${index}]}" ; then
102 append-driver "${DEVICE_DRIVERS[${index}]}"
103 fi
104 let "index = ${index} + 1"
105 done
106
107 # Append the not-lcd-drivers (input)
108 use lirc && append-driver "lirc"
109 use irman && append-driver "irman"
110 use joystick && append-driver "joy"
111
112 if [ -z "${COMMA_DRIVERS}" ] ; then
113 ewarn "You are compiling LCDd without support for any LCD drivers at all."
114 else
115 # Patch the config to contain a driver that is actually installed instead of the default
116 elog "Compiling the following drivers for LCDd: ${COMMA_DRIVERS}"
117 elog "Setting Driver=${FIRST_DRIVER} in LCDd.conf"
118 sed -i "53s:curses:${FIRST_DRIVER}:" LCDd.conf || die
119 fi
120
121 local EXTRA_CONF
122 if use lcd_devices_cfontzpacket || use lcd_devices_cwlinux || use lcd_devices_pyramid || \
123 use lcd_devices_picolcd || use lcd_devices_lis || use lcd_devices_shuttlevfd ; then
124 EXTRA_CONF="--enable-libusb"
125 else
126 EXTRA_CONF="$(use_enable usb libusb)"
127 fi
128
129 if use lcd_devices_ula200 || use lcd_devices_i2500vfd || use lcd_devices_lis ; then
130 EXTRA_CONF="${EXTRA_CONF} --enable-libftdi"
131 else
132 EXTRA_CONF="${EXTRA_CONF} $(use_enable ftdi libftdi)"
133 fi
134
135 econf --enable-extra-charmaps \
136 $(use_enable debug) \
137 $(use_enable nfs stat-nfs) \
138 $(use_enable samba stat-smbfs ) \
139 $(use_enable seamless-hbars) \
140 ${EXTRA_CONF} \
141 "--enable-drivers=${COMMA_DRIVERS}"
142 }
143
144 src_compile() {
145 default
146
147 if use doc; then
148 ebegin "Creating user documentation"
149 cd "${S}"/docs/lcdproc-user
150 xmlto html --skip-validation lcdproc-user.docbook
151 eend $?
152
153 ebegin "Creating dev documentation"
154 cd "${S}"/docs/lcdproc-dev
155 xmlto html --skip-validation lcdproc-dev.docbook
156 eend $?
157 fi
158 }
159
160 append-driver() {
161 [[ -z $* ]] && return 0
162 if [ -z "${COMMA_DRIVERS}" ] ; then
163 # First in the list
164 COMMA_DRIVERS="$*"
165 FIRST_DRIVER="$*"
166 else
167 # Second, third, ... include a comma at the front
168 COMMA_DRIVERS="${COMMA_DRIVERS},$*"
169 fi
170 return 0
171 }
172
173 src_install() {
174 emake DESTDIR="${D}" install
175
176 # move example clients installed to /usr/bin
177 rm -f "${D}"/usr/bin/{tail,lcdmetar,iosock,fortune,x11amp}.pl
178 insinto /usr/share/lcdproc/clients
179 doins clients/examples/*.pl
180 doins clients/metar/*.pl
181
182 newinitd "${FILESDIR}/0.5.1-LCDd.initd" LCDd
183 newinitd "${FILESDIR}/0.5.2-r2-lcdproc.initd" lcdproc
184
185 dodoc README CREDITS ChangeLog INSTALL TODO
186
187 if use doc; then
188 insinto /usr/share/doc/${PF}/lcdproc-user
189 doins docs/lcdproc-user/*.html
190 insinto /usr/share/doc/${PF}/lcdproc-dev
191 doins docs/lcdproc-dev/*.html
192 fi
193 }

  ViewVC Help
Powered by ViewVC 1.1.20