Browse Source

Copy hal from main tree archives

pull/2/head
Golubev Alexander 7 years ago
parent
commit
b3656f949a

+ 3
- 0
app-misc/hal-info/Manifest View File

@@ -0,0 +1,3 @@
1
+DIST hal-info-20091130.tar.gz 144859 RMD160 3ff2caedf57e09f0c5c3203ff50570b35085b94d SHA1 d548a0d837d39a609c42a789c92578150c18b9f5 SHA256 3b5a90eaea4359977d36c808a19b3f08835345a258c68b9c6c080ad5ef875224
2
+EBUILD hal-info-20091130.ebuild 667 RMD160 c0ae142e3f738cd0358e23786a9d6887161a226c SHA1 c28d1e7cc81c72c478e8dd0b646fdeaf53ff62b6 SHA256 c5099f13c4c6a201a9eed296e6fb14b99c81968c3a44e0c288460dd44943d706
3
+MISC metadata.xml 258 RMD160 494bce98cc779b9a7d7e07db86bebb5f27478db8 SHA1 0bd7d94fb8ceea398218ca95a5765c98473f8e45 SHA256 a6a56922ae7d1e13c51774721cb3b98a8d45a15a102f879ff3e706bcfb73fe5d

+ 22
- 0
app-misc/hal-info/hal-info-20091130.ebuild View File

@@ -0,0 +1,22 @@
1
+# Copyright 1999-2011 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-misc/hal-info/Attic/hal-info-20091130.ebuild,v 1.4 2011/09/18 09:08:54 ssuominen dead $
4
+
5
+DESCRIPTION="The fdi scripts that HAL uses"
6
+HOMEPAGE="http://hal.freedesktop.org/"
7
+SRC_URI="http://hal.freedesktop.org/releases/${P}.tar.gz"
8
+
9
+LICENSE="GPL-2"
10
+SLOT="0"
11
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd"
12
+IUSE=""
13
+
14
+RDEPEND=">=sys-apps/hal-0.5.10"
15
+DEPEND="${RDEPEND}"
16
+
17
+# This ebuild does not install any binaries
18
+RESTRICT="binchecks strip"
19
+
20
+src_install() {
21
+	emake DESTDIR="${D}" install || die
22
+}

+ 9
- 0
app-misc/hal-info/metadata.xml View File

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+	<herd>no-herd</herd>
5
+	<maintainer>
6
+		<email>fatzer2@gmail.com</email>
7
+		<name>Golubev Alexander</name>
8
+	</maintainer>
9
+</pkgmetadata>

+ 722
- 0
eclass/multilib-native.eclass View File

@@ -0,0 +1,722 @@
1
+# Copyright 1999-2008 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+#
5
+# @ECLASS: multilib-native.eclass
6
+# @MAINTAINER:
7
+# Steven Newbury <steve@snewbury.org.uk>
8
+# @BLURB: Provide infrastructure for native multilib ebuilds
9
+
10
+IUSE="${IUSE} lib32"
11
+
12
+DEPEND="${DEPEND} sys-apps/abi-wrapper"
13
+RDEPEND="${RDEPEND} sys-apps/abi-wrapper"
14
+
15
+if use lib32; then
16
+	EMULTILIB_PKG="true"
17
+fi
18
+
19
+inherit base multilib
20
+
21
+case "${EAPI:-0}" in
22
+	2|3)
23
+		EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
24
+		;;
25
+	*)
26
+		EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm
27
+		;;
28
+esac
29
+
30
+# -----------------------------------------------------------------------------
31
+
32
+# @VARIABLE: EMULTILIB_SAVE_VARS
33
+# @DESCRIPTION: Environment variables to save
34
+# EMULTILIB_SAVE_VARS="${EMULTILIB_SAVE_VARS}
35
+#		AS CC CXX FC LD ASFLAGS CFLAGS CXXFLAGS FCFLAGS FFLAGS LDFLAGS
36
+#		CHOST CBUILD CDEFINE LIBDIR S CCACHE_DIR myconf PYTHON PERLBIN
37
+#		QMAKE QMAKESPEC QTBINDIR  QTBASEDIR QTLIBDIR QTPCDIR
38
+#		QTPLUGINDIR CMAKE_BUILD_DIR mycmakeargs KDE_S POPPLER_MODULE_S
39
+#		ECONF_SOURCE MY_LIBDIR MOZLIBDIR SDKDIR G2CONF PKG_CONFIG_PATH
40
+#		DESTTREE SRC_PREP USE_64"
41
+EMULTILIB_SAVE_VARS="${EMULTILIB_SAVE_VARS}
42
+		AS CC CXX FC LD ASFLAGS CFLAGS CXXFLAGS FCFLAGS FFLAGS LDFLAGS
43
+		CHOST CBUILD CDEFINE LIBDIR S CCACHE_DIR myconf PYTHON PERLBIN
44
+		QMAKE QMAKESPEC QTBINDIR  QTBASEDIR QTLIBDIR QTPCDIR
45
+		QTPLUGINDIR CMAKE_BUILD_DIR mycmakeargs KDE_S POPPLER_MODULE_S
46
+		ECONF_SOURCE MY_LIBDIR MOZLIBDIR SDKDIR G2CONF PKG_CONFIG_PATH
47
+		DESTTREE SRC_PREP USE_64 osname mythreading myarch PRIV_LIB 
48
+		SITE_LIB SITE_ARCH VENDOR_LIB VENDOR_ARCH ARCH_LIB MY_OPTS
49
+		ECONF_PARAMS MODULE_NAMES"
50
+
51
+# @VARIABLE: EMULTILIB_SOURCE_DIRNAME
52
+# @DESCRIPTION: Holds the name of the source directory
53
+# EMULTILIB_SOURCE_DIRNAME=""
54
+EMULTILIB_SOURCE_DIRNAME=""
55
+
56
+# @VARIABLE: EMULTILIB_SOURCE
57
+# @DESCRIPTION:
58
+# PATH to the top-level source directory.  This may be used in multilib-ised
59
+# ebuilds choosing to make use of external build directories for installing
60
+# files from the top of the source tree although for builds with external 
61
+# build directories it's sometimes more appropriate to use ${ECONF_SOURCE}.
62
+# EMULTILIB_SOURCE=""
63
+EMULTILIB_SOURCE=""
64
+
65
+# @VARIABLE: EMULTILIB_RELATIVE_BUILD_DIR
66
+# @DESCRIPTION:
67
+# EMULTILIB_RELATIVE_BUILD_DIR=""
68
+EMULTILIB_RELATIVE_BUILD_DIR=""
69
+
70
+# @VARIABLE: CMAKE_BUILD_DIR
71
+# @DESCRIPTION:
72
+# Despite the name, this is used for all build systems within this eclass.  
73
+# Usually this is the same as ${S}, except when using an external build
74
+# directory. (This is per ABI and so is saved/restored for each phase.)
75
+# CMAKE_BUILD_DIR=""
76
+CMAKE_BUILD_DIR=""
77
+
78
+# @VARIABLE: EMULTILIB_INHERITED
79
+# @DESCRIPTION:
80
+# Holds a list of inherited eclasses
81
+# is this var is onlky used in multilib-native_check_inherited_funcs
82
+EMULTILIB_INHERITED=""
83
+
84
+# -----------------------------------------------------------------------------
85
+
86
+# @FUNCTION: multilib-native_pkg_setup
87
+# @USAGE:
88
+# @DESCRIPTION: This is a multilib wrapper for the pkg_setup phase
89
+multilib-native_pkg_setup() {
90
+	multilib-native_src_generic pkg_setup
91
+}
92
+
93
+# @FUNCTION: multilib-native_src_unpack
94
+# @USAGE:
95
+# @DESCRIPTION: This is a multilib wrapper for the src_unpack phase
96
+multilib-native_src_unpack() {
97
+	multilib-native_src_generic src_unpack
98
+}
99
+
100
+# @FUNCTION: multilib-native_src_prepare
101
+# @USAGE:
102
+# @DESCRIPTION: This is a multilib wrapper for the src_prepare phase
103
+multilib-native_src_prepare() {
104
+	multilib-native_src_generic src_prepare
105
+}
106
+
107
+# @FUNCTION: multilib-native_src_configure
108
+# @USAGE:
109
+# @DESCRIPTION: This is a multilib wrapper for the src_configure phase
110
+multilib-native_src_configure() {
111
+	multilib-native_src_generic src_configure
112
+}
113
+
114
+# @FUNCTION: multilib-native_src_compile
115
+# @USAGE:
116
+# @DESCRIPTION: This is a multilib wrapper for the src_compile phase
117
+multilib-native_src_compile() {
118
+	multilib-native_src_generic src_compile
119
+}
120
+
121
+# @FUNCTION: multilib-native_src_install
122
+# @USAGE:
123
+# @DESCRIPTION: This is a multilib wrapper for the src_install phase
124
+multilib-native_src_install() {
125
+	multilib-native_src_generic src_install
126
+}
127
+
128
+# @FUNCTION: multilib-native_pkg_preinst
129
+# @USAGE:
130
+# @DESCRIPTION: This is a multilib wrapper for the pkg_preinst phase
131
+multilib-native_pkg_preinst() {
132
+	multilib-native_src_generic pkg_preinst
133
+}
134
+
135
+# @FUNCTION: multilib-native_pkg_postinst
136
+# @USAGE:
137
+# @DESCRIPTION: This is a multilib wrapper for the pkg_postinst phase
138
+multilib-native_pkg_postinst() {
139
+	multilib-native_src_generic pkg_postinst
140
+}
141
+
142
+# @FUNCTION: multilib-native_pkg_postrm
143
+# @USAGE:
144
+# @DESCRIPTION: This is a multilib wrapper for the pkg_postrm phase
145
+multilib-native_pkg_postrm() {
146
+	multilib-native_src_generic pkg_postrm
147
+}
148
+
149
+# @FUNCTION: multilib_debug
150
+# @USAGE: <name_of_variable> <content_of_variable>
151
+# @DESCRIPTION: print debug output if MULTILIB_DEBUG is set
152
+multilib_debug() {
153
+	[[ -n ${MULTILIB_DEBUG} ]] && einfo "MULTILIB_DEBUG: ${1}=\"${2}\""
154
+}
155
+
156
+# -----------------------------------------------------------------------------
157
+
158
+# Internal function
159
+# @FUNCTION: multilib-native_src_generic
160
+# @USAGE: <phase>
161
+# @DESCRIPTION: Run each phase for each "install ABI"
162
+multilib-native_src_generic() {
163
+# Recurse this function for each ABI from get_install_abis()
164
+	if [[ -n ${EMULTILIB_PKG} ]] && [[ -z ${OABI} ]] ; then
165
+		local abilist=""
166
+		if has_multilib_profile ; then
167
+			abilist=$(get_install_abis)
168
+			einfo "${1/src_/} multilib ${PN} for ABIs: ${abilist}"
169
+		elif is_crosscompile || tc-is-cross-compiler ; then
170
+			abilist=${DEFAULT_ABI}
171
+		fi
172
+		if [[ -n ${abilist} ]] ; then
173
+			OABI=${ABI}
174
+			for ABI in ${abilist} ; do
175
+				export ABI
176
+				multilib-native_src_generic ${1}
177
+			done
178
+			ABI=${OABI}
179
+			unset OABI
180
+			return 0
181
+		fi
182
+	fi
183
+
184
+# If this is the first time through, initialise the source path variables early
185
+# and unconditionally, whether building for multilib or not.  (This allows
186
+# multilib-native ebuilds to always make use of them.)  Then save the initial
187
+# environment.
188
+#
189
+# Sometimes, packages assume a directory structure ABOVE "S". ("S" is set to a
190
+# subdirectory of the tree they unpack into ${WORKDIR}.)  We need to deal with
191
+# this by finding the top-level of the source tree and keeping track of ${S}
192
+# relative to it.
193
+
194
+	if [[ -z ${EMULTILIB_INITIALISED[$(multilib-native_abi_to_index_key "INIT")]} ]]; then
195
+		[[ -n ${MULTILIB_DEBUG} ]] && \
196
+			einfo "MULTILIB_DEBUG: Determining EMULTILIB_SOURCE from S and WORKDIR"
197
+		EMULTILIB_RELATIVE_BUILD_DIR="${S#*${WORKDIR}\/}"
198
+		[[ -n ${MULTILIB_DEBUG} ]] && \
199
+			einfo "MULTILIB_DEBUG: EMULTILIB_RELATIVE_BUILD_DIR=\"${EMULTILIB_RELATIVE_BUILD_DIR}\""
200
+		EMULTILIB_SOURCE_DIRNAME="${EMULTILIB_RELATIVE_BUILD_DIR%%/*}"
201
+		[[ -n ${MULTILIB_DEBUG} ]] && \
202
+			einfo "MULTILIB_DEBUG: EMULTILIB_SOURCE_DIRNAME=\"${EMULTILIB_SOURCE_DIRNAME}\""
203
+		EMULTILIB_SOURCE="${WORKDIR}/${EMULTILIB_SOURCE_DIRNAME}"
204
+		CMAKE_BUILD_DIR="${S}"
205
+		[[ -n ${MULTILIB_DEBUG} ]] && \
206
+			einfo "MULTILIB_DEBUG: EMULTILIB_SOURCE=\"${EMULTILIB_SOURCE}\""
207
+		multilib-native_save_abi_env "INIT"
208
+		EMULTILIB_INITIALISED[$(multilib-native_abi_to_index_key "INIT")]=1
209
+	fi
210
+
211
+	if [[ -n ${EMULTILIB_PKG} ]] && has_multilib_profile; then
212
+		multilib-native_src_generic_sub ${1}
213
+
214
+# Save the environment for this ABI
215
+		multilib-native_save_abi_env "${ABI}"
216
+
217
+# If this is the default ABI and we have a build tree, update the INIT
218
+# environment
219
+		[[ "${ABI}" == "${DEFAULT_ABI}" ]] && \
220
+				[[ -d "${WORKDIR}/${PN}_build_${ABI}" ]] && \
221
+			multilib-native_save_abi_env "INIT"
222
+
223
+# This assures the environment is correctly configured for non-multilib phases
224
+# such as a src_unpack override in ebuilds.
225
+		multilib-native_restore_abi_env "INIT"
226
+	else
227
+		multilib-native_${1}_internal
228
+	fi
229
+}
230
+
231
+# Internal function
232
+# @FUNCTION: multilib-native_src_generic_sub
233
+# @USAGE: <phase>
234
+# @DESCRIPTION: This function gets used for each ABI pass of each phase
235
+multilib-native_src_generic_sub() {
236
+# We support two kinds of build: By default we copy/move the source dir for
237
+# each ABI. Where supported with the underlying package, we can just create an
238
+# external build dir.  This requires a modified ebuild which makes use of the
239
+# EMULTILIB_SOURCE variable (which points the the top of the original
240
+# source dir) to install doc files etc.  This latter behaviour is enabled with
241
+# MULTILIB_EXT_SOURCE_BUILD.  For CMake based packages default is reversed and
242
+# the CMAKE_IN_SOURCE_BUILD environment variable is used to specify the former
243
+# behaviour.
244
+#
245
+
246
+	if [[ -z ${EMULTILIB_INITIALISED[$(multilib-native_abi_to_index_key ${ABI})]} ]]; then
247
+		multilib-native_restore_abi_env "INIT"
248
+		multilib-native_setup_abi_env "${ABI}"
249
+	else
250
+		multilib-native_restore_abi_env "${ABI}"
251
+	fi
252
+
253
+# If this is the unpack or prepare phase we only need to run for the
254
+# DEFAULT_ABI when we are building out of the source tree since it is shared
255
+# between each ABI.
256
+#
257
+# After the unpack phase, some eclasses change into the unpacked source tree
258
+# (gnome2.eclass for example), we need to change back to the WORKDIR otherwise
259
+# the next ABI tree will get unpacked into a subdir of previous tree.
260
+
261
+
262
+	case ${1/*_} in
263
+		setup)
264
+		;;
265
+		unpack)
266
+			[[ -d "${WORKDIR}" ]] && cd "${WORKDIR}"
267
+			if multilib-native_is_EBD && \
268
+					[[ ! "${ABI}" == "${DEFAULT_ABI}" ]]; then
269
+				einfo "Skipping ${1} for ${ABI}"
270
+				return
271
+			fi
272
+		;;
273
+		prepare)
274
+			if multilib-native_is_EBD; then
275
+				if [[ ! "${ABI}" == "${DEFAULT_ABI}" ]]; then
276
+					einfo "Skipping ${1} for ${ABI}"
277
+					return
278
+				fi
279
+			else
280
+				[[ ! -d "${WORKDIR}/${PN}_build_${ABI}" ]] && multilib-native_setup_build_directory
281
+			fi
282
+			if [[ -d "${S}" ]]; then
283
+				einfo "Working in ${S}"
284
+				cd "${S}"
285
+			else
286
+				ewarn "Not changing to non-existant source directory"
287
+			fi
288
+		;;
289
+		configure|compile|install)
290
+			[[ ! -d "${WORKDIR}/${PN}_build_${ABI}" ]] && multilib-native_setup_build_directory
291
+			[[ -d "${S}" ]] && cd "${S}"
292
+		;;
293
+		*)
294
+			[[ -d "${S}" ]] && cd "${S}"
295
+		;;
296
+	esac
297
+
298
+
299
+	# FIXME: There is a failure case when there is no source directory
300
+	# at ${EMULTILIB_SOURCE}, creating a directory there is the *wrong*
301
+	# thing to do, certianly not unconditionally!
302
+	# mkdir -p "${EMULTILIB_SOURCE}"
303
+
304
+# Call the "real" phase function
305
+	multilib-native_${1}_internal
306
+
307
+# If we've just unpacked the source, move it into place.
308
+	if [[ ! "${1/unpack}" == "${1}" ]] && \
309
+			( [[ -d "${EMULTILIB_SOURCE}" ]] && \
310
+			[[ ! -d "${WORKDIR}/${PN}_build_${ABI}" ]] ) && ! (multilib-native_is_EBD); then
311
+		einfo "Moving source tree from ${EMULTILIB_SOURCE} to ${WORKDIR}/${PN}_build_${ABI}"
312
+		mv "${EMULTILIB_SOURCE}" "${WORKDIR}/${PN}_build_${ABI}"
313
+		S="${CMAKE_BUILD_DIR}"
314
+		[[ -n ${KDE_S} ]] && KDE_S="${S}"
315
+		[[ -n ${POPPLER_MODULE_S} ]] && \
316
+				POPPLER_MODULE_S=${S}/${POPPLER_MODULE}
317
+	fi
318
+}
319
+
320
+multilib-native_setup_build_directory() {
321
+	if multilib-native_is_EBD; then
322
+		einfo "Preparing external build directory for ABI: ${ABI} ..."
323
+		einfo "Creating build directory: ${WORKDIR}/${PN}_build_${ABI}"
324
+		mkdir -p "${CMAKE_BUILD_DIR}"
325
+		ECONF_SOURCE="${S}"
326
+	else
327
+		if [[ -d ${EMULTILIB_SOURCE} ]]; then
328
+			if ! is_final_abi; then
329
+				einfo "Copying source tree from ${EMULTILIB_SOURCE} to ${WORKDIR}/${PN}_build_${ABI}"
330
+				cp -al "${EMULTILIB_SOURCE}" "${WORKDIR}/${PN}_build_${ABI}"
331
+			else
332
+				einfo "Moving source tree from ${EMULTILIB_SOURCE} to ${WORKDIR}/${PN}_build_${ABI}"
333
+				mv "${EMULTILIB_SOURCE}" "${WORKDIR}/${PN}_build_${ABI}"
334
+			fi
335
+		fi
336
+	fi
337
+	if ([[ -n "${CMAKE_BUILD_TYPE}" ]] && \
338
+			[[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]) || \
339
+			[[ -z "${CMAKE_BUILD_TYPE}" ]]; then
340
+				S="${CMAKE_BUILD_DIR}"
341
+	fi
342
+
343
+}
344
+
345
+# Internal function
346
+# @FUNCTION: multilib-native_is_EBD
347
+# @USAGE:
348
+# @DESCRIPTION: Returns true if we're building with an "External Build Directory"
349
+multilib-native_is_EBD() {
350
+! ( [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]] || \
351
+				( [[ -z "${CMAKE_BUILD_TYPE}" ]] && \
352
+				[[ -z "${MULTILIB_EXT_SOURCE_BUILD}" ]] ) )
353
+}
354
+
355
+# Internal function
356
+# @FUNCTION: multilib-native_setup_abi_env
357
+# @USAGE: <ABI>
358
+# @DESCRIPTION: Setup initial environment for ABI, flags, workarounds etc.
359
+multilib-native_setup_abi_env() {
360
+	local pyver="" libsuffix=""
361
+	[[ -z $(multilib-native_abi_to_index_key ${1}) ]] && \
362
+						die "Unknown ABI (${1})" 
363
+
364
+# Set the CHOST native first so that we pick up the native #202811.
365
+	export CHOST=$(get_abi_CHOST ${DEFAULT_ABI})
366
+	export AS="$(tc-getAS)"
367
+	export CC="$(tc-getCC)"
368
+	export CXX="$(tc-getCXX)"
369
+	export FC="$(tc-getFC)"
370
+	export LD="$(tc-getLD) $(get_abi_LDFLAGS)"
371
+	export ASFLAGS="${ASFLAGS} $(get_abi_ASFLAGS)"
372
+	export CFLAGS="${CFLAGS} $(get_abi_CFLAGS)"
373
+	export CXXFLAGS="${CXXFLAGS} $(get_abi_CFLAGS)"
374
+	export FCFLAGS="${FCFLAGS} ${CFLAGS}"
375
+	export FFLAGS="${FFLAGS} ${CFLAGS}"
376
+	export CHOST=$(get_abi_CHOST $1)
377
+	export CBUILD=$(get_abi_CHOST $1)
378
+	export CDEFINE="${CDEFINE} $(get_abi_CDEFINE $1)"
379
+	export LDFLAGS="${LDFLAGS}"
380
+
381
+	if [[ -z PKG_CONFIG_PATH ]]; then
382
+		export PKG_CONFIG_PATH="/usr/$(get_libdir)/pkgconfig"
383
+	else
384
+		PKG_CONFIG_PATH="${PKG_CONFIG_PATH/lib*\//$(get_libdir)/}:/usr/$(get_libdir)/pkgconfig"
385
+	fi
386
+
387
+#	if ! [[ "${ABI}" == "${DEFAULT_ABI}" ]]; then
388
+#		built_with_use dev-lang/perl lib32 && [[ "$(readlink /usr/bin/perl)" == "/usr/bin/abi-wrapper" ]] || eerror multilib-native.eclass: please rebuild dev-lang/perl to avoid problems
389
+#		pyver=$(python --version 2>&1)
390
+#		pyver=${pyver/Python /python}
391
+#		pyver=${pyver%.*}
392
+#		built_with_use dev-lang/python lib32 && [[ "$(readlink /usr/bin/${pyver})" == "/usr/bin/abi-wrapper" ]] || eerror multilib-native.eclass: please rebuild dev-lang/python to avoid problems
393
+#	fi
394
+
395
+# ccache is ABI dependent
396
+	if [[ -z ${CCACHE_DIR} ]] ; then 
397
+		CCACHE_DIR="/var/tmp/ccache-${1}"
398
+	else
399
+		CCACHE_DIR="${CCACHE_DIR}-${1}"
400
+	fi
401
+
402
+	CMAKE_BUILD_DIR="${WORKDIR}/${PN}_build_${ABI}/${EMULTILIB_RELATIVE_BUILD_DIR/${EMULTILIB_SOURCE_DIRNAME}}"
403
+
404
+	# Strip any trailing slash (fixes build failure with python.eclass)
405
+	CMAKE_BUILD_DIR="${CMAKE_BUILD_DIR%/}"
406
+
407
+	EMULTILIB_INITIALISED[$(multilib-native_abi_to_index_key ${1})]=1
408
+}
409
+
410
+# Internal function
411
+# @FUNCTION: multilib-native_abi_to_index_key
412
+# @USAGE: <ABI>
413
+# @RETURN: <index key>
414
+# @DESCRIPTION: Return an array index key for a given ABI
415
+multilib-native_abi_to_index_key() {
416
+# Until we can count on bash version > 4, we can't use associative arrays.
417
+	local index=0 element=""
418
+	if [[ -z "${EMULTILIB_ARRAY_INDEX}" ]]; then
419
+		local abilist=""
420
+		abilist=$(get_install_abis)
421
+		EMULTILIB_ARRAY_INDEX=(INIT ${abilist})
422
+	fi
423
+	for element in ${EMULTILIB_ARRAY_INDEX[@]}; do
424
+		[[ "${element}" == "${1}" ]] && echo "${index}"
425
+		let index++
426
+	done		
427
+}
428
+
429
+# Internal function
430
+# @FUNCTION: multilib-native_save_abi_env
431
+# @USAGE: <ABI>
432
+# @DESCRIPTION: Save environment for ABI
433
+multilib-native_save_abi_env() {
434
+	[[ -n ${MULTILIB_DEBUG} ]] && \
435
+		einfo "MULTILIB_DEBUG: Saving Environment:" "${1}"
436
+	local _var _array
437
+	for _var in ${EMULTILIB_SAVE_VARS}; do
438
+		_array="EMULTILIB_${_var}"
439
+		declare -p ${_var} &>/dev/null || continue
440
+		multilib_debug ${_array}[$(multilib-native_abi_to_index_key ${1})] "${!_var}"
441
+		eval "${_array}[$(multilib-native_abi_to_index_key ${1})]"=\"${!_var}\"
442
+	done
443
+}
444
+
445
+# Internal function
446
+# @FUNCTION: multilib-native_restore_abi_env
447
+# @USAGE: <ABI>
448
+# @DESCRIPTION: Restore environment for ABI
449
+multilib-native_restore_abi_env() {
450
+	[[ -n ${MULTILIB_DEBUG} ]] && \
451
+		einfo "MULTILIB_DEBUG: Restoring Environment:" "${1}"
452
+	local _var _array
453
+	for _var in ${EMULTILIB_SAVE_VARS}; do
454
+		_array="EMULTILIB_${_var}[$(multilib-native_abi_to_index_key ${1})]"
455
+		if ! (declare -p EMULTILIB_${_var} &>/dev/null) || \
456
+						[[ -z ${!_array} ]]; then
457
+			if (declare -p ${_var} &>/dev/null); then
458
+				[[ -n ${MULTILIB_DEBUG} ]] && \
459
+					einfo "MULTILIB_DEBUG: unsetting ${_var}"
460
+				unset ${_var}
461
+			fi
462
+			continue
463
+		fi
464
+		multilib_debug "${_var}" "${!_array}"
465
+		export ${_var}="${!_array}"
466
+	done
467
+}
468
+
469
+# Internal function
470
+# @FUNCTION multilib-native_check_inherited_funcs
471
+# @USAGE: <phase>
472
+# @DESCRIPTION: Checks all inherited eclasses for requested phase function
473
+multilib-native_check_inherited_funcs() {
474
+# Check all eclasses for given function, in order of inheritance.
475
+# If none provides it, the var stays empty. If more have it, the last one wins.
476
+# Ignore the ones we inherit ourselves, base doesn't matter, as we default on
477
+# it.
478
+	local declared_func=""
479
+	if [[ -f "${T}"/eclass-debug.log ]]; then
480
+		EMULTILIB_INHERITED="$(grep EXPORT_FUNCTIONS "${T}"/eclass-debug.log | grep ${1} | cut -d ' ' -f 4 | cut -d '_' -f 1)"
481
+	else
482
+		if [[ "$1" != pkg_postrm ]]; then 
483
+			ewarn "You are using a package manager that does not provide "${T}"/eclass-debug.log."
484
+			ewarn "Join #gentoo-multilib-overlay on freenode to help finding another way for you."
485
+			ewarn "Falling back to old behaviour ..."
486
+		fi
487
+		EMULTILIB_INHERITED="${INHERITED}"
488
+	fi
489
+
490
+	EMULTILIB_INHERITED="${EMULTILIB_INHERITED//base/}"
491
+	EMULTILIB_INHERITED="${EMULTILIB_INHERITED//multilib-native/}"
492
+	if [[ "${EMULTILIB_PYTHON_NOT_EXPORTED}" != "${EMULTILIB_PYTHON_NOT_EXPORTED//${1}}/" ]]; then 
493
+		multilib_debug EMULTILIB_PYTHON_NOT_EXPORTED "${EMULTILIB_PYTHON_NOT_EXPORTED}"
494
+		EMULTILIB_INHERITED="${EMULTILIB_INHERITED//python/}"
495
+	fi
496
+
497
+	multilib_debug EMULTILIB_INHERITED "${EMULTILIB_INHERITED}"
498
+
499
+	for func in ${EMULTILIB_INHERITED}; do
500
+		if [[ -n $(declare -f ${func}_${1}) ]]; then
501
+			multilib_debug declared_func "${declared_func}"
502
+			declared_func="${func}_${1}"
503
+		fi
504
+	done
505
+
506
+	if [[ "$declared_func" == "distutils_src_unpack" ]]; then
507
+		if ! has "${EAPI:-0}" 0 1; then
508
+			unset declared_func
509
+		fi
510
+	fi
511
+	
512
+# Now if $declared_func is still empty, none of the inherited eclasses provides
513
+# it, so default on base.eclass. Do nothing for "phase != src_*".
514
+	if [[ -z "${declared_func}" ]]; then
515
+		if [[ "${1/_*}" != "src" ]]; then
516
+			declared_func="return"
517
+		else
518
+			declared_func="base_${1}"
519
+		fi
520
+	fi
521
+
522
+	if [[ -z ${SRC_URI} && ( "${declared_func}" == "base_src_prepare" || "${declared_func}" == "base_src_install" ) ]]; then
523
+		# those functions do not work if we do not have sources
524
+		declared_func="return"
525
+	fi
526
+
527
+	einfo "Using ${declared_func} for ABI ${ABI} ..."
528
+	${declared_func}
529
+}
530
+
531
+# @FUNCTION: multilib-native_src_prepare_internal
532
+# @USAGE:
533
+# @DESCRIPTION: Override this function if you want a custom src_configure.
534
+multilib-native_src_prepare_internal() {
535
+	multilib-native_check_inherited_funcs src_prepare
536
+}
537
+
538
+# @FUNCTION: multilib-native_src_configure_internal
539
+# @USAGE:
540
+# @DESCRIPTION: Override this function if you want a custom src_configure.
541
+multilib-native_src_configure_internal() {
542
+	multilib-native_check_inherited_funcs src_configure
543
+}
544
+
545
+# @FUNCTION: multilib-native_src_compile_internal
546
+# @USAGE:
547
+# @DESCRIPTION: Override this function if you want a custom src_compile.
548
+multilib-native_src_compile_internal() {
549
+	multilib-native_check_inherited_funcs src_compile
550
+}
551
+
552
+# @FUNCTION: multilib-native_src_install_internal
553
+# @USAGE:
554
+# @DESCRIPTION: Override this function if you want a custom src_install
555
+multilib-native_src_install_internal() {
556
+	multilib-native_check_inherited_funcs src_install
557
+}
558
+
559
+# @FUNCTION: multilib-native_pkg_setup_internal
560
+# @USAGE:
561
+# @DESCRIPTION: Override this function if you want a custom pkg_setup
562
+multilib-native_pkg_setup_internal() {
563
+	multilib-native_check_inherited_funcs pkg_setup
564
+}
565
+
566
+# @FUNCTION: multilib-native_src_unpack_internal
567
+# @USAGE:
568
+# @DESCRIPTION: Override this function if you want a custom src_unpack
569
+multilib-native_src_unpack_internal() {
570
+	multilib-native_check_inherited_funcs src_unpack
571
+}
572
+
573
+
574
+# @FUNCTION: multilib-native_pkg_preinst_internal
575
+# @USAGE:
576
+# @DESCRIPTION: Override this function if you want a custom pkg_preinst
577
+multilib-native_pkg_preinst_internal() {
578
+	multilib-native_check_inherited_funcs pkg_preinst
579
+}
580
+
581
+
582
+# @FUNCTION: multilib-native_pkg_postinst_internal
583
+# @USAGE:
584
+# @DESCRIPTION: Override this function if you want a custom pkg_postinst
585
+multilib-native_pkg_postinst_internal() {
586
+	multilib-native_check_inherited_funcs pkg_postinst
587
+}
588
+
589
+
590
+# @FUNCTION: multilib-native_pkg_postrm_internal
591
+# @USAGE:
592
+# @DESCRIPTION: Override this function if you want a custom pkg_postrm
593
+multilib-native_pkg_postrm_internal() {
594
+	multilib-native_check_inherited_funcs pkg_postrm
595
+}
596
+
597
+# @FUNCTION: is_crosscompile
598
+# @USAGE:
599
+# @DESCRIPTION:
600
+# True if we are cross-compiling.
601
+# This is identical to the version in
602
+# toolchain.eclass, but inheriting that eclass from here breaks many packages
603
+# so just define locally.
604
+is_crosscompile() {
605
+	[[ ${CHOST} != ${CTARGET} ]]
606
+}
607
+
608
+# @FUNCTION: _check_build_dir
609
+# @USAGE:
610
+# @DESCRIPTION:
611
+# This function overrides the function of the same name
612
+# in cmake-utils.eclass.  We handle the build dir ourselves. 
613
+# Determine using IN or OUT source build
614
+_check_build_dir() {
615
+	# @ECLASS-VARIABLE: CMAKE_USE_DIR
616
+	# @DESCRIPTION:
617
+	# Sets the directory where we are working with cmake.
618
+	# For example when application uses autotools and only one
619
+	# plugin needs to be done by cmake. By default it uses ${S}.
620
+	: ${CMAKE_USE_DIR:=${S}}
621
+
622
+# in/out source build
623
+	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
624
+}
625
+
626
+# @FUNCTION prep_ml_binaries
627
+# @USAGE:
628
+# @DESCRIPTION: Use wrapper to support non-default binaries 
629
+prep_ml_binaries() {
630
+	if [[ -n $EMULTILIB_PKG ]] ; then
631
+		for binary in "$@"; do
632
+			if [[ -a ${D}/${binary} ]]; then
633
+				mv ${D}/${binary} ${D}/${binary}-${ABI} || \
634
+					die "${D}/${binary} not found!"
635
+				einfo "mv ${D}/${binary} ${D}/${binary}-${ABI}"
636
+				if is_final_abi; then
637
+					ln -s /usr/bin/abi-wrapper ${D}/${binary} || \
638
+						die "could link abi-wrapper to ${D}/${binary}!"
639
+					einfo "ln -s /usr/bin/abi-wrapper ${D}/${binary}"
640
+				fi
641
+			else
642
+				ewarn "${D}/${binary} does not exist, please inform the people in #gentoo-multilib-overlay on freenode"
643
+			fi
644
+		done
645
+	fi		
646
+}
647
+
648
+# @FUNCTION: prep_ml_includes
649
+# @DESCRIPTION:
650
+# Some includes (include/asm, glibc, etc) are ABI dependent.  In this case,
651
+# We can install them in different locations for each ABI and create a common
652
+# header which includes the right one based on CDEFINE_${ABI}.  If your
653
+# package installs ABI-specific headers, just add 'prep_ml_includes' to the
654
+# end of your src_install().  It takes a list of directories that include
655
+# files are installed in (default is /usr/include if none are passed).
656
+#
657
+# Example:
658
+#     src_install() {
659
+#        ...
660
+#        prep_ml_includes /usr/qt/3/include
661
+#     }
662
+prep_ml_includes() {
663
+	if [[ $(number_abis) -gt 1 ]] ; then
664
+		local dir
665
+		local dirs
666
+		local base
667
+
668
+		if [[ $# -eq 0 ]] ; then
669
+			dirs=/usr/include
670
+		else
671
+			dirs="$@"
672
+		fi
673
+
674
+		for dir in ${dirs} ; do
675
+			base=${T}/gentoo-multilib/${dir}/gentoo-multilib
676
+			mkdir -p "${base}"
677
+			[[ -d ${base}/${ABI} ]] && rm -rf "${base}/${ABI}"
678
+			mv "${D}/${dir}" "${base}/${ABI}"
679
+		done
680
+
681
+		if is_final_abi; then
682
+			base=${T}/gentoo-multilib
683
+
684
+			local files_differ=
685
+			local install_abis=$(get_install_abis)
686
+			local alternate_abis=${install_abis% *}
687
+			for dir in ${dirs}; do
688
+				pushd "${base}${dir}/gentoo-multilib/${ABI}"
689
+				for i in $(find . -type f); do
690
+					for diffabi in ${alternate_abis}; do
691
+						diff -q "${i}" ../${diffabi}/"${i}" >/dev/null || files_differ=1
692
+					done
693
+					if [ -z "${files_differ}" ]; then
694
+						[ -d "${D}${dir}/${i%/*}" ] || mkdir -p "${D}${dir}/${i%/*}"
695
+						mv ${base}${dir}/gentoo-multilib/${ABI}/"${i}" "${D}${dir}/${i}"
696
+						einfo rm -rf ${base}${dir}/gentoo-multilib/*/"${i}"
697
+						rm -rf ${base}${dir}/gentoo-multilib/*/"${i}"
698
+					fi
699
+					files_differ=
700
+				done
701
+				popd
702
+			done
703
+
704
+
705
+			pushd "${base}"
706
+			find . | tar -c -T - -f - | tar -x --no-same-owner -f - -C "${D}"
707
+			popd
708
+
709
+			# This 'set' stuff is required by mips profiles to properly pass
710
+			# CDEFINE's (which have spaces) to sub-functions
711
+			set --
712
+			for dir in ${dirs} ; do
713
+				set -- "$@" "${dir}"
714
+				local abi
715
+				for abi in $(get_install_abis); do
716
+					set -- "$@" "$(get_abi_CDEFINE ${abi}):${dir}/gentoo-multilib/${abi}"
717
+				done
718
+				create_ml_includes "$@"
719
+			done
720
+		fi
721
+	fi
722
+}

+ 46
- 0
licenses/AFL-2.0 View File

@@ -0,0 +1,46 @@
1
+The Academic Free License
2
+ v. 2.0
3
+
4
+This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work:   
5
+Licensed under the Academic Free License version 2.0
6
+
7
+1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: 
8
+a) to reproduce the Original Work in copies; 
9
+
10
+b) to prepare derivative works ("Derivative Works") based upon the Original Work; 
11
+
12
+c) to distribute copies of the Original Work and Derivative Works to the public; 
13
+
14
+d) to perform the Original Work publicly; and 
15
+
16
+e) to display the Original Work publicly.   
17
+
18
+2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works.  
19
+
20
+3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work.  Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes.  Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work.    
21
+
22
+4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor.  Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein.  No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2.  No right is granted to the trademarks of Licensor even if such marks are included in the Original Work.  Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license.  
23
+
24
+5) This section intentionally omitted.  
25
+
26
+6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice."  You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.  
27
+
28
+7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights.  Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.  This DISCLAIMER OF WARRANTY constitutes an essential part of this License.  No license to Original Work is granted hereunder except under this disclaimer.  
29
+
30
+8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses.  This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation.  Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.  
31
+
32
+9) Acceptance and Termination. If You distribute  copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License.  Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty.  Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions.    
33
+
34
+10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, for patent infringement (i) against Licensor with respect to a patent applicable to software or (ii) against any entity with respect to a patent applicable to the Original Work (but excluding combinations of the Original Work with other software or hardware).    
35
+
36
+11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions.  The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded.  Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. ¤ 101 et seq., the equivalent laws of other countries, and international treaty.  This section shall survive the termination of this License.  
37
+
38
+12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action.  This section shall survive the termination of this License.  
39
+
40
+13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof.  If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.    
41
+
42
+14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License.  For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you.  For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.   
43
+
44
+15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.    
45
+
46
+This license is Copyright (C) 2003 Lawrence E. Rosen.  All rights reserved.  Permission is hereby granted to copy and distribute this license without modification.  This license may not be modified without the express written permission of its copyright owner. 

+ 2
- 0
profiles/package.unmask View File

@@ -0,0 +1,2 @@
1
+sys-apps/hal
2
+sys-apps/policycoreutils

+ 3
- 0
profiles/use.local.desc View File

@@ -0,0 +1,3 @@
1
+sys-apps/hal:dell - FIXME <unknown>
2
+sys-apps/hal:disk-partition - FIXME <unknown>
3
+sys-apps/hal:laptop - FIXME <unknown>

+ 15
- 0
sys-apps/hal/Manifest View File

@@ -0,0 +1,15 @@
1
+AUX 0.5.14-hald.conf 119 RMD160 06e205ba7fa8acfb6f68e84a247845a3ad028351 SHA1 c8a62a808c7f632154dda1686fe344a4a136e28f SHA256 b19e6df9c78b6f813405a7cbff20e049714db1a000e6b71ab2eca02d372d58af
2
+AUX 0.5.14-hald.rc 1174 RMD160 e9371f69f6594cf53de234e443a204c2b2127d31 SHA1 35ff148aec2d457cdeaed7e2032a414315a7236b SHA256 0ba01941ed8b7946524fb7ba4253c3ae57c6bdf9ddb4eaa01bd9bd89d1d4ef21
3
+AUX 0.5.14-hald.rc.1 1114 RMD160 24c508a1a8df09252a21b178addba8a18a17ba1e SHA1 6bcca0ce11b50529b71cb2ff3af4ad877c3f144c SHA256 ab68ed700d2c3044da6ec2cc88f315c33518d4df503c52eda1ded3354b751cca
4
+AUX 96_plugdev_allow_send.patch 1781 RMD160 08f0cbb8960d4753d15d02c8694fae09a6ef2a02 SHA1 ad04ac23936ac8f1915b2d25cbc366d6db24cdc9 SHA256 090d666c8df223fc0ea30f473fa3d52412ef22aff85c1eebf609a3f00dbd652a
5
+AUX hal-0.5.10-sabayonlinux-ntfs-3g.default.patch 829 RMD160 9ffc2ce8b8b9cfbf2e74c83a1e867ed0b725fcea SHA1 7074e6eb57a8578a5a87a1e4dcb43c15224f76f1 SHA256 5815f4e661e12c4bc1e5fa70e89dedca3627fb01a97f3ae85e1eb2713c92607b
6
+AUX hal-0.5.12-fix-ntfs-mount.patch 832 RMD160 9b08749e3e8ad1ec0c2567023a9e141c96d12086 SHA1 1350edf3bc5b8a596b5bbd8609661dcb3552149f SHA256 6711e2f7ef0fdfc972c3ade5f0368710abd3effc93e3476a005bdd9110c7a78f
7
+AUX hal-0.5.12-ntfs3g-support.patch 522 RMD160 fc9efb40266564dd94672deec9c369ba4fa68b13 SHA1 dd5b55cd2f1abae5e20ec51b81ae92107c486be7 SHA256 3130824022c21db8f99b3857bbba55f6cf3c83d02796c8283495d9339ce39270
8
+AUX hal-0.5.14-r2-fbsd.patch 4380 RMD160 9a3483cf3a7eee5f43b582b9ca531da7487221f9 SHA1 67d41b9b74d89ab7645ac3750780895a70856e50 SHA256 8299068a7d0276e2e08785a56e3285d4232435a427c3059cc9f88ebe87e97ee2
9
+AUX hal-alignment.patch 763 RMD160 768b316422b996e72625bd3796d10c805af195ad SHA1 21b4b3fe19605451c9b4bcf09b9ca416fdfb7468 SHA256 b8e4100e33d4b6fcf973be683c9710a514c7d6461a8ac34b8aad8c1ecccc3398
10
+AUX hal-unmount.dev 397 RMD160 78286dd9527bbb421082e73b0d08e06cd514d275 SHA1 31169a28448fb1eb1dfee5d1699de9a02449a6b7 SHA256 747a4c483f8a558f2c75666e9547e539475f112363f1dbfc6ea19ca393c8e89b
11
+DIST hal-0.5.14-gentoo-patches-5.tar.bz2 6494 RMD160 810e68c430b9207ddc6d7531a728cc3f49eea7b4 SHA1 0b5159d6cbd91c9357f1c5b59074fd48870d6156 SHA256 5919bf1e3e5ff8b3682b8163e8b9cd86269263f9d023783d0c13dc759b36849c
12
+DIST hal-0.5.14.tar.bz2 942954 RMD160 0314dace9512bf49a62bd1556963fc60a6c9caf9 SHA1 a6ec098d78112e18e2773afa5f9ed642b00c4c59 SHA256 c4c5ecc5d50d5d9c061dc06c405461b1f71c12f2c60ed062350b2e6db2f1c51e
13
+EBUILD hal-0.5.14-r4.ebuild 9193 RMD160 101915a3c6d19b7585611dbdaf59dc37e3f24b76 SHA1 40c7a2810ff5ee0dc4f2fe27141d526930ab03d6 SHA256 5df49923173fb794efaa95b09b459073f10ade3a01bad04da78d8992fbb3aba0
14
+MISC Reasons 500 RMD160 6ea57edaf5dbe5900cf6675ae861b28bb781d015 SHA1 150fe52386cdf5af4bda7dc7ed2959aab5ef8219 SHA256 795ed9671e7df093b8fd74a53590151947b0d15bf6f6505774dfcf8498f9ac9f
15
+MISC metadata.xml 1878 RMD160 98e726fd64a322810863b345c6d22ecb91469f5b SHA1 c9eb711263006e04dedf814ecd6b55aa1d0a379b SHA256 e5e149e2957c585f91247bdbb1341549a561c4d519c070a07648a39bb45d99ee

+ 16
- 0
sys-apps/hal/Reasons View File

@@ -0,0 +1,16 @@
1
+sys-apps/hal
2
+
3
+Ebuild originally added Dec 7, 2006
4
+Added by Fabio Erculiani <lxnay@sabayonlinux.org>
5
+
6
+Ebuild added to fix/add the following issues:
7
+Enable plugdev support
8
+NTFS-3G support
9
+Fix HAL mount when extra options specified
10
+Fix Gentoo bug #299483
11
+
12
+======
13
+02.08.08 - Wael Nasreddine <wael.nasreddine@sabayonlinux.org>
14
+           - depend on >=app-misc/hal-info-20080310 instead of
15
+             =app-misc/hal-info-20080310 because gentoo has marked
16
+             app-misc/hal-info-20080508 stable.

+ 6
- 0
sys-apps/hal/files/0.5.14-hald.conf View File

@@ -0,0 +1,6 @@
1
+# /etc/conf.d/hald
2
+
3
+# Should HAL be verbose to syslog? Useful for debugging
4
+HALD_VERBOSE="no"
5
+
6
+# vim: ft=gentoo-conf-d

+ 41
- 0
sys-apps/hal/files/0.5.14-hald.rc View File

@@ -0,0 +1,41 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2010 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License, v2 or later
4
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5.14-hald.rc,v 1.1 2010/01/20 13:42:14 dang Exp $
5
+
6
+depend() {
7
+	use logger acpid
8
+	need dbus
9
+	after coldplug dns nscd
10
+}
11
+
12
+start() {
13
+	[ -z "${HALD_VERBOSE}" ] && HALD_VERBOSE="no"
14
+	ebegin "Starting Hardware Abstraction Layer daemon"
15
+
16
+#	REAL_ROOT=`mount -fv / | cut -d' ' -f1`
17
+#	TEST_ROOT=`cat /proc/mounts | cut -d' ' -f1 | head -n 2 | tail -n 1`
18
+
19
+#	if [ ! -e ${TEST_ROOT} ]; then
20
+#		echo "You need a ${TEST_ROOT} that points to your ${REAL_ROOT}"
21
+#		echo "See http://bugs.gentoo.org/show_bug.cgi?id=175243"
22
+#		echo "Quick fix is: ln -s ${REAL_ROOT} ${TEST_ROOT}"
23
+#		eend 2
24
+#	fi
25
+
26
+	if [ -f /proc/acpi/event ]; then
27
+		chgrp haldaemon /proc/acpi/event
28
+		chmod 440 /proc/acpi/event
29
+	fi
30
+
31
+	[ ${#PATH} -gt 512 ] && export PATH=/usr/libexec:${PATH} #267928
32
+
33
+	start-stop-daemon --start -q --exec /usr/sbin/hald -- --use-syslog --verbose=${HALD_VERBOSE}
34
+	eend $?
35
+}
36
+
37
+stop() {
38
+	ebegin "Stopping Hardware Abstraction Layer daemon"
39
+	start-stop-daemon --stop -q --pidfile /var/run/hald.pid 
40
+	eend $?
41
+}

+ 39
- 0
sys-apps/hal/files/0.5.14-hald.rc.1 View File

@@ -0,0 +1,39 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2010 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License, v2 or later
4
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5.14-hald.rc.1,v 1.1 2010/09/28 06:20:47 ssuominen Exp $
5
+
6
+depend() {
7
+	use logger acpid
8
+	need dbus
9
+	after coldplug dns nscd
10
+}
11
+
12
+start() {
13
+	[ -z "${HALD_VERBOSE}" ] && HALD_VERBOSE="no"
14
+	ebegin "Starting Hardware Abstraction Layer daemon"
15
+
16
+#	REAL_ROOT=`mount -fv / | cut -d' ' -f1`
17
+#	TEST_ROOT=`cat /proc/mounts | cut -d' ' -f1 | head -n 2 | tail -n 1`
18
+
19
+#	if [ ! -e ${TEST_ROOT} ]; then
20
+#		echo "You need a ${TEST_ROOT} that points to your ${REAL_ROOT}"
21
+#		echo "See http://bugs.gentoo.org/show_bug.cgi?id=175243"
22
+#		echo "Quick fix is: ln -s ${REAL_ROOT} ${TEST_ROOT}"
23
+#		eend 2
24
+#	fi
25
+
26
+	if [ -f /proc/acpi/event ]; then
27
+		chgrp haldaemon /proc/acpi/event
28
+		chmod 440 /proc/acpi/event
29
+	fi
30
+
31
+	start-stop-daemon --start -q --exec /usr/sbin/hald -- --use-syslog --verbose=${HALD_VERBOSE}
32
+	eend $?
33
+}
34
+
35
+stop() {
36
+	ebegin "Stopping Hardware Abstraction Layer daemon"
37
+	start-stop-daemon --stop -q --pidfile /var/run/hald.pid 
38
+	eend $?
39
+}

+ 42
- 0
sys-apps/hal/files/96_plugdev_allow_send.patch View File

@@ -0,0 +1,42 @@
1
+Index: b/hal.conf
2
+===================================================================
3
+--- a/hal.conf	2007-04-03 00:41:24.000000000 -0400
4
++++ b/hal.conf	2007-04-06 20:36:53.000000000 -0400
5
+@@ -63,5 +63,16 @@
6
+     <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
7
+   </policy>
8
+ 
9
++  <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
10
++  <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
11
++  <policy group="plugdev">
12
++  	<allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
13
++	<allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
14
++  </policy>
15
++  <policy group="plugdev">
16
++  	<allow send_interface="org.freedesktop.Hal.Device.Volume"/>
17
++	<allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
18
++  </policy>
19
++
20
+ </busconfig>
21
+ 
22
+Index: b/hal.conf.in
23
+===================================================================
24
+--- a/hal.conf.in	2007-03-07 16:52:19.000000000 -0500
25
++++ b/hal.conf.in	2007-04-06 20:37:59.000000000 -0400
26
+@@ -63,5 +63,16 @@
27
+     <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
28
+   </policy>
29
+ 
30
++  <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
31
++  <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
32
++  <policy group="plugdev">
33
++  	<allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
34
++	<allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
35
++  </policy>
36
++  <policy group="plugdev">
37
++  	<allow send_interface="org.freedesktop.Hal.Device.Volume"/>
38
++	<allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
39
++  </policy>
40
++
41
+ </busconfig>
42
+ 

+ 21
- 0
sys-apps/hal/files/hal-0.5.10-sabayonlinux-ntfs-3g.default.patch View File

@@ -0,0 +1,21 @@
1
+diff -Nurp hal-0.5.8.1.orig/tools/hal-storage-mount.c hal-0.5.8.1/tools/hal-storage-mount.c
2
+--- hal-0.5.8.1.orig/tools/hal-storage-mount.c
3
++++ hal-0.5.8.1/tools/hal-storage-mount.c
4
+@@ -813,6 +813,17 @@ handle_mount (LibHalContext *hal_ctx, 
5
+ 	} else if (libhal_volume_get_fstype (volume) != NULL && strlen (libhal_volume_get_fstype (volume)) > 0) {
6
+ 		mount_do_fstype = (char *) map_fstype (libhal_volume_get_fstype (volume));
7
+ 	}
8
++
9
++	/* Dirty hack while we're waiting for a better KDE support for filesystems' selection */
10
++	/* we are going to force NTFS-FUSE instead of NTFS */
11
++	if (strcmp (mount_do_fstype, "ntfs") == 0) {
12
++		int rc = system("which ntfs-3g");
13
++		if ( rc == 1 )
14
++			mount_do_fstype = "ntfs-fuse";
15
++		else
16
++			mount_do_fstype = "ntfs-3g";
17
++	}
18
++
19
+ 	args[na++] = MOUNT_TYPE_OPT;
20
+ 	args[na++] = mount_do_fstype;
21
+ 

+ 11
- 0
sys-apps/hal/files/hal-0.5.12-fix-ntfs-mount.patch View File

@@ -0,0 +1,11 @@
1
+diff -Nurp hal-0.5.12rc1.orig/fdi/policy/10osvendor/20-storage-methods.fdi hal-0.5.12rc1/fdi/policy/10osvendor/20-storage-methods.fdi
2
+--- hal-0.5.12rc1.orig/fdi/policy/10osvendor/20-storage-methods.fdi	2009-04-03 18:18:18.000000000 +0200
3
++++ hal-0.5.12rc1/fdi/policy/10osvendor/20-storage-methods.fdi	2009-04-03 18:19:49.000000000 +0200
4
+@@ -224,6 +224,7 @@
5
+ 	  <append key="volume.mount.valid_options" type="strlist">gid=</append>
6
+ 	  <append key="volume.mount.valid_options" type="strlist">umask=</append>
7
+ 	  <append key="volume.mount.valid_options" type="strlist">utf8</append>
8
++	  <append key="volume.mount.valid_options" type="strlist">locale=</append>
9
+ 	</match>
10
+ 	<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
11
+ 	  <append key="volume.mount.valid_options" type="strlist">-u=</append>

+ 18
- 0
sys-apps/hal/files/hal-0.5.12-ntfs3g-support.patch View File

@@ -0,0 +1,18 @@
1
+--- hal-0.5.12rc1.orig/tools/hal-storage-mount.c	2009-03-16 20:23:53.744118591 +0100
2
++++ hal-0.5.12rc1/tools/hal-storage-mount.c	2009-03-16 20:31:37.546232405 +0100
3
+@@ -695,6 +695,15 @@ handle_mount (LibHalContext *hal_ctx, 
4
+ 		mount_do_fstype = "auto";
5
+ 	}
6
+ 
7
++	/* Try to use NTFS-3G when possible */
8
++	if (strcmp (mount_do_fstype, "ntfs") == 0) {
9
++		int rc = system("which ntfs-3g &> /dev/null");
10
++		if ( rc == 0 )
11
++			mount_do_fstype = "ntfs-3g";
12
++	}
13
++
14
++
15
++
16
+ 	/* check the mount options */
17
+ 	dbus_error_init (&error);
18
+ 	

+ 121
- 0
sys-apps/hal/files/hal-0.5.14-r2-fbsd.patch View File

@@ -0,0 +1,121 @@
1
+commit a3ea9ecc75a414e35ae763a92a2c3fa05a7ca0b3
2
+Author: Joe Marcus Clarke <marcus@FreeBSD.org>
3
+Date:   Fri Dec 25 11:21:23 2009 -0500
4
+
5
+    Fix (or workaround) quite a few bugs with newusb interaction
6
+    
7
+    * Allow the newusb module to compile with the recent input changes from
8
+      kFreeBSD.
9
+    * Make sure usb2 devices attach properly to the device tree with the correct
10
+      parent.
11
+    * Properly detect when newusb devices are added and removed.
12
+
13
+diff --git a/hald/freebsd/hf-usb2.c b/hald/freebsd/hf-usb2.c
14
+index fff49e0..f1a02e2 100644
15
+--- a/hald/freebsd/hf-usb2.c
16
++++ b/hald/freebsd/hf-usb2.c
17
+@@ -98,10 +98,10 @@ hf_usb2_probe_interfaces(HalDevice *parent)
18
+ 	  if (driver)
19
+             {
20
+ 	      if (! strcmp(driver, "ukbd"))
21
+-                hf_device_set_input(device, "keyboard", NULL);
22
+-	      else if (! strcmp(driver, "ums"))
23
++                hf_device_set_input(device, "keyboard", "keys", devname);
24
++	      else if (! strcmp(driver, "ums") || ! strcmp(driver, "atp"))
25
+                 {
26
+-                  hf_device_set_input(device, "mouse", devname);
27
++                  hf_device_set_input(device, "mouse", NULL, devname);
28
+ 	          hf_runner_run_sync(device, 0, "hald-probe-mouse", NULL);
29
+ 	        }
30
+ 	      else if (! strcmp(driver, "uhid"))
31
+@@ -192,11 +192,12 @@ hf_usb2_probe (void)
32
+       addr = libusb20_dev_get_address(pdev);
33
+ 
34
+       if (addr == 1)
35
+-        parent = hf_devtree_find_parent_from_info(hald_get_gdl(), "usbus", bus);
36
++        parent = hf_devtree_find_from_info(hald_get_gdl(), "usbus", bus);
37
+       else
38
+         parent = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number",
39
+           HAL_PROPERTY_TYPE_INT32, bus, "usb_device.port_number",
40
+-	  HAL_PROPERTY_TYPE_INT32, addr - 1, NULL);
41
++	  HAL_PROPERTY_TYPE_INT32, addr - 1, "info.bus",
42
++	  HAL_PROPERTY_TYPE_STRING, "usb_device", NULL);
43
+       if (! parent || hal_device_property_get_bool(parent, "info.ignore"))
44
+         continue;
45
+ 
46
+@@ -216,7 +217,13 @@ hf_usb2_devd_add (const char *name,
47
+   HalDevice *parent_device;
48
+   int bus, addr, pbus, paddr;
49
+ 
50
+-  if (strncmp(name, "ugen", strlen("ugen")))
51
++  if (! parent)
52
++    return FALSE;
53
++
54
++  if (strncmp(name, "ugen", strlen("ugen")) &&
55
++      ! strncmp(parent, "uhub", strlen("uhub")))
56
++    return TRUE;
57
++  else if (strncmp(name, "ugen", strlen("ugen")))
58
+     return FALSE;
59
+   else if (strncmp(parent, "ugen", strlen("ugen")))
60
+     return TRUE;
61
+@@ -232,7 +239,8 @@ hf_usb2_devd_add (const char *name,
62
+ 
63
+   parent_device = hf_device_store_match(hald_get_gdl(),
64
+     "usb_device.bus_number", HAL_PROPERTY_TYPE_INT32, pbus,
65
+-    "usb_device.port_number", HAL_PROPERTY_TYPE_INT32, paddr, NULL);
66
++    "usb_device.port_number", HAL_PROPERTY_TYPE_INT32, paddr, "info.bus",
67
++    HAL_PROPERTY_TYPE_STRING, "usb_device", NULL);
68
+ 
69
+   if (parent_device && ! hal_device_property_get_bool(parent_device,
70
+       "info.ignore"))
71
+@@ -255,8 +263,6 @@ hf_usb2_devd_remove (const char *name,
72
+ 
73
+   if (strncmp(name, "ugen", strlen("ugen")))
74
+     return FALSE;
75
+-  else if (strncmp(parent, "ugen", strlen("ugen")))
76
+-    return TRUE;
77
+ 
78
+   if (sscanf(name, "ugen%i.%i", &bus, &addr) != 2)
79
+     return FALSE;
80
+@@ -265,7 +271,8 @@ hf_usb2_devd_remove (const char *name,
81
+ 
82
+   device = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number",
83
+     HAL_PROPERTY_TYPE_INT32, bus, "usb_device.port_number",
84
+-    HAL_PROPERTY_TYPE_INT32, addr, NULL);
85
++    HAL_PROPERTY_TYPE_INT32, addr, "info.bus",
86
++    HAL_PROPERTY_TYPE_STRING, "usb_device", NULL);
87
+ 
88
+   if (device)
89
+     {
90
+@@ -276,6 +283,23 @@ hf_usb2_devd_remove (const char *name,
91
+   return FALSE;
92
+ }
93
+ 
94
++static gboolean
95
++hf_usb2_devd_notify (const char *system,
96
++		     const char *subsystem,
97
++		     const char *type,
98
++		     const char *data)
99
++{
100
++  if (! data || strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") ||
101
++      (strcmp(type, "CREATE") && strcmp(type, "DESTROY")))
102
++    return FALSE;
103
++
104
++  if (! strncmp(data, "cdev=ugen", strlen("cdev=ugen")) ||
105
++      ! strncmp(data, "cdev=usb", strlen("cdev=usb")))
106
++    return TRUE;
107
++
108
++  return FALSE;
109
++}
110
++
111
+ HFHandler hf_usb2_handler = {
112
+   .privileged_init	= hf_usb2_privileged_init,
113
+   .probe		= hf_usb2_probe
114
+@@ -283,5 +307,6 @@ HFHandler hf_usb2_handler = {
115
+ 
116
+ HFDevdHandler hf_usb2_devd_handler = {
117
+   .add =	hf_usb2_devd_add,
118
+-  .remove =	hf_usb2_devd_remove
119
++  .remove =	hf_usb2_devd_remove,
120
++  .notify =     hf_usb2_devd_notify
121
+ };

+ 22
- 0
sys-apps/hal/files/hal-alignment.patch View File

@@ -0,0 +1,22 @@
1
+--- hal-0.5.8.1/hald-runner/main.c.orig	2006-10-09 16:28:45.000000000 -0400
2
++++ hal-0.5.8.1/hald-runner/main.c	2006-10-09 16:28:39.000000000 -0400
3
+@@ -111,7 +111,7 @@
4
+ 	DBusMessage *reply;
5
+ 	DBusMessageIter iter;
6
+ 	run_request *r;
7
+-	GPid pid;
8
++	GPid pid __attribute__ ((aligned));
9
+ 
10
+ 	r = new_run_request();
11
+ 	g_assert(dbus_message_iter_init(msg, &iter));
12
+--- hal-0.5.8.1/partutil/partutil.c.orig	2006-10-09 17:04:31.000000000 -0400
13
++++ hal-0.5.8.1/partutil/partutil.c	2006-10-09 17:05:01.000000000 -0400
14
+@@ -491,7 +491,7 @@
15
+ part_table_parse_msdos (int fd, guint64 offset, guint64 size, gboolean *found_gpt)
16
+ {
17
+ 	int n;
18
+-	const guint8 mbr[512];
19
++	const guint8 mbr[512] __attribute__ ((aligned));
20
+ 	PartitionTable *p;
21
+ 
22
+ 	//HAL_INFO (("Entering MS-DOS parser"));

+ 17
- 0
sys-apps/hal/files/hal-unmount.dev View File

@@ -0,0 +1,17 @@
1
+#!/bin/sh
2
+
3
+# sanity check. DEVNAME should start with a /
4
+[ "$DEVNAME" != "${DEVNAME#/}" ] || exit 0
5
+
6
+# Lazily unmount drives which are removed, but still mounted
7
+if [ "$ACTION" = remove ] \
8
+   && (grep -q "^$DEVNAME" /proc/mounts || grep -q "^$DEVNAME" /etc/mtab); then
9
+  if [ -x /usr/bin/pumount ] ; then
10
+    /usr/bin/pumount -l "$DEVNAME";
11
+  else
12
+    /bin/umount -l "$DEVNAME";
13
+  fi
14
+fi
15
+
16
+exit 0
17
+

+ 296
- 0
sys-apps/hal/hal-0.5.14-r4.ebuild View File

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

+ 37
- 0
sys-apps/hal/metadata.xml View File

@@ -0,0 +1,37 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3
+<pkgmetadata>
4
+	<herd>no-herd</herd>
5
+	<maintainer>
6
+		<email>fatzer2@gmail.com</email>
7
+		<name>Golubev Alexander</name>
8
+	</maintainer>
9
+<use>
10
+	<flag name='acpi'>Enables HAL to attempt to read from /proc/acpi/event, if
11
+		unavailable, HAL will read events from <pkg>sys-power/acpid</pkg>. If
12
+		you need multiple acpi readers, ensure acpid is in your default
13
+		runlevel (rc-update add acpid default) along with HAL. This will also
14
+		enable HAL to read Toshiba and IBM acpi events which do not get sent
15
+		via /proc/acpi/event</flag>
16
+	<flag name='crypt'>Allows HAL to mount volumes that are encrypted using
17
+		LUKS. <pkg>sys-fs/cryptsetup-luks</pkg> which has recently been renamed
18
+		to <pkg>sys-fs/cryptsetup</pkg> allows you to create such encrypted
19
+		volumes. HAL will be able to handle volumes that are removable or
20
+		fixed.</flag>
21
+	<flag name='dell'>Builds and installs the Dell addon, which reads data from
22
+		the Dell SM BIOS via <pkg>sys-libs/libsmbios</pkg>. It will read your
23
+		service tag information and your hardware backlight data as well as
24
+		allow you to modify the backlight settings on a Dell laptop.</flag>
25
+	<flag name='disk-partition'>Allows HAL to use libparted from
26
+		<pkg>sys-block/parted</pkg> to read raw partition data from your disks
27
+		and process that data. Future versions of HAL (possibly 0.5.11 and
28
+		higher) will allow you to create, modify, delete and format partitions
29
+		from a GUI interface agnostic of your desktop environment.</flag>
30
+	<flag name='doc'>Generates documentation that describes HAL's fdi
31
+		format.</flag>
32
+	<flag name='laptop'>Adds support for power management scripts
33
+		(<pkg>sys-power/pm-utils</pkg>)</flag>
34
+	<flag name='selinux'>Installs SELinux policies and links HAL to the SELinux
35
+		libraries.</flag>
36
+</use>
37
+</pkgmetadata>

Loading…
Cancel
Save