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