Gentoo Archives: gentoo-commits

From: "Daniel Gryniewicz (dang)" <dang@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/hal: ChangeLog hal-0.5.14-r1.ebuild
Date: Thu, 07 Jan 2010 13:28:08
Message-Id: E1NSsPE-0002wg-QV@stork.gentoo.org
1 dang 10/01/07 13:28:04
2
3 Modified: ChangeLog
4 Added: hal-0.5.14-r1.ebuild
5 Log:
6 Fix MAX_PATH to be the same as the system. Bug #299385
7 (Portage version: 2.2_rc61/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.312 sys-apps/hal/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/ChangeLog?rev=1.312&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/ChangeLog?rev=1.312&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/ChangeLog?r1=1.311&r2=1.312
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v
19 retrieving revision 1.311
20 retrieving revision 1.312
21 diff -u -r1.311 -r1.312
22 --- ChangeLog 13 Dec 2009 18:46:24 -0000 1.311
23 +++ ChangeLog 7 Jan 2010 13:28:04 -0000 1.312
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sys-apps/hal
26 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.311 2009/12/13 18:46:24 nirbheek Exp $
28 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.312 2010/01/07 13:28:04 dang Exp $
30 +
31 +*hal-0.5.14-r1 (07 Jan 2010)
32 +
33 + 07 Jan 2010; Daniel Gryniewicz <dang@g.o> +hal-0.5.14-r1.ebuild:
34 + Fix MAX_PATH to be the same as the system. Bug #299385
35 +
36
37 13 Dec 2009; Nirbheek Chauhan <nirbheek@g.o> hal-0.5.14.ebuild:
38 Fix blockers due to a combination of hal[consolekit,-policykit] and polkit
39
40
41
42 1.1 sys-apps/hal/hal-0.5.14-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/hal-0.5.14-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/hal-0.5.14-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: hal-0.5.14-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2010 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.14-r1.ebuild,v 1.1 2010/01/07 13:28:04 dang Exp $
52
53 EAPI="2"
54
55 inherit eutils linux-info autotools flag-o-matic multilib
56
57 PATCH_VERSION="2"
58
59 MY_P=${P/_/}
60 S=${WORKDIR}/${MY_P}
61 PATCHNAME="${MY_P}-gentoo-patches-${PATCH_VERSION}"
62 DESCRIPTION="Hardware Abstraction Layer"
63 HOMEPAGE="http://www.freedesktop.org/wiki/Software/hal"
64 SRC_URI="http://hal.freedesktop.org/releases/${MY_P}.tar.bz2
65 http://dev.gentoo.org/~dang/files/${PATCHNAME}.tar.bz2"
66
67 LICENSE="|| ( GPL-2 AFL-2.0 )"
68 SLOT="0"
69 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 -x86-fbsd"
70
71 KERNEL_IUSE="kernel_linux kernel_FreeBSD"
72 IUSE="X acpi apm crypt consolekit debug dell disk-partition doc laptop policykit selinux ${KERNEL_IUSE}"
73
74 RDEPEND=">=dev-libs/dbus-glib-0.61
75 >=dev-libs/glib-2.14
76 >=dev-libs/expat-1.95.8
77 =virtual/libusb-0*
78 >=sys-apps/pciutils-2.2.7-r1
79 sys-apps/usbutils
80 virtual/eject
81 amd64? ( >=sys-apps/dmidecode-2.7 )
82 dell? ( >=sys-libs/libsmbios-0.13.4 )
83 disk-partition? ( >=sys-apps/parted-1.8.0 )
84 ia64? ( >=sys-apps/dmidecode-2.7 )
85 kernel_linux? (
86 >=sys-fs/udev-125
87 >=sys-apps/util-linux-2.16
88 >=sys-kernel/linux-headers-2.6.22
89 crypt? ( >=sys-fs/cryptsetup-1.0.5 )
90 )
91 kernel_FreeBSD? ( >=dev-libs/libvolume_id-0.77 )
92 x86? ( >=sys-apps/dmidecode-2.7 )
93 selinux? ( sys-libs/libselinux sec-policy/selinux-hal )
94 consolekit? (
95 || (
96 <sys-auth/consolekit-0.4[policykit=]
97 >=sys-auth/consolekit-0.4
98 )
99 )
100 policykit? (
101 sys-auth/consolekit[policykit]
102 sys-auth/policykit[pam]
103 )"
104 DEPEND="${RDEPEND}
105 dev-util/pkgconfig
106 >=dev-util/gperf-3.0.3
107 >=dev-util/intltool-0.35
108 doc? (
109 app-text/xmlto
110 dev-libs/libxml2
111 dev-util/gtk-doc
112 app-text/docbook-sgml-utils
113 )"
114 PDEPEND=">=app-misc/hal-info-20081219
115 !gnome-extra/hal-device-manager
116 laptop? ( >=sys-power/pm-utils-0.99.3 )"
117
118 ## HAL Daemon drops privledges so we need group access to read disks
119 HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
120 HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
121
122 function check_hotplug_net() {
123 local CONFIG_CHECK="~HOTPLUG ~NET"
124 local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)\n"
125 local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)\n"
126 check_extra_config
127 }
128
129 function check_inotify() {
130 local CONFIG_CHECK="~INOTIFY_USER"
131 local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)\n"
132 check_extra_config
133 }
134
135 function check_acpi_proc() {
136 local CONFIG_CHECK="~ACPI_PROCFS ~ACPI_PROC_EVENT"
137 local WARNING_ACPI_PROCFS="CONFIG_ACPI_PROCFS:\tis not set (required for HAL)\n"
138 local WARNING_ACPI_PROC_EVENT="CONFIG_ACPI_PROC_EVENT:\tis not set (required for HAL)\n"
139 check_extra_config
140 }
141
142 pkg_setup() {
143 if use kernel_linux ; then
144 if [[ -e "${ROOT}/usr/src/linux/.config" ]] ; then
145 kernel_is ge 2 6 19 || ewarn "HAL requires a kernel version 2.6.19 or newer"
146
147 if kernel_is lt 2 6 23 && use acpi ; then
148 check_acpi_proc
149 fi
150 fi
151
152 check_hotplug_net
153 check_inotify
154 fi
155
156 # http://devmanual.gentoo.org/ebuild-writing/functions/
157 # http://bugs.gentoo.org/show_bug.cgi?id=191605
158
159 # Create groups for hotplugging and HAL
160 enewgroup haldaemon
161 enewgroup plugdev
162
163 # HAL drops priviledges by default now ...
164 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
165 if use kernel_linux; then
166 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX}
167 elif use kernel_FreeBSD; then
168 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD}
169 fi
170
171 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
172 # If users have a problem with this, let them file a bug
173 if [[ ${ROOT} == / ]] ; then
174 if use kernel_linux; then
175 usermod -G ${HALDAEMON_GROUPS_LINUX} haldaemon
176 elif use kernel_FreeBSD; then
177 pw usermod haldaemon -G ${HALDAEMON_GROUPS_FREEBSD}
178 fi
179 fi
180 }
181
182 src_prepare() {
183 # Only apply one of the policy patches. Bug #267042
184 if use policykit ; then
185 rm "${WORKDIR}/${PATCHNAME}/patches/0001-plugdev-dbus-policy.patch"
186 else
187 rm "${WORKDIR}/${PATCHNAME}/patches/0002-policykit-dbus-policy.patch"
188 fi
189
190 EPATCH_MULTI_MSG="Applying Gentoo Patchset ..." \
191 EPATCH_SUFFIX="patch" \
192 EPATCH_SOURCE="${WORKDIR}/${PATCHNAME}/patches/" \
193 EPATCH_FORCE="yes" \
194 epatch
195
196 eautoreconf
197 }
198
199 src_configure() {
200 local acpi="$(use_enable acpi)"
201 local backend=
202 local hardware=
203 local consolekit="$(use_enable consolekit console-kit)"
204
205 append-flags -rdynamic
206
207 if use kernel_linux ; then
208 backend="linux"
209 elif use kernel_FreeBSD ; then
210 backend="freebsd"
211 else
212 eerror "Invalid backend"
213 fi
214
215 if use kernel_linux ; then
216 if use acpi ; then
217 # Using IBM ACPI and Toshiba ACPI results in double notification as this
218 # was merged into the Linux Kernel 2.6.22
219 if kernel_is lt 2 6 22 ; then
220 acpi="$acpi --enable-acpi-ibm --enable-acpi-toshiba"
221 else
222 acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
223 fi
224
225 acpi="$acpi --enable-acpi-proc --enable-acpi-acpid"
226 else
227 acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
228 acpi="$acpi --disable-acpi-proc --disable-acpi-acpid"
229 fi
230
231 hardware="--with-cpufreq --with-usb-csr --with-keymaps"
232 use arm && hardware="$hardware --with-omap --enable-pmu"
233 use ppc && hardware="$hardware --enable-pmu"
234 if use x86 || use amd64; then
235 hardware="$hardware --with-macbook --with-macbookpro"
236 fi
237
238 if use dell ; then
239 hardware="$hardware --with-dell-backlight"
240 else
241 hardware="$hardware --without-dell-backlight"
242 fi
243
244 hardware="$hardware --enable-sonypic"
245 else
246 hardware="--without-cpufreq --without-usb-csr --without-keymaps"
247 hardware="$hardware --without-omap"
248 hardware="$hardware --without-dell-backlight"
249 hardware="$hardware --enable-acpi-ibm --enable-acpi-toshiba"
250 hardware="$hardware --disable-sonypic"
251 fi
252
253 # Policykit support depends on consolekit support. Therefore, force on
254 # consolekit, even if it's USE flag is off, if policykit support is on.
255 # This enables packages to USE-depend on hal[policykit?]
256 if use policykit ; then
257 consolekit="--enable-console-kit"
258 fi
259
260 econf --with-backend=${backend} \
261 --with-os-type=gentoo \
262 --with-pid-file=/var/run/hald.pid \
263 --with-hwdata=/usr/share/misc \
264 --with-socket-dir=/var/run/hald \
265 --with-udev-prefix=/etc \
266 --enable-umount-helper \
267 --enable-man-pages \
268 --disable-acl-management \
269 --enable-pci \
270 $(use_enable apm) \
271 $(use_enable debug verbose-mode) \
272 $(use_enable disk-partition parted) \
273 $(use_enable doc docbook-docs) \
274 $(use_enable doc gtk-doc) \
275 $(use_enable policykit policy-kit) \
276 ${consolekit} \
277 --docdir=/usr/share/doc/${PF} \
278 --localstatedir=/var \
279 ${acpi} ${hardware} \
280 || die "configure failed"
281 }
282
283 src_install() {
284 emake DESTDIR="${D}" install || die
285 dodoc AUTHORS ChangeLog NEWS README || die "docs failed"
286
287 # hal umount for unclean unmounts
288 exeinto /$(get_libdir)/udev/
289 newexe "${FILESDIR}/hal-unmount.dev" hal_unmount || die "udev helper failed"
290
291 # initscript
292 newinitd "${FILESDIR}/0.5.10-hald.rc" hald || die "init script failed"
293
294 # configuration
295 cp "${FILESDIR}/0.5.10-hald.conf" "${WORKDIR}/" || \
296 die "failed to copy hald.conf"
297
298 if use debug; then
299 sed -e 's:HALD_VERBOSE="no":HALD_VERBOSE="yes":' \
300 -i "${WORKDIR}/0.5.10-hald.conf" || die "failed to change verbose"
301 fi
302 newconfd "${WORKDIR}/0.5.10-hald.conf" hald || \
303 die "failed to install hald.conf"
304
305 if use X ; then
306 # New Configuration Snippets
307 dodoc "${WORKDIR}/${PATCHNAME}/config-examples/"*.fdi || \
308 die "dodoc X examples failed"
309 fi
310
311 # We now create and keep /media here as both gnome-mount and pmount
312 # use these directories, to avoid collision.
313 keepdir /media
314
315 # We also need to create and keep /etc/fdi/{information,policy,preprobe}
316 # or else hal bombs.
317 keepdir /etc/hal/fdi/{information,policy,preprobe}
318
319 # HAL stores it's fdi cache in /var/cache/hald
320 keepdir /var/cache/hald
321
322 # HAL keeps its unix socket here
323 keepdir /var/run/hald
324 keepdir /var/lib/hal
325 }
326
327 pkg_postinst() {
328 # Despite what people keep changing this location. Either one works.. it doesn't matter
329 # http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/
330
331 elog "The HAL daemon needs to be running for certain applications to"
332 elog "work. Suggested is to add the init script to your start-up"
333 elog "scripts, this should be done like this :"
334 elog "\`rc-update add hald default\`"
335 echo
336 elog "Access to hal is not protected by either policykit or the plugdev group."
337 elog "If you have problems discovering/configuring hardware, try adding"
338 elog "yourself to plugdev."
339 echo
340 elog "IF you have additional applications which consume ACPI events, you"
341 elog "should consider installing acpid to allow applications to share ACPI"
342 elog "events."
343 if use X ; then
344 echo
345 elog "If you wish to use a non US layout, you may do so by executing:"
346 elog "setxkbmap <layout> or by utilizing your Desktop Environment's"
347 elog "Keyboard Layout Settings mechanism."
348 elog "Under GNOME, this is gnome-keyboard-properties, and under KDE"
349 elog "it is kxkb."
350 fi
351 echo
352 elog "In order have suspend/hibernate function with HAL or apps that use HAL"
353 elog "(such as gnome-power-manager), you should build HAL with the laptop"
354 elog "useflag which will install pm-utils."
355 if use X ; then
356 echo
357 elog "X Input Hotplugging (if you build xorg-server with the HAL useflag)"
358 elog "reads user specific configuration from /etc/hal/fdi/policy/."
359 echo
360 elog "You should remove the Input sections from your xorg.conf once you have"
361 elog "migrated the rules to a HAL fdi file."
362 fi
363
364 ebeep 5
365 epause 5
366 }