From d2a0d41490e56d4b3098a7fc30f9b9d7fd832f81 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Sat, 19 Jan 2019 04:45:08 -0200 Subject: [PATCH] spice-gtk: update to 0.36. --- ...8a56e389e41c891eaa204b16dd89e74e2e69.patch | 58 ------------------- .../spice-gtk/patches/fix-vapi-build.patch | 35 +++++++++++ srcpkgs/spice-gtk/patches/fix-version.patch | 30 ++++++++++ srcpkgs/spice-gtk/template | 40 +++++++------ 4 files changed, 86 insertions(+), 77 deletions(-) delete mode 100644 srcpkgs/spice-gtk/patches/a45e8a56e389e41c891eaa204b16dd89e74e2e69.patch create mode 100644 srcpkgs/spice-gtk/patches/fix-vapi-build.patch create mode 100644 srcpkgs/spice-gtk/patches/fix-version.patch diff --git a/srcpkgs/spice-gtk/patches/a45e8a56e389e41c891eaa204b16dd89e74e2e69.patch b/srcpkgs/spice-gtk/patches/a45e8a56e389e41c891eaa204b16dd89e74e2e69.patch deleted file mode 100644 index 47ab3760052..00000000000 --- a/srcpkgs/spice-gtk/patches/a45e8a56e389e41c891eaa204b16dd89e74e2e69.patch +++ /dev/null @@ -1,58 +0,0 @@ -From a45e8a56e389e41c891eaa204b16dd89e74e2e69 Mon Sep 17 00:00:00 2001 -From: Frediano Ziglio -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. -Signed-off-by: Frediano Ziglio -Acked-by: Christophe Fergeau -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 - #include - --#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); diff --git a/srcpkgs/spice-gtk/patches/fix-vapi-build.patch b/srcpkgs/spice-gtk/patches/fix-vapi-build.patch new file mode 100644 index 00000000000..8280db10146 --- /dev/null +++ b/srcpkgs/spice-gtk/patches/fix-vapi-build.patch @@ -0,0 +1,35 @@ +From 432a29090c061b8567d69c576f6761904c8d228b Mon Sep 17 00:00:00 2001 +From: Rasmus Thomsen +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 + diff --git a/srcpkgs/spice-gtk/patches/fix-version.patch b/srcpkgs/spice-gtk/patches/fix-version.patch new file mode 100644 index 00000000000..9f7dff9c0df --- /dev/null +++ b/srcpkgs/spice-gtk/patches/fix-version.patch @@ -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) + diff --git a/srcpkgs/spice-gtk/template b/srcpkgs/spice-gtk/template index c55946f7861..490cb7c08c8 100644 --- a/srcpkgs/spice-gtk/template +++ b/srcpkgs/spice-gtk/template @@ -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 " +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