spice-gtk: update to 0.36.

This commit is contained in:
Rasmus Thomsen 2019-01-19 04:45:08 -02:00 committed by maxice8
parent 69d374f25e
commit d2a0d41490
4 changed files with 86 additions and 77 deletions

View file

@ -1,58 +0,0 @@
From a45e8a56e389e41c891eaa204b16dd89e74e2e69 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <fziglio@redhat.com>
Date: Thu, 21 Jun 2018 06:52:56 +0100
Subject: [PATCH] Fix build for newer LibreSSL
LibreSSL 2.7 hidden some definition, like OpenSSL 1.1.
This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229044.
Original patch from Piotr Kubaj.
Reported-by: Jack L. <xxjack12xx@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Upstream: Yes
---
src/bio-gio.c | 3 ++-
src/spice-channel.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/bio-gio.c b/src/bio-gio.c
index 30aa73b..79ce7f8 100644
--- a/src/bio-gio.c
+++ b/src/bio-gio.c
@@ -23,7 +23,8 @@
#include "spice-util.h"
#include "bio-gio.h"
-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
static BIO_METHOD one_static_bio;
static int BIO_meth_set_read(BIO_METHOD *biom,
diff --git a/src/spice-channel.c b/src/spice-channel.c
index 6f3ca27..55dcd8e 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -55,7 +55,8 @@ static void spice_channel_reset_capabilities(SpiceChannel *channel);
static void spice_channel_send_migration_handshake(SpiceChannel *channel);
static gboolean channel_connect(SpiceChannel *channel, gboolean tls);
-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
static RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
{
if (pkey->type != EVP_PKEY_RSA) {
--- a/spice-common/common/ssl_verify.c
+++ b/spice-common/common/ssl_verify.c
@@ -33,7 +33,8 @@
#include <string.h>
#include <gio/gio.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || \
+ (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)
{
return M_ASN1_STRING_data(asn1);

View file

@ -0,0 +1,35 @@
From 432a29090c061b8567d69c576f6761904c8d228b Mon Sep 17 00:00:00 2001
From: Rasmus Thomsen <rasmus.thomsen@protonmail.com>
Date: Sun, 20 Jan 2019 02:09:53 +0100
Subject: [PATCH] meson: ensure correct build order of VAPI
Without this commit spice-client-gtk-3.0.vapi may be built
before spice-client-glib-2.0.vapi if build_jobs > 1. This causes
the build to fail because the former depends on the latter
---
vapi/meson.build | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vapi/meson.build b/vapi/meson.build
index 2c4caa0..c9fef3d 100644
--- vapi/meson.build
+++ vapi/meson.build
@@ -1,12 +1,13 @@
if spice_gtk_has_vala
- gnome.generate_vapi('spice-client-glib-2.0',
+ spice_glib_vapi = gnome.generate_vapi('spice-client-glib-2.0',
install : true,
packages : ['gio-2.0', 'gstreamer-1.0'],
sources : spice_client_glib_gir[0])
+
if spice_gtk_has_gtk
gnome.generate_vapi('spice-client-gtk-3.0',
install : true,
- packages : ['gtk+-3.0', 'gstreamer-1.0', 'spice-client-glib-2.0'],
+ packages : ['gtk+-3.0', 'gstreamer-1.0', spice_glib_vapi],
gir_dirs : join_paths(meson.build_root(), 'src'),
vapi_dirs : meson.current_build_dir(),
sources : spice_client_gtk_gir[0])
--
2.20.1

View file

@ -0,0 +1,30 @@
diff --git a/meson.build b/meson.build
index d7062af..93aae1a 100644
--- meson.build
+++ meson.build
@@ -2,7 +2,7 @@
# project definition
#
project('spice-gtk', 'c',
- version : run_command('build-aux/git-version-gen', '${MESON_SOURCE_ROOT}/.tarball-version', check : true).stdout().strip(),
+ version : '0.36',
license : 'LGPLv2.1',
meson_version : '>= 0.49')
diff --git a/src/meson.build b/src/meson.build
index d9614cb..2378c83 100644
--- src/meson.build
+++ src/meson.build
@@ -8,10 +8,7 @@ spice_gtk_include += [include_directories('.')]
version_info = meson.project_version().split('.')
major = '@0@'.format(version_info[0])
minor = '@0@'.format(version_info[1])
-micro = version_info[2].split('-')[0]
-if micro == ''
- micro = '0'
-endif
+micro = '0'
version_data = configuration_data()
version_data.set('SPICE_GTK_MAJOR_VERSION', major)
version_data.set('SPICE_GTK_MINOR_VERSION', minor)

View file

@ -1,29 +1,32 @@
# Template file for 'spice-gtk'
pkgname=spice-gtk
version=0.35
revision=2
patch_args="-Np1"
build_style=gnu-configure
configure_args="--disable-static $(vopt_enable vala vala) $(vopt_enable gir introspection)
--enable-smartcard=no --enable-usbredir --enable-polkit=yes
--enable-lz4=yes --with-usb-ids-path=/usr/share/hwdata/usb.ids
--disable-celt051"
hostmakedepends="pkg-config gettext-devel intltool vala-devel
glib-devel spice-protocol $(vopt_if gir gobject-introspection)"
makedepends="acl-devel liblz4-devel dbus-glib-devel vala-devel pixman-devel
opus-devel libressl-devel libsasl-devel gtk+3-devel pulseaudio-devel
libjpeg-turbo-devel polkit-devel libsoup-devel usbredir-devel spice-protocol
libglib-devel"
version=0.36
revision=1
build_style=meson
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)
-Dvapi=$(vopt_if vala enabled disabled) -Dsmartcard=disabled
-Dusbredir=enabled -Dpolkit=enabled -Dlz4=enabled -Dopus=enabled
-Dcelt051=disabled -Dusb-ids-path=/usr/share/hwdata/usb.ids
-Dpulse=disabled -Dgtk_doc=disabled"
hostmakedepends="pkg-config $(vopt_if vala vala-devel) glib-devel
spice-protocol $(vopt_if gir gobject-introspection) python3-six
python3-parsing perl"
makedepends="acl-devel liblz4-devel pixman-devel opus-devel libressl-devel
libsasl-devel gtk+3-devel libjpeg-turbo-devel polkit-devel libsoup-devel
usbredir-devel spice-protocol json-glib-devel libglib-devel libva-devel
phodav-devel gstreamer1-devel gst-plugins-base1-devel $(vopt_if vala 'vala-devel')"
depends="hwids"
homepage="https://spice-space.org"
license="LGPL-2.1-or-laster"
short_desc="GTK+ SPICE widget"
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
license="LGPL-2.1-or-laster"
homepage="https://spice-space.org"
distfiles="https://spice-space.org/download/gtk/${pkgname}-${version}.tar.bz2"
checksum=b4e6073de5125e2bdecdf1fbe7c9e8c4cabe9c85518889b42f72bf63c8ab9e86
checksum=7126c3584df12d40dcf4970f5f46fafd65b757620f911687e549f7da5c8fd7cd
build_options="gir vala"
CFLAGS="-Wno-error"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="gir vala"
else
@ -36,8 +39,7 @@ spice-gtk-devel_package() {
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
vmove usr/share/gtk-doc
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi