--- app-cdr/cdcover/cdcover-0.7.3.ebuild 2008-06-07 11:23:27.000000000 +0200 +++ app-cdr/cdcover/cdcover-0.7.3.ebuild.new 2009-03-08 20:32:54.000000000 +0100 @@ -22,9 +22,7 @@ S=${WORKDIR}/${PN} pkg_setup() { - if ! built_with_use dev-lang/python tk; then - die "dev-lang/python needs to be built with USE tk." - fi + python_tkinter_exists } src_unpack() { --- app-text/txt2tags/txt2tags-2.4.ebuild 2007-09-21 19:57:13.000000000 +0200 +++ app-text/txt2tags/txt2tags-2.4.ebuild.new 2009-03-08 20:33:51.000000000 +0100 @@ -20,16 +20,7 @@ SITEFILE="51${PN}-gentoo.el" pkg_setup() { - # need to test if the tk support in python is working - if use tk; then - if ! built_with_use dev-lang/python tk; then - eerror "You have requested tk, but your build of Python" - eerror "doesn't support import _tkinter. You may need to" - eerror "remerge dev-lang/python, or build ${P}" - eerror "with USE=\"-tk\"" - die "rebuild python with USE=tk" - fi - fi + use tk && python_tkinter_exists } src_compile() { --- app-text/txt2tags/txt2tags-2.5.ebuild 2009-02-15 18:42:56.000000000 +0100 +++ app-text/txt2tags/txt2tags-2.5.ebuild.new 2009-03-08 20:34:17.000000000 +0100 @@ -20,16 +20,7 @@ SITEFILE="51${PN}-gentoo.el" pkg_setup() { - # need to test if the tk support in python is working - if use tk; then - if ! built_with_use dev-lang/python tk; then - eerror "You have requested tk, but your build of Python" - eerror "doesn't support import _tkinter. You may need to" - eerror "remerge dev-lang/python, or build ${P}" - eerror "with USE=\"-tk\"" - die "rebuild python with USE=tk" - fi - fi + use tk && python_tkinter_exists } src_compile() { --- dev-python/imaging/imaging-1.1.6.ebuild 2009-03-07 23:05:56.000000000 +0100 +++ dev-python/imaging/imaging-1.1.6.ebuild.new 2009-03-08 20:34:38.000000000 +0100 @@ -26,11 +26,7 @@ S=${WORKDIR}/${MY_P} pkg_setup() { - if use tk && ! built_with_use dev-lang/python tk; then - eerror "Python has to be compiled with tkinter support." - eerror "Please re-emerge python with the 'tk' USE-flag set." - die "Missing USE-flag for dev-lang/python" - fi + use tk && python_tkinter_exists } src_unpack() { --- dev-python/pylint/pylint-0.13.1.ebuild 2008-07-12 02:37:29.000000000 +0200 +++ dev-python/pylint/pylint-0.13.1.ebuild.new 2009-03-08 20:34:53.000000000 +0100 @@ -19,12 +19,7 @@ DOCS="doc/*.txt" pkg_setup() { - if use tk && ! built_with_use dev-lang/python tk; then - eerror "You have USE='tk' enabled." - eerror "Python has not been compiled with tkinter support." - eerror "Please re-emerge python with the 'tk' USE-flag set." - die "Missing USE-flag for dev-lang/python" - fi + use tk && python_tkinter_exists } src_unpack() { --- dev-python/pyopengl/pyopengl-2.0.0.44.ebuild 2007-07-22 10:05:59.000000000 +0200 +++ dev-python/pyopengl/pyopengl-2.0.0.44.ebuild.new 1970-01-01 01:00:00.000000000 +0100 @@ -1,52 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pyopengl/pyopengl-2.0.0.44.ebuild,v 1.16 2007/07/22 07:45:06 graaff Exp $ - -MY_P=${P/pyopengl/PyOpenGL} -S=${WORKDIR}/${MY_P} - -inherit eutils distutils - -DESCRIPTION="Python OpenGL bindings" -HOMEPAGE="http://pyopengl.sourceforge.net/" -SRC_URI="mirror://sourceforge/pyopengl/${MY_P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh sparc x86" -IUSE="" - -DEPEND="virtual/python - virtual/glut - x11-libs/libXi - x11-libs/libXmu - virtual/opengl" - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/config.diff - epatch ${FILESDIR}/${P}-fix_togl.patch - - sed -e 's/self\.NUMERIC/self.HAS_NUMERIC/' -i setup/dist.py - - if built_with_use dev-lang/python tk; then - tkv=$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/') - TKLIBRARY="'\/usr\/$(get_libdir)\/tk${tkv}'" - tclv=$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/') - TCLLIBRARY="'\/usr\/$(get_libdir)\/tcl${tclv}'" - TKEQ="True" - else - TKLIBRARY="'/usr/lib/'" - TCLLIBRARY="'/usr/lib/'" - TKEQ="None" - fi - SEDED=""" -s:tk = Tkinter.Tk():tk = ${TKEQ}:; -s:tk.getvar('tk_version'):str(Tkinter.TkVersion):g; -s:tk.getvar( 'tk_version' ):str(Tkinter.TkVersion):g; -s:tk.getvar('tcl_version'):str(Tkinter.TclVersion):g; -s:tk.getvar('tk_library'):${TKLIBRARY}:g; -s:tk.getvar('tcl_library'):${TCLLIBRARY}:g;""" - sed -i -e "${SEDED}" setup/togl_setup.py -} --- media-gfx/asymptote/asymptote-1.29.ebuild 2008-09-04 10:08:47.000000000 +0200 +++ media-gfx/asymptote/asymptote-1.29.ebuild.new 2009-03-08 20:36:48.000000000 +0100 @@ -43,13 +43,7 @@ fi fi - if ! built_with_use dev-lang/python tk; then - eerror "Please reemerge dev-lang/python with 'tk' support or xasy will" - eerror "not work. In order to fix this, execute the following:" - eerror "echo \"dev-lang/python tk\" >> /etc/portage/package.use" - eerror "and reemerge dev-lang/python before emerging asymptote." - die "requires dev-lang/python with use-flag 'tk'!!" - fi + python_tkinter_exists } src_unpack() { --- media-video/tovid/tovid-0.31-r1.ebuild 2009-01-03 15:06:33.000000000 +0100 +++ media-video/tovid/tovid-0.31-r1.ebuild.new 2009-03-08 20:37:50.000000000 +0100 @@ -31,10 +31,9 @@ SLOT="0" pkg_setup() { - if use tk && ( ! built_with_use dev-lang/python tk ); then - eerror "Please emerge python with useflag 'tk' enabled." - die "Fix USE flags and re-emerge" - elif ! use tk; then + use tk && python_tkinter_exists + + if ! use tk; then ewarn "If you want to use 'todiscgui', then emerge" ewarn "dev-lang/python and this package with the 'tk' use flag" fi --- sci-chemistry/pymol/pymol-1.1-r2.ebuild 2008-12-19 01:32:56.000000000 +0100 +++ sci-chemistry/pymol/pymol-1.1-r2.ebuild.new 1970-01-01 01:00:00.000000000 +0100 @@ -1,117 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/pymol/pymol-1.1-r2.ebuild,v 1.1 2008/12/19 00:32:56 je_fro Exp $ - -NEED_PYTHON=2.4 -PYTHON_MODNAME="chempy pmg_tk pymol" - -inherit distutils eutils multilib subversion - -ESVN_REPO_URI="https://pymol.svn.sourceforge.net/svnroot/pymol/branches/b11/pymol" -# ESVN_UPDATE_CMD="svn -r 3395 update" - -DESCRIPTION="A Python-extensible molecular graphics system." -HOMEPAGE="http://pymol.sourceforge.net/" - -LICENSE="PSF-2.2" -IUSE="apbs shaders" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -RDEPEND="dev-python/pmw - dev-python/numeric - dev-lang/tk - media-libs/libpng - sys-libs/zlib - virtual/glut - apbs? ( dev-libs/maloc - sci-chemistry/apbs - sci-chemistry/pdb2pqr - )" -DEPEND="${RDEPEND}" - -pkg_setup() { - if ! built_with_use dev-lang/python tk; then - eerror "Please reemerge dev-lang/python with 'tk' support or pymol will" - eerror "not work. In order to fix this, execute the following:" - eerror "echo \"dev-lang/python tk\" >> /etc/portage/package.use" - eerror "and reemerge dev-lang/python before emerging pymol." - die "requires dev-lang/python with use-flag 'tk'!!" - fi -} - -src_unpack() { - subversion_src_unpack - - python_version - - epatch "${FILESDIR}"/${PV}/${PF}-data-path.patch - - # Turn off splash screen. Please do make a project contribution - # if you are able though. - [[ -z "$WANT_SPLASH" ]] && epatch "${FILESDIR}"/${PV}/nosplash-gentoo.patch - - # Respect CFLAGS - sed -i \ - -e "s:\(ext_comp_args=\).*:\1[]:g" \ - "${S}"/setup.py - - if use shaders; then - epatch "${FILESDIR}"/${PV}/${PF}-shaders.patch - fi - - if use apbs; then - epatch "${FILESDIR}"/${PV}/apbs-070604.patch.bz2 - sed "s:LIBANDPYTHON:$(get_libdir)/python${PYVER}:g" \ - -i modules/pmg_tk/startup/apbs_tools.py || die - fi -} - -src_install() { - distutils_src_install - cd "${S}" - - #The following three lines probably do not do their jobs and should be - #changed - PYTHONPATH="${D}/usr/$(get_libdir)/python${PYVER}/site-packages" ${python} setup2.py - - # These environment variables should not go in the wrapper script, or else - # it will be impossible to use the PyMOL libraries from Python. - cat >> "${T}"/20pymol <<- EOF - PYMOL_PATH=/usr/$(get_libdir)/python${PYVER}/site-packages/pymol - PYMOL_DATA="/usr/share/pymol/data" - PYMOL_SCRIPTS="/usr/share/pymol/scripts" - EOF - - doenvd "${T}"/20pymol || die "Failed to install env.d file." - - # Make our own wrapper - cat >> "${T}"/pymol <<- EOF - #!/bin/sh - ${python} -O \${PYMOL_PATH}/__init__.py \$* - EOF - - if ! use apbs; then - rm "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pmg_tk/startup/apbs_tools.py - fi - - exeinto /usr/bin - doexe "${T}"/pymol || die "Failed to install wrapper." - dodoc DEVELOPERS || die "Failed to install docs." - - mv examples "${D}"/usr/share/doc/${PF}/ || die "Failed moving docs." - - dodir /usr/share/pymol - mv test "${D}"/usr/share/pymol/ || die "Failed moving test files." - mv data "${D}"/usr/share/pymol/ || die "Failed moving data files." - mv scripts "${D}"/usr/share/pymol/ || die "Failed moving scripts." -} - -pkg_postinst() { - distutils_pkg_postinst - - if use apbs; then - [[ -e /usr/share/apbs-0.5* ]] && \ - ewarn "You need to reemerge sci-chemistry/apbs!" - fi -} --- sci-chemistry/sparky/sparky-3.113.ebuild 2008-06-03 04:10:35.000000000 +0200 +++ sci-chemistry/sparky/sparky-3.113.ebuild.new 2009-03-08 20:39:17.000000000 +0100 @@ -27,9 +27,7 @@ python="/usr/bin/python2.4" python_version - if ! built_with_use dev-lang/python tk; then - die "Rebuild python with USE=tk" - fi + python_tkinter_exists arguments=( SPARKY="${S}" \ SPARKY_INSTALL_MAC="" \ --- sci-physics/camfr/camfr-20070717-r1.ebuild 2008-12-09 17:07:05.000000000 +0100 +++ sci-physics/camfr/camfr-20070717-r1.ebuild.new 2009-03-08 20:40:36.000000000 +0100 @@ -17,7 +17,7 @@ dev-python/matplotlib dev-libs/boost dev-libs/blitz - dev-python/imaging + dev-python/imaging[tk] virtual/lapack" DEPEND="${RDEPEND} @@ -27,12 +27,8 @@ S="${WORKDIR}/${P/-/_}" pkg_setup() { - if ! built_with_use dev-lang/python tk || \ - ! built_with_use dev-python/imaging tk ; then - eerror "Python and/or imaging don't have Tk support enabled." - eerror "Set the tk USE flag and reinstall python and imaging before continuing." - die - fi + python_tkinter_exists + FORTRAN="gfortran ifc g77" fortran_pkg_setup }