diff options
Diffstat (limited to 'dev-vcs')
-rw-r--r-- | dev-vcs/tortoisehg/ChangeLog | 8 | ||||
-rw-r--r-- | dev-vcs/tortoisehg/files/tortoisehg-2.6.1-missing_thg_script.patch | 124 | ||||
-rw-r--r-- | dev-vcs/tortoisehg/metadata.xml | 4 | ||||
-rw-r--r-- | dev-vcs/tortoisehg/tortoisehg-2.6.1.ebuild | 93 |
4 files changed, 228 insertions, 1 deletions
diff --git a/dev-vcs/tortoisehg/ChangeLog b/dev-vcs/tortoisehg/ChangeLog index a1f520eaae59..426fe2ded27b 100644 --- a/dev-vcs/tortoisehg/ChangeLog +++ b/dev-vcs/tortoisehg/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-vcs/tortoisehg # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/tortoisehg/ChangeLog,v 1.26 2012/11/24 22:37:16 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/tortoisehg/ChangeLog,v 1.27 2012/12/20 13:36:53 polynomial-c Exp $ + +*tortoisehg-2.6.1 (20 Dec 2012) + + 20 Dec 2012; Lars Wendler <polynomial-c@gentoo.org> +tortoisehg-2.6.1.ebuild, + metadata.xml: + Version bump. Added myself as maintainer. 24 Nov 2012; Mike Gilbert <floppym@gentoo.org> tortoisehg-2.6.ebuild, tortoisehg-9999.ebuild: diff --git a/dev-vcs/tortoisehg/files/tortoisehg-2.6.1-missing_thg_script.patch b/dev-vcs/tortoisehg/files/tortoisehg-2.6.1-missing_thg_script.patch new file mode 100644 index 000000000000..dda5ddca00ea --- /dev/null +++ b/dev-vcs/tortoisehg/files/tortoisehg-2.6.1-missing_thg_script.patch @@ -0,0 +1,124 @@ +--- thg ++++ thg +@@ -0,0 +1,121 @@ ++#!/usr/bin/env python ++# ++# thg - front-end script for TortoiseHg dialogs ++# ++# Copyright (C) 2008-2011 Steve Borho <steve@borho.org> ++# Copyright (C) 2008 TK Soh <teekaysoh@gmail.com> ++# ++# This software may be used and distributed according to the terms of the ++# GNU General Public License version 2, incorporated herein by reference. ++ ++import os ++import sys ++ ++argv = sys.argv[1:] ++if 'THG_OSX_APP' in os.environ: ++ # Remove the -psn argument supplied by launchd ++ if argv[0].startswith('-psn'): ++ argv = argv[1:] ++ # sys.path as created by py2app doesn't work quite right with demandimport ++ # Add the explicit path where PyQt4 and other libs are ++ bundlepath = os.path.dirname(os.path.realpath(__file__)) ++ sys.path.insert(0, os.path.join(bundlepath, 'lib/python2.6/lib-dynload')) ++ ++if hasattr(sys, "frozen"): ++ if sys.frozen == 'windows_exe' and 'THGDEBUG' in os.environ: ++ import win32traceutil ++ print 'starting' ++ # os.Popen() needs this, and Mercurial still uses os.Popen ++ if 'COMSPEC' not in os.environ: ++ comspec = os.path.join(os.environ.get('SystemRoot', r'C:\Windows'), ++ 'system32', 'cmd.exe') ++ os.environ['COMSPEC'] = comspec ++else: ++ thgpath = os.path.dirname(os.path.realpath(__file__)) ++ testpath = os.path.join(thgpath, 'tortoisehg') ++ if os.path.isdir(testpath) and thgpath not in sys.path: ++ sys.path.insert(0, thgpath) ++ ++ # compile .ui and .qrc for in-place use ++ fpath = os.path.realpath(__file__) ++ if os.path.exists(os.path.join(os.path.dirname(fpath), 'setup.py')): ++ from distutils.dist import Distribution ++ from setup import build_qt ++ build_qt(Distribution()).run() ++ ++ if 'HGPATH' in os.environ: ++ hgpath = os.environ['HGPATH'] ++ testpath = os.path.join(hgpath, 'mercurial') ++ if os.path.isdir(testpath) and hgpath not in sys.path: ++ sys.path.insert(0, hgpath) ++ ++# Make sure to load threading by main thread; otherwise, _MainThread instance ++# may have wrong thread id and results KeyError at exit. ++import threading ++ ++from mercurial import demandimport ++demandimport.ignore.append('win32com.shell') ++demandimport.ignore.append('tortoisehg.util.config') ++demandimport.ignore.append('icons_rc') ++demandimport.ignore.append('translations_rc') ++demandimport.enable() ++ ++# Verify we can reach TortoiseHg sources first ++try: ++ import tortoisehg.hgqt.run ++except ImportError, e: ++ sys.stderr.write(str(e)+'\n') ++ sys.stderr.write("abort: couldn't find tortoisehg libraries in [%s]\n" % ++ os.pathsep.join(sys.path)) ++ sys.stderr.write("(check your install and PYTHONPATH)\n") ++ sys.exit(-1) ++ ++# Verify we have an acceptable version of Mercurial ++from tortoisehg.util.hgversion import hgversion, checkhgversion ++errmsg = checkhgversion(hgversion) ++if errmsg: ++ from mercurial import ui ++ from tortoisehg.hgqt.bugreport import run ++ from tortoisehg.hgqt.run import qtrun ++ opts = {} ++ opts['cmd'] = ' '.join(argv) ++ opts['error'] = '\n' + errmsg + '\n' ++ opts['nofork'] = True ++ qtrun(run, ui.ui(), **opts) ++ sys.exit(1) ++ ++if 'THGDEBUG' in os.environ or '--profile' in sys.argv: ++ sys.exit(tortoisehg.hgqt.run.dispatch(argv)) ++else: ++ import cStringIO ++ mystderr = cStringIO.StringIO() ++ origstderr = sys.stderr ++ sys.stderr = mystderr ++ sys.__stdout__ = sys.stdout ++ sys.__stderr__ = sys.stderr ++ ret = 0 ++ try: ++ ret = tortoisehg.hgqt.run.dispatch(argv) ++ sys.stderr = origstderr ++ stderrout = mystderr.getvalue() ++ errors = ('Traceback', 'TypeError', 'NameError', 'AttributeError', ++ 'NotImplementedError') ++ for l in stderrout.splitlines(): ++ if l.startswith(errors): ++ from mercurial import ui ++ from tortoisehg.hgqt.bugreport import run ++ from tortoisehg.hgqt.run import qtrun ++ opts = {} ++ opts['cmd'] = ' '.join(argv) ++ opts['error'] = 'Recoverable error (stderr):\n' + stderrout ++ opts['nofork'] = True ++ qtrun(run, ui.ui(), **opts) ++ break ++ sys.exit(ret) ++ except: ++ if sys.exc_info()[0] not in [SystemExit, KeyboardInterrupt]: ++ import traceback ++ sys.stderr = origstderr ++ traceback.print_exc() ++ else: ++ raise SystemExit(ret) diff --git a/dev-vcs/tortoisehg/metadata.xml b/dev-vcs/tortoisehg/metadata.xml index 09ddbff14dbf..1f90b96d7742 100644 --- a/dev-vcs/tortoisehg/metadata.xml +++ b/dev-vcs/tortoisehg/metadata.xml @@ -5,4 +5,8 @@ <email>floppym@gentoo.org</email> <name>Mike Gilbert</name> </maintainer> + <maintainer> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> </pkgmetadata> diff --git a/dev-vcs/tortoisehg/tortoisehg-2.6.1.ebuild b/dev-vcs/tortoisehg/tortoisehg-2.6.1.ebuild new file mode 100644 index 000000000000..1c7bb841109b --- /dev/null +++ b/dev-vcs/tortoisehg/tortoisehg-2.6.1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/tortoisehg/tortoisehg-2.6.1.ebuild,v 1.1 2012/12/20 13:36:53 polynomial-c Exp $ + +EAPI=4 + +SUPPORT_PYTHON_ABIS=1 +PYTHON_DEPEND="2:2.5" +RESTRICT_PYTHON_ABIS="2.4 3.* *-pypy-*" + +inherit distutils eutils + +# version 2.6.1 has a rather uncommon source package. Files with DOS line +# endings, tarball name in caps, missing files... +MY_P="TortoiseHg-${PV}" + +if [[ ${PV} != *9999* ]]; then + KEYWORDS="~amd64 ~x86" + SRC_URI="mirror://bitbucket/${PN}/targz/downloads/${MY_P}.tar.gz" + HG_DEPEND=">=dev-vcs/mercurial-2.3 <dev-vcs/mercurial-2.5" +else + inherit mercurial + EHG_REPO_URI="https://bitbucket.org/tortoisehg/thg" + KEYWORDS="" + SRC_URI="" + HG_DEPEND="dev-vcs/mercurial" +fi + +DESCRIPTION="Set of graphical tools for Mercurial" +HOMEPAGE="http://tortoisehg.bitbucket.org" + +LICENSE="GPL-2" +SLOT="0" +IUSE="doc" + +RDEPEND="${HG_DEPEND} + dev-python/iniparse + dev-python/pygments + dev-python/PyQt4 + dev-python/qscintilla-python" +DEPEND="${RDEPEND} + doc? ( >=dev-python/sphinx-1.0.3 )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + # Missing from somewhat broken source tarball. + epatch "${FILESDIR}"/${P}-missing_thg_script.patch + + if [[ ${LINGUAS+set} ]]; then + pushd i18n/tortoisehg > /dev/null || die + local x y keep + for x in *.po; do + keep=false + for y in ${LINGUAS}; do + if [[ ${y} == ${x%.po}* ]]; then + keep=true + break + fi + done + ${keep} || rm "${x}" || die + done + popd > /dev/null || die + fi + + distutils_src_prepare +} + +src_compile() { + distutils_src_compile + + if use doc ; then + emake -C doc html + fi +} + +src_install() { + distutils_src_install + dodoc doc/ReadMe*.txt doc/TODO + + if use doc ; then + dohtml -r doc/build/html + fi + + newicon -s scalable icons/scalable/apps/thg-logo.svg tortoisehg_logo.svg + domenu contrib/${PN}.desktop +} + +pkg_postinst() { + elog "When startup of ${PN} fails with an API version mismatch error" + elog "between dev-python/sip and dev-python/PyQt4 please rebuild" + elog "dev-python/qscintilla-python." +} |