git-cola stable port information

Info2: <<
Package: git-cola%type_pkg[qt]
Version: 1.7.0
Revision: 1
Type: python (2.7), qt (-mac -x11)
Description: Highly caffinated GUI for git
DescUsage: <<
To open a git repository in %n, cd to the working directory
and type 'git cola%type_pkg[qt]'.
<<
Maintainer: Daniel Johnson
License: GPL2
Homepage: http://git-cola.github.com/

Source: https://nodeload.github.com/git-cola/git-cola/tarball/v1.7.0
Source-MD5: d9aa884de6cf850cd29582686b6490e7
SourceRename: %{ni}-%v.tar.gz
SourceDirectory: git-cola-git-cola-e8c2076

Depends: <<
git (>= 1.7.3.2-1),
jsonpickle-py%type_pkg[python],
( %type_pkg[qt] = -mac ) pyqt4-mac-py%type_pkg[python] (>= 4.8.2-1),
( %type_pkg[qt] = -x11 ) pyqt4-py%type_pkg[python] (>= 4.8.2-1),
python%type_pkg[python]
<<
BuildDepends: <<
fink (>= 0.24.12),
gettext-tools,
sip-py%type_pkg[python] (>= 4.12-1)
<<

PatchFile: %{ni}.patch
PatchFile-MD5: dc377f4013a78058dfe7a00acfd21b2b
PatchScript: sed 's|@PYTHON@|python%type_raw[python]|g ' <%{PatchFile} | patch -p1

CompileScript: PYTHONPATH=%p/lib/qt4%type_pkg[qt]/lib/python%type_raw[python]/site-packages make prefix=%p/lib/qt4%type_pkg[qt] PYTHON=python%type_raw[python] standalone=1

#InfoTest: <<
# TestDepends: nose-py%type_pkg[python]
# TestScript: PYTHONPATH=%p/lib/qt4%type_pkg[qt]/lib/python%type_raw[python]/site-packages make prefix=%p/lib/qt4%type_pkg[qt] PYTHON=python%type_raw[python] standalone=1 test || exit 2
#<<

InstallScript: <<
PYTHONPATH=%p/lib/qt4%type_pkg[qt]/lib/python%type_raw[python]/site-packages make prefix=%p/lib/qt4%type_pkg[qt] PYTHON=python%type_raw[python] standalone=1 DESTDIR=%d install
mkdir -p %i/lib/git-core
ln -s %p/lib/qt4%type_pkg[qt]/bin/git-cola %i/lib/git-core/git-cola%type_pkg[qt]
<<

DocFiles: COPYRIGHT LICENSE README
<<

git-cola stable port .patch

diff --git a/bin/git-cola b/bin/git-cola
index 1947dfe..e20dade 100755
--- a/bin/git-cola
+++ b/bin/git-cola
@@ -26,6 +26,8 @@ def cola_init():
# Try to detect where it is run from and set prefix and the search path.
# It is assumed that the user installed Cola using the --prefix= option
prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ if os.path.islink(__file__):
+ prefix = os.path.dirname(os.path.dirname(os.readlink(__file__)))

# Look for modules in the source or install trees
thirdparty = os.path.join(prefix, 'thirdparty')
@@ -36,6 +38,7 @@ def cola_init():
else:
# Install tree: prefer cola
paths_to_try = [os.path.join(prefix, 'share', 'git-cola', 'lib')]
+ paths_to_try = paths_to_try + [os.path.join(prefix, 'lib', '@PYTHON@', 'site-packages')]
sys.path = paths_to_try + sys.path

if __name__ == '__main__':
diff --git a/bin/git-dag b/bin/git-dag
index e689d6b..fc4115b 100755
--- a/bin/git-dag
+++ b/bin/git-dag
@@ -26,6 +26,8 @@ def cola_init():
# Try to detect where it is run from and set prefix and the search path.
# It is assumed that the user installed Cola using the --prefix= option
prefix = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ if os.path.islink(__file__):
+ prefix = os.path.dirname(os.path.dirname(os.readlink(__file__)))

# Look for modules in the source or install trees
thirdparty = os.path.join(prefix, 'thirdparty')
@@ -36,6 +38,7 @@ def cola_init():
else:
# Install tree: prefer cola
paths_to_try = [os.path.join(prefix, 'share', 'git-cola', 'lib')]
+ paths_to_try = paths_to_try + [os.path.join(prefix, 'lib', '@PYTHON@', 'site-packages')]
sys.path = paths_to_try + sys.path


git-cola _unstable_ port .patch