From 4faf6cd0d0371c8d048e89013ab0d0dc721988cd Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sun, 14 Aug 2022 16:49:53 +0200 Subject: [PATCH] wip --- .busted.lua | 1 - .ci/pipeline.yml | 2 +- .ci/rock.sh | 5 +---- .ci/rock.yml | 2 +- .ci/test.sh | 13 +------------ .ci/test.yml | 2 +- Makefile | 4 +++- src/lua_libpulse_glib/proplist.h | 2 ++ 8 files changed, 10 insertions(+), 21 deletions(-) diff --git a/.busted.lua b/.busted.lua index 3aa0614..cfafed4 100644 --- a/.busted.lua +++ b/.busted.lua @@ -1,7 +1,6 @@ return { default = { verbose = true, - helper = "./spec/_helper.lua", lpath = "./src/?.lua;./src/?/init.lua;./src/?/?.lua;./tests/?.lua", }, } diff --git a/.ci/pipeline.yml b/.ci/pipeline.yml index 3e2e6b5..7e66b4e 100644 --- a/.ci/pipeline.yml +++ b/.ci/pipeline.yml @@ -4,7 +4,7 @@ resources: type: git icon: github source: - uri: https://git.sclu1034.dev/lucas/lgi-libpulse-glib.git + uri: https://git.sclu1034.dev/lucas/lua-libpulse-glib branch: ci jobs: diff --git a/.ci/rock.sh b/.ci/rock.sh index e959445..4e863aa 100755 --- a/.ci/rock.sh +++ b/.ci/rock.sh @@ -5,13 +5,10 @@ set -ex sudo enable-lua ${LUA_VERSION:-5.1} eval "$(luarocks --lua-version ${LUA_VERSION:-5.1} path)" -sudo apt-get update -sudo apt-get install -y --no-install-recommends gobject-introspection libgirepository1.0-dev libpulse-dev - luarocks --lua-version ${LUA_VERSION:-5.1} install lgi luarocks --lua-version ${LUA_VERSION:-5.1} install ldoc luarocks --lua-version ${LUA_VERSION:-5.1} install lua-discount -luarocks --lua-version ${LUA_VERSION:-5.1} make rocks/lgi-libpulse-glib-scm-1.rockspec +luarocks --lua-version ${LUA_VERSION:-5.1} make rocks/lua-libpulse-glib-scm-1.rockspec sudo disable-lua ${LUA_VERSION:-5.1} diff --git a/.ci/rock.yml b/.ci/rock.yml index 9127953..e8754b4 100644 --- a/.ci/rock.yml +++ b/.ci/rock.yml @@ -5,7 +5,7 @@ platform: linux image_resource: type: registry-image source: - repository: registry.local:5000/lua-clib-x11 + repository: registry.local:5000/lua-clib-pulse tag: latest inputs: diff --git a/.ci/test.sh b/.ci/test.sh index 4562fb9..f07b1ff 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -13,22 +13,11 @@ fi sudo enable-lua ${LUA_VERSION:-5.1} eval "$(luarocks --lua-version ${LUA_VERSION:-5.1} path)" -sudo apt-get update -sudo apt-get install -y --no-install-recommends gobject-introspection libgirepository1.0-dev libpulse-dev - luarocks --lua-version ${LUA_VERSION:-5.1} install busted luarocks --lua-version ${LUA_VERSION:-5.1} install lgi luarocks --lua-version ${LUA_VERSION:-5.1} install ldoc luarocks --lua-version ${LUA_VERSION:-5.1} install lua-discount -cmake -S "${SOURCE_DIR:-./}" -B "${BUILD_DIR:-./build}" ${CMAKE_ARGS} -make -j $(nproc) -C "${BUILD_DIR:-./build}" - -busted \ - --lua /usr/bin/lua \ - -C "${SOURCE_DIR:-./}" \ - "--config-file=${SOURCE_DIR:-./}/.busted.lua" \ - "--cpath=${BUILD_DIR:-./build}/?.so" \ - --output=TAP +make -j $(nproc) -C ${SOURCE_DIR:-.} LUA_VERSION=${LUA_VERSION:-5.1} LUA=lua sudo disable-lua ${LUA_VERSION:-5.1} diff --git a/.ci/test.yml b/.ci/test.yml index 0fea350..0b0dc5d 100644 --- a/.ci/test.yml +++ b/.ci/test.yml @@ -4,7 +4,7 @@ platform: linux image_resource: type: registry-image source: - repository: registry.local:5000/lua-clib-x11 + repository: registry.local:5000/lua-clib-pulse tag: latest inputs: diff --git a/Makefile b/Makefile index 0e47432..a8899ee 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,9 @@ TEST_ARGS ?= --output=TAP CCFLAGS += -Werror endif -.PHONY: clean doc doc-content doc-styles install uninstall test check rock +.PHONY: all clean doc doc-content doc-styles install uninstall test check rock + +all: build doc build: $(TARGET) diff --git a/src/lua_libpulse_glib/proplist.h b/src/lua_libpulse_glib/proplist.h index 15d2d31..4c3d3e2 100644 --- a/src/lua_libpulse_glib/proplist.h +++ b/src/lua_libpulse_glib/proplist.h @@ -310,7 +310,9 @@ static const struct luaU_enumfield proplist_enum[] = { { "FORMAT_RATE", PA_PROP_FORMAT_RATE }, { "FORMAT_CHANNELS", PA_PROP_FORMAT_CHANNELS }, { "FORMAT_CHANNEL_MAP", PA_PROP_FORMAT_CHANNEL_MAP }, +#if PA_CHECK_VERSION(15, 0, 0) { "CONTEXT_FORCE_DISABLE_SHM", PA_PROP_CONTEXT_FORCE_DISABLE_SHM }, { "BLUETOOTH_CODEC", PA_PROP_BLUETOOTH_CODEC }, +#endif { NULL, NULL } };