Index: systemd.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v
retrieving revision 1.11
diff -u -B -d -u -p -r1.11 systemd.eclass
--- systemd.eclass 7 Jan 2012 17:53:47 -0000 1.11
+++ systemd.eclass 11 Jul 2012 17:56:56 -0000
@@ -34,6 +34,10 @@ esac
DEPEND="!<sys-apps/systemd-29-r4
!=sys-apps/systemd-37-r1"
+# systemd does not support non-Linux systems
+# so we won't install unit files for them.
+IUSE="kernel_linux"
+
# @FUNCTION: _systemd_get_unitdir
# @INTERNAL
# @DESCRIPTION:
@@ -61,6 +65,8 @@ systemd_get_unitdir() {
systemd_dounit() {
debug-print-function ${FUNCNAME} "${@}"
+ use kernel_linux || return 0
+
(
insinto "$(_systemd_get_unitdir)"
doins "${@}"
@@ -75,6 +81,8 @@ systemd_dounit() {
systemd_newunit() {
debug-print-function ${FUNCNAME} "${@}"
+ use kernel_linux || return 0
+
(
insinto "$(_systemd_get_unitdir)"
newins "${@}"
@@ -106,6 +114,8 @@ systemd_enable_service() {
[[ ${#} -eq 2 ]] || die "Synopsis: systemd_enable_service target
service"
+ use kernel_linux || return 0
+
local target=${1}
local service=${2}
local ud=$(_systemd_get_unitdir)
@@ -131,7 +141,11 @@ systemd_with_unitdir() {
debug-print-function ${FUNCNAME} "${@}"
local optname=${1:-systemdsystemunitdir}
- echo -n --with-${optname}="$(systemd_get_unitdir)"
+ if use kernel_linux; then
+ echo -n --with-${optname}="$(systemd_get_unitdir)"
+ else
+ echo -n --without-${optname}
+ fi
}
# @FUNCTION: systemd_to_myeconfargs
@@ -142,8 +156,13 @@ systemd_with_unitdir() {
systemd_to_myeconfargs() {
debug-print-function ${FUNCNAME} "${@}"
- myeconfargs=(
- "${myeconfargs[@]}"
- --with-systemdsystemunitdir="$(systemd_get_unitdir)"
- )
+ if use kernel_linux; then
+ myeconfargs+=(
+ --with-systemdsystemunitdir="$(systemd_get_unitdir)"
+ )
+ else
+ myeconfargs+=(
+ --without-systemdsystemunitdir
+ )
+ fi
}
signature.asc
Description: PGP signature
