commit: 6d5254e87e4657eb1d4bf6656da3edf72c695a70 Author: orbea <orbea <AT> riseup <DOT> net> AuthorDate: Sun Jun 12 01:16:21 2022 +0000 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> CommitDate: Sun Jun 12 01:24:50 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=6d5254e8
app-emulation/spice: Added Upstream-PR: https://gitlab.freedesktop.org/spice/spice/-/merge_requests/208 Signed-off-by: orbea <orbea <AT> riseup.net> Closes: https://github.com/gentoo/libressl/pull/420 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> app-emulation/spice/Manifest | 2 + app-emulation/spice/files/README.gentoo | 7 ++ .../spice/files/spice-0.15.0-libressl.patch | 28 ++++++ app-emulation/spice/metadata.xml | 11 +++ app-emulation/spice/spice-0.15.0.ebuild | 106 +++++++++++++++++++++ 5 files changed, 154 insertions(+) diff --git a/app-emulation/spice/Manifest b/app-emulation/spice/Manifest new file mode 100644 index 0000000..9fac0bc --- /dev/null +++ b/app-emulation/spice/Manifest @@ -0,0 +1,2 @@ +DIST spice-0.15.0-pthread-c5fe3df1.patch.bz2 7605 BLAKE2B 86b8094a22a02080db038ef98972bf09f391d5344fee8df2aa7d2def0b50a581353cb0e3dd97f99bbd58b88a13ceac4b54be8086a9f4274f38d132b27b62e84d SHA512 5075bd260b33c2dad8c3ce641372383871f7d69190a4f4697bd5e12af1bf5429310c592961de001d36c19a9cdd91143b8d6e8be0e08b3850b9700c2aef2ddd78 +DIST spice-0.15.0.tar.bz2 1537970 BLAKE2B 98e8f55de81a86c6370e4a74c0fd90db78a9a8e8e3af536bccd6a2a75185194ac7b87521163090c4312e392d2ee10036c0283171c7796aea630e1307128a2d55 SHA512 0a776d191c395ce1f7ebbbac47956a00a2765327d3127aeca6e232bd56fd4ccd28750ae1599eb6eb2909ac909cda517d5511faa631166db16b8b75bd4e7b86d9 diff --git a/app-emulation/spice/files/README.gentoo b/app-emulation/spice/files/README.gentoo new file mode 100644 index 0000000..1920ea6 --- /dev/null +++ b/app-emulation/spice/files/README.gentoo @@ -0,0 +1,7 @@ + +If you choose to enable the video streaming support of gstreamer, +please try to install addtional gst-plugins which matching the video codecs + + mjpeg media-plugins/gst-plugins-libav:1.0 + vpx media-plugins/gst-plugins-vpx:1.0 + x264 media-plugins/gst-plugins-x264:1.0 diff --git a/app-emulation/spice/files/spice-0.15.0-libressl.patch b/app-emulation/spice/files/spice-0.15.0-libressl.patch new file mode 100644 index 0000000..f96a05e --- /dev/null +++ b/app-emulation/spice/files/spice-0.15.0-libressl.patch @@ -0,0 +1,28 @@ +Upstream-PR: https://gitlab.freedesktop.org/spice/spice/-/merge_requests/208 +From 81664d809965927c951bcb58a6ce1e3ddd326100 Mon Sep 17 00:00:00 2001 +From: orbea <[email protected]> +Date: Sat, 11 Jun 2022 16:30:09 -0700 +Subject: [PATCH] server: Fix the build with libressl + +--- + server/red-stream.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/server/red-stream.cpp b/server/red-stream.cpp +index 2c45299c..196a8945 100644 +--- a/server/red-stream.cpp ++++ b/server/red-stream.cpp +@@ -523,8 +523,8 @@ RedStreamSslStatus red_stream_ssl_accept(RedStream *stream) + return RED_STREAM_SSL_STATUS_OK; + } + +-#ifndef SSL_OP_NO_RENEGOTIATION +- // With OpenSSL 1.0.2 and earlier: disable client-side renogotiation ++#if !defined(SSL_OP_NO_RENEGOTIATION) && !defined(LIBRESSL_VERSION_NUMBER) ++ // With LibreSSL or OpenSSL 1.0.2 and earlier: disable client-side renogotiation + stream->priv->ssl->s3->flags |= SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS; + #endif + +-- +GitLab + diff --git a/app-emulation/spice/metadata.xml b/app-emulation/spice/metadata.xml new file mode 100644 index 0000000..f62aa72 --- /dev/null +++ b/app-emulation/spice/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>[email protected]</email> + <name>Gentoo Virtualization Project</name> + </maintainer> + <use> + <flag name="smartcard">Enable smartcard remoting using <pkg>app-emulation/libcacard</pkg></flag> + </use> +</pkgmetadata> diff --git a/app-emulation/spice/spice-0.15.0.ebuild b/app-emulation/spice/spice-0.15.0.ebuild new file mode 100644 index 0000000..c5d0f60 --- /dev/null +++ b/app-emulation/spice/spice-0.15.0.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9,10} ) +inherit autotools python-any-r1 readme.gentoo-r1 xdg-utils + +DESCRIPTION="SPICE server" +HOMEPAGE="https://www.spice-space.org/" +SRC_URI="https://www.spice-space.org/download/releases/spice-server/${P}.tar.bz2" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-pthread-c5fe3df1.patch.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86" +IUSE="lz4 sasl smartcard static-libs gstreamer test" + +RESTRICT="!test? ( test )" + +# the libspice-server only uses the headers of libcacard +RDEPEND=" + dev-lang/orc[static-libs(+)?] + >=dev-libs/glib-2.38:2[static-libs(+)?] + media-libs/opus[static-libs(+)?] + sys-libs/zlib[static-libs(+)?] + virtual/jpeg:0=[static-libs(+)?] + >=x11-libs/pixman-0.17.7[static-libs(+)?] + dev-libs/openssl:0=[static-libs(+)?] + lz4? ( app-arch/lz4:0=[static-libs(+)?] ) + smartcard? ( >=app-emulation/libcacard-2.5.1 ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] ) + gstreamer? ( + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + )" +DEPEND="${RDEPEND} + >=app-emulation/spice-protocol-0.14.3 + smartcard? ( app-emulation/qemu[smartcard] ) + test? ( net-libs/glib-networking )" +BDEPEND="${PYTHON_DEPS} + sys-devel/autoconf-archive + virtual/pkgconfig + $(python_gen_any_dep ' + >=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ')" + +PATCHES=( + "${FILESDIR}"/${P}-libressl.patch + "${WORKDIR}"/${P}-pthread-c5fe3df1.patch +) + +python_check_deps() { + has_version -b ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]" + has_version -b "dev-python/six[${PYTHON_USEDEP}]" +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup +} + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + # Prevent sandbox violations, bug #586560 + # https://bugzilla.gnome.org/show_bug.cgi?id=744134 + # https://bugzilla.gnome.org/show_bug.cgi?id=744135 + addpredict /dev + + xdg_environment_reset + + local myconf=" + $(use_enable static-libs static) + $(use_enable lz4) + $(use_with sasl) + $(use_enable smartcard) + $(use_enable test tests) + --enable-gstreamer=$(usex gstreamer "1.0" "no") + --disable-celt051 + " + econf ${myconf} +} + +src_compile() { + # Prevent sandbox violations, bug #586560 + # https://bugzilla.gnome.org/show_bug.cgi?id=744134 + # https://bugzilla.gnome.org/show_bug.cgi?id=744135 + addpredict /dev + + default +} + +src_install() { + default + use static-libs || find "${D}" -name '*.la' -type f -delete || die + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +}
