svn commit: r458858 - in head/devel: . libspice-server libspice-server/files

Roman Bogorodskiy novel at FreeBSD.org
Fri Jan 12 16:43:44 UTC 2018


Author: novel
Date: Fri Jan 12 16:43:42 2018
New Revision: 458858
URL: https://svnweb.freebsd.org/changeset/ports/458858

Log:
  The Simple Protocol for Independent Computing Environments (SPICE) is
  a remote display system built for virtual environments which allows
  you to view a computing 'desktop' environment not only on the machine
  where it is running, but from anywhere on the Internet and from a wide
  variety of machine architectures.
  
  This package contains the run-time libraries for any application that
  wishes to be a SPICE server
  
  WWW: http://spice-space.org/
  
  PR:		225088
  Submitted by:	olevole at olevole.ru

Added:
  head/devel/libspice-server/
  head/devel/libspice-server/Makefile   (contents, props changed)
  head/devel/libspice-server/distinfo   (contents, props changed)
  head/devel/libspice-server/files/
  head/devel/libspice-server/files/patch-server-net-utils.c   (contents, props changed)
  head/devel/libspice-server/files/patch-server-red-worker.c   (contents, props changed)
  head/devel/libspice-server/files/patch-server-sound.c   (contents, props changed)
  head/devel/libspice-server/files/patch-server-tests-test-display-base.c   (contents, props changed)
  head/devel/libspice-server/files/patch-tools-reds_stat.c   (contents, props changed)
  head/devel/libspice-server/pkg-descr   (contents, props changed)
  head/devel/libspice-server/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Fri Jan 12 16:26:29 2018	(r458857)
+++ head/devel/Makefile	Fri Jan 12 16:43:42 2018	(r458858)
@@ -1538,6 +1538,7 @@
     SUBDIR += libsoup-gnome
     SUBDIR += libsoup-reference
     SUBDIR += libspark2012
+    SUBDIR += libspice-server
     SUBDIR += libstatgrab
     SUBDIR += libstatgrab0
     SUBDIR += libstrfunc

Added: head/devel/libspice-server/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/Makefile	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,56 @@
+# Created by: olevole at olevole.ru
+# $FreeBSD$
+
+PORTNAME=	libspice-server
+DISTVERSION=	0.14.0
+CATEGORIES=	devel
+MASTER_SITES=	https://www.spice-space.org/download/releases/
+DISTNAME=	spice-${PORTVERSION}
+
+MAINTAINER=	olevole at olevole.ru
+COMMENT=	Implements the server side of the SPICE protocol
+
+LICENSE=	GPLv2
+
+LIB_DEPENDS=	libopus.so:audio/opus
+BUILD_DEPENDS=	spice-protocol>=0.12.10:devel/spice-protocol
+RUN_DEPENDS=	spice-protocol>=0.12.10:devel/spice-protocol
+
+OPTIONS_DEFINE=		GSTREAMER LZ4 SASL STATISTICS
+OPTIONS_DEFAULT=	GSTREAMER LZ4 SASL
+STATISTICS_DESC=	Statistic code
+
+GSTREAMER_CONFIGURE_ON=		--enable-gstreamer=1.0
+GSTREAMER_CONFIGURE_OFF=	--enable-gstreamer=no
+GSTREAMER_USE=			gstreamer1=yes
+GSTREAMER_LIB_DEPENDS=		liborc-0.4.so:devel/orc
+
+LZ4_CONFIGURE_ENABLE=	lz4
+LZ4_LIB_DEPENDS+=	liblz4.so:archivers/liblz4
+
+SASL_CONFIGURE_WITH=	sasl
+SASL_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
+
+STATISTICS_CONFIGURE_ENABLE=	statistics
+
+USES=		gmake jpeg libtool localbase:ldflag pkgconfig \
+		ssl tar:bzip2
+
+USE_GNOME=	glib20
+USE_XORG=	pixman
+USE_LDCONFIG=	yes
+
+CPE_VENDOR=	redhat
+
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS+=--disable-celt051 \
+		--enable-manual=no
+
+SPICE_SSL_CFLAGS=	-I${OPENSSLINC}
+SPICE_SSL_LIBS=	-L${OPENSSLLIB} -lcrypto -lssl
+CONFIGURE_ENV+=	SSL_CFLAGS="${SPICE_SSL_CFLAGS}" SSL_LIBS="${SPICE_SSL_LIBS}" \
+		OPENSSL_CFLAGS="${SPICE_SSL_CFLAGS}" OPENSSL_LIBS="${SPICE_SSL_LIBS}"
+
+INSTALL_TARGET=	install-strip
+
+.include <bsd.port.mk>

Added: head/devel/libspice-server/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/distinfo	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1514376420
+SHA256 (spice-0.14.0.tar.bz2) = 3adb9495b51650e5eab53c74dd6a74919af4b339ff21721d9ab2a45b2e3bb848
+SIZE (spice-0.14.0.tar.bz2) = 1330195

Added: head/devel/libspice-server/files/patch-server-net-utils.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/files/patch-server-net-utils.c	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,23 @@
+--- server/net-utils.c.orig	2017-09-12 12:00:11 UTC
++++ server/net-utils.c
+@@ -23,6 +23,9 @@
+ #include <fcntl.h>
+ #include <stdbool.h>
+ #include <string.h>
++#include <sys/types.h>
++#include <arpa/inet.h>
++#include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/tcp.h>
+ #include <sys/socket.h>
+@@ -31,6 +34,10 @@
+ 
+ #include "net-utils.h"
+ 
++#if !defined(SOL_TCP) && defined(IPPROTO_TCP)
++#define SOL_TCP IPPROTO_TCP
++#endif
++
+ /**
+  * red_socket_set_keepalive:
+  * @fd: a socket file descriptor

Added: head/devel/libspice-server/files/patch-server-red-worker.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/files/patch-server-red-worker.c	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,27 @@
+--- server/red-worker.c.orig	2017-09-21 11:05:07 UTC
++++ server/red-worker.c
+@@ -28,6 +28,7 @@
+ #include <unistd.h>
+ #include <poll.h>
+ #include <pthread.h>
++#include <pthread_np.h>
+ #include <openssl/ssl.h>
+ #include <inttypes.h>
+ #include <glib.h>
+@@ -52,6 +53,16 @@
+ 
+ #define INF_EVENT_WAIT ~0
+ 
++int pthread_setname_np(pthread_t, const char *);
++
++
++int pthread_setname_np(pthread_t id, const char *name)
++{
++	/* this BSD function returns no error */
++	pthread_set_name_np(id, name);
++	return 0;
++}
++
+ struct RedWorker {
+     pthread_t thread;
+     QXLInstance *qxl;

Added: head/devel/libspice-server/files/patch-server-sound.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/files/patch-server-sound.c	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,11 @@
+--- server/sound.c.orig	2017-09-21 11:05:07 UTC
++++ server/sound.c
+@@ -22,6 +22,8 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <limits.h>
++#include <sys/types.h>
++#include <netinet/in.h>
+ #include <sys/socket.h>
+ #include <netinet/ip.h>
+ #include <netinet/tcp.h>

Added: head/devel/libspice-server/files/patch-server-tests-test-display-base.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/files/patch-server-tests-test-display-base.c	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,10 @@
+--- server/tests/test-display-base.c.orig	2017-09-21 15:45:56 UTC
++++ server/tests/test-display-base.c
+@@ -22,7 +22,6 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <signal.h>
+-#include <wait.h>
+ #include <sys/select.h>
+ #include <sys/types.h>
+ #include <getopt.h>

Added: head/devel/libspice-server/files/patch-tools-reds_stat.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/files/patch-tools-reds_stat.c	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,60 @@
+--- tools/reds_stat.c.orig	2017-09-21 11:05:07 UTC
++++ tools/reds_stat.c
+@@ -34,11 +34,47 @@
+ #define VALUE_TABS 7
+ #define INVALID_STAT_REF (~(uint32_t)0)
+ 
++#define MREMAP_MAYMOVE     1
++
+ verify(sizeof(SpiceStat) == 20 || sizeof(SpiceStat) == 24);
+ 
+ static SpiceStatNode *reds_nodes = NULL;
+ static uint64_t *values = NULL;
+ 
++void *mremap(int fd,void *oldaddr,size_t oldlen,size_t newlen,int prot,int flags);
++
++void *mremap(int fd,void *oldaddr,size_t oldlen,
++                                size_t newlen,int prot,int flags){
++        void *ret;
++
++        // From mmap(2) on freebsd 6.3: A successful FIXED mmap deletes any
++        // previous mapping in the allocated address range. This means:
++        // remapping over a current map will blow it away (unless FIXED isn't
++        // provided, in which case it can't overlap an old mapping. See bug
++        // 733 for extensive discussion of this issue for Linux and FreeBSD).
++        if((ret = mmap((char *)oldaddr + oldlen,newlen - oldlen,prot,flags,fd,oldlen)) == MAP_FAILED){
++                // We couldn't get the memory whatsoever (or we were a fresh
++                // allocation that succeeded). Return the immediate result...
++                return ret;
++        } // ret != MAP_FAILED. Did we squash?
++        if(ret != (char *)oldaddr + oldlen){
++                // We got the memory, but not where we wanted it. Copy over the
++                // old map, and then free it up...
++                //nag("Wanted %p, got %p\n",(char *)oldaddr + oldlen,ret);
++                munmap(ret,newlen - oldlen);
++//                Munmap(ret,newlen - oldlen);
++                if((ret = mmap(NULL,newlen,prot,flags,fd,0)) == MAP_FAILED){
++                        return ret;
++                }
++                memcpy(ret,oldaddr,oldlen);
++                munmap(oldaddr,oldlen); // Free the old mapping
++//                Munmap(oldaddr,oldlen); // Free the old mapping
++                return ret;
++        } // We successfully squashed. Return a pointer to the first buf.
++        return oldaddr;
++}
++
++
+ static void print_stat_tree(int32_t node_index, int depth)
+ {
+     SpiceStatNode *node = &reds_nodes[node_index];
+@@ -144,7 +180,8 @@ int main(int argc, char **argv)
+             num_of_nodes = reds_stat->num_of_nodes;
+             shm_old_size = shm_size;
+             shm_size = header_size + num_of_nodes * sizeof(SpiceStatNode);
+-            reds_stat = mremap(reds_stat, shm_old_size, shm_size, MREMAP_MAYMOVE);
++// todo
++//            reds_stat = mremap(reds_stat, shm_old_size, shm_size, MREMAP_MAYMOVE);
+             if (reds_stat == (SpiceStat *)MAP_FAILED) {
+                 perror("mremap");
+                 goto error;

Added: head/devel/libspice-server/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/pkg-descr	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,10 @@
+The Simple Protocol for Independent Computing Environments (SPICE) is
+a remote display system built for virtual environments which allows
+you to view a computing 'desktop' environment not only on the machine
+where it is running, but from anywhere on the Internet and from a wide
+variety of machine architectures.
+
+This package contains the run-time libraries for any application that
+wishes to be a SPICE server
+
+WWW: http://spice-space.org/

Added: head/devel/libspice-server/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/pkg-plist	Fri Jan 12 16:43:42 2018	(r458858)
@@ -0,0 +1,15 @@
+libdata/pkgconfig/spice-server.pc
+include/spice-server/spice-experimental.h
+include/spice-server/spice-server.h
+include/spice-server/spice-replay.h
+include/spice-server/spice-char.h
+include/spice-server/spice-core.h
+include/spice-server/spice-migration.h
+include/spice-server/spice-input.h
+include/spice-server/spice.h
+include/spice-server/spice-audio.h
+include/spice-server/spice-version.h
+include/spice-server/spice-qxl.h
+lib/libspice-server.so.1.12.4
+lib/libspice-server.so
+lib/libspice-server.so.1


More information about the svn-ports-all mailing list