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