mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[sese] update to 2.3.0 (#41402)
This commit is contained in:
parent
7adc2e4d49
commit
accdd3de6e
@ -1,138 +0,0 @@
|
|||||||
diff --git a/alpine-x64.dockerfile b/alpine-x64.dockerfile
|
|
||||||
index d24c0d661..1e84ea96e 100644
|
|
||||||
--- a/alpine-x64.dockerfile
|
|
||||||
+++ b/alpine-x64.dockerfile
|
|
||||||
@@ -1,27 +1,11 @@
|
|
||||||
FROM amd64/alpine:3.20.1
|
|
||||||
|
|
||||||
-RUN apk add \
|
|
||||||
- samurai \
|
|
||||||
- ninja-build \
|
|
||||||
- autoconf \
|
|
||||||
- automake \
|
|
||||||
- gcc \
|
|
||||||
- g++ \
|
|
||||||
- cmake \
|
|
||||||
- git \
|
|
||||||
- libtool \
|
|
||||||
- libunwind-dev \
|
|
||||||
- gtest-dev \
|
|
||||||
- benchmark-dev \
|
|
||||||
- sqlite-dev \
|
|
||||||
- libpq-dev \
|
|
||||||
- mariadb-connector-c-dev \
|
|
||||||
- asio-dev \
|
|
||||||
- openssl-dev \
|
|
||||||
- libarchive-dev \
|
|
||||||
- python3 \
|
|
||||||
- py3-pip \
|
|
||||||
- doxygen
|
|
||||||
+RUN apk add samurai ninja-build autoconf automake gcc g++ cmake
|
|
||||||
+
|
|
||||||
+RUN apk add libtool libunwind-dev gtest-dev benchmark-dev sqlite-dev libpq-dev mariadb-connector-c-dev \
|
|
||||||
+ asio-dev openssl-dev libarchive-dev python3 py3-pip
|
|
||||||
+
|
|
||||||
+RUN apk add doxygen mariadb-client postgresql-client
|
|
||||||
|
|
||||||
COPY ./requirements.txt /tmp/requirements.txt
|
|
||||||
|
|
||||||
diff --git a/sese/internal/db/impl/sqlite/SqlitePreparedStatementImpl.cpp b/sese/internal/db/impl/sqlite/SqlitePreparedStatementImpl.cpp
|
|
||||||
index 6d085d8eb..64d18fdb3 100644
|
|
||||||
--- a/sese/internal/db/impl/sqlite/SqlitePreparedStatementImpl.cpp
|
|
||||||
+++ b/sese/internal/db/impl/sqlite/SqlitePreparedStatementImpl.cpp
|
|
||||||
@@ -92,6 +92,7 @@ int64_t impl::SqlitePreparedStatementImpl::executeUpdate() noexcept {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool impl::SqlitePreparedStatementImpl::setDouble(uint32_t index, const double &value) noexcept {
|
|
||||||
+ if (index == 0 || index > count) return false;
|
|
||||||
if (this->stmtStatus) sqlite3_reset(stmt);
|
|
||||||
if (this->isManual[index - 1]) {
|
|
||||||
free(this->buffer[index - 1]);
|
|
||||||
@@ -102,6 +103,7 @@ bool impl::SqlitePreparedStatementImpl::setDouble(uint32_t index, const double &
|
|
||||||
}
|
|
||||||
|
|
||||||
bool impl::SqlitePreparedStatementImpl::setFloat(uint32_t index, const float &value) noexcept {
|
|
||||||
+ if (index == 0 || index > count) return false;
|
|
||||||
if (this->stmtStatus) sqlite3_reset(stmt);
|
|
||||||
if (this->isManual[index - 1]) {
|
|
||||||
free(this->buffer[index - 1]);
|
|
||||||
@@ -112,6 +114,7 @@ bool impl::SqlitePreparedStatementImpl::setFloat(uint32_t index, const float &va
|
|
||||||
}
|
|
||||||
|
|
||||||
bool impl::SqlitePreparedStatementImpl::setLong(uint32_t index, const int64_t &value) noexcept {
|
|
||||||
+ if (index == 0 || index > count) return false;
|
|
||||||
if (this->stmtStatus) sqlite3_reset(stmt);
|
|
||||||
if (this->isManual[index - 1]) {
|
|
||||||
free(this->buffer[index - 1]);
|
|
||||||
@@ -122,6 +125,7 @@ bool impl::SqlitePreparedStatementImpl::setLong(uint32_t index, const int64_t &v
|
|
||||||
}
|
|
||||||
|
|
||||||
bool impl::SqlitePreparedStatementImpl::setInteger(uint32_t index, const int32_t &value) noexcept {
|
|
||||||
+ if (index == 0 || index > count) return false;
|
|
||||||
if (this->stmtStatus) sqlite3_reset(stmt);
|
|
||||||
if (this->isManual[index - 1]) {
|
|
||||||
free(this->buffer[index - 1]);
|
|
||||||
@@ -132,6 +136,7 @@ bool impl::SqlitePreparedStatementImpl::setInteger(uint32_t index, const int32_t
|
|
||||||
}
|
|
||||||
|
|
||||||
bool impl::SqlitePreparedStatementImpl::setText(uint32_t index, const char *value) noexcept {
|
|
||||||
+ if (index == 0 || index > count) return false;
|
|
||||||
if (this->stmtStatus) sqlite3_reset(stmt);
|
|
||||||
if (this->isManual[index - 1]) {
|
|
||||||
free(this->buffer[index - 1]);
|
|
||||||
@@ -148,6 +153,7 @@ bool impl::SqlitePreparedStatementImpl::setText(uint32_t index, const char *valu
|
|
||||||
}
|
|
||||||
|
|
||||||
bool impl::SqlitePreparedStatementImpl::setNull(uint32_t index) noexcept {
|
|
||||||
+ if (index == 0 || index > count) return false;
|
|
||||||
if (this->stmtStatus) sqlite3_reset(stmt);
|
|
||||||
if (this->isManual[index - 1]) {
|
|
||||||
free(this->buffer[index - 1]);
|
|
||||||
@@ -158,6 +164,7 @@ bool impl::SqlitePreparedStatementImpl::setNull(uint32_t index) noexcept {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool impl::SqlitePreparedStatementImpl::setDateTime(uint32_t index, const sese::DateTime &value) noexcept {
|
|
||||||
+ if (index == 0 || index > count) return false;
|
|
||||||
if (this->stmtStatus) sqlite3_reset(stmt);
|
|
||||||
this->stmtStatus = false;
|
|
||||||
|
|
||||||
diff --git a/sese/test/TestFormat.cpp b/sese/test/TestFormat.cpp
|
|
||||||
index 515551380..7a6130bfa 100644
|
|
||||||
--- a/sese/test/TestFormat.cpp
|
|
||||||
+++ b/sese/test/TestFormat.cpp
|
|
||||||
@@ -123,16 +123,17 @@ TEST(TestFormat, Number) {
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(TestFormat, Formatter) {
|
|
||||||
- Point point{1, 2};
|
|
||||||
- SESE_INFO(R"(\{{\}123\}ABC\}})", point);
|
|
||||||
- auto datetime = sese::DateTime::now();
|
|
||||||
- SESE_INFO("{} | {HH:mm:ss}", datetime, datetime);
|
|
||||||
- SESE_INFO("{A}", "Hello");
|
|
||||||
+ // Point point{1, 2};
|
|
||||||
+ // SESE_INFO(R"(\{{\}123\}ABC\}})", point);
|
|
||||||
+ // auto datetime = sese::DateTime::now();
|
|
||||||
+ // SESE_INFO("{} | {HH:mm:ss}", datetime, datetime);
|
|
||||||
+ // SESE_INFO("{A}", "Hello");
|
|
||||||
+ SESE_INFO("free buffer[{}] = 0x{:x}", 1, 123456);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(TestFormat, MismatchParam) {
|
|
||||||
SESE_INFO("{}");
|
|
||||||
- SESE_INFO("{}",1, 2);
|
|
||||||
+ SESE_INFO("{}", 1, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(TestFormat, Constexpr) {
|
|
||||||
diff --git a/sese/text/Format.cpp b/sese/text/Format.cpp
|
|
||||||
index 3aa635c2f..a519e246f 100644
|
|
||||||
--- a/sese/text/Format.cpp
|
|
||||||
+++ b/sese/text/Format.cpp
|
|
||||||
@@ -57,6 +57,7 @@ bool sese::text::FmtCtx::parsing(std::string &args) {
|
|
||||||
|
|
||||||
// 无参数直接返回
|
|
||||||
if (*pre_m == '}') {
|
|
||||||
+ pos = pre_m + 1;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
25
ports/sese/001-msvc-pdbs.patch
Normal file
25
ports/sese/001-msvc-pdbs.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 641e9d4ef..51d151149 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -48,6 +48,11 @@ if (EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||||
|
get_git_branch(SESE_REPO_BRANCH ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
+# for vcpkg_copy_pdbs()
|
||||||
|
+if (MSVC AND BUILD_SHARED_LIBS)
|
||||||
|
+ set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} /Zi")
|
||||||
|
+endif ()
|
||||||
|
+
|
||||||
|
if (NOT "${CMAKE_BUILD_TYPE}" MATCHES "Debug")
|
||||||
|
if (MSVC)
|
||||||
|
set(${CMAKE_CXX_FLAGS} "${CMAKE_CXX_FLAGS} /Ox")
|
||||||
|
@@ -62,7 +67,7 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "Re
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
|
||||||
|
# for sanitizer
|
||||||
|
# 0xC0000135 : https://stackoverflow.com/questions/66531482/application-crashes-when-using-address-sanitizer-with-msvc
|
||||||
|
- # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address /fno-sanitize-address-vcasan-lib /Zi /D_DISABLE_VECTOR_ANNOTATION /D_DISABLE_STRING_ANNOTATION")
|
||||||
|
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address /fno-sanitize-address-vcasan-lib /D_DISABLE_VECTOR_ANNOTATION /D_DISABLE_STRING_ANNOTATION")
|
||||||
|
else ()
|
||||||
|
# unittest coverage
|
||||||
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-update=atomic")
|
@ -17,9 +17,9 @@ vcpkg_from_github(
|
|||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO libsese/sese
|
REPO libsese/sese
|
||||||
REF "${VERSION}"
|
REF "${VERSION}"
|
||||||
SHA512 6a87cabe6cbd69ab41de85be27ff397c1ae49f95c11151a27e8b9329afe4ff3b580084be53c129e883be50e13fadccb3b6cc1eed833c44ce4f8457dedc71b758
|
SHA512 a1008c351ea3e8745d629bdcceb4a6d089ae5a84137bbd49b8abbbb271032ddf279e9b20f155181b6a7d3d8cb17c2ec2f1b7a12464fb0cac8402628e473966cb
|
||||||
PATCHES
|
PATCHES
|
||||||
001-fix-fmt-error.patch
|
001-msvc-pdbs.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
@ -40,14 +40,14 @@ vcpkg_cmake_configure(
|
|||||||
|
|
||||||
vcpkg_cmake_install()
|
vcpkg_cmake_install()
|
||||||
|
|
||||||
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sese")
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sese")
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||||
|
|
||||||
remove_empty_directories_recursive("${CURRENT_PACKAGES_DIR}/include/sese")
|
remove_empty_directories_recursive("${CURRENT_PACKAGES_DIR}/include/sese")
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
|
||||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE" "${SOURCE_PATH}/NOTICE")
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE" "${SOURCE_PATH}/NOTICE")
|
||||||
|
|
||||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sese",
|
"name": "sese",
|
||||||
"version": "2.2.0",
|
"version": "2.3.0",
|
||||||
"port-version": 1,
|
|
||||||
"description": "A cross-platform framework for basic components.",
|
"description": "A cross-platform framework for basic components.",
|
||||||
"homepage": "https://github.com/libsese/sese",
|
"homepage": "https://github.com/libsese/sese",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -8229,8 +8229,8 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"sese": {
|
"sese": {
|
||||||
"baseline": "2.2.0",
|
"baseline": "2.3.0",
|
||||||
"port-version": 1
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"sf2cute": {
|
"sf2cute": {
|
||||||
"baseline": "0.2.0",
|
"baseline": "0.2.0",
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
"git-tree": "ac627dbb07263cec40760f87fb1b21d776d324a9",
|
"git-tree": "ac627dbb07263cec40760f87fb1b21d776d324a9",
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"port-version": 1
|
"port-version": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"git-tree": "d2af951334877cf8e111e3da423abfccd941f587",
|
||||||
|
"version": "2.3.0",
|
||||||
|
"port-version": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user