diff options
author | 2012-01-06 23:04:17 +0000 | |
---|---|---|
committer | 2012-01-06 23:04:17 +0000 | |
commit | e5f52370a1334081236f3434d42a5e435058f424 (patch) | |
tree | 5228b45258ffddeca4c0fbb67cd975cafad8764e /dev-python/wxpython/wxpython-2.8.12.1.ebuild | |
parent | Allow newer coreutils to provide realpath. (diff) | |
download | gentoo-2-e5f52370a1334081236f3434d42a5e435058f424.tar.gz gentoo-2-e5f52370a1334081236f3434d42a5e435058f424.tar.bz2 gentoo-2-e5f52370a1334081236f3434d42a5e435058f424.zip |
Synchronize ebuilds. Use distutils.eclass. Patch by Arfrever.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/wxpython/wxpython-2.8.12.1.ebuild')
-rw-r--r-- | dev-python/wxpython/wxpython-2.8.12.1.ebuild | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/dev-python/wxpython/wxpython-2.8.12.1.ebuild b/dev-python/wxpython/wxpython-2.8.12.1.ebuild index 929a022501b5..1dddfcc77d27 100644 --- a/dev-python/wxpython/wxpython-2.8.12.1.ebuild +++ b/dev-python/wxpython/wxpython-2.8.12.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/wxpython/wxpython-2.8.12.1.ebuild,v 1.2 2012/01/06 21:25:12 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/wxpython/wxpython-2.8.12.1.ebuild,v 1.3 2012/01/06 23:04:17 hwoarang Exp $ EAPI="4" PYTHON_DEPEND="2" @@ -8,7 +8,7 @@ WX_GTK_VER="2.8" SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="3.* *-jython" -inherit alternatives eutils fdo-mime flag-o-matic python wxwidgets +inherit alternatives distutils eutils fdo-mime wxwidgets MY_P="${P/wxpython-/wxPython-src-}" @@ -25,7 +25,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="cairo doc examples opengl" RDEPEND=" - >=x11-libs/wxGTK-${PV}:2.8[opengl?,tiff,X] + >=x11-libs/wxGTK-${PV}:${WX_GTK_VER}[opengl?,tiff,X] dev-libs/glib:2 dev-python/setuptools media-libs/libpng:0 @@ -42,6 +42,11 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${MY_P}/wxPython" DOC_S="${WORKDIR}/wxPython-${PV}" +PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") +PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing") + +PYTHON_MODULES="wx-${SLOT}-gtk2-unicode wxversion.py" + src_prepare() { sed -i "s:cflags.append('-O3'):pass:" config.py || die "sed failed" @@ -65,42 +70,28 @@ src_prepare() { src_configure() { need-wxwidgets unicode - append-flags -fno-strict-aliasing - - use opengl \ - && mypyconf="${mypyconf} BUILD_GLCANVAS=1" \ - || mypyconf="${mypyconf} BUILD_GLCANVAS=0" - - mypyconf="${mypyconf} WX_CONFIG=${WX_CONFIG}" - mypyconf="${mypyconf} WXPORT=gtk2 UNICODE=1" + DISTUTILS_GLOBAL_OPTIONS=( + "* WX_CONFIG=${WX_CONFIG}" + "* WXPORT=gtk2" + "* UNICODE=1" + "* BUILD_GLCANVAS=$(use opengl && echo 1 || echo 0)" + ) } -src_compile() { - building() { - "$(PYTHON)" setup.py ${mypyconf} build - } - python_execute_function -s building +distutils_src_install_post_hook() { + # Collision protection. + local file + for file in "$(distutils_get_intermediate_installation_image)${EPREFIX}/usr/bin/"*; do + mv "${file}" "${file}-${SLOT}" + done } src_install() { - local docdir file mypyconf - - mypyconf="${mypyconf} WX_CONFIG=${WX_CONFIG}" - use opengl \ - && mypyconf="${mypyconf} BUILD_GLCANVAS=1" \ - || mypyconf="${mypyconf} BUILD_GLCANVAS=0" - - mypyconf="${mypyconf} WXPORT=gtk2 UNICODE=1" + local docdir file - installation() { - "$(PYTHON)" setup.py ${mypyconf} install --root="${D}" --install-purelib $(python_get_sitedir) - } - python_execute_function -s installation + distutils_src_install # Collision protection. - for file in "${D}"/usr/bin/*; do - mv "${file}" "${file}-${SLOT}" - done rename_files() { for file in "${D}$(python_get_sitedir)/"wx{version.*,.pth}; do mv "${file}" "${file}-${SLOT}" || return 1 @@ -144,7 +135,7 @@ pkg_postinst() { } python_execute_function -q create_symlinks - python_mod_optimize wx-${SLOT}-gtk2-unicode wxversion.py + distutils_pkg_postinst echo elog "Gentoo uses the Multi-version method for SLOT'ing." @@ -175,7 +166,7 @@ pkg_postinst() { } pkg_postrm() { - python_mod_cleanup wx-${SLOT}-gtk2-unicode wxversion.py + distutils_pkg_postrm fdo-mime_desktop_database_update create_symlinks() { |