From e3d4d253b4fa9810a5436e017ef43db9444a16f3 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 3 Apr 2021 19:58:40 -0700 Subject: [PATCH] spice: update to 0.15.0 Remove celt051 option as upstream removed it. Remove upstreamed patches. Switch to AUTORELEASE for simplicity. Signed-off-by: Rosen Penev --- libs/spice/Makefile | 13 +- libs/spice/patches/010-doxy.patch | 7 + libs/spice/patches/010-librt-libm.patch | 26 ---- .../patches/020-no-code-generation.patch | 142 ------------------ .../patches/030-include-generated-code.patch | 2 +- libs/spice/patches/040-only-server.patch | 10 +- libs/spice/patches/050-no-mkenums.patch | 10 +- 7 files changed, 21 insertions(+), 189 deletions(-) create mode 100644 libs/spice/patches/010-doxy.patch delete mode 100644 libs/spice/patches/010-librt-libm.patch delete mode 100644 libs/spice/patches/020-no-code-generation.patch diff --git a/libs/spice/Makefile b/libs/spice/Makefile index 55d08d6b84..e386e1e03f 100644 --- a/libs/spice/Makefile +++ b/libs/spice/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=spice -PKG_VERSION:=0.14.3 -PKG_RELEASE:=3 +PKG_VERSION:=0.15.0 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.spice-space.org/download/releases/spice-server -PKG_HASH:=551d4be4a07667cf0543f3c895beb6da8a93ef5a9829f2ae47817be5e616a114 +PKG_HASH:=b320cf8f4bd2852750acb703c15b72856027e5a8554f8217dfbb3cc09deba0f5 PKG_MAINTAINER:=Yousong Zhou PKG_LICENSE:=LGPL-2.1-only @@ -31,13 +31,12 @@ define Package/libspice-server CATEGORY:=Libraries TITLE:=SPICE server library URL:=https://www.spice-space.org/index.html - DEPENDS:=+glib2 +libjpeg +libopenssl +pixman +zlib + DEPENDS:=+glib2 +libjpeg +libopenssl +pixman +zlib +libstdcpp endef # audio codec MESON_ARGS += \ - -Dcelt051=disabled \ - -Dopus=disabled \ + -Dopus=disabled MESON_ARGS += \ -Dgstreamer=no \ @@ -49,11 +48,11 @@ MESON_ARGS += \ -Dstatistics=false \ -Dmanual=false \ -Dinstrumentation=no \ + -Dtests=false MESON_ARGS += \ -Dspice-common:alignment-checks=false \ -Dspice-common:extra-checks=false \ - -Dspice-common:celt051=disabled \ -Dspice-common:opus=disabled \ -Dspice-common:instrumentation=no \ -Dspice-common:smartcard=disabled \ diff --git a/libs/spice/patches/010-doxy.patch b/libs/spice/patches/010-doxy.patch new file mode 100644 index 0000000000..837cad4051 --- /dev/null +++ b/libs/spice/patches/010-doxy.patch @@ -0,0 +1,7 @@ +--- a/meson.build ++++ b/meson.build +@@ -229,4 +229,3 @@ endif + configure_file(output : 'config.h', + configuration : spice_server_config_data) + +-run_target('doxy', command : './doxygen.sh') diff --git a/libs/spice/patches/010-librt-libm.patch b/libs/spice/patches/010-librt-libm.patch deleted file mode 100644 index faba9632d9..0000000000 --- a/libs/spice/patches/010-librt-libm.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 26bbb85c150f882c05399e4c574208b8b1242082 Mon Sep 17 00:00:00 2001 -From: James Le Cuirot -Date: Tue, 7 Apr 2020 19:32:15 +0100 -Subject: [PATCH] build: Fix librt and libm dependencies in Meson - -They need to be requested without the lib prefix, otherwise a -generated pkg-config file ends up with absolute paths instead of -l -flags. - -Signed-off-by: James Le Cuirot -Acked-by: Frediano Ziglio ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/meson.build -+++ b/meson.build -@@ -103,7 +103,7 @@ foreach dep : ['libjpeg', 'zlib'] - endforeach - - if host_machine.system() != 'windows' -- foreach dep : ['librt', 'libm'] -+ foreach dep : ['rt', 'm'] - spice_server_deps += compiler.find_library(dep) - endforeach - else diff --git a/libs/spice/patches/020-no-code-generation.patch b/libs/spice/patches/020-no-code-generation.patch deleted file mode 100644 index 89a7eb32db..0000000000 --- a/libs/spice/patches/020-no-code-generation.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 713a3e09fbd5948823ac0c396249537329b878e4 Mon Sep 17 00:00:00 2001 -From: Frediano Ziglio -Date: Thu, 12 Mar 2020 03:45:54 +0000 -Subject: [PATCH] build: Allow to build disabling code generation - -Reduce dependencies if used by agents which do not need -marshallers/demarshallers code. - -Signed-off-by: Frediano Ziglio ---- - common/meson.build | 28 +++++++++++++++------------- - meson.build | 24 +++++++++++++----------- - meson_options.txt | 2 +- - tests/meson.build | 34 ++++++++++++++++++---------------- - 4 files changed, 47 insertions(+), 41 deletions(-) - ---- a/subprojects/spice-common/common/meson.build -+++ b/subprojects/spice-common/common/meson.build -@@ -67,19 +67,21 @@ spice_common_dep = declare_dependency(li - - - # client_demarshallers --codegen_cmd = [python, spice_codegen] --codegen_args = ['--generate-demarshallers', -- '--client', -- '--include', 'common/messages.h', -- '--generated-declaration-file', '@OUTPUT1@', -- '@INPUT@', '@OUTPUT0@'] -+if spice_common_generate_client_code or spice_common_generate_server_code -+ codegen_cmd = [python, spice_codegen] -+ codegen_args = ['--generate-demarshallers', -+ '--client', -+ '--include', 'common/messages.h', -+ '--generated-declaration-file', '@OUTPUT1@', -+ '@INPUT@', '@OUTPUT0@'] - --client_demarshallers = custom_target('client_demarshallers', -- input : [spice_proto], -- output : ['generated_client_demarshallers.c', 'generated_messages.h'], -- install : false, -- command : [codegen_cmd, codegen_args], -- depend_files : [spice_codegen_files, 'messages.h']) -+ client_demarshallers = custom_target('client_demarshallers', -+ input : [spice_proto], -+ output : ['generated_client_demarshallers.c', 'generated_messages.h'], -+ install : false, -+ command : [codegen_cmd, codegen_args], -+ depend_files : [spice_codegen_files, 'messages.h']) -+endif - - # - # libspice-common-client ---- a/subprojects/spice-common/meson.build -+++ b/subprojects/spice-common/meson.build -@@ -131,17 +131,19 @@ foreach dep, version : optional_deps - endforeach - - # Python --py_module = import('python') --python = py_module.find_installation() -+if spice_common_generate_client_code or spice_common_generate_server_code -+ py_module = import('python') -+ python = py_module.find_installation() - --if get_option('python-checks') -- foreach module : ['six', 'pyparsing'] -- message('Checking for python module @0@'.format(module)) -- cmd = run_command(python, '-m', module) -- if cmd.returncode() != 0 -- error('Python module @0@ not found'.format(module)) -- endif -- endforeach -+ if get_option('python-checks') -+ foreach module : ['six', 'pyparsing'] -+ message('Checking for python module @0@'.format(module)) -+ cmd = run_command(python, '-m', module) -+ if cmd.returncode() != 0 -+ error('Python module @0@ not found'.format(module)) -+ endif -+ endforeach -+ endif - endif - - # smartcard check ---- a/subprojects/spice-common/meson_options.txt -+++ b/subprojects/spice-common/meson_options.txt -@@ -45,7 +45,7 @@ option('manual', - - option('generate-code', - type : 'combo', -- choices : ['all', 'server', 'client'], -+ choices : ['all', 'server', 'client', 'none'], - description : 'Which code should be built') - - option('tests', ---- a/subprojects/spice-common/tests/meson.build -+++ b/subprojects/spice-common/tests/meson.build -@@ -15,26 +15,28 @@ endforeach - # - # test_marshallers - # --test_proto = files('test-marshallers.proto') -+if spice_common_generate_client_code or spice_common_generate_server_code -+ test_proto = files('test-marshallers.proto') - --test_marshallers_sources = ['test-marshallers.c', 'test-marshallers.h'] -+ test_marshallers_sources = ['test-marshallers.c', 'test-marshallers.h'] - --targets = [ -- ['test_marshallers', test_proto, 'generated_test_marshallers.c', ['--generate-marshallers', '--server', '--include', 'test-marshallers.h', '@INPUT@', '@OUTPUT@']], -- ['test_marshallers_h', test_proto, 'generated_test_marshallers.h', ['--generate-marshallers', '--server', '--include', 'test-marshallers.h', '-H', '@INPUT@', '@OUTPUT@']], -- ['test_demarshallers', test_proto, 'generated_test_demarshallers.c', ['--generate-demarshallers', '--client', '--include', 'test-marshallers.h', '@INPUT@', '@OUTPUT@']], -- ['test_enums_h', test_proto, 'generated_test_enums.h', ['-e', '@INPUT@', '@OUTPUT@']], --] -+ targets = [ -+ ['test_marshallers', test_proto, 'generated_test_marshallers.c', ['--generate-marshallers', '--server', '--include', 'test-marshallers.h', '@INPUT@', '@OUTPUT@']], -+ ['test_marshallers_h', test_proto, 'generated_test_marshallers.h', ['--generate-marshallers', '--server', '--include', 'test-marshallers.h', '-H', '@INPUT@', '@OUTPUT@']], -+ ['test_demarshallers', test_proto, 'generated_test_demarshallers.c', ['--generate-demarshallers', '--client', '--include', 'test-marshallers.h', '@INPUT@', '@OUTPUT@']], -+ ['test_enums_h', test_proto, 'generated_test_enums.h', ['-e', '@INPUT@', '@OUTPUT@']], -+ ] - --foreach t : targets -- cmd = [python, spice_codegen] + t[3] -- test_marshallers_sources += custom_target(t[0], input: t[1], output : t[2], command: cmd, depend_files : spice_codegen_files) --endforeach -+ foreach t : targets -+ cmd = [python, spice_codegen] + t[3] -+ test_marshallers_sources += custom_target(t[0], input: t[1], output : t[2], command: cmd, depend_files : spice_codegen_files) -+ endforeach - --test('test_marshallers', -- executable('test_marshallers', test_marshallers_sources, -- dependencies : spice_common_dep, -- install : false)) -+ test('test_marshallers', -+ executable('test_marshallers', test_marshallers_sources, -+ dependencies : spice_common_dep, -+ install : false)) -+endif - - # - # test_quic diff --git a/libs/spice/patches/030-include-generated-code.patch b/libs/spice/patches/030-include-generated-code.patch index 4d8d5e37c5..0e93d7dffe 100644 --- a/libs/spice/patches/030-include-generated-code.patch +++ b/libs/spice/patches/030-include-generated-code.patch @@ -12,7 +12,7 @@ Signed-off-by: Rosen Penev --- a/subprojects/spice-common/common/meson.build +++ b/subprojects/spice-common/common/meson.build -@@ -187,4 +187,17 @@ if spice_common_generate_server_code +@@ -189,4 +189,17 @@ if spice_common_generate_server_code spice_common_server_dep = declare_dependency(sources : spice_common_server_dep_sources, link_with : spice_common_server_lib, dependencies : spice_common_dep) diff --git a/libs/spice/patches/040-only-server.patch b/libs/spice/patches/040-only-server.patch index 2c441806da..1506407994 100644 --- a/libs/spice/patches/040-only-server.patch +++ b/libs/spice/patches/040-only-server.patch @@ -1,6 +1,6 @@ --- a/meson.build +++ b/meson.build -@@ -192,8 +192,6 @@ add_project_arguments(compiler.get_suppo +@@ -208,8 +208,6 @@ add_project_arguments(cxx_compiler.get_s # Subdirectories # subdir('server') @@ -9,11 +9,3 @@ # # write config.h ---- a/server/meson.build -+++ b/server/meson.build -@@ -186,5 +186,3 @@ spice_server_libs = both_libraries('spic - - spice_server_shared_lib = spice_server_libs.get_shared_lib() - spice_server_static_lib = spice_server_libs.get_static_lib() -- --subdir('tests') diff --git a/libs/spice/patches/050-no-mkenums.patch b/libs/spice/patches/050-no-mkenums.patch index 3c2b69fbbe..106f9d7b20 100644 --- a/libs/spice/patches/050-no-mkenums.patch +++ b/libs/spice/patches/050-no-mkenums.patch @@ -12,15 +12,17 @@ Signed-off-by: Rosen Penev --- a/server/meson.build +++ b/server/meson.build -@@ -36,11 +36,7 @@ spice_server_headers = [ +@@ -43,13 +43,7 @@ spice_server_headers = [ install_headers(spice_server_headers, subdir : 'spice-server') -# generate enums -gnome = import('gnome') --spice_server_enums = gnome.mkenums_simple('spice-server-enums', -- sources : 'spice-server.h', -- symbol_prefix : 'SPICE') +-spice_server_enums = gnome.mkenums('spice-server-enums', +- sources : 'spice-server.h', +- symbol_prefix : 'SPICE', +- c_template: 'spice-server-enums.c.tmpl', +- h_template: 'spice-server-enums.h.tmpl') +spice_server_enums = ['spice-server-enums.c', 'spice-server-enums.h'] spice_server_sources = [