From 6e5162317eb2a8e40720ab5f91980d983b5a44ae Mon Sep 17 00:00:00 2001 From: Eloi Torrents Date: Mon, 19 Sep 2022 10:49:24 +0200 Subject: [PATCH] New package: dooble-2023.02.20. --- .../translations-dooble_application.patch | 20 ++++++++++++++++ .../translations-dooble_settings.patch | 21 ++++++++++++++++ srcpkgs/dooble/template | 24 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 srcpkgs/dooble/patches/translations-dooble_application.patch create mode 100644 srcpkgs/dooble/patches/translations-dooble_settings.patch create mode 100644 srcpkgs/dooble/template diff --git a/srcpkgs/dooble/patches/translations-dooble_application.patch b/srcpkgs/dooble/patches/translations-dooble_application.patch new file mode 100644 index 00000000000000..2072e9150e6727 --- /dev/null +++ b/srcpkgs/dooble/patches/translations-dooble_application.patch @@ -0,0 +1,20 @@ +--- a/Source/dooble_application.cc ++++ b/Source/dooble_application.cc +@@ -76,16 +76,13 @@ void dooble_application::install_translator(void) + + if(dooble_settings::setting("language_index").toInt() == 1) // System + { +- QString path(""); ++ QString path("/usr/share/translations/"); + auto name(QLocale::system().name()); + auto variable(qgetenv("DOOBLE_TRANSLATIONS_PATH").trimmed()); + + if(!variable.isEmpty()) + path = QString::fromLocal8Bit(variable.constData()); + +- if(path.isEmpty()) +- path = QDir::currentPath() + QDir::separator() + "Translations"; +- + m_translator = new QTranslator(this); + + if(m_translator->load("dooble_" + name, path)) \ No newline at end of file diff --git a/srcpkgs/dooble/patches/translations-dooble_settings.patch b/srcpkgs/dooble/patches/translations-dooble_settings.patch new file mode 100644 index 00000000000000..726a248105f537 --- /dev/null +++ b/srcpkgs/dooble/patches/translations-dooble_settings.patch @@ -0,0 +1,21 @@ +--- a/Source/dooble_settings.cc ++++ b/Source/dooble_settings.cc +@@ -188,17 +188,11 @@ dooble_settings::dooble_settings(void):dooble_main_window() + } + else + { +- QString path(""); ++ QString path("/usr/share/dooble/translations/"); + auto variable(qgetenv("DOOBLE_TRANSLATIONS_PATH").trimmed()); + + if(!variable.isEmpty()) + path = QString::fromLocal8Bit(variable.constData()); +- else +- { +- path = QDir::currentPath(); +- path.append(QDir::separator()); +- path.append("Translations"); +- } + + if(!path.endsWith(QDir::separator())) + path.append(QDir::separator()); \ No newline at end of file diff --git a/srcpkgs/dooble/template b/srcpkgs/dooble/template new file mode 100644 index 00000000000000..4da0c23f090268 --- /dev/null +++ b/srcpkgs/dooble/template @@ -0,0 +1,24 @@ +# Template file for 'dooble' +pkgname=dooble +version=2023.02.20 +revision=1 +build_style=qmake +configure_args="dooble.pro" +hostmakedepends="qt5-qmake qt5-host-tools qt5-webengine" +makedepends="qt5-charts-devel qt5-webengine-devel qt5-webchannel-devel qt5-location-devel" +depends="qt5-plugin-sqlite" +short_desc="Dooble, the scientific browser. Minimal, cute, and unusually stable" +maintainer="Eloi Torrents " +license="BSD-3-Clause" +homepage="https://textbrowser.github.io/dooble/" +distfiles="https://github.com/textbrowser/dooble/archive/refs/tags/${version}.tar.gz" +checksum=fa2a8f2687c44547f32b1d8f6879ede8792e23197e8ac01d99e619529ce57717 + +do_install() { + vbin Dooble dooble + vinstall dooble.desktop 644 usr/share/applications + vinstall Icons/Logo/dooble.png 644 usr/share/pixmaps + vmkdir usr/share/dooble/translations + vcopy "Translations/dooble_*.qm" usr/share/dooble/translations + vlicense LICENSE +}