[Midnightbsd-cvs] mports [24051] trunk/devel: add libspice server

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Aug 31 15:23:43 EDT 2018


Revision: 24051
          http://svnweb.midnightbsd.org/mports/?rev=24051
Author:   laffer1
Date:     2018-08-31 15:23:42 -0400 (Fri, 31 Aug 2018)
Log Message:
-----------
add libspice server

Modified Paths:
--------------
    trunk/devel/Makefile

Added Paths:
-----------
    trunk/devel/libspice-server/
    trunk/devel/libspice-server/Makefile
    trunk/devel/libspice-server/distinfo
    trunk/devel/libspice-server/files/
    trunk/devel/libspice-server/files/patch-configure.ac
    trunk/devel/libspice-server/files/patch-server-net-utils.c
    trunk/devel/libspice-server/files/patch-server-red-worker.c
    trunk/devel/libspice-server/files/patch-server-sound.c
    trunk/devel/libspice-server/files/patch-server-tests-test-display-base.c
    trunk/devel/libspice-server/files/patch-tools-reds_stat.c
    trunk/devel/libspice-server/pkg-descr
    trunk/devel/libspice-server/pkg-plist

Modified: trunk/devel/Makefile
===================================================================
--- trunk/devel/Makefile	2018-08-31 19:19:58 UTC (rev 24050)
+++ trunk/devel/Makefile	2018-08-31 19:23:42 UTC (rev 24051)
@@ -185,6 +185,7 @@
 SUBDIR += libsigc++20
 SUBDIR += libsigsegv
 SUBDIR += libslang2
+SUBDIR += libspice-server
 SUBDIR += libsoup
 SUBDIR += libsoup-gnome
 SUBDIR += libthai

Added: trunk/devel/libspice-server/Makefile
===================================================================
--- trunk/devel/libspice-server/Makefile	                        (rev 0)
+++ trunk/devel/libspice-server/Makefile	2018-08-31 19:23:42 UTC (rev 24051)
@@ -0,0 +1,58 @@
+# $MidnightBSD$
+
+PORTNAME=	libspice-server
+DISTVERSION=	0.14.0
+PORTREVISION=	2
+CATEGORIES=	devel
+MASTER_SITES=	https://www.spice-space.org/download/releases/
+DISTNAME=	spice-${PORTVERSION}
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Implements the server side of the SPICE protocol
+
+LICENSE=	gpl2
+
+BROKEN_powerpc64=	fails to compile: red-channel-client.h:44: redefinition of typedef 'RedChannelClient'
+
+LIB_DEPENDS=	libopus.so:audio/opus
+BUILD_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=		autoreconf gmake jpeg libtool localbase:ldflag pkgconfig \
+		python 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}" \
+		PYTHON=${PYTHON_CMD}
+
+INSTALL_TARGET=	install-strip
+
+.include <bsd.port.mk>


Property changes on: trunk/devel/libspice-server/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/distinfo
===================================================================
--- trunk/devel/libspice-server/distinfo	                        (rev 0)
+++ trunk/devel/libspice-server/distinfo	2018-08-31 19:23:42 UTC (rev 24051)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1514376420
+SHA256 (spice-0.14.0.tar.bz2) = 3adb9495b51650e5eab53c74dd6a74919af4b339ff21721d9ab2a45b2e3bb848
+SIZE (spice-0.14.0.tar.bz2) = 1330195


Property changes on: trunk/devel/libspice-server/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/files/patch-configure.ac
===================================================================
--- trunk/devel/libspice-server/files/patch-configure.ac	                        (rev 0)
+++ trunk/devel/libspice-server/files/patch-configure.ac	2018-08-31 19:23:42 UTC (rev 24051)
@@ -0,0 +1,31 @@
+--- configure.ac.orig	2018-01-13 04:00:56 UTC
++++ configure.ac
+@@ -62,7 +62,7 @@ AC_SUBST(SPICE_LT_VERSION)
+ 
+ # Check for the CPU we are using
+ case $host_cpu in
+-  x86_64)
++  x86_64|amd64)
+         ;;
+   *)
+         SPICE_WARNING([spice-server on non-x86_64 architectures has not been extensively tested])
+@@ -186,10 +186,18 @@ if test "x$enable_celt051" = "xyes"; then
+                       AS_VAR_APPEND([SPICE_REQUIRES], [" celt051 >= $CELT051_REQUIRED"]))
+ fi
+ 
++OPENSSL_PKGCONF_USED=1
++if test -n "${OPENSSL_LIBS}" || test -n "${OPENSSL_CFLAGS}"; then
++    OPENSSL_PKGCONF_USED=0
++fi
+ PKG_CHECK_MODULES(SSL, openssl)
+ AC_SUBST(SSL_CFLAGS)
+ AC_SUBST(SSL_LIBS)
+-AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
++if test "{OPENSSL_PKGCONF_USED}" = 1; then
++    AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
++else
++    AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $SSL_LIBS"])
++fi
+ 
+ AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
+     AC_MSG_CHECKING([for jpeglib.h])


Property changes on: trunk/devel/libspice-server/files/patch-configure.ac
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/files/patch-server-net-utils.c
===================================================================
--- trunk/devel/libspice-server/files/patch-server-net-utils.c	                        (rev 0)
+++ trunk/devel/libspice-server/files/patch-server-net-utils.c	2018-08-31 19:23:42 UTC (rev 24051)
@@ -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


Property changes on: trunk/devel/libspice-server/files/patch-server-net-utils.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/files/patch-server-red-worker.c
===================================================================
--- trunk/devel/libspice-server/files/patch-server-red-worker.c	                        (rev 0)
+++ trunk/devel/libspice-server/files/patch-server-red-worker.c	2018-08-31 19:23:42 UTC (rev 24051)
@@ -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;


Property changes on: trunk/devel/libspice-server/files/patch-server-red-worker.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/files/patch-server-sound.c
===================================================================
--- trunk/devel/libspice-server/files/patch-server-sound.c	                        (rev 0)
+++ trunk/devel/libspice-server/files/patch-server-sound.c	2018-08-31 19:23:42 UTC (rev 24051)
@@ -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>


Property changes on: trunk/devel/libspice-server/files/patch-server-sound.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/files/patch-server-tests-test-display-base.c
===================================================================
--- trunk/devel/libspice-server/files/patch-server-tests-test-display-base.c	                        (rev 0)
+++ trunk/devel/libspice-server/files/patch-server-tests-test-display-base.c	2018-08-31 19:23:42 UTC (rev 24051)
@@ -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>


Property changes on: trunk/devel/libspice-server/files/patch-server-tests-test-display-base.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/files/patch-tools-reds_stat.c
===================================================================
--- trunk/devel/libspice-server/files/patch-tools-reds_stat.c	                        (rev 0)
+++ trunk/devel/libspice-server/files/patch-tools-reds_stat.c	2018-08-31 19:23:42 UTC (rev 24051)
@@ -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;


Property changes on: trunk/devel/libspice-server/files/patch-tools-reds_stat.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/pkg-descr
===================================================================
--- trunk/devel/libspice-server/pkg-descr	                        (rev 0)
+++ trunk/devel/libspice-server/pkg-descr	2018-08-31 19:23:42 UTC (rev 24051)
@@ -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/


Property changes on: trunk/devel/libspice-server/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/libspice-server/pkg-plist
===================================================================
--- trunk/devel/libspice-server/pkg-plist	                        (rev 0)
+++ trunk/devel/libspice-server/pkg-plist	2018-08-31 19:23:42 UTC (rev 24051)
@@ -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


Property changes on: trunk/devel/libspice-server/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list