commit:     e783ec5147e4781634556754411da02090429f42
Author:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Mon Jan 19 11:00:00 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Jan 19 11:00:00 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e783ec51

sci-misc/mendeleydesktop: Fix for python3

---
 sci-misc/mendeleydesktop/ChangeLog                       |  8 ++++++--
 .../files/mendeleydesktop-fix-python3.patch              | 16 ++++++++++++++++
 sci-misc/mendeleydesktop/mendeleydesktop-1.13.1.ebuild   |  3 +++
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/sci-misc/mendeleydesktop/ChangeLog 
b/sci-misc/mendeleydesktop/ChangeLog
index 18821b6..b8e6ec6 100644
--- a/sci-misc/mendeleydesktop/ChangeLog
+++ b/sci-misc/mendeleydesktop/ChangeLog
@@ -1,14 +1,18 @@
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header:  $
 
+  19 Jan 2015; Marius Brehler <[email protected]>
+  mendeleydesktop-1.13.1.ebuild, +files/mendeleydesktop-fix-python3.patch:
+  Fix for python3 as discussed in #536656, thanks to Alexander Shamov
+
 *mendeleydesktop-1.13.1 (14 Jan 2015)
 
-  14 Jan 2015; Marius Brehler <[email protected]>,
+  14 Jan 2015; Marius Brehler <[email protected]>
   -mendeleydesktop-1.13.ebuild, +mendeleydesktop-1.13.1.ebuild:
   Version bump; Drop old
 
 *mendeleydesktop-1.13 (13 Jan 2015)
 
-  13 Jan 2015; Marius Brehler <[email protected]>,
+  13 Jan 2015; Marius Brehler <[email protected]>
   +mendeleydesktop-1.13.ebuild, metadata.xml:
   Add version bumped ebuild

diff --git a/sci-misc/mendeleydesktop/files/mendeleydesktop-fix-python3.patch 
b/sci-misc/mendeleydesktop/files/mendeleydesktop-fix-python3.patch
new file mode 100644
index 0000000..e1b1abc
--- /dev/null
+++ b/sci-misc/mendeleydesktop/files/mendeleydesktop-fix-python3.patch
@@ -0,0 +1,16 @@
+--- mendeleydesktop-1.13.1/bin/mendeleydesktop.orig 2015-01-15 
15:49:15.589870680 +0100
++++ mendeleydesktop-1.13.1/bin/mendeleydesktop 2015-01-15 15:46:49.308954069 
+0100
+@@ -95,11 +95,11 @@
+               # Both version components are non-numeric, treat
+               # them as equal
+               return False
+-      elif (version_part_a and version_part_b is None):
++      elif (type(version_part_a) is int and version_part_b is None):
+               # Left version component is numeric, right component is not.
+               # Treat the numeric part as greater
+               return False
+-      elif (version_part_b and version_part_a is None):
++      elif (type(version_part_b) is int and version_part_a is None):
+               # Right version component is numeric, left component is not.
+               # Treat the numeric part as greater
+               return True

diff --git a/sci-misc/mendeleydesktop/mendeleydesktop-1.13.1.ebuild 
b/sci-misc/mendeleydesktop/mendeleydesktop-1.13.1.ebuild
index 8855f75..b374ef7 100644
--- a/sci-misc/mendeleydesktop/mendeleydesktop-1.13.1.ebuild
+++ b/sci-misc/mendeleydesktop/mendeleydesktop-1.13.1.ebuild
@@ -66,6 +66,9 @@ src_prepare() {
                -e "s:lib/mendeleydesktop:$(get_libdir)/mendeleydesktop:g" \
                -e "s:MENDELEY_BASE_PATH + \"/lib/\":MENDELEY_BASE_PATH + 
\"/$(get_libdir)/\":g" \
                bin/mendeleydesktop || die "failed to patch library path"
+
+       # patch for python3
+       epatch "${FILESDIR}/mendeleydesktop-fix-python3.patch"
 }
 
 src_install() {

Reply via email to