As we discussed in the last meeting, we reset the ports tree and began from scratch, even though this change involves porting all the packages. Starting small and growing gradually, this approach will reduce build times and consequently lower energy consumption in a world affected by climate change. We will add new ports as users needs arise; ok h3artbl33d@
This commit is contained in:
parent
83a0aaf92c
commit
9a3af55370
59377 changed files with 98673 additions and 4712155 deletions
21
databases/mariadb/patches/patch-cmake_libfmt_cmake
Normal file
21
databases/mariadb/patches/patch-cmake_libfmt_cmake
Normal file
|
@ -0,0 +1,21 @@
|
|||
MDEV-31963 cmake: fix libfmt usage
|
||||
|
||||
`fmt::detail::make_arg` does not accept temporaries, so the code snippet
|
||||
checking system libfmt needs to be adjusted.
|
||||
|
||||
f4cec369a392c8a6056207012992ad4a5639965a
|
||||
|
||||
Index: cmake/libfmt.cmake
|
||||
--- cmake/libfmt.cmake.orig
|
||||
+++ cmake/libfmt.cmake
|
||||
@@ -33,8 +33,9 @@ MACRO (CHECK_LIBFMT)
|
||||
#include <fmt/format-inl.h>
|
||||
#include <iostream>
|
||||
int main() {
|
||||
+ int answer= 42;
|
||||
fmt::format_args::format_arg arg=
|
||||
- fmt::detail::make_arg<fmt::format_context>(42);
|
||||
+ fmt::detail::make_arg<fmt::format_context>(answer);
|
||||
std::cout << fmt::vformat(\"The answer is {}.\",
|
||||
fmt::format_args(&arg, 1));
|
||||
}" HAVE_SYSTEM_LIBFMT)
|
|
@ -1,7 +1,7 @@
|
|||
Index: extra/mariabackup/xtrabackup.cc
|
||||
--- extra/mariabackup/xtrabackup.cc.orig
|
||||
+++ extra/mariabackup/xtrabackup.cc
|
||||
@@ -7122,6 +7122,8 @@ static int get_exepath(char *buf, size_t size, const c
|
||||
@@ -7144,6 +7144,8 @@ static int get_exepath(char *buf, size_t size, const c
|
||||
if (sysctl(mib, 4, buf, &size, NULL, 0) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
Provide generous estimates of the sizes of EVP_MD_CTX and EVP_CIPHER_CTX.
|
||||
(In OpenBSD 7.0 amd64 and sparc64 they are 48 and 168, respectively).
|
||||
Also provide EVP_MD_CTX_init and EVP_CIPHER_CTX_init because someone
|
||||
decided it was a good idea to do this.
|
||||
|
||||
Index: include/ssl_compat.h
|
||||
--- include/ssl_compat.h.orig
|
||||
+++ include/ssl_compat.h
|
||||
@@ -62,6 +62,13 @@
|
||||
#endif /* HAVE_OPENSSL11 */
|
||||
#endif
|
||||
|
||||
+#ifdef LIBRESSL_VERSION_NUMBER
|
||||
+#define EVP_MD_CTX_SIZE 64
|
||||
+#define EVP_CIPHER_CTX_SIZE 192
|
||||
+#define EVP_MD_CTX_init(X) do { memset((X), 0, EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
|
||||
+#define EVP_CIPHER_CTX_init(X) do { memset((X), 0, EVP_CIPHER_CTX_SIZE); EVP_CIPHER_CTX_reset(X); } while(0)
|
||||
+#else
|
||||
+
|
||||
#ifdef HAVE_WOLFSSL
|
||||
#define EVP_MD_CTX_SIZE sizeof(wc_Md5)
|
||||
#endif
|
||||
@@ -87,6 +94,7 @@
|
||||
#define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X)
|
||||
#define X509_get0_notBefore(X) X509_get_notBefore(X)
|
||||
#define X509_get0_notAfter(X) X509_get_notAfter(X)
|
||||
+#endif
|
||||
#endif
|
||||
#endif
|
||||
|
98
databases/mariadb/patches/patch-sql_item_strfunc_cc
Normal file
98
databases/mariadb/patches/patch-sql_item_strfunc_cc
Normal file
|
@ -0,0 +1,98 @@
|
|||
[PATCH] MDEV-31963 Fix libfmt usage in SFORMAT
|
||||
|
||||
`fmt::detail::make_arg` does not accept temporaries. Make it happy by
|
||||
storing the format arg values in a temporary array first.
|
||||
|
||||
cd5808eb8da13c5626d4bdeb452cef6ada29cb1d
|
||||
|
||||
Index: sql/item_strfunc.cc
|
||||
--- sql/item_strfunc.cc.orig
|
||||
+++ sql/item_strfunc.cc
|
||||
@@ -1382,11 +1382,24 @@ namespace fmt {
|
||||
*/
|
||||
String *Item_func_sformat::val_str(String *res)
|
||||
{
|
||||
+ /*
|
||||
+ A union that stores a numeric format arg value.
|
||||
+ fmt::detail::make_arg does not accept temporaries, so all of its numeric
|
||||
+ args are temporarily stored in the fmt_args array.
|
||||
+ See: https://github.com/fmtlib/fmt/issues/3596
|
||||
+ */
|
||||
+ union Format_arg_store {
|
||||
+ longlong val_int;
|
||||
+ float val_float;
|
||||
+ double val_double;
|
||||
+ };
|
||||
+
|
||||
DBUG_ASSERT(fixed());
|
||||
- using ctx= fmt::format_context;
|
||||
- String *fmt_arg= NULL;
|
||||
- String *parg= NULL;
|
||||
- fmt::format_args::format_arg *vargs= NULL;
|
||||
+ using ctx= fmt::format_context;
|
||||
+ String *fmt_arg= NULL;
|
||||
+ String *parg= NULL;
|
||||
+ fmt::format_args::format_arg *vargs= NULL;
|
||||
+ Format_arg_store *fmt_args= NULL;
|
||||
|
||||
null_value= true;
|
||||
if (!(fmt_arg= args[0]->val_str(res)))
|
||||
@@ -1395,25 +1408,39 @@ String *Item_func_sformat::val_str(String *res)
|
||||
if (!(vargs= new fmt::format_args::format_arg[arg_count - 1]))
|
||||
return NULL;
|
||||
|
||||
+ if (!(fmt_args= new Format_arg_store[arg_count - 1]))
|
||||
+ {
|
||||
+ delete [] vargs;
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
/* Creates the array of arguments for vformat */
|
||||
for (uint carg= 1; carg < arg_count; carg++)
|
||||
{
|
||||
switch (args[carg]->result_type())
|
||||
{
|
||||
case INT_RESULT:
|
||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_int());
|
||||
+ fmt_args[carg-1].val_int= args[carg]->val_int();
|
||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_int);
|
||||
break;
|
||||
case DECIMAL_RESULT: // TODO
|
||||
case REAL_RESULT:
|
||||
if (args[carg]->field_type() == MYSQL_TYPE_FLOAT)
|
||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>((float)args[carg]->val_real());
|
||||
+ {
|
||||
+ fmt_args[carg-1].val_float= (float)args[carg]->val_real();
|
||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_float);
|
||||
+ }
|
||||
else
|
||||
- vargs[carg-1]= fmt::detail::make_arg<ctx>(args[carg]->val_real());
|
||||
+ {
|
||||
+ fmt_args[carg-1].val_double= args[carg]->val_real();
|
||||
+ vargs[carg-1]= fmt::detail::make_arg<ctx>(fmt_args[carg-1].val_double);
|
||||
+ }
|
||||
break;
|
||||
case STRING_RESULT:
|
||||
if (!(parg= args[carg]->val_str(&val_arg[carg-1])))
|
||||
{
|
||||
delete [] vargs;
|
||||
+ delete [] fmt_args;
|
||||
return NULL;
|
||||
}
|
||||
vargs[carg-1]= fmt::detail::make_arg<ctx>(*parg);
|
||||
@@ -1423,6 +1450,7 @@ String *Item_func_sformat::val_str(String *res)
|
||||
default:
|
||||
DBUG_ASSERT(0);
|
||||
delete [] vargs;
|
||||
+ delete [] fmt_args;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1446,6 +1474,7 @@ String *Item_func_sformat::val_str(String *res)
|
||||
null_value= true;
|
||||
}
|
||||
delete [] vargs;
|
||||
+ delete [] fmt_args;
|
||||
return null_value ? NULL : res;
|
||||
}
|
||||
|
98
databases/mariadb/patches/patch-storage_connect_libdoc_cpp
Normal file
98
databases/mariadb/patches/patch-storage_connect_libdoc_cpp
Normal file
|
@ -0,0 +1,98 @@
|
|||
Unbreak build with libxml >=2.12.0
|
||||
|
||||
Index: storage/connect/libdoc.cpp
|
||||
--- storage/connect/libdoc.cpp.orig
|
||||
+++ storage/connect/libdoc.cpp
|
||||
@@ -93,7 +93,7 @@ class LIBXMLDOC : public XMLDOCUMENT {
|
||||
xmlXPathContextPtr Ctxp;
|
||||
xmlXPathObjectPtr Xop;
|
||||
xmlXPathObjectPtr NlXop;
|
||||
- xmlErrorPtr Xerr;
|
||||
+ const xmlError * Xerr;
|
||||
char *Buf; // Temporary
|
||||
bool Nofreelist;
|
||||
}; // end of class LIBXMLDOC
|
||||
@@ -366,7 +366,7 @@ bool LIBXMLDOC::ParseFile(PGLOBAL g, char *fn)
|
||||
|
||||
return false;
|
||||
} else if ((Xerr = xmlGetLastError()))
|
||||
- xmlResetError(Xerr);
|
||||
+ xmlResetLastError();
|
||||
|
||||
return true;
|
||||
} // end of ParseFile
|
||||
@@ -505,9 +505,9 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn)
|
||||
#if 1
|
||||
// This function does not crash (
|
||||
if (xmlSaveFormatFileEnc((const char *)ofn, Docp, Encoding, 0) < 0) {
|
||||
- xmlErrorPtr err = xmlGetLastError();
|
||||
+ const xmlError * err = xmlGetLastError();
|
||||
strcpy(g->Message, (err) ? err->message : "Error saving XML doc");
|
||||
- xmlResetError(Xerr);
|
||||
+ xmlResetLastError();
|
||||
rc = -1;
|
||||
} // endif Save
|
||||
// rc = xmlDocDump(of, Docp);
|
||||
@@ -547,7 +547,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
|
||||
xmlXPathFreeNodeSet(Nlist);
|
||||
|
||||
if ((Xerr = xmlGetLastError()))
|
||||
- xmlResetError(Xerr);
|
||||
+ xmlResetLastError();
|
||||
|
||||
Nlist = NULL;
|
||||
} // endif Nlist
|
||||
@@ -556,7 +556,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
|
||||
xmlXPathFreeObject(Xop);
|
||||
|
||||
if ((Xerr = xmlGetLastError()))
|
||||
- xmlResetError(Xerr);
|
||||
+ xmlResetLastError();
|
||||
|
||||
Xop = NULL;
|
||||
} // endif Xop
|
||||
@@ -565,7 +565,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
|
||||
xmlXPathFreeObject(NlXop);
|
||||
|
||||
if ((Xerr = xmlGetLastError()))
|
||||
- xmlResetError(Xerr);
|
||||
+ xmlResetLastError();
|
||||
|
||||
NlXop = NULL;
|
||||
} // endif NlXop
|
||||
@@ -574,7 +574,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
|
||||
xmlXPathFreeContext(Ctxp);
|
||||
|
||||
if ((Xerr = xmlGetLastError()))
|
||||
- xmlResetError(Xerr);
|
||||
+ xmlResetLastError();
|
||||
|
||||
Ctxp = NULL;
|
||||
} // endif Ctxp
|
||||
@@ -651,7 +651,7 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNod
|
||||
|
||||
if ((Xerr = xmlGetLastError())) {
|
||||
strcpy(g->Message, Xerr->message);
|
||||
- xmlResetError(Xerr);
|
||||
+ xmlResetLastError();
|
||||
return NULL;
|
||||
} // endif Xerr
|
||||
|
||||
@@ -1079,7 +1079,7 @@ void XML2NODE::AddText(PGLOBAL g, PCSZ txtp)
|
||||
/******************************************************************/
|
||||
void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp)
|
||||
{
|
||||
- xmlErrorPtr xerr;
|
||||
+ const xmlError * xerr;
|
||||
|
||||
if (trace(1))
|
||||
htrc("DeleteChild: node=%p\n", dnp);
|
||||
@@ -1122,7 +1122,7 @@ err:
|
||||
if (trace(1))
|
||||
htrc("DeleteChild: errmsg=%-.256s\n", xerr->message);
|
||||
|
||||
- xmlResetError(xerr);
|
||||
+ xmlResetLastError();
|
||||
} // end of DeleteChild
|
||||
|
||||
/* -------------------- class XML2NODELIST ---------------------- */
|
Loading…
Add table
Add a link
Reference in a new issue