Browse Source

mu: Fix i686 build error

master
Fredrik Fornwall 5 years ago
parent
commit
38b498a497
  1. 1
      packages/mu/build.sh
  2. 22
      packages/mu/lib-mu-store.cc.patch

1
packages/mu/build.sh

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.djcbsoftware.nl/code/mu/
TERMUX_PKG_DESCRIPTION="Maildir indexer/searcher and Emacs client (mu4e)"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=1.4.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/djcb/mu/releases/download/$TERMUX_PKG_VERSION/mu-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=f819db50a21eb200f015ff3486e9bb9db51e0a616aa9dd257b6654512c7c782a
TERMUX_PKG_DEPENDS="glib, libc++, libxapian, libgmime"

22
packages/mu/lib-mu-store.cc.patch

@ -0,0 +1,22 @@
Fix for error in i686 build:
/home/builder/.termux-build/mu/src/lib/mu-store.cc:107:26: error: non-constant-expression cannot be narrowed from type 'long long' to 'time_t' (aka 'long') in initializer list [-Wc++11-narrowing]
created_{atoll(db()->get_metadata(CreatedKey).c_str())},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/.termux-build/mu/src/lib/mu-store.cc:107:26: note: insert an explicit cast to silence this issue
created_{atoll(db()->get_metadata(CreatedKey).c_str())},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<time_t>( )
diff -u -r ../mu-1.4.3/lib/mu-store.cc ./lib/mu-store.cc
--- ../mu-1.4.3/lib/mu-store.cc 2020-03-05 20:40:06.000000000 +0000
+++ ./lib/mu-store.cc 2020-04-29 12:10:46.086507000 +0000
@@ -104,7 +104,7 @@
std::make_shared<Xapian::Database>(db_path_) :
std::make_shared<Xapian::WritableDatabase>(db_path_, Xapian::DB_OPEN)},
root_maildir_{db()->get_metadata(RootMaildirKey)},
- created_{atoll(db()->get_metadata(CreatedKey).c_str())},
+ created_{static_cast<time_t>(atoll(db()->get_metadata(CreatedKey).c_str()))},
schema_version_{db()->get_metadata(SchemaVersionKey)},
personal_addresses_{Mu::split(db()->get_metadata(PersonalAddressesKey),",")},
contacts_{db()->get_metadata(ContactsKey)} {
Loading…
Cancel
Save