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