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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20