From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QD24E-0002Cn-Ko for garchives@archives.gentoo.org; Thu, 21 Apr 2011 22:09:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 448B71C04E; Thu, 21 Apr 2011 22:09:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 13FB41C001 for ; Thu, 21 Apr 2011 22:09:30 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7A7B91B4070 for ; Thu, 21 Apr 2011 22:09:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id A3A8F802C1 for ; Thu, 21 Apr 2011 22:09:28 +0000 (UTC) From: "Gilles Dartiguelongue" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Gilles Dartiguelongue" Message-ID: Subject: [gentoo-commits] proj/gnome:master commit in: eclass/ X-VCS-Repository: proj/gnome X-VCS-Files: eclass/gnome2-python.eclass X-VCS-Directories: eclass/ X-VCS-Committer: eva X-VCS-Committer-Name: Gilles Dartiguelongue X-VCS-Revision: c2bda2cb3b9c132dd969616d0981c6d73d44e158 Date: Thu, 21 Apr 2011 22:09:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 2dc52efbe45c7255deeb6cc6eb02ee38 commit: c2bda2cb3b9c132dd969616d0981c6d73d44e158 Author: Gilles Dartiguelongue gentoo org> AuthorDate: Wed Apr 20 21:21:52 2011 +0000 Commit: Gilles Dartiguelongue gentoo org> CommitDate: Thu Apr 21 20:48:50 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gnome.git;a=3D= commit;h=3Dc2bda2cb eclass: quick and dirty gnome2-python --- eclass/gnome2-python.eclass | 68 +++++++++++++++++++++++++++++++++++++= ++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/eclass/gnome2-python.eclass b/eclass/gnome2-python.eclass new file mode 100644 index 0000000..fa31067 --- /dev/null +++ b/eclass/gnome2-python.eclass @@ -0,0 +1,68 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# +# Original Author: Gilles Dartiguelongue +# Purpose: +# + +inherit gnome2 python + +# Stolen from git.eclass +EXPORTED_FUNCTIONS=3D"pkg_setup src_compile src_test src_install pkg_pos= tinst pkg_postrm" +case "${EAPI:-0}" in + 2|3) EXPORTED_FUNCTIONS=3D"${EXPORTED_FUNCTIONS} src_prepare src_con= figure" ;; + 0|1) ;; + *) die "Unknown EAPI, Bug eclass maintainers." ;; +esac + +EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} + +gnome2-python_pkg_setup() { + python_pkg_setup +} + +gnome2-python_src_prepare() { + if [ -f py-compile ]; then + # disable pyc compiling + mv py-compile py-compile.orig + ln -s $(type -P true) py-compile + fi + + gnome2_src_prepare + python_copy_sources +} + +gnome2-python_src_configure() { + configure() { + gnome2_src_configure PYTHON=3D$(PYTHON -a) + } + python_execute_function -s configure +} + +gnome2-python_src_compile() { + python_execute_function -s gnome2_src_compile +} + +gnome2-python_src_test() { + python_execute_function -s -d +} + + +gnome2-python_src_install() { + python_execute_function -s gnome2_src_install + python_clean_installation_image +} + + +gnome2-python_pkg_postinst() { + gnome2_pkg_postinst + python_mod_optimize ${GNOME_ORG_MODULE} +} + + +gnome2-python_pkg_postrm() { + gnome2_pkg_postrm + python_mod_cleanup ${GNOME_ORG_MODULE} +}