mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Zeal: bump version
This commit is contained in:
38
app-doc/zeal/additional-files/zeal.rdef.in
Normal file
38
app-doc/zeal/additional-files/zeal.rdef.in
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Zeal",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource file_types message {
|
||||
"types" = "image"
|
||||
};
|
||||
|
||||
resource vector_icon {
|
||||
$"6E6369660A0101000071030100000200060239C6663B870ABB870A39C666499A"
|
||||
$"8F4A457000FFAA00FF7F4C0002001602B7C666B84000384000B7C6664945EB4B"
|
||||
$"1A7A00E3FFE5020006023E6DEB3BA6B8BBA6B83E6DEB48C8CC4B590A00FCE3B1"
|
||||
$"ACFFAA06020006023ABAF43A8204BAB4CC3AF23D4B35FB4A37BC01FFAA00FF7F"
|
||||
$"4C00020006023BBFF60000000000003BC36A4C02A74AC25B007F4C00FFE9E9E9"
|
||||
$"020006023BBFF60000000000003BC36A4B554F481D08007F4C00FFE9E9E90200"
|
||||
$"06023E13A03DF5DCBD51F33D7B5C498C6E3B671522FFAA00FF01010104FFBD0C"
|
||||
$"0A05465A4B5A6044584046400A06223E352E5A3C5A46475922460A0446582246"
|
||||
$"223E464E0A04464E46585A445A3C0A04B4AFBE33352E5A3C484C0A04223EB4AF"
|
||||
$"BE33C315C479464E0803CA1BBEF3C223C648C2CDC6480803CA1BC00DC223C761"
|
||||
$"C2CDC7610803CA1BC0C8C223C81DC2CDC81D08065A3C484CC27CC53AC270C72B"
|
||||
$"4758CA35C1B00806243C494CC216C5A0C20AC7914659CA35C1B00A0A2A3B3630"
|
||||
$"3B3246424F3A553C4848434637362F3D0C0A000100000A010101100117830004"
|
||||
$"0A020102000A030103000A040104000A050105000A060106000A070107000A08"
|
||||
$"0108000A0801091001178000040A08010A1001178000040A08010B00"
|
||||
};
|
||||
@@ -1,144 +0,0 @@
|
||||
From de0320e4d35afc0a3c8245f02553df8dc609649d Mon Sep 17 00:00:00 2001
|
||||
From: Calvin Hill <calvin@hakobaito.co.uk>
|
||||
Date: Tue, 24 Oct 2017 19:15:13 +0000
|
||||
Subject: [PATCH] Disable keyboard shortcuts for Haiku.
|
||||
|
||||
---
|
||||
src/libs/core/settings.cpp | 2 +-
|
||||
src/libs/ui/mainwindow.cpp | 15 ++++++++-------
|
||||
src/libs/ui/mainwindow.h | 4 ++--
|
||||
src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri | 2 +-
|
||||
src/libs/ui/ui.pri | 5 ++---
|
||||
5 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/libs/core/settings.cpp b/src/libs/core/settings.cpp
|
||||
index d62bd73..e460fba 100644
|
||||
--- a/src/libs/core/settings.cpp
|
||||
+++ b/src/libs/core/settings.cpp
|
||||
@@ -106,7 +106,7 @@ void Settings::load()
|
||||
docsetPath = settings->value(QStringLiteral("path")).toString();
|
||||
} else {
|
||||
#ifndef PORTABLE_BUILD
|
||||
- docsetPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation)
|
||||
+ docsetPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)
|
||||
+ QLatin1String("/docsets");
|
||||
#else
|
||||
docsetPath = QCoreApplication::applicationDirPath() + QLatin1String("/docsets");
|
||||
diff --git a/src/libs/ui/mainwindow.cpp b/src/libs/ui/mainwindow.cpp
|
||||
index b970a0f..0e714ef 100644
|
||||
--- a/src/libs/ui/mainwindow.cpp
|
||||
+++ b/src/libs/ui/mainwindow.cpp
|
||||
@@ -28,7 +28,8 @@
|
||||
#include "docsetsdialog.h"
|
||||
#include "searchitemdelegate.h"
|
||||
#include "settingsdialog.h"
|
||||
-#include "qxtglobalshortcut/qxtglobalshortcut.h"
|
||||
+// TODO: Implement global shortcuts for Haiku
|
||||
+// #include "qxtglobalshortcut/qxtglobalshortcut.h"
|
||||
|
||||
#include <core/application.h>
|
||||
#include <core/settings.h>
|
||||
@@ -157,13 +158,13 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
|
||||
m_application(app),
|
||||
m_settings(app->settings()),
|
||||
m_zealListModel(new Registry::ListModel(app->docsetRegistry(), this)),
|
||||
- m_globalShortcut(new QxtGlobalShortcut(m_settings->showShortcut, this)),
|
||||
+ //m_globalShortcut(new QxtGlobalShortcut(m_settings->showShortcut, this)),
|
||||
m_openDocsetTimer(new QTimer(this))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
// initialise key grabber
|
||||
- connect(m_globalShortcut, &QxtGlobalShortcut::activated, this, &MainWindow::toggleWindow);
|
||||
+ //connect(m_globalShortcut, &QxtGlobalShortcut::activated, this, &MainWindow::toggleWindow);
|
||||
|
||||
setupTabBar();
|
||||
|
||||
@@ -192,10 +193,10 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
|
||||
connect(ui->actionFind, &QAction::triggered, ui->webView, &SearchableWebView::showSearchBar);
|
||||
|
||||
connect(ui->actionPreferences, &QAction::triggered, [this]() {
|
||||
- m_globalShortcut->setEnabled(false);
|
||||
+ //m_globalShortcut->setEnabled(false);
|
||||
QScopedPointer<SettingsDialog> dialog(new SettingsDialog(m_application, this));
|
||||
dialog->exec();
|
||||
- m_globalShortcut->setEnabled(true);
|
||||
+ //m_globalShortcut->setEnabled(true);
|
||||
});
|
||||
|
||||
ui->actionBack->setShortcut(QKeySequence::Back);
|
||||
@@ -797,7 +798,7 @@ void MainWindow::keyPressEvent(QKeyEvent *keyEvent)
|
||||
|
||||
void MainWindow::applySettings()
|
||||
{
|
||||
- m_globalShortcut->setShortcut(m_settings->showShortcut);
|
||||
+ //m_globalShortcut->setShortcut(m_settings->showShortcut);
|
||||
|
||||
if (m_settings->showSystrayIcon)
|
||||
createTrayIcon();
|
||||
@@ -833,7 +834,7 @@ void MainWindow::applySettings()
|
||||
|
||||
void MainWindow::toggleWindow()
|
||||
{
|
||||
- const bool checkActive = sender() == m_globalShortcut;
|
||||
+ const bool checkActive = sender(); //== m_globalShortcut;
|
||||
|
||||
if (!isVisible() || (checkActive && !isActiveWindow())) {
|
||||
bringToFront();
|
||||
diff --git a/src/libs/ui/mainwindow.h b/src/libs/ui/mainwindow.h
|
||||
index 13d453f..df07674 100644
|
||||
--- a/src/libs/ui/mainwindow.h
|
||||
+++ b/src/libs/ui/mainwindow.h
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
-class QxtGlobalShortcut;
|
||||
+//class QxtGlobalShortcut;
|
||||
|
||||
class QModelIndex;
|
||||
class QSystemTrayIcon;
|
||||
@@ -105,7 +105,7 @@ private:
|
||||
QMenu *m_backMenu = nullptr;
|
||||
QMenu *m_forwardMenu = nullptr;
|
||||
|
||||
- QxtGlobalShortcut *m_globalShortcut = nullptr;
|
||||
+// QxtGlobalShortcut *m_globalShortcut = nullptr;
|
||||
|
||||
QTabBar *m_tabBar = nullptr;
|
||||
|
||||
diff --git a/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri b/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri
|
||||
index d4c3e3c..7ce3d36 100644
|
||||
--- a/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri
|
||||
+++ b/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri
|
||||
@@ -1,6 +1,6 @@
|
||||
HEADERS += $$files($$PWD/*.h)
|
||||
SOURCES += $$PWD/qxtglobalshortcut.cpp
|
||||
|
||||
-unix:!macx:SOURCES += $$PWD/qxtglobalshortcut_x11.cpp
|
||||
+unix:!macx:!haiku:SOURCES += $$PWD/qxtglobalshortcut_x11.cpp
|
||||
win32:SOURCES += $$PWD/qxtglobalshortcut_win.cpp
|
||||
macx:SOURCES += $$PWD/qxtglobalshortcut_mac.cpp
|
||||
diff --git a/src/libs/ui/ui.pri b/src/libs/ui/ui.pri
|
||||
index c38640d..a327f32 100644
|
||||
--- a/src/libs/ui/ui.pri
|
||||
+++ b/src/libs/ui/ui.pri
|
||||
@@ -3,13 +3,12 @@ ZEAL_LIB_NAME = Ui
|
||||
QT += webkitwidgets
|
||||
|
||||
# QxtGlobalShortcut dependencies
|
||||
-unix:!macx {
|
||||
- QT += x11extras
|
||||
+unix:!macx:!haiku{
|
||||
+ QT += x11extras
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += x11 xcb xcb-keysyms
|
||||
}
|
||||
-
|
||||
macx {
|
||||
LIBS += -framework Carbon
|
||||
}
|
||||
--
|
||||
2.14.2
|
||||
|
||||
100
app-doc/zeal/patches/zeal-0.6.0.patchset
Normal file
100
app-doc/zeal/patches/zeal-0.6.0.patchset
Normal file
@@ -0,0 +1,100 @@
|
||||
From 70fbd5c99aa2027804533c238ed6d4a8a8229a12 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 3 Sep 2018 20:03:29 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/src/app/main.cpp b/src/app/main.cpp
|
||||
index 611ee1f..02a3d44 100644
|
||||
--- a/src/app/main.cpp
|
||||
+++ b/src/app/main.cpp
|
||||
@@ -203,6 +203,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifndef Q_OS_HAIKU
|
||||
QScopedPointer<Core::ApplicationSingleton> appSingleton(new Core::ApplicationSingleton());
|
||||
if (appSingleton->isSecondary()) {
|
||||
#ifdef Q_OS_WIN32
|
||||
@@ -215,7 +216,7 @@ int main(int argc, char *argv[])
|
||||
appSingleton->sendMessage(ba);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
// Set application-wide window icon. All message boxes and other windows will use it by default.
|
||||
qapp->setWindowIcon(QIcon::fromTheme(QStringLiteral("zeal"),
|
||||
QIcon(QStringLiteral(":/zeal.ico"))));
|
||||
@@ -223,7 +224,7 @@ int main(int argc, char *argv[])
|
||||
QDir::setSearchPaths(QStringLiteral("typeIcon"), {QStringLiteral(":/icons/type")});
|
||||
|
||||
QScopedPointer<Core::Application> app(new Core::Application());
|
||||
-
|
||||
+#ifndef Q_OS_HAIKU
|
||||
QObject::connect(appSingleton.data(), &Core::ApplicationSingleton::messageReceived,
|
||||
[&app](const QByteArray &data) {
|
||||
Registry::SearchQuery query;
|
||||
@@ -234,7 +235,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
app->executeQuery(query, preventActivation);
|
||||
});
|
||||
-
|
||||
+#endif
|
||||
if (!clParams.query.isEmpty()) {
|
||||
QTimer::singleShot(0, [&app, clParams] {
|
||||
app->executeQuery(clParams.query, clParams.preventActivation);
|
||||
diff --git a/src/libs/ui/qxtglobalshortcut/CMakeLists.txt b/src/libs/ui/qxtglobalshortcut/CMakeLists.txt
|
||||
index 8b1b0ef..ce2c28a 100644
|
||||
--- a/src/libs/ui/qxtglobalshortcut/CMakeLists.txt
|
||||
+++ b/src/libs/ui/qxtglobalshortcut/CMakeLists.txt
|
||||
@@ -6,6 +6,10 @@ if(APPLE)
|
||||
list(APPEND QxtGlobalShortcut_SOURCES
|
||||
qxtglobalshortcut_mac.cpp
|
||||
)
|
||||
+elseif(HAIKU)
|
||||
+ list(APPEND QxtGlobalShortcut_SOURCES
|
||||
+ qxtglobalshortcut_haiku.cpp
|
||||
+ )
|
||||
elseif(UNIX)
|
||||
find_package(X11)
|
||||
if(X11_FOUND)
|
||||
diff --git a/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut_haiku.cpp b/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..1bb9cde
|
||||
--- /dev/null
|
||||
+++ b/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut_haiku.cpp
|
||||
@@ -0,0 +1,31 @@
|
||||
+#include "qxtglobalshortcut_p.h"
|
||||
+
|
||||
+#include <QKeySequence>
|
||||
+#include <QScopedPointer>
|
||||
+#include <QVector>
|
||||
+
|
||||
+bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray &eventType,
|
||||
+ void *message, long *result)
|
||||
+{
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+quint32 QxtGlobalShortcutPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+quint32 QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key key)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+bool QxtGlobalShortcutPrivate::registerShortcut(quint32 nativeKey, quint32 nativeMods)
|
||||
+{
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+bool QxtGlobalShortcutPrivate::unregisterShortcut(quint32 nativeKey, quint32 nativeMods)
|
||||
+{
|
||||
+ return false;
|
||||
+}
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -4,15 +4,16 @@ documentation browser for software developers, inspired by Dash Docs \
|
||||
for macOS and iOS. Zeal has over 195+ docsets and are all compatible \
|
||||
with Dash docsets."
|
||||
HOMEPAGE="https://zealdocs.org"
|
||||
COPYRIGHT="2013, 2017 Oleg Shparber"
|
||||
COPYRIGHT="2013-2018 Oleg Shparber"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/zealdocs/zeal/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="1f6b50026036923ae0cfbf3f4eb1066ee2fdaf0425d4c321203e0dd9506823fd"
|
||||
CHECKSUM_SHA256="ef307d3ad4f03c76fa5fc249f8e7e04de879aa7574bec1ff8be548dbc2c02973"
|
||||
PATCHES="zeal-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="zeal.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
zeal$secondaryArchSuffix = $portVersion
|
||||
@@ -26,12 +27,14 @@ REQUIRES="
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5WebKit$secondaryArchSuffix
|
||||
lib:libQt5WebKitWidgets$secondaryArchSuffix
|
||||
lib:libsqlite3$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
extra_cmake_modules >= 5.47
|
||||
devel:libarchive$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
@@ -41,25 +44,43 @@ BUILD_REQUIRES="
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:qmake$secondaryArchSuffix >= 5
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
/bin/qmake .
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. $cmakeDirArgs \
|
||||
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# TODO Add a rdef icon for Zeal
|
||||
mkdir -p $appsDir/Zeal
|
||||
cp bin/zeal $appsDir/Zeal/Zeal
|
||||
addAppDeskbarSymlink $appsDir/Zeal/Zeal
|
||||
mkdir -p $appsDir
|
||||
cp build/bin/zeal $appsDir/Zeal
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.zeal"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/zeal.rdef.in > zeal.rdef
|
||||
|
||||
addResourcesToBinaries zeal.rdef $appsDir/Zeal
|
||||
mimeset -f $appsDir/Zeal
|
||||
addAppDeskbarSymlink $appsDir/Zeal
|
||||
}
|
||||
|
||||
TEST()
|
||||
Reference in New Issue
Block a user