-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add port for luasec * Mark luasec:x64-windows-static as fail * Set versions for luasec
- Loading branch information
1 parent
c867e68
commit 17378cf
Showing
6 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
cmake_minimum_required(VERSION 3.20.0) | ||
project(luasec) | ||
|
||
find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) | ||
find_library(LUA_LIBRARY lua) | ||
find_package(OpenSSL) | ||
|
||
set(LUASEC_INCLUDES ${LUA_INCLUDE_DIR} src) | ||
set(LUASEC_LIBRARIES | ||
${LUA_LIBRARY} | ||
OpenSSL::SSL | ||
OpenSSL::Crypto | ||
OpenSSL::applink | ||
ws2_32) | ||
|
||
add_library(lua-ssl | ||
src/config.c | ||
src/ssl.c | ||
src/context.c | ||
src/x509.c | ||
src/ec.c | ||
src/options.c | ||
src/luasocket/buffer.c | ||
src/luasocket/io.c | ||
src/luasocket/timeout.c | ||
src/luasocket/wsocket.c) | ||
|
||
target_include_directories(lua-ssl PRIVATE ${LUASEC_INCLUDES}) | ||
target_link_libraries(lua-ssl PRIVATE ${LUASEC_LIBRARIES}) | ||
set_target_properties(lua-ssl PROPERTIES PREFIX "") | ||
|
||
install(TARGETS lua-ssl | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib) | ||
|
||
install(FILES src/ssl.lua DESTINATION share/lua) | ||
install(FILES src/https.lua DESTINATION share/lua/ssl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
set(LUASEC_REVISION v1.0.1) | ||
set(LUASEC_HASH 21ae200e40f13a35eebca95cdac25ae13532a3008b2f9ec97a079033b9efde69e81954354453623eb77340368f482d3c69adb26881a6c0d7c4897df31301af93) | ||
|
||
if (VCPKG_TARGET_IS_WINDOWS) | ||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) | ||
endif() | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO brunoos/luasec | ||
REF ${LUASEC_REVISION} | ||
SHA512 ${LUASEC_HASH} | ||
HEAD_REF master | ||
) | ||
|
||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
|
||
# Remove debug share | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | ||
|
||
# Handle copyright | ||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) | ||
|
||
# Allow empty include directory | ||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "luasec", | ||
"version": "1.0.1", | ||
"maintainers": "Stephen Baker <baker.stephen.e@gmail.com>", | ||
"description": "LuaSec depends on OpenSSL, and integrates with LuaSocket to make it easy to add secure connections to any Lua applications or scripts.", | ||
"homepage": "https://github.com/brunoos/luasec", | ||
"dependencies": [ | ||
"lua", | ||
"luasocket", | ||
"openssl" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "2529ee34af0b23fb576f0e8ed672ceba83c4c305", | ||
"version": "1.0.1", | ||
"port-version": 0 | ||
} | ||
] | ||
} |