diff options
Diffstat (limited to 'sys-apps/openrc/openrc-9999.ebuild')
-rw-r--r-- | sys-apps/openrc/openrc-9999.ebuild | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sys-apps/openrc/openrc-9999.ebuild b/sys-apps/openrc/openrc-9999.ebuild index bd348f7..99011a8 100644 --- a/sys-apps/openrc/openrc-9999.ebuild +++ b/sys-apps/openrc/openrc-9999.ebuild @@ -43,18 +43,21 @@ pkg_setup() { fi [ -n "${brand}" ] && MAKE_ARGS="${MAKE_ARGS} BRANDING=Gentoo/${brand}" - local pamok=true - if use pam && use static; then - if has_version sys-libs/pam; then - ewarn "You cannot build a static OpenRC against LinuxPAM" - elog "Disabling PAM" - pamok=false + use ncurses && MAKE_ARGS="${MAKE_ARGS} TERMCAP=ncurses" + if use pam; then + MAKE_ARGS="${MAKE_ARGS} PAM=pam" + if use static; then + ewarn "OpenRC cannot be built statically with PAM" + elog "not building statically" + fi + fi + if use static && ! use pam; then + if use elibc_glibc; then + MAKE_ARGS="${MAKE_ARGS} BIN_LDFLAGS=-Wl,-Bstatic" + else + MAKE_ARGS="${MAKE_ARGS} BIN_LDFLAGS=-static" fi fi - - use ncurses && MAKE_ARGS="${MAKE_ARGS} TERMCAP=ncurses" - use pam && ${pamok} && MAKE_ARGS="${MAKE_ARGS} PAM=pam" - use static && MAKE_ARGS="${MAKE_ARGS} BIN_LDFLAGS=-static" MAKE_ARGS="${MAKE_ARGS} CC=$(tc-getCC)" } |