Add package script for mimetic

This commit is contained in:
Simeon Huang 2021-05-18 19:30:26 +01:00 committed by buttaface
parent c17ea7ff1b
commit 22ccd3797c
4 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://www.codesink.org/mimetic_mime_library.html
TERMUX_PKG_DESCRIPTION="A C++ Email library (MIME)"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
TERMUX_PKG_VERSION=0.9.8
TERMUX_PKG_SRCURL=http://www.codesink.org/download/mimetic-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=3a07d68d125f5e132949b078c7275d5eb0078dd649079bd510dd12b969096700

View File

@ -0,0 +1,30 @@
Description: Fix build failure with GCC-11
The failure:
.
mmfile.cxx: In member function bool mimetic::MMFile::map():
mmfile.cxx:60:14: error: ordered comparison of pointer with integer zero (char* and int)
60 | if(m_beg > 0)
| ~~~~~~^~~
.
https://gcc.gnu.org/gcc-11/porting_to.html says:
.
GCC 11 now issues a diagnostic for ordered comparisons of pointers against
constant integers. Commonly this is an ordered comparison against NULL or
0. These should be equality comparisons, not ordered comparisons.
Origin: upstream
Bug-Debian: https://bugs.debian.org/984235
Applied: bf84940f9021950c80846e6b1a5f8b0b55991b00
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2021-04-13
--- a/mimetic/os/mmfile.cxx
+++ b/mimetic/os/mmfile.cxx
@@ -57,7 +57,7 @@
bool MMFile::map()
{
m_beg = (char*) mmap(0, m_st.st_size, PROT_READ, MAP_SHARED,m_fd,0);
- if(m_beg > 0)
+ if(m_beg != MAP_FAILED)
{
m_end = m_beg + m_st.st_size;
#if HAVE_MADVISE

View File

@ -0,0 +1,32 @@
Description: fix FTBFS on architectures where char is unsigned
Fix error
base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
by making Base64::sDecTable a signed char.
Bug-Debian: https://bugs.debian.org/859963
Forwarded: via email
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2021-04-13
Applied: d83e0363e316836d1b8d587f4b89e8e09229abe4 and 2f1bb2b93ecec3167a0aa3410ea4423d5b26320a
--- a/mimetic/codec/base64.cxx
+++ b/mimetic/codec/base64.cxx
@@ -13,7 +13,7 @@
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/=";
-const char Base64::sDecTable[] = {
+const signed char Base64::sDecTable[] = {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--- a/mimetic/codec/base64.h
+++ b/mimetic/codec/base64.h
@@ -20,7 +20,7 @@
enum { default_maxlen = 76 };
enum { eq_sign = 100 };
static const char sEncTable[];
- static const char sDecTable[];
+ static const signed char sDecTable[];
static const int sDecTableSz;
public:
class Encoder; class Decoder;

View File

@ -0,0 +1,11 @@
--- src/Makefile.in 2021-05-18 18:26:27.774977928 +0000
+++ src.mod/Makefile.in 2021-05-18 18:28:31.341028561 +0000
@@ -225,7 +225,7 @@
top_srcdir = @top_srcdir@
MAINTAINERCLEANFILES = Makefile Makefile.in config.cache
EXTRA_DIST = LICENSE m4
-SUBDIRS = mimetic doc examples test win32
+SUBDIRS = mimetic doc
INCLUDES = -I$(top_srcdir)
ACLOCAL_AMFLAGS = -I m4
all: all-recursive