From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EF78F13800E for ; Sun, 2 Feb 2014 13:37:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2057AE0A62; Sun, 2 Feb 2014 13:37:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1DA34E09AA for ; Sun, 2 Feb 2014 13:37:00 +0000 (UTC) Received: from [192.168.4.5] (blfd-4db0f83d.pool.mediaWays.net [77.176.248.61]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: hasufell) by smtp.gentoo.org (Postfix) with ESMTPSA id 0464A33F5F5 for ; Sun, 2 Feb 2014 13:36:58 +0000 (UTC) Message-ID: <52EE49F6.8040209@gentoo.org> Date: Sun, 02 Feb 2014 14:36:54 +0100 From: hasufell User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC] games.eclass: move /etc/env.d/90games to a separate package References: <52EE3840.90504@gentoo.org> <21230.16016.570158.723410@a1i15.kph.uni-mainz.de> In-Reply-To: <21230.16016.570158.723410@a1i15.kph.uni-mainz.de> X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------000504040602020201020208" X-Archives-Salt: 2031ca9c-d4eb-4de9-96e5-5e47e616c5ab X-Archives-Hash: e196fd3c7e54968a688ca70b7f258d3b This is a multi-part message in MIME format. --------------000504040602020201020208 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ebuild: * use EAPI-5 * drop RDEPEND/DEPEND * drop useless elog * set homepage to games project page eclass: * use ${CATEGORY}/${PN} for the check -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS7kn2AAoJEFpvPKfnPDWz5O4IAKHuUnOtQIIlkG7Le93fBLCw axMSpepFfnY4qD1MAOWBrSt3ECbh8iArtxIImNL8FdzmIdz7YPU79SkmUqAqIpMY bAp3vGUfwaSqK8kWYSBRtvSOAloEMncdVmROk0FDR21BnXBUnfVMY1hrlQNo4lJH hhUCqZ/YYWIPdfYhHimguTSyH6D6wbZ/UMTlH0o0a9gRAaHj7tTo7TB0iiX/qCtr 4Gsls4Y4THY9ZI6gZKEac/3Qab3/k0UEUNlo2EEDYVbtbHQKGkJybfTwwGR0gjPV BwICpY9Kot/nlBldO5ZyigAu7WyMjQvpgciXdN++cZ9vDgM6RvSL4Yx1yHy5Foc= =fPXY -----END PGP SIGNATURE----- --------------000504040602020201020208 Content-Type: text/x-patch; name="games.eclass.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="games.eclass.patch" move /etc/env.d/90games to a separate package wrt #417383 --- eclass/games.eclass +++ eclass/games.eclass @@ -18,6 +18,11 @@ 2|3|4|5) EXPORT_FUNCTIONS pkg_setup src_configure src_compile pkg_preinst pkg_postinst ;; *) die "no support for EAPI=${EAPI} yet" ;; esac + +if [[ ${CATEGORY}/${PN} != "games-misc/gentoo-envd" ]] ; then + # environment file + RDEPEND="games-misc/gentoo-envd" +fi export GAMES_PREFIX=${GAMES_PREFIX:-/usr/games} export GAMES_PREFIX_OPT=${GAMES_PREFIX_OPT:-/opt} @@ -124,23 +129,6 @@ find "${D}/${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}" - 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} - LDPATH="${libdirs:1}" - PATH="${GAMES_BINDIR}" - EOF - gamesowners "${ROOT}"/etc/env.d/${GAMES_ENVD} - gamesperms "${ROOT}"/etc/env.d/${GAMES_ENVD} -} - games_pkg_setup() { tc-export CC CXX LD AR RANLIB @@ -183,9 +171,8 @@ done < <(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P\n' 2>/dev/null) } -# pkg_postinst function ... create env.d entry and warn about games group +# pkg_postinst function ... warn about games group games_pkg_postinst() { - gamesenv if [[ -z "${GAMES_SHOW_WARNING}" ]] ; then ewarn "Remember, in order to play games, you have to" ewarn "be in the '${GAMES_GROUP}' group." --------------000504040602020201020208 Content-Type: text/plain; charset=UTF-8; name="gentoo-envd-0.ebuild" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gentoo-envd-0.ebuild" # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit games DESCRIPTION="Environment file for gentoo games" HOMEPAGE="http://www.gentoo.org/proj/en/desktop/games/index.xml" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" S=${WORKDIR} pkg_setup() { games_pkg_setup if [[ -z "${REPLACING_VERSIONS}" ]] ; then if [[ "${EROOT%/}/etc/env.d/${GAMES_ENVD}" ]] ; then rm -v "${EROOT%/}/etc/env.d/${GAMES_ENVD}" || die fi fi } src_prepare() { local d libdirs for d in $(get_all_libdirs) ; do libdirs="${libdirs}:${GAMES_PREFIX}/${d}" done cat <<-EOF > ${GAMES_ENVD} || die LDPATH="${libdirs:1}" PATH="${GAMES_BINDIR}" EOF } src_configure() { :; } src_compile() { :; } src_install() { doenvd ${GAMES_ENVD} gamesowners "${ED%/}"/etc/env.d/${GAMES_ENVD} gamesperms "${ED%/}"/etc/env.d/${GAMES_ENVD} } pkg_preinst() { :; } pkg_postinst() { :; } --------------000504040602020201020208--