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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Dec 20 12:00:12 2006 UTC (13 years, 11 months ago) by jokey
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Adding patch to fix dep-compile bug #151308
(Portage version: 2.1.2_rc3-r7)
 (Signed Manifest commit)

1 # Copyright 1999-2006 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.ebuild,v 1.4 2006/12/06 11:42:59 jokey 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 ~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
44 # compatibility with 1.4-ebuild format
45 LCDPROC_DRIVERS=${LCDPROC_DRIVERS//,/ }
46
47 # if no drivers or all are set, select the defaults
48 has all ${LCDPROC_DRIVERS} \
49 && LCDPROC_DRIVERS="${EXTRA_DRIVERS}"
50 [ -z "${LCDPROC_DRIVERS}" ] \
51 && LCDPROC_DRIVERS="${EXTRA_DRIVERS}"
52 has none ${LCDPROC_DRIVERS} \
53 && LCDPROC_DRIVERS=""
54
55
56 pkg_setup() {
57 echo
58 einfo "If you are updating from lcdproc-0.4, note that the setup of drivers has changed:"
59 einfo "The drivers ${USE_DRIVERS// /, } are controlled by use flags."
60 einfo "All other drivers are built by default, or in respect to the env variable"
61 einfo "LCDPROC_DRIVERS which can be a space separated list. Example:"
62 einfo " LCDPROC_DRIVERS=\"text CFontz\" emerge lcdproc"
63 einfo "You can also set this variable in your make.conf."
64 echo
65 einfo "Possible choices for LCDPROC_DRIVERS are:"
66
67 # Nice Output of EXTRA_DRIVERS
68 local LINE=" "
69 local ELEM=0
70 for driver in ${EXTRA_DRIVERS}; do
71 ELEM=$((${ELEM}+1))
72 LINE="${LINE} ${driver}"
73 if [ "${ELEM}" = 8 ]; then
74 einfo "${LINE}"
75 ELEM=0
76 LINE=" "
77 fi
78 done
79 if [ ! "${ELEM}" = 0 ]; then
80 einfo "${LINE}"
81 fi
82
83 einfo " 'all' if you want to include all drivers (default)."
84 einfo " 'none' will not include any extra drivers."
85 echo
86
87 local FILTERED_DRIVERS
88 for driver in ${LCDPROC_DRIVERS}; do
89 if has ${driver} ${EXTRA_DRIVERS} ; then
90 FILTERED_DRIVERS="${FILTERED_DRIVERS} ${driver}"
91 else
92 eerror "The extra driver '${driver}' is not available or has to be enabled by a USE flag."
93 eerror "Please check your LCDPROC_DRIVERS variable!"
94 echo
95 fi
96 done
97 LCDPROC_DRIVERS="${FILTERED_DRIVERS}"
98
99 # add use-flag specific drivers to LCDPROC_DRIVERS
100 use graphlcd && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} glcdlib"
101 use g15 && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} g15"
102 use irman && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} irman"
103 use lirc && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} lirc"
104 use ncurses && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} curses"
105 use svga && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} svga"
106 use ula200 && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} ula200"
107 use xosd && LCDPROC_DRIVERS="${LCDPROC_DRIVERS} xosd"
108
109 einfo "The following drivers will be built: "
110 echo
111
112 for driver in ${ALL_DRIVERS}; do
113 has ${driver} ${LCDPROC_DRIVERS} && einfo $driver
114 if (! use usb) && (has ${driver} "CFontzPacket CwLnx pyramid"); then
115 ewarn "${driver} might not compile if you do not enable USE=\"usb\""
116 fi
117 done
118 }
119
120 src_unpack() {
121 unpack ${A}
122 cd "${S}"
123 epatch "${FILESDIR}/${PV}-LCDd-conf-driver-path.patch"
124 epatch "${FILESDIR}/${PV}-as-needed.patch"
125 eautoreconf
126 }
127
128 src_compile() {
129 # avoid executable stack as mentioned
130 # in http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
131 append-ldflags -Wl,-z,noexecstack
132
133 # convert space separated LCDPROC_DRIVERS to comma separated COMMA_DRIVERS
134 local COMMA_DRIVERS
135 for driver in ${LCDPROC_DRIVERS}; do
136 if [ -z "${COMMA_DRIVERS}" ] ; then
137 COMMA_DRIVERS="${driver}"
138 else
139 COMMA_DRIVERS="${COMMA_DRIVERS},${driver}"
140 fi
141 done
142
143 econf \
144 $(use_enable debug) \
145 $(use_enable ldap) \
146 $(use_enable nfs stat-nfs) \
147 $(use_enable samba stat-smbfs ) \
148 $(use_enable seamless-hbars) \
149 $(use_enable usb libusb) \
150 "--enable-drivers=${COMMA_DRIVERS}" \
151 || die "configure failed"
152
153 emake || die "make failed"
154
155 if use doc; then
156 ebegin "Creating user documentation"
157 cd ${S}/docs/lcdproc-user
158 xmlto html lcdproc-user.docbook
159 eend 0
160 ebegin "Creating dev documentation"
161 cd ${S}/docs/lcdproc-dev
162 xmlto html lcdproc-dev.docbook
163 eend 0
164 fi
165 }
166
167 src_install() {
168 dosbin server/LCDd
169 dobin clients/lcdexec/lcdexec
170 dobin clients/lcdproc/lcdproc
171 dobin clients/lcdvc/lcdvc
172
173 insinto /usr/share/lcdproc/drivers
174 doins server/drivers/*.so
175
176 insinto /usr/share/lcdproc/clients
177 doins clients/examples/*.pl
178 doins clients/metar/lcdmetar.pl
179
180 insinto /etc
181 doins LCDd.conf
182 doins clients/lcdexec/lcdexec.conf
183 doins clients/lcdproc/lcdproc.conf
184 doins clients/lcdvc/lcdvc.conf
185
186 newinitd "${FILESDIR}/${PV}-LCDd.initd" LCDd
187 newinitd "${FILESDIR}/${PV}-lcdproc.initd" lcdproc
188
189 doman docs/*.1 docs/*.5 docs/*.8
190 dodoc README CREDITS ChangeLog INSTALL TODO
191 dodoc docs/README.* docs/*.txt
192
193 if use doc; then
194 insinto /usr/share/doc/${PF}/lcdproc-user
195 doins docs/lcdproc-user/*.html
196 insinto /usr/share/doc/${PF}/lcdproc-dev
197 doins docs/lcdproc-dev/*.html
198 fi
199 }

  ViewVC Help
Powered by ViewVC 1.1.20