Skip to content

Commit 08f7e95

Browse files
committed
Fixed vcpkg files for most recent vcpkg version.
1 parent ed1abf4 commit 08f7e95

7 files changed

Lines changed: 186 additions & 0 deletions

File tree

Source/vcpkg.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
"vcpkg-configuration": {
66
"overlay-triplets": [
77
"../vcpkg/triplets"
8+
],
9+
"registries": [
10+
{
11+
"kind": "filesystem",
12+
"path": "../vcpkg/registry",
13+
"baseline": "default",
14+
"packages": ["libpqxx"]
15+
}
816
]
917
},
1018
"dependencies": [
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
diff --git a/include/pqxx/internal/header-pre.hxx b/include/pqxx/internal/header-pre.hxx
2+
index 833d583..21b7400 100644
3+
--- a/include/pqxx/internal/header-pre.hxx
4+
+++ b/include/pqxx/internal/header-pre.hxx
5+
@@ -101,6 +101,11 @@
6+
// Workarounds for Microsoft Visual C++
7+
# ifdef _MSC_VER
8+
9+
+// Workarounds for deprecated attribute syntax error in Visual Studio 2017.
10+
+# if _MSC_VER < 1920
11+
+# define PQXX_DEPRECATED(MESSAGE) __declspec(deprecated( #MESSAGE ))
12+
+# endif
13+
+
14+
// Suppress vtables on abstract classes.
15+
# define PQXX_NOVTABLE __declspec(novtable)
16+
17+
@@ -170,6 +175,10 @@
18+
# define PQXX_NOVTABLE /* novtable */
19+
#endif
20+
21+
+#ifndef PQXX_DEPRECATED
22+
+# define PQXX_DEPRECATED(MESSAGE) [[deprecated( #MESSAGE )]]
23+
+#endif
24+
+
25+
// C++20: Assume support.
26+
#if defined(PQXX_HAVE_LIKELY)
27+
# define PQXX_LIKELY [[likely]]
28+
diff --git a/include/pqxx/stream_from.hxx b/include/pqxx/stream_from.hxx
29+
index b275a7f..c63a80f 100644
30+
--- a/include/pqxx/stream_from.hxx
31+
+++ b/include/pqxx/stream_from.hxx
32+
@@ -160,7 +160,7 @@ public:
33+
/** @deprecated Use factories @ref table or @ref raw_table instead.
34+
*/
35+
template<typename Iter>
36+
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
37+
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
38+
transaction_base &, from_table_t, std::string_view table,
39+
Iter columns_begin, Iter columns_end);
40+
41+
@@ -168,13 +168,13 @@ public:
42+
/** @deprecated Use factory function @ref query instead.
43+
*/
44+
template<typename Columns>
45+
- [[deprecated("Use transaction_base::stream() instead.")]] stream_from(
46+
+ PQXX_DEPRECATED("Use transaction_base::stream() instead.") stream_from(
47+
transaction_base &tx, from_table_t, std::string_view table,
48+
Columns const &columns);
49+
50+
#include "pqxx/internal/ignore-deprecated-pre.hxx"
51+
/// @deprecated Use factories @ref table or @ref raw_table instead.
52+
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
53+
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
54+
transaction_base &tx, std::string_view table) :
55+
stream_from{tx, from_table, table}
56+
{}
57+
@@ -182,14 +182,14 @@ public:
58+
59+
/// @deprecated Use factories @ref table or @ref raw_table instead.
60+
template<typename Columns>
61+
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
62+
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
63+
transaction_base &tx, std::string_view table, Columns const &columns) :
64+
stream_from{tx, from_table, table, columns}
65+
{}
66+
67+
/// @deprecated Use factories @ref table or @ref raw_table instead.
68+
template<typename Iter>
69+
- [[deprecated("Use transaction_base::stream instead.")]] stream_from(
70+
+ PQXX_DEPRECATED("Use transaction_base::stream instead.") stream_from(
71+
transaction_base &, std::string_view table, Iter columns_begin,
72+
Iter columns_end);
73+
74+
diff --git a/include/pqxx/stream_to.hxx b/include/pqxx/stream_to.hxx
75+
index 281af28..838003d 100644
76+
--- a/include/pqxx/stream_to.hxx
77+
+++ b/include/pqxx/stream_to.hxx
78+
@@ -248,7 +248,7 @@ public:
79+
* your data fields and the table is explicit in your code, and not hidden
80+
* in an "implicit contract" between your code and your schema.
81+
*/
82+
- [[deprecated("Use table() or raw_table() factory.")]] stream_to(
83+
+ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to(
84+
transaction_base &tx, std::string_view table_name) :
85+
stream_to{tx, table_name, ""sv}
86+
{}
87+
@@ -257,7 +257,7 @@ public:
88+
/** @deprecated Use @ref table or @ref raw_table as a factory.
89+
*/
90+
template<typename Columns>
91+
- [[deprecated("Use table() or raw_table() factory.")]] stream_to(
92+
+ PQXX_DEPRECATED("Use table() or raw_table() factory.") stream_to(
93+
transaction_base &, std::string_view table_name, Columns const &columns);
94+
95+
private:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/libpqxx.pc.in b/libpqxx.pc.in
2+
index eb7dcff4..8de4cdd8 100644
3+
--- a/libpqxx.pc.in
4+
+++ b/libpqxx.pc.in
5+
@@ -6,5 +6,6 @@ includedir=@includedir@
6+
Name: libpqxx
7+
Description: C++ client API for the PostgreSQL database management system.
8+
Version: @VERSION@
9+
+Requires.private: libpq
10+
Libs: -L${libdir} -lpqxx
11+
Cflags: -I${includedir}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
vcpkg_from_github(
2+
OUT_SOURCE_PATH SOURCE_PATH
3+
REPO jtv/libpqxx
4+
REF "${VERSION}"
5+
SHA512 065545fe93bd2f2904f27c891b7ef960b709b7021bbf978e82eeffddd2c7625b7da21a2239987215a0974918ddde5ff400913216a25ac6c590048afc8f309411
6+
HEAD_REF master
7+
PATCHES
8+
fix_build_with_vs2017.patch
9+
pkgconfig.diff
10+
)
11+
12+
vcpkg_cmake_configure(
13+
SOURCE_PATH "${SOURCE_PATH}"
14+
OPTIONS
15+
-DSKIP_BUILD_TEST=ON
16+
)
17+
18+
vcpkg_cmake_install()
19+
vcpkg_copy_pdbs()
20+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libpqxx)
21+
22+
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
23+
# Not module from libpq
24+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
25+
else()
26+
vcpkg_fixup_pkgconfig()
27+
endif()
28+
29+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
30+
31+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "libpqxx",
3+
"version": "7.10.1",
4+
"description": [
5+
"The official* C++ client API for PostgreSQL.",
6+
"*) NB https://pqxx.org/libpqxx/faq/"
7+
],
8+
"homepage": "https://pqxx.org/libpqxx/",
9+
"license": "BSD-3-Clause",
10+
"dependencies": [
11+
{
12+
"name": "libpq",
13+
"default-features": false
14+
},
15+
{
16+
"name": "vcpkg-cmake",
17+
"host": true
18+
},
19+
{
20+
"name": "vcpkg-cmake-config",
21+
"host": true
22+
}
23+
]
24+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"default": {
3+
"libpqxx": {
4+
"baseline": "7.10.1",
5+
"port-version": 0
6+
}
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"version": "7.10.1",
5+
"port-version": 0,
6+
"path": "$/ports/libpqxx/7.10.1_0"
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)