diff --git a/mimetic-0.9.8-signedness-fix.patch b/mimetic-0.9.8-signedness-fix.patch new file mode 100644 index 0000000..e5fc95a --- /dev/null +++ b/mimetic-0.9.8-signedness-fix.patch @@ -0,0 +1,31 @@ +* Signedness fix for 0.9.8 version (denis@fateyev.com) +--- a/mimetic/codec/base64.cxx 2016-03-03 07:05:58.587129195 +0600 ++++ b/mimetic/codec/base64.cxx 2016-03-03 07:06:32.213128743 +0600 +@@ -8,12 +8,12 @@ + + using namespace mimetic; + +-const char Base64::sEncTable[] = ++const signed char Base64::sEncTable[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "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 2016-03-03 07:13:26.405123140 +0600 ++++ b/mimetic/codec/base64.h 2016-03-03 07:14:34.629121732 +0600 +@@ -19,8 +19,8 @@ + enum { LF = 0xA, CR = 0xD, NL = '\n' }; + enum { default_maxlen = 76 }; + enum { eq_sign = 100 }; +- static const char sEncTable[]; +- static const char sDecTable[]; ++ static const signed char sEncTable[]; ++ static const signed char sDecTable[]; + static const int sDecTableSz; + public: + class Encoder; class Decoder; diff --git a/mimetic-0.9.8.tar.gz b/mimetic-0.9.8.tar.gz new file mode 100644 index 0000000..d89e197 Binary files /dev/null and b/mimetic-0.9.8.tar.gz differ diff --git a/mimetic-gcc11.patch b/mimetic-gcc11.patch new file mode 100644 index 0000000..643d749 --- /dev/null +++ b/mimetic-gcc11.patch @@ -0,0 +1,13 @@ +diff --git a/mimetic/os/mmfile.cxx b/mimetic/os/mmfile.cxx +index dfc95b7..3e54a53 100644 +--- a/mimetic/os/mmfile.cxx ++++ b/mimetic/os/mmfile.cxx +@@ -57,7 +57,7 @@ bool MMFile::open(int mode) + 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 != 0) + { + m_end = m_beg + m_st.st_size; + #if HAVE_MADVISE diff --git a/mimetic.spec b/mimetic.spec new file mode 100644 index 0000000..6689165 --- /dev/null +++ b/mimetic.spec @@ -0,0 +1,71 @@ +Name: mimetic +Version: 0.9.8 +Release: 1 +Summary: A full featured C++ MIME library +License: MIT +URL: http://www.codesink.org/mimetic_mime_library.html + +Source0: http://www.codesink.org/download/mimetic-%{version}.tar.gz +Patch0: mimetic-%{version}-signedness-fix.patch +Patch1: mimetic-gcc11.patch + +BuildRequires: gcc-c++ +BuildRequires: doxygen +BuildRequires: findutils +BuildRequires: make + +%description +mimetic is an Email library (MIME) written in C++ designed to be easy to use +and integrate but yet fast and efficient. + +It has been built around the standard lib. This means that you'll not find yet +another string class or list implementation and that you'll feel comfortable +in using this library from the very first time. + +Most classes functionalities and behavior will be clear if you ever studied +MIME and its components; if you don't know anything about Internet messages +you'll probably want to read some RFCs to understand the topic and, therefore, +easily use the library whose names, whenever possible, overlap terms adopted +in the standard RFC documents. At the very least: RFC 822, RFC 2045 and RFC +2046. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%configure --disable-static +make %{?_smp_mflags} +make docs -C doc + +%install +%make_install +find %{buildroot} -name '*.*a' -delete -print + +%check +make check + +%ldconfig_scriptlets + +%files +%license COPYING LICENSE +%doc AUTHORS ChangeLog README +%{_libdir}/libmimetic.so.* + +%files devel +%doc doc/html/* +%{_includedir}/mimetic/ +%{_libdir}/libmimetic.so + +%changelog +* Mon Jul 25 2022 loong_C - 0.9.8-1 +- Initial Package.