astroid: update to 0.15.

Closes: #15696
This commit is contained in:
Doan Tran Cong Danh 2019-12-07 15:39:14 +07:00 committed by Juan RP
parent 9d122244e9
commit a8dd869de0
3 changed files with 36 additions and 58 deletions

View file

@ -1,53 +0,0 @@
From 03e05bbdae9939cf4716ca2ff47dee75f1f3f57e Mon Sep 17 00:00:00 2001
From: Gaute Hope <eg@gaute.vetsj.com>
Date: Sat, 20 Oct 2018 19:38:01 +0200
Subject: [PATCH] ae: correctly allocate buffer array (-pedantic)
char[n] is technically not allowed in C++, and seems to cause trouble in
this case.
---
.../thread_view/webextension/ae_protocol.cc | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/modes/thread_view/webextension/ae_protocol.cc b/src/modes/thread_view/webextension/ae_protocol.cc
index 735b219b..6687b97b 100644
--- a/src/modes/thread_view/webextension/ae_protocol.cc
+++ b/src/modes/thread_view/webextension/ae_protocol.cc
@@ -59,7 +59,12 @@ namespace Astroid {
s &= ostream->write_all ((char*) &mt, sizeof (mt), written);
/* send message */
- s &= ostream->write_all (o, written);
+ try {
+ s &= ostream->write_all (o, written);
+ } catch (Gio::Error &ex) {
+ LOG (error) << "ae: error: " << ex.what ();
+ throw;
+ }
ostream->flush ();
if (!s) {
@@ -154,8 +159,13 @@ namespace Astroid {
}
/* read message */
- gchar buffer[msg_sz + 1]; buffer[msg_sz] = '\0';
- s = istream->read_all (buffer, msg_sz, read, reader_cancel);
+ gchar * buffer = new gchar[msg_sz];
+ try {
+ s = istream->read_all (buffer, msg_sz, read, reader_cancel);
+ } catch (Gio::Error &ex) {
+ LOG (error) << "ae: error (read): " << ex.code() << ", " << ex.what ();
+ throw;
+ }
if (!s || read != msg_sz) {
LOG (error) << "reader: error while reading message (size: " << msg_sz << ")";
@@ -163,6 +173,7 @@ namespace Astroid {
}
msg_str = std::string (buffer, msg_sz);
+ delete [] buffer;
return mt;
}

View file

@ -0,0 +1,28 @@
--- cmake/FindNotmuch.cmake.orig 2019-12-07 15:36:42.495906856 +0700
+++ cmake/FindNotmuch.cmake 2019-12-07 15:37:24.330785115 +0700
@@ -68,24 +68,4 @@
check_symbol_exists (notmuch_database_index_file notmuch.h Notmuch_INDEX_FILE_API)
# GMime version notmuch was linked against
-include (GetPrerequisites)
-GET_PREREQUISITES(${Notmuch_LIBRARY} _notmuch_prerequisites 0 0 "" "")
-set (Notmuch_GMIME_VERSION "unknown")
-if (_notmuch_prerequisites)
- foreach (_nm_prereq ${_notmuch_prerequisites})
- if (_nm_prereq MATCHES
- "^(.*/)?${CMAKE_SHARED_LIBRARY_PREFIX}gmime[-\\.]([0-9]+\\.[0-9]+)(\\${CMAKE_SHARED_LIBRARY_SUFFIX})?(\\.[0-9]+)(\\${CMAKE_SHARED_LIBRARY_SUFFIX})?$"
- )
- set (Notmuch_GMIME_VERSION "${CMAKE_MATCH_2}${CMAKE_MATCH_4}")
- message (STATUS "Notmuch was built against GMime ${Notmuch_GMIME_VERSION}")
- endif ()
- endforeach (_nm_prereq)
-else()
- message(WARNING "[ FindNotmuch.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
- "Failed to determine libnotmuch prerequisites, please report this as a bug.")
-endif()
-unset (_notmuch_prerequisites)
-if (Notmuch_GMIME_VERSION EQUAL "unknown")
- message(WARNING "[ FindNotmuch.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
- "Failed to determine needed libgmime version number, please report this as a bug.")
-endif ()
+set(Notmuch_GMIME_VERSION "3.0.0")

View file

@ -1,9 +1,9 @@
# Template file for 'astroid'
pkgname=astroid
version=0.14
revision=6
version=0.15
revision=1
build_style=cmake
hostmakedepends="pkg-config scdoc protobuf"
hostmakedepends="pkg-config scdoc protobuf gobject-introspection"
makedepends="libnotmuch-devel gtkmm-devel webkit2gtk-devel libsass-devel
gmime3-devel boost-devel protobuf-devel vte3-devel gobject-introspection
libpeas-devel"
@ -12,5 +12,8 @@ maintainer="Ameise <ameise@bitparlament.de>"
license="GPL-3.0-or-later"
homepage="http://astroidmail.github.io/"
distfiles="https://github.com/astroidmail/astroid/archive/v${version}.tar.gz"
checksum=f2642968919527008d383b4c32d4b038c7b6f785ea084dde1222a65162ebc5ca
patch_args="-p1"
checksum=8581bbdbc71bd00d4cdd473cfad8bc604628bb15616fe5eab5c623461f686c65
if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" qemu-user-static prelink-cross"
fi