diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2021-01-11 16:06:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 00:06:54 -0800 |
| commit | 7959513538066f8d22d54942d098c65c8d0990e1 (patch) | |
| tree | c02685048c3220e1d2b742d34fa3059f3a2ec7b0 /ports/sqlite-orm | |
| parent | 56e1606ea05dc9e51548256d6a4474564e226ffa (diff) | |
| download | vcpkg-7959513538066f8d22d54942d098c65c8d0990e1.tar.gz vcpkg-7959513538066f8d22d54942d098c65c8d0990e1.zip | |
[sqlite-orm] Update to 1.6 (#15517)
* [sqlite-orm] Update to 1.6
* Removed unused FEATURE_PATCHES
* Add vcpkg_fixup_cmake_targets()
* Update patch
Diffstat (limited to 'ports/sqlite-orm')
| -rw-r--r-- | ports/sqlite-orm/CONTROL | 3 | ||||
| -rw-r--r-- | ports/sqlite-orm/fix-build-error.patch | 24 | ||||
| -rw-r--r-- | ports/sqlite-orm/fix-dependency.patch | 10 | ||||
| -rw-r--r-- | ports/sqlite-orm/fix-example-feature.patch | 11 | ||||
| -rw-r--r-- | ports/sqlite-orm/fix-features-build-error.patch | 50 | ||||
| -rw-r--r-- | ports/sqlite-orm/fix-test-feature.patch | 30 | ||||
| -rw-r--r-- | ports/sqlite-orm/fix-usage.patch | 59 | ||||
| -rw-r--r-- | ports/sqlite-orm/portfile.cmake | 21 |
8 files changed, 67 insertions, 141 deletions
diff --git a/ports/sqlite-orm/CONTROL b/ports/sqlite-orm/CONTROL index e5f4bccb0..3ae7f4611 100644 --- a/ports/sqlite-orm/CONTROL +++ b/ports/sqlite-orm/CONTROL @@ -1,6 +1,5 @@ Source: sqlite-orm -Version: 1.5 -Port-Version: 2 +Version: 1.6 Homepage: https://github.com/fnc12/sqlite_orm Build-Depends: sqlite3 Description: SQLite ORM light header only library for modern C++ diff --git a/ports/sqlite-orm/fix-build-error.patch b/ports/sqlite-orm/fix-build-error.patch deleted file mode 100644 index ca4e005d4..000000000 --- a/ports/sqlite-orm/fix-build-error.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5ffbdf3..6debae6 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -39,6 +39,9 @@ set(ProjectName "SqliteOrm")
-
- option(SqliteOrm_BuildTests "Build sqlite_orm unit tests" ON)
-
-+find_package(unofficial-sqlite3 CONFIG REQUIRED)
-+link_libraries(unofficial::sqlite3::sqlite3)
-+
- set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include")
- add_library(sqlite_orm INTERFACE)
-
-@@ -75,7 +78,9 @@ if(SqliteOrm_BuildTests AND BUILD_TESTING)
- add_subdirectory(tests)
- endif()
-
-+if(BUILD_EXAMPLES)
- add_subdirectory(examples)
-+endif()
-
- install(TARGETS sqlite_orm EXPORT "${ProjectName}Targets"
- INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development
diff --git a/ports/sqlite-orm/fix-dependency.patch b/ports/sqlite-orm/fix-dependency.patch new file mode 100644 index 000000000..7372d67fe --- /dev/null +++ b/ports/sqlite-orm/fix-dependency.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/SqliteOrmConfig.cmake.in b/cmake/SqliteOrmConfig.cmake.in +index e0635d2..30403cd 100644 +--- a/cmake/SqliteOrmConfig.cmake.in ++++ b/cmake/SqliteOrmConfig.cmake.in +@@ -1,4 +1,4 @@ + include(CMakeFindDependencyMacro) +-find_dependency(SQLite3) ++find_dependency(unofficial-sqlite3) + + include(${CMAKE_CURRENT_LIST_DIR}/SqliteOrmTargets.cmake) diff --git a/ports/sqlite-orm/fix-example-feature.patch b/ports/sqlite-orm/fix-example-feature.patch deleted file mode 100644 index ad68dade0..000000000 --- a/ports/sqlite-orm/fix-example-feature.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
-index 2857b65..3ee46e6 100644
---- a/examples/CMakeLists.txt
-+++ b/examples/CMakeLists.txt
-@@ -4,5 +4,5 @@ file(GLOB files "*.cpp")
- foreach(file ${files})
- get_filename_component(file_basename ${file} NAME_WE)
- add_executable(${file_basename} ${file})
-- target_link_libraries(${file_basename} PRIVATE sqlite_orm sqlite3)
-+ target_link_libraries(${file_basename} PRIVATE sqlite_orm)
- endforeach()
diff --git a/ports/sqlite-orm/fix-features-build-error.patch b/ports/sqlite-orm/fix-features-build-error.patch new file mode 100644 index 000000000..ce34583d1 --- /dev/null +++ b/ports/sqlite-orm/fix-features-build-error.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd86d2f..6696809 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,15 +32,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + include(CTest) + + ### Dependencies +-add_subdirectory(dependencies) + + ### Main Build Targets + set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include") + add_library(sqlite_orm INTERFACE) + add_library(sqlite_orm::sqlite_orm ALIAS sqlite_orm) + +-find_package(SQLite3 REQUIRED) +-target_link_libraries(sqlite_orm INTERFACE SQLite::SQLite3) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++target_link_libraries(sqlite_orm INTERFACE unofficial::sqlite3::sqlite3) + + target_sources(sqlite_orm INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/sqlite_orm/sqlite_orm.h>) + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 2857b65..3ee46e6 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -4,5 +4,5 @@ file(GLOB files "*.cpp") + foreach(file ${files}) + get_filename_component(file_basename ${file} NAME_WE) + add_executable(${file_basename} ${file}) +- target_link_libraries(${file_basename} PRIVATE sqlite_orm sqlite3) ++ target_link_libraries(${file_basename} PRIVATE sqlite_orm) + endforeach() +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index fd41e70..8087899 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -7,9 +7,11 @@ option(SqliteOrm_SysSqlite "Use system version of sqlite library" OFF) + if(SqliteOrm_SysSqlite) + message(FATAL_ERROR "WIP: please, disable the SqliteOrm_SysSqlite option.") + else() +- add_subdirectory(third_party/sqlite) ++ find_package(unofficial-sqlite3 CONFIG REQUIRED) + endif() + ++find_package(Catch2 CONFIG REQUIRED) ++ + add_executable(unit_tests tests.cpp tests2.cpp tests3.cpp tests4.cpp tests5.cpp private_getters_tests.cpp pragma_tests.cpp explicit_columns.cpp core_functions_tests.cpp index_tests.cpp constraints/composite_key.cpp static_tests.cpp operators/arithmetic_operators.cpp operators/like.cpp operators/glob.cpp operators/in.cpp operators/cast.cpp operators/is_null.cpp operators/not_operator.cpp operators/bitwise.cpp dynamic_order_by.cpp prepared_statement_tests/select.cpp prepared_statement_tests/get_all.cpp prepared_statement_tests/get_all_pointer.cpp prepared_statement_tests/get_all_optional.cpp prepared_statement_tests/update_all.cpp prepared_statement_tests/remove_all.cpp prepared_statement_tests/get.cpp prepared_statement_tests/get_pointer.cpp prepared_statement_tests/get_optional.cpp prepared_statement_tests/update.cpp prepared_statement_tests/remove.cpp prepared_statement_tests/insert.cpp prepared_statement_tests/replace.cpp prepared_statement_tests/insert_range.cpp prepared_statement_tests/replace_range.cpp prepared_statement_tests/insert_explicit.cpp pragma_tests.cpp simple_query.cpp static_tests/is_bindable.cpp static_tests/arithmetic_operators_result_type.cpp static_tests/tuple_conc.cpp static_tests/node_tuple.cpp static_tests/bindable_filter.cpp static_tests/count_tuple.cpp static_tests/member_traits_tests.cpp static_tests/select_return_type.cpp constraints/default.cpp constraints/unique.cpp constraints/foreign_key.cpp constraints/check.cpp table_tests.cpp statement_serializator_tests/primary_key.cpp statement_serializator_tests/column_names.cpp statement_serializator_tests/autoincrement.cpp statement_serializator_tests/arithmetic_operators.cpp statement_serializator_tests/core_functions.cpp statement_serializator_tests/comparison_operators.cpp statement_serializator_tests/unique.cpp statement_serializator_tests/foreign_key.cpp statement_serializator_tests/collate.cpp statement_serializator_tests/check.cpp statement_serializator_tests/index.cpp statement_serializator_tests/indexed_column.cpp unique_cases/get_all_with_two_tables.cpp unique_cases/prepare_get_all_with_case.cpp unique_cases/index_named_table_with_fk.cpp unique_cases/issue525.cpp unique_cases/delete_with_two_fields.cpp unique_cases/join_iterator_ctor_compilation_error.cpp get_all_custom_containers.cpp select_asterisk.cpp backup_tests.cpp transaction_tests.cpp) + + diff --git a/ports/sqlite-orm/fix-test-feature.patch b/ports/sqlite-orm/fix-test-feature.patch deleted file mode 100644 index 2f8259384..000000000 --- a/ports/sqlite-orm/fix-test-feature.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
-index 578cbed..c1c6d56 100644
---- a/tests/CMakeLists.txt
-+++ b/tests/CMakeLists.txt
-@@ -4,11 +4,11 @@ option(SQLITE_ORM_OMITS_CODECVT "Omits codec testing" OFF)
-
- option(SqliteOrm_SysSqlite "Use system version of sqlite library" OFF)
-
--if(SqliteOrm_SysSqlite)
-- message(FATAL_ERROR "WIP: please, disable the SqliteOrm_SysSqlite option.")
--else()
-- add_subdirectory(third_party/sqlite)
--endif()
-+#if(SqliteOrm_SysSqlite)
-+# message(FATAL_ERROR "WIP: please, disable the SqliteOrm_SysSqlite option.")
-+#else()
-+# add_subdirectory(third_party/sqlite)
-+#endif()
-
- add_executable(unit_tests tests.cpp tests2.cpp tests3.cpp tests4.cpp tests4.cpp private_getters_tests.cpp pragma_tests.cpp explicit_columns.cpp core_functions_tests.cpp composite_key.cpp static_tests.cpp operators.cpp operators/like.cpp operators/glob.cpp operators/in.cpp operators/cast.cpp operators/is_null.cpp dynamic_order_by.cpp prepared_statement_tests/select.cpp prepared_statement_tests/get_all.cpp prepared_statement_tests/get_all_pointer.cpp prepared_statement_tests/get_all_optional.cpp prepared_statement_tests/update_all.cpp prepared_statement_tests/remove_all.cpp prepared_statement_tests/get.cpp prepared_statement_tests/get_pointer.cpp prepared_statement_tests/get_optional.cpp prepared_statement_tests/update.cpp prepared_statement_tests/remove.cpp prepared_statement_tests/insert.cpp prepared_statement_tests/replace.cpp prepared_statement_tests/insert_range.cpp prepared_statement_tests/replace_range.cpp prepared_statement_tests/insert_explicit.cpp pragma_tests.cpp simple_query.cpp static_tests/is_bindable.cpp static_tests/arithmetic_operators_result_type.cpp static_tests/tuple_conc.cpp static_tests/node_tuple.cpp static_tests/bindable_filter.cpp static_tests/count_tuple.cpp constraints/default.cpp constraints/foreign_key.cpp)
-
-@@ -19,7 +19,7 @@ if(SQLITE_ORM_OMITS_CODECVT)
- endif()
-
- find_package(Catch2 REQUIRED)
--target_link_libraries(unit_tests PRIVATE sqlite_orm sqlite3 Catch2::Catch2)
-+target_link_libraries(unit_tests PRIVATE sqlite_orm Catch2::Catch2)
-
- enable_testing()
-
diff --git a/ports/sqlite-orm/fix-usage.patch b/ports/sqlite-orm/fix-usage.patch deleted file mode 100644 index 7e90b0edf..000000000 --- a/ports/sqlite-orm/fix-usage.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6debae6..facdc1e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -47,7 +47,7 @@ add_library(sqlite_orm INTERFACE)
-
- target_sources(sqlite_orm INTERFACE
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/sqlite_orm/sqlite_orm.h>
-- $<INSTALL_INTERFACE:include/sqlite_orm/sqlite_orm.h>)
-+ $<INSTALL_INTERFACE:include/sqlite_orm.h>)
-
- target_include_directories(sqlite_orm INTERFACE
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
-@@ -83,11 +83,11 @@ add_subdirectory(examples)
- endif()
-
- install(TARGETS sqlite_orm EXPORT "${ProjectName}Targets"
-- INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development
-- PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development)
-+ INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}"
-+ PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}")
-
- install(FILES "include/sqlite_orm/sqlite_orm.h"
-- DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development)
-+ DESTINATION "${INCLUDE_INSTALL_DIR}")
-
- export(EXPORT "${ProjectName}Targets"
- FILE "${CMAKE_CURRENT_BINARY_DIR}/${ProjectName}/${ProjectName}Targets.cmake"
-diff --git a/build/cmake/GenerateConfigModule.cmake b/build/cmake/GenerateConfigModule.cmake
-index 3c5143d..a49f76a 100644
---- a/build/cmake/GenerateConfigModule.cmake
-+++ b/build/cmake/GenerateConfigModule.cmake
-@@ -1,7 +1,7 @@
- include(CMakePackageConfigHelpers)
-
--set(PACKAGE_INCLUDE_INSTALL_DIR "${includedir}/sqlite_orm")
--set(PACKAGE_CMAKE_INSTALL_DIR "${cmakedir}/sqlite_orm")
-+set(PACKAGE_INCLUDE_INSTALL_DIR "${includedir}")
-+set(PACKAGE_CMAKE_INSTALL_DIR "${cmakedir}")
-
- # In CYGWIN enviroment below commands does not work properly
- if (NOT CYGWIN)
-diff --git a/build/cmake/SqliteOrmConfig.cmake.in b/build/cmake/SqliteOrmConfig.cmake.in
-index a6b6f20..7411aa1 100644
---- a/build/cmake/SqliteOrmConfig.cmake.in
-+++ b/build/cmake/SqliteOrmConfig.cmake.in
-@@ -3,10 +3,10 @@ set(SQLITE_ORM_VERSION ${sqlite_orm_VERSION})
- @PACKAGE_INIT@
-
- set_and_check(SQLITE_ORM_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
--set_and_check(SQLITE_ORM_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@")
-+set_and_check(SQLITE_ORM_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@/../../")
-
- if (NOT TARGET sqlite_orm::sqlite_orm)
-- include("${SQLITE_ORM_CMAKE_DIR}/SqliteOrmTargets.cmake")
-+ include("${SQLITE_ORM_CMAKE_DIR}/share/SqliteOrm/SqliteOrmTargets.cmake")
- endif()
-
- set(SQLITE_ORM_LIBRARIES sqlite_orm::sqlite_orm)
diff --git a/ports/sqlite-orm/portfile.cmake b/ports/sqlite-orm/portfile.cmake index 140ab42c6..e72426449 100644 --- a/ports/sqlite-orm/portfile.cmake +++ b/ports/sqlite-orm/portfile.cmake @@ -2,28 +2,19 @@ set(FEATURE_PATCHES) -if(test IN_LIST FEATURES) - list(APPEND FEATURE_PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-test-feature.patch) -endif() - -if(example IN_LIST FEATURES) - list(APPEND FEATURE_PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-example-feature.patch) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fnc12/sqlite_orm - REF b30ddc6a50dc582c93cd49d8d0cf8f5025ba1d2b # 1.5 - SHA512 faeeef88aef11e89e9565850c23087925fb4d75ef48a16434055f18831db8e230d044c81574d840dacca406d7095cb83a113afc326996e289ab11a02d8caa2f4 + REF 4c6a46bd4dcfba14a650e0fafb86331526878587 # 1.6 + SHA512 9626fc20374aff5da718d32c7b942a7a6434920da9cf68df6146e9c25cca61936c2e3091c6476c369c8bf241dcb8473169ee726eaedfeb92d79ff4fa8a6b2d32 HEAD_REF master PATCHES - fix-build-error.patch - fix-usage.patch - ${FEATURE_PATCHES} + fix-features-build-error.patch + fix-dependency.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - test SqliteOrm_BuildTests + test BUILD_TESTING example BUILD_EXAMPLES ) @@ -36,7 +27,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sqlite_orm TARGET_PATH share/SqliteOrm) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SqliteOrm TARGET_PATH share/SqliteOrm) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) |
