Trojita: bump git version (#1758)

gpgme is disabled because we lack qgpgme.
This commit is contained in:
miqlas
2017-11-02 14:13:52 +01:00
committed by Jérôme Duval
parent 24a3818021
commit 24331f15ae
3 changed files with 153 additions and 11 deletions

View File

@@ -10,7 +10,7 @@ resource app_version {
internal = 0,
short_info = "Trojita Email Client",
long_info = "A Qt IMAP e-mail client."
long_info = "A Qt IMAP e-mail client"
};
resource app_signature "@APP_SIGNATURE@";

View File

@@ -0,0 +1,131 @@
From 16b117c12164d254eba741bea6c037b7f1746c4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Mon, 30 Oct 2017 07:51:20 +0100
Subject: Pthread needs -lpthread on Haiku
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a20962..31e8670 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,7 +185,11 @@ if(NOT MSVC)
#
# And because we also support MinGW and its `windres` compiler, we have to avoid passing -pthread to *that* thing, so,
# well, let's cheat and put it into the CXXFLAGS.
- set(CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}")
+ if(NOT HAIKU)
+ set(CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}")
+ else()
+ set(CMAKE_CXX_FLAGS "-lpthread ${CMAKE_CXX_FLAGS}")
+ endif()
endif()
# Make sure that plugins not export all symbols, only that which are explicitly marked
--
2.14.2
From e311c4e7d70c12d0f29be4f6e007347db1fb0cfa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Mon, 30 Oct 2017 08:04:51 +0100
Subject: Haiku got no -ldl
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31e8670..1d6d5b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -809,7 +809,11 @@ if(BUILD_TESTING)
add_library(fake-dev-random SHARED ${CMAKE_CURRENT_SOURCE_DIR}/tests/Utils/fake-dev-random.c)
set_target_properties(fake-dev-random PROPERTIES AUTOMOC off)
- target_link_libraries(fake-dev-random dl)
+ if(NOT HAIKU)
+ target_link_libraries(fake-dev-random dl)
+ else()
+ target_link_libraries(fake-dev-random root)
+ endif()
# FIXME: it would be nice to depend on the contents of keys/, but in my testing it produces Makefiles
# which suffer from races (the keygen.sh is run multiple times in parallel within the CI environment).
--
2.14.2
From 4c02000a91f499dcd9caf5a3d77cd6fd2d2734fe Mon Sep 17 00:00:00 2001
From: Caspar Schutijser <caspar@schutijser.com>
Date: Mon, 30 Oct 2017 14:47:58 +0100
Subject: [PATCH] Apply "Construct On First Use Idiom" to warningBorder
It suffered from the "static initialization order fiasco" [1], as
pointed out by Jan, which was accidentally introduced by
commit f70690899d2a6c69495d225214a7279ba8c1ff73. First reported by
miqlas on IRC.
1: https://isocpp.org/wiki/faq/ctors#static-init-order
BUG: 386351
BUG: 386353
Change-Id: I559c12e606883068e09072de26bdaac3b1d5d73c
---
diff --git a/src/Gui/ComposeWidget.cpp b/src/Gui/ComposeWidget.cpp
index 1f96ce8..7b4388f 100644
--- a/src/Gui/ComposeWidget.cpp
+++ b/src/Gui/ComposeWidget.cpp
@@ -589,7 +589,7 @@
auto lbl = new QLabel(tr("<b>This message appears to be malformed, please be careful before sending it.</b>")
+ QStringLiteral("<ul><li>") + warnings.join(QStringLiteral("</li><li>")) + QStringLiteral("</li></ul>"),
w);
- lbl->setStyleSheet(Gui::Util::Css::warningBorder);
+ lbl->setStyleSheet(Gui::Util::cssWarningBorder());
w->ui->verticalSplitter->insertWidget(1, lbl);
}
diff --git a/src/Gui/SettingsDialog.cpp b/src/Gui/SettingsDialog.cpp
index 6535caf..e496481 100644
--- a/src/Gui/SettingsDialog.cpp
+++ b/src/Gui/SettingsDialog.cpp
@@ -63,7 +63,7 @@
namespace Gui
{
-QString SettingsDialog::warningStyleSheet = Util::Css::warningBorder + QStringLiteral("font-weight: bold;");
+QString SettingsDialog::warningStyleSheet = Util::cssWarningBorder() + QStringLiteral("font-weight: bold;");
/** @short Check a text field for being non empty. If it's empty, show an error to the user. */
template<typename T>
diff --git a/src/Gui/Util.cpp b/src/Gui/Util.cpp
index 8c5c522..08cd97c 100644
--- a/src/Gui/Util.cpp
+++ b/src/Gui/Util.cpp
@@ -129,7 +129,11 @@
return false;
}
-const QString Css::warningBorder = QStringLiteral("border: 2px solid red; background-color: #E7C575; color: black; padding: 5px; margin: 5px; text-align: center;");
+QString cssWarningBorder()
+{
+ static QString border = QStringLiteral("border: 2px solid red; background-color: #E7C575; color: black; padding: 5px; margin: 5px; text-align: center;");
+ return border;
+}
} // namespace Util
diff --git a/src/Gui/Util.h b/src/Gui/Util.h
index aaf3668..eee843d 100644
--- a/src/Gui/Util.h
+++ b/src/Gui/Util.h
@@ -51,9 +51,7 @@
bool isFromDistinctImapAccount(QDropEvent* de);
-struct Css {
- static const QString warningBorder;
-};
+QString cssWarningBorder();
} // namespace Util

View File

@@ -16,14 +16,16 @@ not afraid of making them work."
HOMEPAGE="http://trojita.flaska.net/"
COPYRIGHT="2006-2017 Trojitá developers"
LICENSE="GNU GPL v2"
REVISION="1"
srcGitRev="5a330ec192c257fcc6b0563cb14be6488f0c9d15"
SOURCE_URI="https://github.com/jktjkt/trojita/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="b3cdd1051238a01beecf956e5ca1a443d14cb566251113dc05a33d7fd6c133ef"
REVISION="2"
srcGitRev="93f73aae1c317698883b37aab5cf94ba1d82753d"
SOURCE_URI="https://github.com/KDE/trojita/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="37eac9f7d333a84eff1a2c834ea8b0ef7242174b59a6a605d8b9b87dd3a26bb0"
SOURCE_DIR="trojita-$srcGitRev"
SOURCE_FILENAME="trojita-$srcGitRev.tar.gz"
ADDITIONAL_FILES="trojita.rdef.in"
PATCHES="trojita-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
@@ -32,7 +34,10 @@ PROVIDES="
"
REQUIRES="
haiku${secondaryArchSuffix}
# cmd:gpgconf$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
# lib:libgpgmepp$secondaryArchSuffix
# lib:libgpg_error$secondaryArchSuffix
lib:libmimetic$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
@@ -50,6 +55,8 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix
# devel:libgpgmepp$secondaryArchSuffix
# devel:libgpg_error$secondaryArchSuffix
devel:libmimetic$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
@@ -67,9 +74,9 @@ BUILD_PREREQUIRES="
cmd:cat
cmd:cmake
cmd:git
# cmd:gpgconf$secondaryArchSuffix
cmd:g++$secondaryArchSuffix
cmd:make
# cmd:gpgmepp$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
# cmd:ragel
cmd:sed
@@ -91,8 +98,9 @@ BUILD()
-DCMAKE_INSTALL_PREFIX:PATH=$appsDir/Trojita \
-DCMAKE_INSTALL_LIBDIR:PATH=$appsDir/Trojita/lib \
-DCMAKE_INSTALL_DATAROOTDIR:PATH=$dataDir/Trojita \
-DWITH_DBUS:BOOL=NO \
-DWITH_SHARED_PLUGINS:BOOL=NO
-DWITH_DBUS:BOOL=OFF \
-DWITH_KF5_GPGMEPP=OFF \
-Wno-dev
make $jobArgs
}
@@ -112,10 +120,13 @@ INSTALL()
rm -rf $dataDir/Trojita/{appdata,applications,icons}
# Add Haiku resources
local APP_SIGNATURE="application/x-vnd.flaska.org-Trojita"
local APP_SIGNATURE="application/x-vnd.trojita"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
# For release
#local MINOR="`echo "$portVersion" | cut -d. -f3`"
# For git version
local MINOR="`echo "$portVersion" | cut -d. -f3 | cut -d~ -f1`"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \