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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Mar 20 23:46:40 2007 UTC (13 years, 8 months ago) by rbu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Included an upstream patch for better g15daemon-1.9 compatibility, dropping 0.5.1-r1 because it does not support LCD_DEVICES
(Portage version: 2.1.2.2)

1 # Copyright 1999-2007 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.1-r1.ebuild,v 1.5 2007/01/28 15:18:55 rbu Exp $
4
5 WANT_AUTOCONF="latest"
6 WANT_AUTOMAKE="latest"
7 inherit eutils flag-o-matic autotools
8
9 DESCRIPTION="Client/Server suite to drive all kinds of LCD (-like) devices"
10 HOMEPAGE="http://lcdproc.org/"
11 SRC_URI="mirror://sourceforge/lcdproc/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc64 ~sparc ~x86"
16
17 # general use keywords in first line, drivers in line 2
18 IUSE="doc debug ldap nfs samba seamless-hbars usb
19 g15 graphlcd irman lirc ncurses svga ula200 xosd"
20
21 DEPEND="
22 doc? ( app-text/xmlto )
23 ldap? ( net-nds/openldap )
24 usb? ( dev-libs/libusb )
25
26 graphlcd? ( app-misc/graphlcd-base app-misc/glcdprocdriver )
27 g15? ( app-misc/g15daemon dev-libs/libg15 >=dev-libs/libg15render-1.1.1 )
28 irman? ( media-libs/libirman )
29 lirc? ( app-misc/lirc )
30 ncurses? ( sys-libs/ncurses )
31 svga? ( media-libs/svgalib )
32 ula200? ( dev-embedded/libftdi dev-libs/libusb )
33 xosd? ( x11-libs/xosd x11-libs/libX11 x11-libs/libXext ) "
34 RDEPEND=${DEPEND}
35
36 USE_DRIVERS="curses g15 glcdlib irman lirc svga ula200 xosd"
37 EXTRA_DRIVERS="bayrad CFontz CFontz633 CFontzPacket CwLnx EyeboxOne \
38 glk hd44780 icp_a106 imon IOWarrior joy lb216 lcdm001 \
39 lcterm MD8800 ms6931 mtc_s16209x MtxOrb NoritakeVFD pyramid sed1330 \
40 sed1520 serialVFD sli stv5730 t6963 text tyan "
41 ALL_DRIVERS="${USE_DRIVERS} ${EXTRA_DRIVERS}"
42
43 # compatibility with 0.4-ebuild format
44 LCDPROC_DRIVERS=${LCDPROC_DRIVERS//,/ }
45
46 # if no drivers or all are set, select the defaults
47 has all ${LCDPROC_DRIVERS} \
48 && LCDPROC_DRIVERS="${EXTRA_DRIVERS}"
49 [ -z "${LCDPROC_DRIVERS}" ] \
50 && LCDPROC_DRIVERS="${EXTRA_DRIVERS}"
51 has none ${LCDPROC_DRIVERS} \
52 && LCDPROC_DRIVERS=""
53
54 pkg_setup() {
55 echo
56 einfo "If you are updating from lcdproc-0.4, note that the setup of drivers has changed:"
57 einfo "The drivers ${USE_DRIVERS// /, } are controlled by use flags."
58 einfo "All other drivers are built by default, or in respect to the env variable"
59 einfo "LCDPROC_DRIVERS which can be a space separated list. Example:"
60 einfo " LCDPROC_DRIVERS=\"text CFontz\" emerge lcdproc"
61 einfo "You can also set this variable in your make.conf."
62 echo
63 einfo "Possible choices for LCDPROC_DRIVERS are:"
64
65 # Nice Output of EXTRA_DRIVERS
66 local LINE=" "
67 local ELEM=0
68 for driver in ${EXTRA_DRIVERS}; do
69 ELEM=$((${ELEM}+1))
70 LINE="${LINE} ${driver}"
71 if [ "${ELEM}" = 8 ]; then
72 einfo "${LINE}"
73 ELEM=0
74 LINE=" "
75 fi
76 done
77 if [ ! "${ELEM}" = 0 ]; then
78 einfo "${LINE}"
79 fi
80
81 einfo " 'all' if you want to include all drivers (default)."
82 einfo " 'none' will not include any extra drivers."
83 echo
84
85 local FILTERED_DRIVERS
86 for driver in ${LCDPROC_DRIVERS}; do
87 if has ${driver} ${EXTRA_DRIVERS} ; then
88 FILTERED_DRIVERS="${FILTERED_DRIVERS} ${driver}"
89 else
90 eerror "The extra driver '${driver}' is not available or has to be enabled by a USE flag."
91 eerror "Please check your LCDPROC_DRIVERS variable!"
92 echo
93 fi
94 done
95 LCDPROC_DRIVERS="${FILTERED_DRIVERS}"
96
97 # add use-flag specific drivers to LCDPROC_DRIVERS
98 use graphlcd && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} glcdlib"
99 use g15 && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} g15"
100 use irman && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} irman"
101 use lirc && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} lirc"
102 use ncurses && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} curses"
103 use svga && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} svga"
104 use ula200 && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} ula200"
105 use xosd && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} xosd"
106
107 einfo "The following drivers will be built: "
108 echo
109
110 for driver in ${ALL_DRIVERS}; do
111 has ${driver} ${LCDPROC_DRIVERS} && einfo $driver
112 if (! use usb) && (has ${driver} "CFontzPacket CwLnx pyramid"); then
113 ewarn "${driver} might not compile if you do not enable USE=\"usb\""
114 fi
115 done
116 }
117
118 src_unpack() {
119 unpack ${A}
120 cd "${S}"
121 epatch "${FILESDIR}/${PV}-LCDd-conf-driver-path.patch"
122 epatch "${FILESDIR}/${PV}-as-needed.patch"
123 epatch "${FILESDIR}/${PV}-serialvfd-parallel.patch"
124 eautoreconf
125 }
126
127 src_compile() {
128 # avoid executable stack as mentioned
129 # in http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
130 append-ldflags -Wl,-z,noexecstack
131
132 # convert space separated LCDPROC_DRIVERS to comma separated COMMA_DRIVERS
133 local COMMA_DRIVERS
134 for driver in ${LCDPROC_DRIVERS}; do
135 if [ -z "${COMMA_DRIVERS}" ] ; then
136 COMMA_DRIVERS="${driver}"
137 else
138 COMMA_DRIVERS="${COMMA_DRIVERS},${driver}"
139 fi
140 done
141
142 econf \
143 $(use_enable debug) \
144 $(use_enable ldap) \
145 $(use_enable nfs stat-nfs) \
146 $(use_enable samba stat-smbfs ) \
147 $(use_enable seamless-hbars) \
148 $(use_enable usb libusb) \
149 "--enable-drivers=${COMMA_DRIVERS}" \
150 || die "configure failed"
151
152 emake || die "make failed"
153
154 if use doc; then
155 ebegin "Creating user documentation"
156 cd ${S}/docs/lcdproc-user
157 xmlto html lcdproc-user.docbook
158 eend 0
159 ebegin "Creating dev documentation"
160 cd ${S}/docs/lcdproc-dev
161 xmlto html lcdproc-dev.docbook
162 eend 0
163 fi
164 }
165
166 src_install() {
167 dosbin server/LCDd
168 dobin clients/lcdexec/lcdexec
169 dobin clients/lcdproc/lcdproc
170 dobin clients/lcdvc/lcdvc
171
172 insinto /usr/share/lcdproc/drivers
173 doins server/drivers/*.so
174
175 insinto /usr/share/lcdproc/clients
176 doins clients/examples/*.pl
177 doins clients/metar/lcdmetar.pl
178
179 insinto /etc
180 doins LCDd.conf
181 doins clients/lcdexec/lcdexec.conf
182 doins clients/lcdproc/lcdproc.conf
183 doins clients/lcdvc/lcdvc.conf
184
185 newinitd "${FILESDIR}/${PV}-LCDd.initd" LCDd
186 newinitd "${FILESDIR}/${PV}-lcdproc.initd" lcdproc
187
188 doman docs/*.1 docs/*.5 docs/*.8
189 dodoc README CREDITS ChangeLog INSTALL TODO
190 dodoc docs/README.* docs/*.txt
191
192 if use doc; then
193 insinto /usr/share/doc/${PF}/lcdproc-user
194 doins docs/lcdproc-user/*.html
195 insinto /usr/share/doc/${PF}/lcdproc-dev
196 doins docs/lcdproc-dev/*.html
197 fi
198 }

  ViewVC Help
Powered by ViewVC 1.1.20