Gentoo Archives: gentoo-commits

From: Michael Weber <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-misc/mendeleydesktop/files/, sci-misc/mendeleydesktop/
Date: Thu, 09 Mar 2017 18:28:42
Message-Id: 1489084107.2081cabce708068615e0a07de5d6193c10f09107.xmw@gentoo
1 commit: 2081cabce708068615e0a07de5d6193c10f09107
2 Author: Michael Weber <xmw <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 9 18:28:13 2017 +0000
4 Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 9 18:28:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2081cabc
7
8 sci-misc/mendeleydesktop: Revbump with fixed launcher (thanks Marius Brehler, bug 611792).
9
10 Package-Manager: Portage-2.3.4, Repoman-2.3.2
11
12 .../files/mendeleydesktop-1.17.8-libdir.patch | 19 +++++++++++++++
13 .../files/mendeleydesktop-1.17.8-qt5plugins.patch | 15 ++++++++++++
14 .../mendeleydesktop-1.17.8-unix-distro-build.patch | 16 +++++++++++++
15 ...7.8.ebuild => mendeleydesktop-1.17.8-r1.ebuild} | 28 ++++++++++++----------
16 4 files changed, 65 insertions(+), 13 deletions(-)
17
18 diff --git a/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-libdir.patch b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-libdir.patch
19 new file mode 100644
20 index 00000000000..67ba57fca05
21 --- /dev/null
22 +++ b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-libdir.patch
23 @@ -0,0 +1,19 @@
24 +Patch to find libstdc++.
25 +
26 +https://bugs.funtoo.org/browse/FL-3519
27 +--- a/bin/mendeleydesktop
28 ++++ b/bin/mendeleydesktop
29 +@@ -29,6 +29,13 @@ def library_paths():
30 + paths.append("/usr/lib/x86_64-linux-gnu")
31 + paths.append("/usr/lib/i386-linux-gnu")
32 +
33 ++ gcc_libpath = subprocess.Popen(
34 ++ '/usr/bin/gcc-config -L', shell=True, stdout=subprocess.PIPE,
35 ++ ).stdout.read().decode('utf-8').replace('\n', '').split(':')
36 ++ for path in gcc_libpath:
37 ++ if len(path) > 0:
38 ++ paths.append(path)
39 ++
40 + return paths
41 +
42 + def library_version_from_path(lib_path):
43
44 diff --git a/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-qt5plugins.patch b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-qt5plugins.patch
45 new file mode 100644
46 index 00000000000..49395a46a0f
47 --- /dev/null
48 +++ b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-qt5plugins.patch
49 @@ -0,0 +1,15 @@
50 +Patch to find qt5 plugins.
51 +
52 +Patch by Marius Brehler <marbre@××××××××××××××.de>
53 +--- a/bin/mendeleydesktop
54 ++++ b/bin/mendeleydesktop
55 +@@ -75,7 +83,7 @@ def get_paths():
56 + else:
57 + results['MENDELEY_BIN'] = results['MENDELEY_BASE'] + "/lib/mendeleydesktop/libexec/mendeleydesktop.i486"
58 +
59 +- results['MENDELEY_BUNDLED_QT_PLUGIN'] = results['MENDELEY_BASE'] + "/lib/mendeleydesktop/plugins/"
60 ++ results['MENDELEY_BUNDLED_QT_PLUGIN'] = "/usr/lib/qt5/plugins"
61 +
62 + # Path to Mendeley Desktop and PDFNet libraries
63 + results['MENDELEY_LIB'] = results['MENDELEY_BASE'] + "/lib/"
64 +
65
66 diff --git a/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-unix-distro-build.patch b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-unix-distro-build.patch
67 new file mode 100644
68 index 00000000000..dffd69df6b5
69 --- /dev/null
70 +++ b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-unix-distro-build.patch
71 @@ -0,0 +1,16 @@
72 +Patch to force --unix-distro-build.
73 +
74 +Patch by Marius Brehler <marbre@××××××××××××××.de>
75 +--- a/bin/mendeleydesktop
76 ++++ b/bin/mendeleydesktop
77 +@@ -159,10 +167,7 @@ def mendeley_desktop_arguments():
78 + """ Returns a list with the argumetns to be appended to Mendeley Desktop. """
79 + extra_args = sys.argv[1:]
80 +
81 +- if is_linux_distro_build():
82 +- # Enable Linux distro specific changes (eg. in auto-update
83 +- # handling)
84 +- extra_args = extra_args + ["--unix-distro-build"]
85 ++ extra_args = extra_args + ["--unix-distro-build"]
86 +
87 + use_debugger = sys.argv.count("--debug") > 0
88
89 diff --git a/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8.ebuild b/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8-r1.ebuild
90 similarity index 80%
91 rename from sci-misc/mendeleydesktop/mendeleydesktop-1.17.8.ebuild
92 rename to sci-misc/mendeleydesktop/mendeleydesktop-1.17.8-r1.ebuild
93 index 69eb1562274..5cad0e09b57 100644
94 --- a/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8.ebuild
95 +++ b/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8-r1.ebuild
96 @@ -45,6 +45,10 @@ RDEPEND="
97
98 QA_PREBUILT="/opt/mendeleydesktop/.*"
99
100 +PATCHES=( "${FILESDIR}"/${PN}-1.17.8-libdir.patch
101 + "${FILESDIR}"/${PN}-1.17.8-qt5plugins.patch
102 + "${FILESDIR}"/${PN}-1.17.8-unix-distro-build.patch )
103 +
104 pkg_nofetch() {
105 elog "Please download ${A} from:"
106 elog "http://www.mendeley.com/download-mendeley-desktop/"
107 @@ -64,22 +68,21 @@ src_unpack() {
108 }
109
110 src_prepare() {
111 + default
112 +
113 # remove bundled Qt libraries
114 rm -r lib/mendeleydesktop/plugins \
115 || die "failed to remove plugin directory"
116 - rm -r lib/qt || die "failed to remove qt libraries"
117 + rm -r lib/qt || die
118
119 - # force use of system Qt libraries
120 - sed -i "s:sys\.argv\.count(\"--force-system-qt\") > 0:True:" \
121 - bin/mendeleydesktop || die "failed to patch startup script"
122 + # fix qt library path
123 + sed -e "s:/usr/lib/qt5/plugins:${EROOT}usr/$(get_libdir)/qt5/plugins:g" \
124 + -i bin/mendeleydesktop || die
125
126 # fix library paths
127 - sed -i \
128 - -e "s:lib/mendeleydesktop:$(get_libdir)/mendeleydesktop:g" \
129 - -e "s:MENDELEY_BASE_PATH + \"/lib/\":MENDELEY_BASE_PATH + \"/$(get_libdir)/\":g" \
130 - bin/mendeleydesktop || die "failed to patch library path"
131 -
132 - default
133 + sed -e "s:lib/mendeleydesktop:$(get_libdir)/mendeleydesktop:g" \
134 + -e "s:MENDELEY_BASE'] + \"/lib/\":MENDELEY_BASE'] + \"/$(get_libdir)/\":g" \
135 + -i bin/mendeleydesktop || die
136 }
137
138 src_install() {
139 @@ -113,9 +116,8 @@ src_install() {
140 insinto /opt/${PN}/share
141 doins -r share/mendeleydesktop
142
143 - # install launch script
144 - into /opt
145 - make_wrapper ${PN} "/opt/${PN}/bin/${PN} --unix-distro-build"
146 + # symlink launch script
147 + dosym /opt/mendeleydesktop/bin/mendeleydesktop /opt/bin/mendeleydesktop
148 }
149
150 pkg_postinst() {