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