[libpqxx] Upgrade up to 7.6.0 (#19381)

* Add files via upload

* [new port] avro-cpp

* add boost-format

* remove comments

* remove comments

* upgrade libpq up to 7.6.0

* upgrade libpq up to 7.6.0

* upgrade libpq up to 7.6.0

* upgrade libpq up to 7.6.0

* upgrade libpq up to 7.6.0

* Update ports/libpqxx/vcpkg.json

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* Update ports/libpqxx/vcpkg.json

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* fix remarks

* update version files

* fix

Co-authored-by: Alexander Smyslov <aleksandr.smyslov@libertexgroup.com>
Co-authored-by: Smyslov Alexander Nikolayevich <aleksandr.smyslov@fxclub.com>
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
This commit is contained in:
Alexander Smyslov 2021-08-10 09:59:47 +02:00 committed by GitHub
parent 646aa7d8c0
commit 45768239ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 287 deletions

View File

@ -1,6 +0,0 @@
Source: libpqxx
Version: 7.3.1
Port-Version: 1
Homepage: https://github.com/jtv/libpqxx
Description: The official C++ client API for PostgreSQL
Build-Depends: libpq[core]

View File

@ -1,275 +0,0 @@
diff --git a/include/pqxx/binarystring.hxx b/include/pqxx/binarystring.hxx
index 780cd6e..50865d3 100644
--- a/include/pqxx/binarystring.hxx
+++ b/include/pqxx/binarystring.hxx
@@ -65,31 +65,31 @@ public:
using const_iterator = const_pointer;
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
- [[deprecated("Use std::byte for binary data.")]] binarystring(
- binarystring const &) = default;
+ PQXX_DEPRECATED("Use std::byte for binary data.")
+ binarystring(binarystring const &) = default;
/// Read and unescape bytea field.
/** The field will be zero-terminated, even if the original bytea field
* isn't.
* @param F the field to read; must be a bytea field
*/
- [[deprecated("Use std::byte for binary data.")]] explicit binarystring(
- field const &);
+ PQXX_DEPRECATED("Use std::byte for binary data.")
+ explicit binarystring(field const &);
/// Copy binary data from std::string_view on binary data.
/** This is inefficient in that it copies the data to a buffer allocated on
* the heap.
*/
- [[deprecated("Use std::byte for binary data.")]] explicit binarystring(
- std::string_view);
+ PQXX_DEPRECATED("Use std::byte for binary data.")
+ explicit binarystring(std::string_view);
/// Copy binary data of given length straight out of memory.
- [[deprecated("Use std::byte for binary data.")]] binarystring(
- void const *, std::size_t);
+ PQXX_DEPRECATED("Use std::byte for binary data.")
+ binarystring(void const *, std::size_t);
/// Efficiently wrap a buffer of binary data in a @c binarystring.
- [[deprecated("Use std::byte for binary data.")]] binarystring(
- std::shared_ptr<value_type> ptr, size_type size) :
+ PQXX_DEPRECATED("Use std::byte for binary data.")
+ binarystring(std::shared_ptr<value_type> ptr, size_type size) :
m_buf{std::move(ptr)}, m_size{size}
{}
diff --git a/include/pqxx/compiler-public.hxx b/include/pqxx/compiler-public.hxx
index 08d7ac9..8f01755 100644
--- a/include/pqxx/compiler-public.hxx
+++ b/include/pqxx/compiler-public.hxx
@@ -43,6 +43,11 @@
// Workarounds for Microsoft Visual C++
# ifdef _MSC_VER
+// Workarounds for deprecated attribute syntax error in Visual Studio 2017.
+# if _MSC_VER < 1920
+# define PQXX_DEPRECATED(MESSAGE) __declspec(deprecated(# MESSAGE))
+# endif
+
// Suppress vtables on abstract classes.
# define PQXX_NOVTABLE __declspec(novtable)
@@ -112,4 +117,8 @@
# define PQXX_NOVTABLE
#endif
+#ifndef PQXX_DEPRECATED
+# define PQXX_DEPRECATED(MESSAGE) [[deprecated(# MESSAGE)]]
+#endif
+
#endif
diff --git a/include/pqxx/largeobject.hxx b/include/pqxx/largeobject.hxx
index 072a490..40ab51b 100644
--- a/include/pqxx/largeobject.hxx
+++ b/include/pqxx/largeobject.hxx
@@ -36,20 +36,20 @@ public:
/// Refer to a nonexistent large object (similar to what a null pointer
/// does).
- [[deprecated("Use blob instead.")]] largeobject() noexcept = default;
+ PQXX_DEPRECATED("Use blob instead.") largeobject() noexcept = default;
/// Create new large object.
/** @param t Backend transaction in which the object is to be created.
*/
- [[deprecated("Use blob instead.")]] explicit largeobject(dbtransaction &t);
+ PQXX_DEPRECATED("Use blob instead.") explicit largeobject(dbtransaction &t);
/// Wrap object with given oid.
/** Convert combination of a transaction and object identifier into a
* large object identity. Does not affect the database.
* @param o Object identifier for the given object.
*/
- [[deprecated("Use blob instead.")]] explicit largeobject(oid o) noexcept :
- m_id{o}
+ PQXX_DEPRECATED("Use blob instead.")
+ explicit largeobject(oid o) noexcept : m_id{o}
{}
/// Import large object from a local file.
@@ -57,16 +57,16 @@ public:
* @param t Backend transaction in which the large object is to be created.
* @param file A filename on the client program's filesystem.
*/
- [[deprecated("Use blob instead.")]] largeobject(
- dbtransaction &t, std::string_view file);
+ PQXX_DEPRECATED("Use blob instead.")
+ largeobject(dbtransaction &t, std::string_view file);
/// Take identity of an opened large object.
/** Copy identity of already opened large object. Note that this may be done
* as an implicit conversion.
* @param o Already opened large object to copy identity from.
*/
- [[deprecated("Use blob instead.")]] largeobject(
- largeobjectaccess const &o) noexcept;
+ PQXX_DEPRECATED("Use blob instead.")
+ largeobject(largeobjectaccess const &o) noexcept;
/// Object identifier.
/** The number returned by this function identifies the large object in the
@@ -179,8 +179,8 @@ public:
* @param mode Access mode, defaults to ios_base::in | ios_base::out |
* ios_base::binary.
*/
- [[deprecated("Use blob instead.")]] explicit largeobjectaccess(
- dbtransaction &t, openmode mode = default_mode);
+ PQXX_DEPRECATED("Use blob instead.")
+ explicit largeobjectaccess(dbtransaction &t, openmode mode = default_mode);
/// Open large object with given oid.
/** Convert combination of a transaction and object identifier into a
@@ -190,8 +190,8 @@ public:
* @param mode Access mode, defaults to ios_base::in | ios_base::out |
* ios_base::binary.
*/
- [[deprecated("Use blob instead.")]] largeobjectaccess(
- dbtransaction &t, oid o, openmode mode = default_mode);
+ PQXX_DEPRECATED("Use blob instead.")
+ largeobjectaccess(dbtransaction &t, oid o, openmode mode = default_mode);
/// Open given large object.
/** Open a large object with the given identity for reading and/or writing.
@@ -200,7 +200,8 @@ public:
* @param mode Access mode, defaults to ios_base::in | ios_base::out |
* ios_base::binary.
*/
- [[deprecated("Use blob instead.")]] largeobjectaccess(
+ PQXX_DEPRECATED("Use blob instead.")
+ largeobjectaccess(
dbtransaction &t, largeobject o, openmode mode = default_mode);
/// Import large object from a local file and open it.
@@ -209,7 +210,8 @@ public:
* @param file A filename on the client program's filesystem.
* @param mode Access mode, defaults to ios_base::in | ios_base::out.
*/
- [[deprecated("Use blob instead.")]] largeobjectaccess(
+ PQXX_DEPRECATED("Use blob instead.")
+ largeobjectaccess(
dbtransaction &t, std::string_view file, openmode mode = default_mode);
~largeobjectaccess() noexcept { close(); }
@@ -386,7 +388,8 @@ public:
static constexpr auto default_mode{
std::ios::in | std::ios::out | std::ios::binary};
- [[deprecated("Use blob instead.")]] largeobject_streambuf(
+ PQXX_DEPRECATED("Use blob instead.")
+ largeobject_streambuf(
dbtransaction &t, largeobject o, openmode mode = default_mode,
size_type buf_size = 512) :
m_bufsize{buf_size}, m_obj{t, o, mode}, m_g{nullptr}, m_p{nullptr}
@@ -394,7 +397,8 @@ public:
initialize(mode);
}
- [[deprecated("Use blob instead.")]] largeobject_streambuf(
+ PQXX_DEPRECATED("Use blob instead.")
+ largeobject_streambuf(
dbtransaction &t, oid o, openmode mode = default_mode,
size_type buf_size = 512) :
m_bufsize{buf_size}, m_obj{t, o, mode}, m_g{nullptr}, m_p{nullptr}
@@ -556,7 +560,8 @@ public:
* @param o Large object to access.
* @param buf_size Size of buffer to use internally (optional).
*/
- [[deprecated("Use blob instead.")]] basic_ilostream(
+ PQXX_DEPRECATED("Use blob instead.")
+ basic_ilostream(
dbtransaction &t, largeobject o, largeobject::size_type buf_size = 512) :
super{nullptr},
m_buf{t, o, std::ios::in | std::ios::binary, buf_size}
@@ -570,7 +575,8 @@ public:
* @param o Identifier of a large object to access.
* @param buf_size Size of buffer to use internally (optional).
*/
- [[deprecated("Use blob instead.")]] basic_ilostream(
+ PQXX_DEPRECATED("Use blob instead.")
+ basic_ilostream(
dbtransaction &t, oid o, largeobject::size_type buf_size = 512) :
super{nullptr},
m_buf{t, o, std::ios::in | std::ios::binary, buf_size}
@@ -612,7 +618,8 @@ public:
* @param o a large object to access.
* @param buf_size size of buffer to use internally (optional).
*/
- [[deprecated("Use blob instead.")]] basic_olostream(
+ PQXX_DEPRECATED("Use blob instead.")
+ basic_olostream(
dbtransaction &t, largeobject o, largeobject::size_type buf_size = 512) :
super{nullptr},
m_buf{t, o, std::ios::out | std::ios::binary, buf_size}
@@ -626,7 +633,8 @@ public:
* @param o a large object to access.
* @param buf_size size of buffer to use internally (optional).
*/
- [[deprecated("Use blob instead.")]] basic_olostream(
+ PQXX_DEPRECATED("Use blob instead.")
+ basic_olostream(
dbtransaction &t, oid o, largeobject::size_type buf_size = 512) :
super{nullptr},
m_buf{t, o, std::ios::out | std::ios::binary, buf_size}
@@ -682,7 +690,8 @@ public:
* @param o Large object to access.
* @param buf_size Size of buffer to use internally (optional).
*/
- [[deprecated("Use blob instead.")]] basic_lostream(
+ PQXX_DEPRECATED("Use blob instead.")
+ basic_lostream(
dbtransaction &t, largeobject o, largeobject::size_type buf_size = 512) :
super{nullptr},
m_buf{
@@ -697,7 +706,8 @@ public:
* @param o Large object to access.
* @param buf_size Size of buffer to use internally (optional).
*/
- [[deprecated("Use blob instead.")]] basic_lostream(
+ PQXX_DEPRECATED("Use blob instead.")
+ basic_lostream(
dbtransaction &t, oid o, largeobject::size_type buf_size = 512) :
super{nullptr},
m_buf{
diff --git a/include/pqxx/stream_from.hxx b/include/pqxx/stream_from.hxx
index 7d05966..2e484bb 100644
--- a/include/pqxx/stream_from.hxx
+++ b/include/pqxx/stream_from.hxx
@@ -128,21 +128,23 @@ public:
Columns const &columns);
/// @deprecated Use the @c from_table_t overload instead.
- [[deprecated("Use the from_table_t overload instead.")]] stream_from(
- transaction_base &tx, std::string_view table) :
+ PQXX_DEPRECATED("Use the from_table_t overload instead.")
+ stream_from(transaction_base &tx, std::string_view table) :
stream_from{tx, from_table, table}
{}
/// @deprecated Use the @c from_table_t overload instead.
template<typename Columns>
- [[deprecated("Use the from_table_t overload instead.")]] stream_from(
+ PQXX_DEPRECATED("Use the from_table_t overload instead.")
+ stream_from(
transaction_base &tx, std::string_view table, Columns const &columns) :
stream_from{tx, from_table, table, columns}
{}
/// @deprecated Use the @c from_table_t overload instead.
template<typename Iter>
- [[deprecated("Use the from_table_t overload instead.")]] stream_from(
+ PQXX_DEPRECATED("Use the from_table_t overload instead.")
+ stream_from(
transaction_base &, std::string_view table, Iter columns_begin,
Iter columns_end);
//@}

View File

@ -1,11 +1,11 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jtv/libpqxx
REF 9e55cea0116febb5c536ed18ede9a7b2c647e631 # 7.3.1
SHA512 22da46c1c4ef798e7aa2db4f5094f8d4c3a965d755ae72a1cfae6282264c0d974317849f8db0bf34ff6aebd1ede5e5086cf74bff8bc3c6a21b3149a94d30c04f
REF 221ddc8be329bafb376a3d83b9cd257fd52fc7b7 # 7.6.0
SHA512 32a673bbae2f26fbc41bdcba007d9a5ded29680cb49ba434d1913cd5007bc1c1443bf38c88d9c5a6abe0a3ee519c0f691464c8d2b144cd3f16652447d644e400
HEAD_REF master
PATCHES
fix-build-with-vs2017.patch #https://github.com/jtv/libpqxx/pull/406
#PATCHES
# fix-build-with-vs2017.patch #https://github.com/jtv/libpqxx/pull/406
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in DESTINATION ${SOURCE_PATH})

9
ports/libpqxx/vcpkg.json Normal file
View File

@ -0,0 +1,9 @@
{
"name": "libpqxx",
"version-semver": "7.6.0",
"description": "The official C++ client API for PostgreSQL",
"homepage": "https://www.postgresql.org/",
"dependencies": [
"libpq"
]
}

View File

@ -3521,8 +3521,8 @@
"port-version": 18
},
"libpqxx": {
"baseline": "7.3.1",
"port-version": 1
"baseline": "7.6.0",
"port-version": 0
},
"libprotobuf-mutator": {
"baseline": "1.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bbbc587d55d5d1ee059e417b045dfc82ca4897c2",
"version-semver": "7.6.0",
"port-version": 0
},
{
"git-tree": "ac2255ecfdb7a6d5b6307413f181117d005a4989",
"version-string": "7.3.1",