--- /dev/null
+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):
--- /dev/null
+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/"
+
--- /dev/null
+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
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/"
}
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() {
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() {