Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 260877 Details for
Bug 336626
port games.eclass to EAPI=4
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
updated eapi=3 patch for games.eclass
games.eclass.patch (text/plain), 4.63 KB, created by
Fabian Groffen
on 2011-01-27 18:06:43 UTC
(
hide
)
Description:
updated eapi=3 patch for games.eclass
Filename:
MIME Type:
Creator:
Fabian Groffen
Created:
2011-01-27 18:06:43 UTC
Size:
4.63 KB
patch
obsolete
>--- games.eclass >+++ games.eclass >@@ -12,7 +12,7 @@ > > case ${EAPI:-0} in > 0|1) EXPORT_FUNCTIONS pkg_setup src_compile pkg_preinst pkg_postinst ;; >- 2) EXPORT_FUNCTIONS pkg_setup src_configure src_compile pkg_preinst pkg_postinst ;; >+ 2|3) EXPORT_FUNCTIONS pkg_setup src_configure src_compile pkg_preinst pkg_postinst ;; > esac > > DESCRIPTION="Based on the ${ECLASS} eclass" >@@ -38,11 +38,11 @@ > > egamesconf() { > econf \ >- --prefix="${GAMES_PREFIX}" \ >- --libdir="$(games_get_libdir)" \ >- --datadir="${GAMES_DATADIR}" \ >- --sysconfdir="${GAMES_SYSCONFDIR}" \ >- --localstatedir="${GAMES_STATEDIR}" \ >+ --prefix="${EPREFIX}${GAMES_PREFIX}" \ >+ --libdir="${EPREFIX}$(games_get_libdir)" \ >+ --datadir="${EPREFIX}${GAMES_DATADIR}" \ >+ --sysconfdir="${EPREFIX}${GAMES_SYSCONFDIR}" \ >+ --localstatedir="${EPREFIX}${GAMES_STATEDIR}" \ > "$@" > } > >@@ -66,8 +66,8 @@ > > games_make_wrapper() { gameswrapper ${FUNCNAME/games_} "$@"; } > >-gamesowners() { chown ${GAMES_USER}:${GAMES_GROUP} "$@"; } >-gamesperms() { chmod u+rw,g+r-w,o-rwx "$@"; } >+gamesowners() { use prefix || chown ${GAMES_USER}:${GAMES_GROUP} "$@"; } >+gamesperms() { use prefix || chmod u+rw,g+r-w,o-rwx "$@"; } > prepgamesdirs() { > local dir f mode > for dir in \ >@@ -75,13 +75,13 @@ > "${GAMES_SYSCONFDIR}" "${GAMES_STATEDIR}" "$(games_get_libdir)" \ > "${GAMES_BINDIR}" "$@" > do >- [[ ! -d ${D}/${dir} ]] && continue >- ( >- gamesowners -R "${D}/${dir}" >- find "${D}/${dir}" -type d -print0 | xargs -0 chmod 750 >+ [[ ! -d ${ED}/${dir} ]] && continue >+ use prefix || ( >+ gamesowners -R "${ED}/${dir}" >+ find "${ED}/${dir}" -type d -print0 | xargs -0 chmod 750 > mode=o-rwx,g+r,g-w > [[ ${dir} = ${GAMES_STATEDIR} ]] && mode=o-rwx,g+r >- find "${D}/${dir}" -type f -print0 | xargs -0 chmod $mode >+ find "${ED}/${dir}" -type f -print0 | xargs -0 chmod $mode > > # common trees should not be games owned #264872 > if [[ ${dir} == "${GAMES_PREFIX_OPT}" ]] ; then >@@ -94,47 +94,53 @@ > fi > ) &>/dev/null > >- f=$(find "${D}/${dir}" -perm +4000 -a -uid 0 2>/dev/null) >+ f=$(find "${ED}/${dir}" -perm +4000 -a -uid 0 2>/dev/null) > if [[ -n ${f} ]] ; then > eerror "A game was detected that is setuid root!" > eerror "${f}" > die "refusing to merge a setuid root game" > fi > done >- [[ -d ${D}/${GAMES_BINDIR} ]] || return 0 >- find "${D}/${GAMES_BINDIR}" -maxdepth 1 -type f -exec chmod 750 '{}' \; >+ [[ -d ${ED}/${GAMES_BINDIR} ]] || return 0 >+ use prefix || find "${ED}/${GAMES_BINDIR}" -maxdepth 1 -type f -exec chmod 750 '{}' \; > } > > gamesenv() { > local d libdirs > > for d in $(get_all_libdirs) ; do >- libdirs="${libdirs}:${GAMES_PREFIX}/${d}" >+ libdirs="${libdirs}:${EPREFIX}${GAMES_PREFIX}/${d}" > done > > # Wish we could use doevnd here, but we dont want the env > # file to be tracked in the CONTENTS of every game >- cat <<-EOF > "${ROOT}"/etc/env.d/${GAMES_ENVD} >+ cat <<-EOF > "${EROOT}"/etc/env.d/${GAMES_ENVD} > LDPATH="${libdirs:1}" >- PATH="${GAMES_BINDIR}" >+ PATH="${EPREFIX}${GAMES_BINDIR}" > EOF > } > > games_pkg_setup() { >+ if has "${EAPI:-0}" 0 1 2 && ! use prefix; then >+ EPREFIX= >+ EROOT=${ROOT} >+ ED=${D} >+ fi >+ > tc-export CC CXX > [[ ${GAMES_CHECK_LICENSE} == "yes" ]] && check_license ${LICENSE} > > enewgroup "${GAMES_GROUP}" 35 > [[ ${GAMES_USER} != "root" ]] \ >- && enewuser "${GAMES_USER}" 35 -1 "${GAMES_PREFIX}" "${GAMES_GROUP}" >+ && enewuser "${GAMES_USER}" 35 -1 "${EPREFIX}${GAMES_PREFIX}" "${GAMES_GROUP}" > [[ ${GAMES_USER_DED} != "root" ]] \ >- && enewuser "${GAMES_USER_DED}" 36 /bin/bash "${GAMES_PREFIX}" "${GAMES_GROUP}" >+ && enewuser "${GAMES_USER_DED}" 36 "${EPREFIX}"/bin/bash "${EPREFIX}${GAMES_PREFIX}" "${GAMES_GROUP}" > > # Dear portage team, we are so sorry. Lots of love, games team. > # See Bug #61680 > [[ ${USERLAND} != "GNU" ]] && return 0 > [[ $(getent passwd "${GAMES_USER_DED}" | cut -f7 -d:) == "/bin/false" ]] \ >- && usermod -s /bin/bash "${GAMES_USER_DED}" >+ && usermod -s "${EPREFIX}"/bin/bash "${GAMES_USER_DED}" > } > > games_src_configure() { >@@ -152,15 +158,15 @@ > local f > > while read f ; do >- if [[ -e ${ROOT}/${GAMES_STATEDIR}/${f} ]] ; then >+ if [[ -e ${EROOT}/${GAMES_STATEDIR}/${f} ]] ; then > cp -p \ >- "${ROOT}/${GAMES_STATEDIR}/${f}" \ >- "${D}/${GAMES_STATEDIR}/${f}" \ >+ "${EROOT}/${GAMES_STATEDIR}/${f}" \ >+ "${ED}/${GAMES_STATEDIR}/${f}" \ > || die "cp failed" > # make the date match the rest of the install >- touch "${D}/${GAMES_STATEDIR}/${f}" >+ touch "${ED}/${GAMES_STATEDIR}/${f}" > fi >- done < <(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P\n' 2>/dev/null) >+ done < <(find "${ED}/${GAMES_STATEDIR}" -type f -printf '%P\n' 2>/dev/null) > } > > # pkg_postinst function ... create env.d entry and warn about games group
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 336626
:
246621
| 260877 |
297227
|
314819