Skip to content

Commit

Permalink
[luasec] linux and macos support (#37365)
Browse files Browse the repository at this point in the history
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] ~SHA512s are updated for each updated download.~
- [x] The "supports" clause reflects platforms that may be fixed by this
new version.
- [ ] ~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~
- [ ] ~Any patches that are no longer applied are deleted from the
port's directory.~
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
  • Loading branch information
TheCycoONE authored Apr 24, 2024
1 parent 9911cb7 commit 069695d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
18 changes: 13 additions & 5 deletions ports/luasec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ set(LUASEC_LIBRARIES
${LUA_LIBRARY}
OpenSSL::SSL
OpenSSL::Crypto
OpenSSL::applink
ws2_32)
OpenSSL::applink)
if(WIN32)
set(PLATFORM_LIBRARIES ws2_32)
endif()

add_library(lua-ssl
src/config.c
Expand All @@ -22,11 +24,17 @@ add_library(lua-ssl
src/options.c
src/luasocket/buffer.c
src/luasocket/io.c
src/luasocket/timeout.c
src/luasocket/wsocket.c)
src/luasocket/timeout.c)
if(WIN32)
target_sources(lua-ssl PRIVATE
src/luasocket/wsocket.c)
else()
target_sources(lua-ssl PRIVATE
src/luasocket/usocket.c)
endif()

target_include_directories(lua-ssl PRIVATE ${LUASEC_INCLUDES})
target_link_libraries(lua-ssl PRIVATE ${LUASEC_LIBRARIES})
target_link_libraries(lua-ssl PRIVATE ${LUASEC_LIBRARIES} ${PLATFORM_LIBRARIES})
set_target_properties(lua-ssl PROPERTIES PREFIX "")

install(TARGETS lua-ssl
Expand Down
7 changes: 2 additions & 5 deletions ports/luasec/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@

if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
endif()
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO brunoos/luasec
REPO lunarmodules/luasec
REF "v${VERSION}"
SHA512 8f0c4b5ff87c024685b23770e1d342467554b8dc19a1704076e184d9e84b966f171091c31d1da135ab009e850275adc2bf2720fc9f32c83ac23f0a42f13d311f
HEAD_REF master
Expand Down
6 changes: 3 additions & 3 deletions ports/luasec/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "luasec",
"version": "1.3.2",
"port-version": 1,
"port-version": 2,
"maintainers": "Stephen Baker <[email protected]>",
"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",
"homepage": "https://github.com/lunarmodules/luasec",
"license": "MIT",
"supports": "windows & !staticcrt",
"supports": "!staticcrt",
"dependencies": [
"lua",
"luasocket",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5470,7 +5470,7 @@
},
"luasec": {
"baseline": "1.3.2",
"port-version": 1
"port-version": 2
},
"luasocket": {
"baseline": "3.1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/luasec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7274433449f340b73ab11cf6339bc54e3e96b1be",
"version": "1.3.2",
"port-version": 2
},
{
"git-tree": "f2a73d4b729a49aede6db4b11d904bb12224fad6",
"version": "1.3.2",
Expand Down

0 comments on commit 069695d

Please sign in to comment.