public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-misc/mendeleydesktop/files/, sci-misc/mendeleydesktop/
@ 2017-03-09 18:28 Michael Weber
  0 siblings, 0 replies; only message in thread
From: Michael Weber @ 2017-03-09 18:28 UTC (permalink / raw
  To: gentoo-commits

commit:     2081cabce708068615e0a07de5d6193c10f09107
Author:     Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 18:28:13 2017 +0000
Commit:     Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 18:28:27 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2081cabc

sci-misc/mendeleydesktop: Revbump with fixed launcher (thanks Marius Brehler, bug 611792).

Package-Manager: Portage-2.3.4, Repoman-2.3.2

 .../files/mendeleydesktop-1.17.8-libdir.patch      | 19 +++++++++++++++
 .../files/mendeleydesktop-1.17.8-qt5plugins.patch  | 15 ++++++++++++
 .../mendeleydesktop-1.17.8-unix-distro-build.patch | 16 +++++++++++++
 ...7.8.ebuild => mendeleydesktop-1.17.8-r1.ebuild} | 28 ++++++++++++----------
 4 files changed, 65 insertions(+), 13 deletions(-)

diff --git a/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-libdir.patch b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-libdir.patch
new file mode 100644
index 00000000000..67ba57fca05
--- /dev/null
+++ b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-libdir.patch
@@ -0,0 +1,19 @@
+Patch to find libstdc++.
+
+https://bugs.funtoo.org/browse/FL-3519
+--- a/bin/mendeleydesktop
++++ b/bin/mendeleydesktop
+@@ -29,6 +29,13 @@ def library_paths():
+     paths.append("/usr/lib/x86_64-linux-gnu")
+     paths.append("/usr/lib/i386-linux-gnu")
+ 
++    gcc_libpath = subprocess.Popen(
++        '/usr/bin/gcc-config -L', shell=True, stdout=subprocess.PIPE,
++    ).stdout.read().decode('utf-8').replace('\n', '').split(':')
++    for path in gcc_libpath:
++        if len(path) > 0:
++            paths.append(path)
++
+     return paths
+ 
+ def library_version_from_path(lib_path):

diff --git a/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-qt5plugins.patch b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-qt5plugins.patch
new file mode 100644
index 00000000000..49395a46a0f
--- /dev/null
+++ b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-qt5plugins.patch
@@ -0,0 +1,15 @@
+Patch to find qt5 plugins.
+
+Patch by Marius Brehler <marbre@linux.sungazer.de>
+--- a/bin/mendeleydesktop
++++ b/bin/mendeleydesktop
+@@ -75,7 +83,7 @@ def get_paths():
+         else:
+             results['MENDELEY_BIN'] = results['MENDELEY_BASE'] + "/lib/mendeleydesktop/libexec/mendeleydesktop.i486"
+ 
+-        results['MENDELEY_BUNDLED_QT_PLUGIN'] = results['MENDELEY_BASE'] + "/lib/mendeleydesktop/plugins/"
++        results['MENDELEY_BUNDLED_QT_PLUGIN'] = "/usr/lib/qt5/plugins"
+ 
+     # Path to Mendeley Desktop and PDFNet libraries
+     results['MENDELEY_LIB'] = results['MENDELEY_BASE'] + "/lib/"
+ 

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
new file mode 100644
index 00000000000..dffd69df6b5
--- /dev/null
+++ b/sci-misc/mendeleydesktop/files/mendeleydesktop-1.17.8-unix-distro-build.patch
@@ -0,0 +1,16 @@
+Patch to force --unix-distro-build.
+
+Patch by Marius Brehler <marbre@linux.sungazer.de>
+--- a/bin/mendeleydesktop
++++ b/bin/mendeleydesktop
+@@ -159,10 +167,7 @@ def mendeley_desktop_arguments():
+     """ Returns a list with the argumetns to be appended to Mendeley Desktop. """
+     extra_args = sys.argv[1:]
+ 
+-    if is_linux_distro_build():
+-        # Enable Linux distro specific changes (eg. in auto-update
+-        # handling)
+-        extra_args = extra_args + ["--unix-distro-build"]
++    extra_args = extra_args + ["--unix-distro-build"]
+ 
+     use_debugger = sys.argv.count("--debug") > 0

diff --git a/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8.ebuild b/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8-r1.ebuild
similarity index 80%
rename from sci-misc/mendeleydesktop/mendeleydesktop-1.17.8.ebuild
rename to sci-misc/mendeleydesktop/mendeleydesktop-1.17.8-r1.ebuild
index 69eb1562274..5cad0e09b57 100644
--- a/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8.ebuild
+++ b/sci-misc/mendeleydesktop/mendeleydesktop-1.17.8-r1.ebuild
@@ -45,6 +45,10 @@ RDEPEND="
 
 QA_PREBUILT="/opt/mendeleydesktop/.*"
 
+PATCHES=( "${FILESDIR}"/${PN}-1.17.8-libdir.patch
+	"${FILESDIR}"/${PN}-1.17.8-qt5plugins.patch
+	"${FILESDIR}"/${PN}-1.17.8-unix-distro-build.patch )
+
 pkg_nofetch() {
 	elog "Please download ${A} from:"
 	elog "http://www.mendeley.com/download-mendeley-desktop/"
@@ -64,22 +68,21 @@ src_unpack() {
 }
 
 src_prepare() {
+	default
+
 	# remove bundled Qt libraries
 	rm -r lib/mendeleydesktop/plugins \
 		|| die "failed to remove plugin directory"
-	rm -r lib/qt || die "failed to remove qt libraries"
+	rm -r lib/qt || die
 
-	# force use of system Qt libraries
-	sed -i "s:sys\.argv\.count(\"--force-system-qt\") > 0:True:" \
-		bin/mendeleydesktop || die "failed to patch startup script"
+	# fix qt library path
+	sed -e "s:/usr/lib/qt5/plugins:${EROOT}usr/$(get_libdir)/qt5/plugins:g" \
+		-i bin/mendeleydesktop || die
 
 	# fix library paths
-	sed -i \
-		-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"
-
-	default
+	sed -e "s:lib/mendeleydesktop:$(get_libdir)/mendeleydesktop:g" \
+		-e "s:MENDELEY_BASE'] + \"/lib/\":MENDELEY_BASE'] + \"/$(get_libdir)/\":g" \
+		-i bin/mendeleydesktop || die
 }
 
 src_install() {
@@ -113,9 +116,8 @@ src_install() {
 	insinto /opt/${PN}/share
 	doins -r share/mendeleydesktop
 
-	# install launch script
-	into /opt
-	make_wrapper ${PN} "/opt/${PN}/bin/${PN} --unix-distro-build"
+	# symlink launch script
+	dosym /opt/mendeleydesktop/bin/mendeleydesktop /opt/bin/mendeleydesktop
 }
 
 pkg_postinst() {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-09 18:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-09 18:28 [gentoo-commits] repo/gentoo:master commit in: sci-misc/mendeleydesktop/files/, sci-misc/mendeleydesktop/ Michael Weber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox