diff --git a/ports/sqlite-orm/CONTROL b/ports/sqlite-orm/CONTROL index c86beeb3d9..b0735d1de7 100644 --- a/ports/sqlite-orm/CONTROL +++ b/ports/sqlite-orm/CONTROL @@ -1,4 +1,6 @@ Source: sqlite-orm Version: 1.5 +Port-Version: 1 +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/disable-examples.patch b/ports/sqlite-orm/disable-examples.patch new file mode 100644 index 0000000000..61d8320163 --- /dev/null +++ b/ports/sqlite-orm/disable-examples.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ffbdf3..ba22109 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,7 +75,7 @@ if(SqliteOrm_BuildTests AND BUILD_TESTING) + add_subdirectory(tests) + endif() + +-add_subdirectory(examples) ++#add_subdirectory(examples) + + install(TARGETS sqlite_orm EXPORT "${ProjectName}Targets" + INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development diff --git a/ports/sqlite-orm/fix-includes-not-found.patch b/ports/sqlite-orm/fix-includes-not-found.patch new file mode 100644 index 0000000000..42ee7672c7 --- /dev/null +++ b/ports/sqlite-orm/fix-includes-not-found.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ffbdf3..a6b2659 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,11 +43,11 @@ set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include") + add_library(sqlite_orm INTERFACE) + + target_sources(sqlite_orm INTERFACE +- $ ++ $ + $) + + target_include_directories(sqlite_orm INTERFACE +- $ ++ $ + $) + + include(ucm) diff --git a/ports/sqlite-orm/portfile.cmake b/ports/sqlite-orm/portfile.cmake index 3b93af0b84..83dcfa9234 100644 --- a/ports/sqlite-orm/portfile.cmake +++ b/ports/sqlite-orm/portfile.cmake @@ -1,15 +1,30 @@ -include(vcpkg_common_functions) +# header-only library vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fnc12/sqlite_orm - REF e8a9e9416f421303f4b8970caab26dadf8bae98b # v1.5 - SHA512 9774345e0209482a137e5f3058e2f27db55ea72fd08c44e67c0989df8927fee896cb789dcb2cd21167689c2f2be1c126bd730a6ea1083a48e6dd58fb048c6f5e + REF b30ddc6a50dc582c93cd49d8d0cf8f5025ba1d2b # 1.5 + SHA512 faeeef88aef11e89e9565850c23087925fb4d75ef48a16434055f18831db8e230d044c81574d840dacca406d7095cb83a113afc326996e289ab11a02d8caa2f4 HEAD_REF master + PATCHES + fix-includes-not-found.patch + disable-examples.patch ) -file(COPY ${SOURCE_PATH}/include/sqlite_orm DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSQLITE_ORM_ENABLE_CXX_17=OFF + -DSqliteOrm_BuildTests=OFF + -DBUILD_TESTING=OFF +) -file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-orm RENAME copyright) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sqlite_orm TARGET_PATH share/SqliteOrm) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file