From d78da70f9ecacf153c18447c5af29f494ce7f954 Mon Sep 17 00:00:00 2001 From: Artur Sinila Date: Mon, 5 Jul 2021 03:44:08 +0300 Subject: [PATCH 1/2] common/build-style/: enable running tests in parallel --- common/build-style/cmake.sh | 6 +++++- common/build-style/configure.sh | 6 +++++- common/build-style/gnu-configure.sh | 6 +++++- common/build-style/gnu-makefile.sh | 6 +++++- common/build-style/perl-module.sh | 6 +++++- common/environment/setup/sourcepkg.sh | 3 ++- 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index 401dabad31c8..c7ffd16fee21 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -113,7 +113,11 @@ do_check() { : ${make_check_target:=test} - ${make_cmd} ${make_check_args} ${make_check_target} + if [ -z "$disable_parallel_check" ]; then + ${make_cmd} ${makejobs} ${make_check_args} ${make_check_target} + else + ${make_cmd} ${make_check_args} ${make_check_target} + fi } do_install() { diff --git a/common/build-style/configure.sh b/common/build-style/configure.sh index 0963fc347934..b846a1a77572 100644 --- a/common/build-style/configure.sh +++ b/common/build-style/configure.sh @@ -29,7 +29,11 @@ do_check() { : ${make_cmd:=make} : ${make_check_target:=check} - ${make_cmd} ${make_check_args} ${make_check_target} + if [ -z "$disable_parallel_check" ]; then + ${make_cmd} ${makejobs} ${make_check_args} ${make_check_target} + else + ${make_cmd} ${make_check_args} ${make_check_target} + fi } do_install() { diff --git a/common/build-style/gnu-configure.sh b/common/build-style/gnu-configure.sh index 8121136cd121..b09de442b05b 100644 --- a/common/build-style/gnu-configure.sh +++ b/common/build-style/gnu-configure.sh @@ -30,7 +30,11 @@ do_check() { : ${make_cmd:=make} : ${make_check_target:=check} - ${make_cmd} ${make_check_args} ${make_check_target} + if [ -z "$disable_parallel_check" ]; then + ${make_cmd} ${makejobs} ${make_check_args} ${make_check_target} + else + ${make_cmd} ${make_check_args} ${make_check_target} + fi } do_install() { diff --git a/common/build-style/gnu-makefile.sh b/common/build-style/gnu-makefile.sh index d7ea148fc483..0f7afa7d3695 100644 --- a/common/build-style/gnu-makefile.sh +++ b/common/build-style/gnu-makefile.sh @@ -30,7 +30,11 @@ do_check() { : ${make_cmd:=make} : ${make_check_target:=check} - ${make_cmd} ${make_check_args} ${make_check_target} + if [ -z "$disable_parallel_check" ]; then + ${make_cmd} ${makejobs} ${make_check_args} ${make_check_target} + else + ${make_cmd} ${make_check_args} ${make_check_target} + fi } do_install() { diff --git a/common/build-style/perl-module.sh b/common/build-style/perl-module.sh index b9a01b13cfa9..d47945b33d36 100644 --- a/common/build-style/perl-module.sh +++ b/common/build-style/perl-module.sh @@ -79,7 +79,11 @@ do_check() { : ${make_cmd:=make} : ${make_check_target:=test} - ${make_cmd} ${make_check_args} ${make_check_target} + if [ -z "$disable_parallel_check" ]; then + ${make_cmd} ${makejobs} ${make_check_args} ${make_check_target} + else + ${make_cmd} ${make_check_args} ${make_check_target} + fi } do_install() { diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index bc06f745b78a..1fd541f1e715 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -13,7 +13,8 @@ unset -v cmake_builddir meson_builddir unset -v meson_crossfile unset -v gemspec unset -v go_import_path go_package go_mod_mode -unset -v patch_args disable_parallel_build keep_libtool_archives make_use_env +unset -v patch_args disable_parallel_build disable_parallel_check +unset -v keep_libtool_archives make_use_env unset -v reverts subpackages makedepends hostmakedepends checkdepends depends restricted unset -v nopie build_options build_options_default bootstrap repository reverts unset -v CFLAGS CXXFLAGS FFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH From 61e7ecd1b23de77e6dabee1592e5ab5d850f264b Mon Sep 17 00:00:00 2001 From: Paper Date: Sat, 20 Mar 2021 23:19:47 +0100 Subject: [PATCH 2/2] New package: lsp-plugins-1.1.30 --- .../00-makefile-test-remove-cflags.patch | 12 ++ srcpkgs/lsp-plugins/patches/01-musl.patch | 104 ++++++++++++++++++ srcpkgs/lsp-plugins/template | 29 +++++ 3 files changed, 145 insertions(+) create mode 100644 srcpkgs/lsp-plugins/patches/00-makefile-test-remove-cflags.patch create mode 100644 srcpkgs/lsp-plugins/patches/01-musl.patch create mode 100644 srcpkgs/lsp-plugins/template diff --git a/srcpkgs/lsp-plugins/patches/00-makefile-test-remove-cflags.patch b/srcpkgs/lsp-plugins/patches/00-makefile-test-remove-cflags.patch new file mode 100644 index 000000000000..fd82f25d4a25 --- /dev/null +++ b/srcpkgs/lsp-plugins/patches/00-makefile-test-remove-cflags.patch @@ -0,0 +1,12 @@ +https://github.com/void-linux/void-packages/pull/29932#discussion_r605695858 +--- a/Makefile ++++ b/Makefile +@@ -108,8 +108,6 @@ trace: export EXE_FLAGS += -g3 + trace: compile + + test: OBJDIR = $(TESTDIR) +-test: export CFLAGS += -O2 -DLSP_TESTING -DLSP_TRACE -g3 -fstack-protector +-test: export CXXFLAGS += -O2 -DLSP_TESTING -DLSP_TRACE -g3 -fstack-protector + test: export EXE_TEST_FLAGS += -g3 + test: export MAKE_OPTS += LSP_TESTING=1 + test: export BUILD_MODULES = jack diff --git a/srcpkgs/lsp-plugins/patches/01-musl.patch b/srcpkgs/lsp-plugins/patches/01-musl.patch new file mode 100644 index 000000000000..de8c1ca275c3 --- /dev/null +++ b/srcpkgs/lsp-plugins/patches/01-musl.patch @@ -0,0 +1,104 @@ +https://github.com/sadko4u/lsp-plugins/pull/198 +diff --git a/include/data/cvector.h b/include/data/cvector.h +index eccc94a..17fe119 100644 +--- a/include/data/cvector.h ++++ b/include/data/cvector.h +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #define CVECTOR_GROW 16 + +diff --git a/include/test/main/executor.h b/include/test/main/executor.h +index 0faf73f..b37cbf2 100644 +--- a/include/test/main/executor.h ++++ b/include/test/main/executor.h +@@ -633,7 +633,7 @@ namespace lsp + } + #endif /* PLATFORM_WINDOWS */ + +-#ifdef PLATFORM_LINUX ++#if defined(PLATFORM_LINUX) && defined(__GLIBC__) + void TestExecutor::start_memcheck(test::Test *v) + { + if (!pCfg->mtrace) +diff --git a/include/test/main/types.h b/include/test/main/types.h +index ef15800..c833379 100644 +--- a/include/test/main/types.h ++++ b/include/test/main/types.h +@@ -42,7 +42,7 @@ + #include + #endif /* PLATFORM_UNIX_COMPATIBLE */ + +-#ifdef PLATFORM_LINUX ++#if defined(PLATFORM_LINUX) && defined(__GLIBC__) + #include + #endif /* PLATFORM_LINUX */ + +diff --git a/include/testing/mtest/3d/common/X11Renderer.h b/include/testing/mtest/3d/common/X11Renderer.h +index e8ec205..f0a51e2 100644 +--- a/include/testing/mtest/3d/common/X11Renderer.h ++++ b/include/testing/mtest/3d/common/X11Renderer.h +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +diff --git a/src/testing/mtest/3d/boolean3d.cpp b/src/testing/mtest/3d/boolean3d.cpp +index 636dce1..f92c63e 100644 +--- a/src/testing/mtest/3d/boolean3d.cpp ++++ b/src/testing/mtest/3d/boolean3d.cpp +@@ -41,7 +41,7 @@ + #include + #include + #include +-#include ++#include + + //#define TEST_DEBUG + +diff --git a/src/testing/mtest/3d/bsp_context.cpp b/src/testing/mtest/3d/bsp_context.cpp +index de54427..ea9ab36 100644 +--- a/src/testing/mtest/3d/bsp_context.cpp ++++ b/src/testing/mtest/3d/bsp_context.cpp +@@ -39,7 +39,7 @@ + #include + #include + #include +-#include ++#include + + //#define TEST_DEBUG + +diff --git a/src/testing/mtest/3d/reflections3d.cpp b/src/testing/mtest/3d/reflections3d.cpp +index e250444..367f86c 100644 +--- a/src/testing/mtest/3d/reflections3d.cpp ++++ b/src/testing/mtest/3d/reflections3d.cpp +@@ -39,7 +39,7 @@ + #include + #include + #include +-#include ++#include + + //#define TEST_DEBUG + +diff --git a/src/ui/ws/x11/X11Display.cpp b/src/ui/ws/x11/X11Display.cpp +index d85db51..1bf7ff2 100644 +--- a/src/ui/ws/x11/X11Display.cpp ++++ b/src/ui/ws/x11/X11Display.cpp +@@ -23,7 +23,7 @@ + + #ifdef USE_X11_DISPLAY + +-#include ++#include + #include + #include + diff --git a/srcpkgs/lsp-plugins/template b/srcpkgs/lsp-plugins/template new file mode 100644 index 000000000000..18a1b402181b --- /dev/null +++ b/srcpkgs/lsp-plugins/template @@ -0,0 +1,29 @@ +# Template file for 'lsp-plugins' +pkgname=lsp-plugins +version=1.1.30 +revision=1 +build_style=gnu-makefile +hostmakedepends="pkg-config php" +makedepends="libsndfile-devel libX11-devel libglvnd-devel lv2 cairo-devel ladspa-sdk jack-devel" +make_build_args='SHELL="sh -x"' +short_desc="Collection of free plugins compatible with LADSPA, LV2 and LinuxVST" +maintainer="Artur Sinila " +license="LGPL-3.0-or-later" +homepage="https://lsp-plug.in/" +distfiles="https://github.com/sadko4u/lsp-plugins/archive/refs/tags/${version}.tar.gz" +checksum=9cf43257729093c240375b3640b1514dff34b092b83b54a5ee68d7e8565c8f80 + +_arch="${XBPS_TARGET_MACHINE%%-musl}" +# case "$_arch" in +# i686) export BUILD_PROFILE=i586 ;; +# *) export BUILD_PROFILE=${_arch} ;; +# esac + +# https://github.com/sadko4u/lsp-plugins/issues/191#issuecomment-812847630 +CXXFLAGS="-std=c++98" + +do_check() { + export CXXFLAGS="$CXXFLAGS -DLSP_TESTING -DLSP_TRACE" + make SHELL="sh -x" test + .test/lsp-plugins-test utest +}