diff --git a/ports/oatpp-consul/CONTROL b/ports/oatpp-consul/CONTROL new file mode 100644 index 000000000..d6722dcbe --- /dev/null +++ b/ports/oatpp-consul/CONTROL @@ -0,0 +1,4 @@ +Source: oatpp-consul +Version: 1.0.0 +Description: OAT++ Modern web framework consul module +Build-Depends: oatpp diff --git a/ports/oatpp-consul/portfile.cmake b/ports/oatpp-consul/portfile.cmake new file mode 100644 index 000000000..f7568990c --- /dev/null +++ b/ports/oatpp-consul/portfile.cmake @@ -0,0 +1,32 @@ +set(OATPP_VERSION "1.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-consul + REF 4fb420fdf9286f0e0f8d2a1dbd30a56024f10529 # 1.0.0 + SHA512 fa26ed7b12ed1cc6bf0a969628b4e70a911bfba76562a6c7406a13875dae88f5125349107e3278362441b518d556ac75c926994b21f93e02e2decc80883e3bfa + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-consul-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-curl/CONTROL b/ports/oatpp-curl/CONTROL new file mode 100644 index 000000000..1b80b3883 --- /dev/null +++ b/ports/oatpp-curl/CONTROL @@ -0,0 +1,4 @@ +Source: oatpp-curl +Version: 1.0.0 +Description: Oat++ Modern web framework curl module to use libcurl as a RequestExecutor on the oatpp's ApiClient +Build-Depends: curl,oatpp diff --git a/ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch b/ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch new file mode 100644 index 000000000..75fe7af36 --- /dev/null +++ b/ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 477064a..5da99e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,8 +95,26 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + ############################## + ## Find libcurl dependency + +-include(FindPkgConfig) +-pkg_check_modules(PKG_CURL REQUIRED libcurl) ++if (VCPKG_TOOLCHAIN) ++ find_package(CURL REQUIRED) ++ if (CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$") ++ get_filename_component(PKG_CURL_LIBRARIES ${CURL_LIBRARY_DEBUG} NAME) ++ get_filename_component(PKG_CURL_LIBRARY_DIR ${CURL_LIBRARY_DEBUG} DIRECTORY) ++ else() ++ get_filename_component(PKG_CURL_LIBRARIES ${CURL_LIBRARY_RELEASE} NAME) ++ get_filename_component(PKG_CURL_LIBRARY_DIR ${CURL_LIBRARY_RELEASE} DIRECTORY) ++ endif() ++ if (PKG_CURL_LIBRARIES MATCHES [[^.*\.a$]]) ++ string(LENGTH ${PKG_CURL_LIBRARIES} _LEN) ++ math(EXPR _LEN "${_LEN} - 5") ++ string(SUBSTRING ${PKG_CURL_LIBRARIES} 3 ${_LEN} PKG_CURL_LIBRARIES) ++ endif() ++ set(PKG_CURL_VERSION ${CURL_VERSION}) ++ set(PKG_CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS}) ++else() ++ include(FindPkgConfig) ++ pkg_check_modules(PKG_CURL REQUIRED libcurl) ++endif() + + message("[libcurl] libcurl found:") + message("[libcurl] LIBRARIES=${PKG_CURL_LIBRARIES}") diff --git a/ports/oatpp-curl/portfile.cmake b/ports/oatpp-curl/portfile.cmake new file mode 100644 index 000000000..0e2388fa2 --- /dev/null +++ b/ports/oatpp-curl/portfile.cmake @@ -0,0 +1,33 @@ +set(OATPP_VERSION "1.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-curl + REF 03a3f336be70c71d0547489aa0ed50206f46dcf8 # 1.0.0 + SHA512 799cbddeb6e9d90eb43911845dd33ee272c4e86c86a07bb710ceb8c0e1722cda15412fdca10c4228a77f38e3b9e3d5d5248c8cd4366cbb9c369db4a830e29496 + HEAD_REF master + PATCHES "curl-submodule-no-pkg-config-in-vcpkg.patch" +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-curl-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-libressl/CONTROL b/ports/oatpp-libressl/CONTROL new file mode 100644 index 000000000..dd867ff36 --- /dev/null +++ b/ports/oatpp-libressl/CONTROL @@ -0,0 +1,4 @@ +Source: oatpp-libressl +Version: 1.0.0 +Build-Depends: libressl, oatpp +Description: Oat++ libressl module providing secure server and client connection providers diff --git a/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch b/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch new file mode 100644 index 000000000..62644beda --- /dev/null +++ b/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch @@ -0,0 +1,63 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4663a65..b91077a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,19 +95,25 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + ############################## + ## Find Libressl dependency + +-include(FindPkgConfig) +-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/module") +- +-find_package(LibreSSL 3.0.0 REQUIRED) +- +-message("LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}") +-message("LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}") +-message("LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}") +-message("LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}") +-message("LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}") +-message("LIBRESSL_VERSION=${LIBRESSL_VERSION}") +- +-message("\n############################################################################\n") ++find_file(LIBRESSL_INCLUDE_DIR tls.h) ++if (NOT LIBRESSL_INCLUDE_DIR) ++ find_file(_OPENSSL_SSL_INCLUDE_FILE openssl/ssl.h) ++ if (NOT _OPENSSL_SSL_INCLUDE_FILE) ++ message(FATAL_ERROR "LibreSSL and OpenSSL not found. LibreSSL must be installed.") ++ else() ++ message(FATAL_ERROR "OpenSSL installed instead of LibreSSL. oatpp-libressl requires LibreSSL.") ++ endif() ++endif() ++get_filename_component(LIBRESSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR} DIRECTORY) ++find_library(LIBRESSL_TLS_LIBRARY NAMES tls tls-21 tls-20 tls-19) ++find_library(LIBRESSL_SSL_LIBRARY NAMES ssl ssl-49 ssl-48 ssl-47) ++find_library(LIBRESSL_CRYPTO_LIBRARY NAMES crypto crypto-47 crypto-46 crypto-45) ++find_library(LIBRESSL_LIBRARIES "${LIBRESSL_CRYPTO_LIBRARY};${LIBRESSL_SSL_LIBRARY};${LIBRESSL_TLS_LIBRARY}") ++message(STATUS "LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}") ++message(STATUS "LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}") ++message(STATUS "LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}") ++message(STATUS "LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}") ++message(STATUS "LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}") + + ################################################################################################### + ## define targets +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ace3b13..489fbb1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -30,10 +30,12 @@ target_include_directories(${OATPP_THIS_MODULE_NAME} + PUBLIC $ + ) + ++target_include_directories(${OATPP_THIS_MODULE_NAME} ++ SYSTEM PRIVATE "${LIBRESSL_INCLUDE_DIR}" ++) ++ + target_link_libraries(${OATPP_THIS_MODULE_NAME} +- PUBLIC LibreSSL::TLS +- PUBLIC LibreSSL::SSL +- PUBLIC LibreSSL::Crypto ++ PUBLIC "${LIBRESSL_TLS_LIBRARY}" "${LIBRESSL_SSL_LIBRARY}" "${LIBRESSL_CRYPTO_LIBRARY}" + ) + + ####################################################################################################### diff --git a/ports/oatpp-libressl/portfile.cmake b/ports/oatpp-libressl/portfile.cmake new file mode 100644 index 000000000..14bb9f5e2 --- /dev/null +++ b/ports/oatpp-libressl/portfile.cmake @@ -0,0 +1,36 @@ +set(OATPP_VERSION "1.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# get the source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-libressl + REF 2cf02b6fd08bb9be29bdbe5188f35f2155c0c843 # 1.0.0 + SHA512 053d017690d318edeeda63f782ee4845280b0f405e02249b18c30ac3d88cbfb1d3090bb6b60c0c8742f73357d60fa1695c369bef56a5ab7985d9773ea1fd52a2 + HEAD_REF master + PATCHES "libress-submodule-downgrade-required-libressl-version.patch" +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DLIBRESSL_ROOT_DIR=${CURRENT_INSTALLED_DIR}" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-libressl-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-mbedtls/CONTROL b/ports/oatpp-mbedtls/CONTROL new file mode 100644 index 000000000..c4edffd72 --- /dev/null +++ b/ports/oatpp-mbedtls/CONTROL @@ -0,0 +1,4 @@ +Source: oatpp-mbedtls +Version: 1.0.0 +Build-Depends: mbedtls, oatpp +Description: Oat++ Mbed TLS submodule providing secure server and client connection providers diff --git a/ports/oatpp-mbedtls/portfile.cmake b/ports/oatpp-mbedtls/portfile.cmake new file mode 100644 index 000000000..18538fcf5 --- /dev/null +++ b/ports/oatpp-mbedtls/portfile.cmake @@ -0,0 +1,31 @@ +set(OATPP_VERSION "1.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-mbedtls + REF f4223fe43c3db3d5a8638f5682ab19ce9f2c8342 # 1.0.0 + SHA512 ff36d74d295f4351b2b10df585c76704f9f63a65fa91856c32f65d914e1cae8bcdd866310d8a2d6ac6f1b4af1ebc610b607327669be6d13b1773dd5117707c25 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-mbedtls-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-swagger/CONTROL b/ports/oatpp-swagger/CONTROL new file mode 100644 index 000000000..bb320bc2f --- /dev/null +++ b/ports/oatpp-swagger/CONTROL @@ -0,0 +1,4 @@ +Source: oatpp-swagger +Version: 1.0.0 +Description: Oat++ OpenApi (Swagger) UI submodule +Build-Depends: oatpp diff --git a/ports/oatpp-swagger/portfile.cmake b/ports/oatpp-swagger/portfile.cmake new file mode 100644 index 000000000..a39b11a8e --- /dev/null +++ b/ports/oatpp-swagger/portfile.cmake @@ -0,0 +1,33 @@ +set(OATPP_VERSION "1.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-swagger + REF 8e4a5d32f82ff71ad645fbfb7e5257a6b611ecfd # 1.0.0 + SHA512 9ae31686689862667871531e92625239fd8b54a6ed77b54ab85ecb09633afae0d450be5bcee6e266d01b2edc602bae6c0ab59dd12f926d689f7183373a39bb21 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-swagger-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp-websocket/CONTROL b/ports/oatpp-websocket/CONTROL new file mode 100644 index 000000000..75d9104ae --- /dev/null +++ b/ports/oatpp-websocket/CONTROL @@ -0,0 +1,4 @@ +Source: oatpp-websocket +Version: 1.0.0 +Description: Oat++ websocket module +Build-Depends: oatpp diff --git a/ports/oatpp-websocket/portfile.cmake b/ports/oatpp-websocket/portfile.cmake new file mode 100644 index 000000000..ed871ab22 --- /dev/null +++ b/ports/oatpp-websocket/portfile.cmake @@ -0,0 +1,32 @@ +set(OATPP_VERSION "1.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-websocket + REF d047321db5ca9194b0035eea481623983a59c82c # 1.0.0 + SHA512 76e411557a790fccbd346241826a89a01f707ecb6bf3295fd4c7af706d376d5cb21070ee375b45ce1aa14ad8d79db753c1adbc2b503b79c8b8e5ae59a044b03b + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-websocket-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/oatpp/CONTROL b/ports/oatpp/CONTROL new file mode 100644 index 000000000..fa72f6939 --- /dev/null +++ b/ports/oatpp/CONTROL @@ -0,0 +1,3 @@ +Source: oatpp +Version: 1.0.0 +Description: Modern web framework diff --git a/ports/oatpp/portfile.cmake b/ports/oatpp/portfile.cmake new file mode 100644 index 000000000..2be9bc0c5 --- /dev/null +++ b/ports/oatpp/portfile.cmake @@ -0,0 +1,33 @@ +set(OATPP_VERSION "1.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp + REF 5a9f042a78e7a47d1788407c99f6257fc7b40fa9 # 1.0.0 + SHA512 133f69e43608b3b5eda929952c8fb49f08bbc114d75b326293a7ddf5f40b7b94ffcff7df2d999c91195ba9939166143ad173b27a962f4fb661f731f63a44116e + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)