New packages : liborc , libspice-server , libspice-protocol (#7101)
Add packages: liborc, libspice-protocol, libspice-server
This commit is contained in:
parent
7a19665fbb
commit
b4552fb7ec
15
packages/liborc/build.sh
Normal file
15
packages/liborc/build.sh
Normal file
@ -0,0 +1,15 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://gstreamer.freedesktop.org/projects/orc.html
|
||||
TERMUX_PKG_DESCRIPTION="Library of Optimized Inner Loops Runtime Compiler"
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.4.32
|
||||
TERMUX_PKG_SRCURL=https://github.com/GStreamer/orc/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=6a7349d2ab4a73476cd4de36212e8c3c6524998081aaa04cf3a891ef792dd50f
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-Dorc-test=disabled
|
||||
-Dtests=disabled
|
||||
-Dbenchmarks=disabled
|
||||
-Dexamples=disabled
|
||||
-Dgtk_doc=disabled
|
||||
"
|
12
packages/liborc/orcprogramneon.c.patch
Normal file
12
packages/liborc/orcprogramneon.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- orc-0.4.32/orc/orcprogram-neon.c 2020-09-11 09:33:15.000000000 +0000
|
||||
+++ orc-0.4.32-fix/orc/orcprogram-neon.c 2021-07-04 09:42:01.803161969 +0000
|
||||
@@ -126,7 +126,7 @@
|
||||
void
|
||||
orc_neon_init (void)
|
||||
{
|
||||
-#if defined(HAVE_ARM)
|
||||
+#if defined(HAVE_ARM) && defined(__TARGET_ARCH_ARM)
|
||||
if (!(orc_arm_get_cpu_flags () & ORC_TARGET_NEON_NEON)) {
|
||||
ORC_INFO("marking neon backend non-executable");
|
||||
neon_target.executable = FALSE;
|
||||
|
12
packages/libspice-protocol/build.sh
Normal file
12
packages/libspice-protocol/build.sh
Normal file
@ -0,0 +1,12 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.spice-space.org/
|
||||
TERMUX_PKG_DESCRIPTION="SPICE protocol headers"
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.14.3
|
||||
TERMUX_PKG_SRCURL=https://www.spice-space.org/download/releases/spice-protocol-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=f986e5bc2a1598532c4897f889afb0df9257ac21c160c083703ae7c8de99487a
|
||||
|
||||
termux_step_post_make_install() {
|
||||
mv "${TERMUX_PREFIX}"/share/pkgconfig/spice-protocol.pc \
|
||||
"${TERMUX_PREFIX}"/lib/pkgconfig
|
||||
}
|
13
packages/libspice-server/build.sh
Normal file
13
packages/libspice-server/build.sh
Normal file
@ -0,0 +1,13 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.spice-space.org/
|
||||
TERMUX_PKG_DESCRIPTION="Implements the server side of the SPICE protocol"
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.14.91
|
||||
TERMUX_PKG_SRCURL=https://www.spice-space.org/download/releases/spice-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=d29acdfe56a09a4f68ddb11e1be27029d478dd863c80245a02e2eaae54afa10f
|
||||
TERMUX_PKG_DEPENDS="glib, libjpeg-turbo, gstreamer, gst-plugins-base, libsasl, libspice-protocol, liborc, openssl, libopus, libpixman, liblz4, zlib, libiconv"
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--enable-manual=no
|
||||
--disable-tests
|
||||
"
|
22
packages/libspice-server/disable-tools.patch
Normal file
22
packages/libspice-server/disable-tools.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- spice-0.14.91/Makefile.in 2020-10-26 12:20:20.000000000 +0000
|
||||
+++ spice-0.14.91-fix/Makefile.in 2021-07-04 16:19:48.925982437 +0000
|
||||
@@ -425,7 +425,7 @@
|
||||
valgrind_tools = @valgrind_tools@
|
||||
NULL =
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
-SUBDIRS = subprojects/spice-common server docs tools
|
||||
+SUBDIRS = subprojects/spice-common server docs
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = spice-server.pc
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--- spice-0.14.91/Makefile.am 2020-10-26 12:18:53.000000000 +0000
|
||||
+++ spice-0.14.91-fix/Makefile.am 2021-07-04 16:20:05.886952189 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
NULL =
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
-SUBDIRS = subprojects/spice-common server docs tools
|
||||
+SUBDIRS = subprojects/spice-common server docs
|
||||
|
||||
if ENABLE_TESTS
|
||||
check-valgrind:
|
16
packages/libspice-server/meson.build.patch
Normal file
16
packages/libspice-server/meson.build.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- spice-0.14.91/meson.build 2020-10-26 12:18:53.000000000 +0000
|
||||
+++ spice-0.14.91-fix/meson.build 2021-07-04 16:17:51.603269800 +0000
|
||||
@@ -208,7 +208,6 @@
|
||||
# Subdirectories
|
||||
#
|
||||
subdir('server')
|
||||
-subdir('tools')
|
||||
subdir('docs')
|
||||
|
||||
#
|
||||
@@ -229,4 +228,4 @@
|
||||
configure_file(output : 'config.h',
|
||||
configuration : spice_server_config_data)
|
||||
|
||||
-run_target('doxy', command : './doxygen.sh')
|
||||
+run_target('doxy', command : 'doxygen')
|
11
packages/libspice-server/red-steam.cpp.patch
Normal file
11
packages/libspice-server/red-steam.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- spice-0.14.91/server/red-stream.cpp 2020-10-26 12:18:53.000000000 +0000
|
||||
+++ spice-0.14.91-fix/server/red-stream.cpp 2021-07-04 16:14:35.124025751 +0000
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
+#include <linux/in.h>
|
||||
+
|
||||
#include <glib.h>
|
||||
|
||||
#include <openssl/err.h>
|
68
packages/libspice-server/stat-file.c.patch
Normal file
68
packages/libspice-server/stat-file.c.patch
Normal file
@ -0,0 +1,68 @@
|
||||
--- spice-0.14.91/server/stat-file.c 2020-10-26 12:18:53.000000000 +0000
|
||||
+++ spice-0.14.91-fix/server/stat-file.c 2021-07-04 16:16:07.377308048 +0000
|
||||
@@ -34,6 +34,65 @@
|
||||
#define STAT_SHM_SIZE(max_nodes) \
|
||||
(sizeof(SpiceStat) + (max_nodes) * sizeof(SpiceStatNode))
|
||||
|
||||
+static int shm_unlink(const char *name) {
|
||||
+ size_t namelen;
|
||||
+ char *fname;
|
||||
+
|
||||
+ /* Construct the filename. */
|
||||
+ while (name[0] == '/') ++name;
|
||||
+
|
||||
+ if (name[0] == '\0') {
|
||||
+ /* The name "/" is not supported. */
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ namelen = strlen(name);
|
||||
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
|
||||
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
|
||||
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
|
||||
+
|
||||
+ return unlink(fname);
|
||||
+}
|
||||
+
|
||||
+static int shm_open(const char *name, int oflag, mode_t mode) {
|
||||
+ size_t namelen;
|
||||
+ char *fname;
|
||||
+ int fd;
|
||||
+
|
||||
+ /* Construct the filename. */
|
||||
+ while (name[0] == '/') ++name;
|
||||
+
|
||||
+ if (name[0] == '\0') {
|
||||
+ /* The name "/" is not supported. */
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ namelen = strlen(name);
|
||||
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
|
||||
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
|
||||
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
|
||||
+
|
||||
+ fd = open(fname, oflag, mode);
|
||||
+ if (fd != -1) {
|
||||
+ /* We got a descriptor. Now set the FD_CLOEXEC bit. */
|
||||
+ int flags = fcntl(fd, F_GETFD, 0);
|
||||
+ flags |= FD_CLOEXEC;
|
||||
+ flags = fcntl(fd, F_SETFD, flags);
|
||||
+
|
||||
+ if (flags == -1) {
|
||||
+ /* Something went wrong. We cannot return the descriptor. */
|
||||
+ int save_errno = errno;
|
||||
+ close(fd);
|
||||
+ fd = -1;
|
||||
+ errno = save_errno;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
struct RedStatFile {
|
||||
char *shm_name;
|
||||
SpiceStat *stat;
|
Loading…
Reference in New Issue
Block a user