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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon May 7 09:51:33 2012 UTC (8 years, 7 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump, remove old, this also fixes bug #359501 by Leho Kraav and jannis and bug #354507 by Markus Lischka.

(Portage version: 2.1.10.57/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.2-r2.ebuild,v 1.3 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/${PF}-patches.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~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 imonlcd 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}"/${PF}-patches/${PV}-imonlcd-0.3.patch
69
70 epatch "${WORKDIR}"/${PF}-patches/${PV}-picolcd.patch
71
72 sed -i "79s:server/drivers:/usr/$(get_libdir)/lcdproc:" LCDd.conf
73 einfo "Patching LCDd.conf to use DriverPath=/usr/$(get_libdir)/lcdproc/"
74
75 eautoreconf
76 }
77
78 src_compile() {
79 # This array contains the driver names required by configure --with-drivers=
80 # The positions must be the same as the corresponding use_expand flags
81 local DEVICE_DRIVERS=(curses bayrad CFontz CFontz633 CFontzPacket
82 CwLnx EyeboxOne g15 glcdlib glk
83 hd44780 icp_a106 imon imonlcd IOWarrior
84 lb216 lcdm001 lcterm
85 MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD
86 pyramid sed1330 sed1520 serialVFD sli
87 stv5730 svga t6963 text tyan
88 ula200 xosd ea65 picolcd serialPOS)
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 ENABLEUSB
117 if use lcd_devices_cfontzpacket || use lcd_devices_cwlinux || use lcd_devices_pyramid; then
118 ENABLEUSB="--enable-libusb"
119 else
120 ENABLEUSB="$(use_enable usb libusb)"
121 fi
122
123 econf \
124 $(use_enable debug) \
125 $(use_enable nfs stat-nfs) \
126 $(use_enable samba stat-smbfs ) \
127 $(use_enable seamless-hbars) \
128 ${ENABLEUSB} \
129 "--enable-drivers=${COMMA_DRIVERS}" \
130 || die "configure failed"
131
132 emake || die "make failed"
133
134 if use doc; then
135 ebegin "Creating user documentation"
136 cd "${S}"/docs/lcdproc-user
137 xmlto html --skip-validation lcdproc-user.docbook
138 eend $?
139
140 ebegin "Creating dev documentation"
141 cd "${S}"/docs/lcdproc-dev
142 xmlto html --skip-validation lcdproc-dev.docbook
143 eend $?
144 fi
145 }
146
147 append-driver() {
148 [[ -z $* ]] && return 0
149 if [ -z "${COMMA_DRIVERS}" ] ; then
150 # First in the list
151 COMMA_DRIVERS="$*"
152 FIRST_DRIVER="$*"
153 else
154 # Second, third, ... include a comma at the front
155 COMMA_DRIVERS="${COMMA_DRIVERS},$*"
156 fi
157 return 0
158 }
159
160 src_install() {
161 emake DESTDIR="${D}" install || die "make install failed"
162
163 # move example clients installed to /usr/bin
164 rm -f "${D}"/usr/bin/{tail,lcdmetar,iosock,fortune,x11amp}.pl
165 insinto /usr/share/lcdproc/clients
166 doins clients/examples/*.pl
167 doins clients/metar/
168
169 newinitd "${FILESDIR}/0.5.1-LCDd.initd" LCDd
170 newinitd "${FILESDIR}/0.5.2-r2-lcdproc.initd" lcdproc
171
172 dodoc README CREDITS ChangeLog INSTALL TODO
173 dodoc docs/README.* docs/*.txt
174
175 if use doc; then
176 insinto /usr/share/doc/${PF}/lcdproc-user
177 doins docs/lcdproc-user/*.html
178 insinto /usr/share/doc/${PF}/lcdproc-dev
179 doins docs/lcdproc-dev/*.html
180 fi
181 }
182
183 pkg_postinst() {
184 ewarn "IMPORTANT: Please update your /etc/LCDd.conf"
185 ewarn "As of lcdproc-0.5.1-r2, the DriverPath changed from /usr/share/lcdproc to /usr/$(get_libdir)/lcdproc ."
186 }

  ViewVC Help
Powered by ViewVC 1.1.20