Skip to content

Commit

Permalink
Merge pull request #332 from squeek502/libuv-1.29.1
Browse files Browse the repository at this point in the history
update libuv to v1.29.1
  • Loading branch information
zhaozg committed Jun 1, 2019
2 parents 9e6e4f2 + 8b85283 commit a07931d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ script:
- mkdir build/lib
- cp build/deps/libuv/libuv_a.a build/lib/libuv.a
- cp -a deps/libuv/include build
- luarocks make rockspecs/$(ls rockspecs) LIBUV_DIR=build
- luarocks make rockspecs/$(ls rockspecs) LIBUV_DIR=build LUA_COMPAT53_INCDIR=deps/lua-compat-5.3
- test $PWD = `lua -e "print(require'luv'.cwd())"`

jobs:
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project (luv C ASM)

set(LUV_VERSION_MAJOR 1)
set(LUV_VERSION_MINOR 29)
set(LUV_VERSION_PATCH 0)
set(LUV_VERSION_PATCH 1)
set(LUV_VERSION ${LUV_VERSION_MAJOR}.${LUV_VERSION_MINOR}.${LUV_VERSION_PATCH})

option(BUILD_MODULE "Build as module" ON)
Expand Down Expand Up @@ -155,7 +155,9 @@ if(APPLE)
# )
endif()

set(LUA_COMPAT53_DIR deps/lua-compat-5.3)
if(NOT LUA_COMPAT53_DIR)
set(LUA_COMPAT53_DIR deps/lua-compat-5.3)
endif()
if(DEFINED ENV{LUA_COMPAT53_DIR})
set(LUA_COMPAT53_DIR $ENV{LUA_COMPAT53_DIR})
endif()
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILD_SHARED_LIBS ?= OFF
WITH_SHARED_LIBUV ?= OFF
WITH_LUA_ENGINE ?= LuaJIT
LUA_BUILD_TYPE ?= Static

LUA_COMPAT53_DIR ?= deps/lua-compat-5.3

ifeq ($(WITH_LUA_ENGINE), LuaJIT)
LUABIN=build/luajit
Expand All @@ -23,7 +23,7 @@ CMAKE_OPTIONS += \
-DWITH_SHARED_LIBUV=$(WITH_SHARED_LIBUV) \
-DWITH_LUA_ENGINE=$(WITH_LUA_ENGINE) \
-DLUA_BUILD_TYPE=$(LUA_BUILD_TYPE) \
-DLUA_COMPAT53_DIR=deps/lua-compat-5.3
-DLUA_COMPAT53_DIR=$(LUA_COMPAT53_DIR)

all: luv

Expand All @@ -33,8 +33,11 @@ deps/libuv/include:
deps/luajit/src:
git submodule update --init deps/luajit

build/Makefile: deps/libuv/include deps/luajit/src
cmake -H. -Bbuild ${CMAKE_OPTIONS}
deps/lua-compat-5.3/c-api:
git submodule update --init deps/lua-compat-5.3

build/Makefile: deps/libuv/include deps/luajit/src deps/lua-compat-5.3/c-api
cmake -H. -Bbuild ${CMAKE_OPTIONS}

luv: build/Makefile
cmake --build build --config Debug
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build_script:
- mkdir build\lib
- cp build\deps\libuv\Release\uv_a.lib build\lib\uv.lib
- cp -a deps\libuv\include build
- ps: luarocks make rockspecs\$(ls rockspecs) LIBUV_DIR=build CFLAGS="/nologo /MT /O2"
- ps: luarocks make rockspecs\$(ls rockspecs) LIBUV_DIR=build LUA_COMPAT53_INCDIR=deps/lua-compat-5.3 CFLAGS="/nologo /MT /O2"
- ps: if("$(Get-Location)" -eq $(lua -e "print(require'luv'.cwd())")) { "LuaRocks test OK" } else { "LuaRocks test failed"; exit 1 }
- luarocks remove luv

Expand Down
2 changes: 1 addition & 1 deletion deps/libuv
5 changes: 4 additions & 1 deletion rockspecs/luv-scm-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ dependencies = {
external_dependencies = {
LIBUV = {
header = 'uv.h'
},
LUA_COMPAT53 = {
header = "c-api/compat-5.3.h"
}
}

Expand All @@ -34,7 +37,7 @@ build = {
['luv'] = {
sources = {'src/luv.c'},
libraries = {'uv'},
incdirs = {"$(LIBUV_INCDIR)","deps/lua-compat-5.3"},
incdirs = {"$(LIBUV_INCDIR)","$(LUA_COMPAT53_INCDIR)"},
libdirs = {"$(LIBUV_LIBDIR)"}
}
};
Expand Down

0 comments on commit a07931d

Please sign in to comment.