Gentoo Archives: gentoo-commits

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