Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 415899 | Differences between
and this patch

Collapse All | Expand All

(-)openrc-9999.ebuild (-4 / +12 lines)
Lines 37-43 Link Here
37
make_args() {
37
make_args() {
38
	unset LIBDIR #266688
38
	unset LIBDIR #266688
39
39
40
	MAKE_ARGS="${MAKE_ARGS} LIBNAME=$(get_libdir) LIBEXECDIR=/$(get_libdir)/rc"
40
	MAKE_ARGS="${MAKE_ARGS} LIBNAME=$(get_libdir) LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc"
41
41
42
	local brand="Unknown"
42
	local brand="Unknown"
43
	if use kernel_linux ; then
43
	if use kernel_linux ; then
Lines 55-60 Link Here
55
			MAKE_ARGS="${MAKE_ARGS} MKSTATICLIBS=no"
55
			MAKE_ARGS="${MAKE_ARGS} MKSTATICLIBS=no"
56
	fi
56
	fi
57
	use newnet || MAKE_ARGS="${MAKE_ARGS} MKNET=oldnet"
57
	use newnet || MAKE_ARGS="${MAKE_ARGS} MKNET=oldnet"
58
	use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX} PKG_PREFIX=${EPREFIX}/usr LOCAL_PREFIX=${EPREFIX}/usr/local"
58
}
59
}
59
60
60
pkg_setup() {
61
pkg_setup() {
Lines 86-92 Link Here
86
# set_config <file> <option name> <yes value> <no value> test
87
# set_config <file> <option name> <yes value> <no value> test
87
# a value of "#" will just comment out the option
88
# a value of "#" will just comment out the option
88
set_config() {
89
set_config() {
89
	local file="${D}/$1" var=$2 val com
90
	local file="${ED}/$1" var=$2 val com
90
	eval "${@:5}" && val=$3 || val=$4
91
	eval "${@:5}" && val=$3 || val=$4
91
	[[ ${val} == "#" ]] && com="#" && val='\2'
92
	[[ ${val} == "#" ]] && com="#" && val='\2'
92
	sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
93
	sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
Lines 115-122 Link Here
115
116
116
	# Backup our default runlevels
117
	# Backup our default runlevels
117
	dodir /usr/share/"${PN}"
118
	dodir /usr/share/"${PN}"
118
	cp -PR "${D}"/etc/runlevels "${D}"/usr/share/${PN} || die
119
	cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
119
	rm -rf "${D}"/etc/runlevels
120
	rm -rf "${ED}"/etc/runlevels
120
121
121
	# Install the default net configuration
122
	# Install the default net configuration
122
	doconfd conf.d/net
123
	doconfd conf.d/net
Lines 127-132 Link Here
127
	# Cater to the norm
128
	# Cater to the norm
128
	set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
129
	set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
129
130
131
	# set prefix if we are
132
	set_config /etc/rc.conf rc_sys prefix "" use prefix
133
130
	# On HPPA, do not run consolefont by default (bug #222889)
134
	# On HPPA, do not run consolefont by default (bug #222889)
131
	if use hppa; then
135
	if use hppa; then
132
		rm -f "${D}"/usr/share/openrc/runlevels/boot/consolefont
136
		rm -f "${D}"/usr/share/openrc/runlevels/boot/consolefont
Lines 169-174 Link Here
169
}
173
}
170
174
171
pkg_preinst() {
175
pkg_preinst() {
176
	use prefix && return 0
177
172
	local f LIBDIR=$(get_libdir)
178
	local f LIBDIR=$(get_libdir)
173
179
174
	# default net script is just comments, so no point in biting people
180
	# default net script is just comments, so no point in biting people
Lines 346-351 Link Here
346
}
352
}
347
353
348
pkg_postinst() {
354
pkg_postinst() {
355
	use prefix && { [[ -d "${EPREFIX}"/run ]] || mkdir "${EPREFIX}"/run; return 0; }
356
349
	local LIBDIR=$(get_libdir)
357
	local LIBDIR=$(get_libdir)
350
358
351
	# Remove old baselayout links
359
	# Remove old baselayout links

Return to bug 415899