aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2018-01-13 00:43:42 +0800
committernovel <novel@FreeBSD.org>2018-01-13 00:43:42 +0800
commitc4bea8c02a0ac186f801d5b2d007058b298a2d19 (patch)
treea4603b0ba9cdf38a57e241d29913e33e89188a6e /devel
parent3f05858187d59929c8a72fd952539a7aa93f0aec (diff)
downloadfreebsd-ports-gnome-c4bea8c02a0ac186f801d5b2d007058b298a2d19.tar.gz
freebsd-ports-gnome-c4bea8c02a0ac186f801d5b2d007058b298a2d19.tar.zst
freebsd-ports-gnome-c4bea8c02a0ac186f801d5b2d007058b298a2d19.zip
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@olevole.ru
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/libspice-server/Makefile56
-rw-r--r--devel/libspice-server/distinfo3
-rw-r--r--devel/libspice-server/files/patch-server-net-utils.c23
-rw-r--r--devel/libspice-server/files/patch-server-red-worker.c27
-rw-r--r--devel/libspice-server/files/patch-server-sound.c11
-rw-r--r--devel/libspice-server/files/patch-server-tests-test-display-base.c10
-rw-r--r--devel/libspice-server/files/patch-tools-reds_stat.c60
-rw-r--r--devel/libspice-server/pkg-descr10
-rw-r--r--devel/libspice-server/pkg-plist15
10 files changed, 216 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 567506b576b8..38567a6f5471 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1538,6 +1538,7 @@
SUBDIR += libsoup-gnome
SUBDIR += libsoup-reference
SUBDIR += libspark2012
+ SUBDIR += libspice-server
SUBDIR += libstatgrab
SUBDIR += libstatgrab0
SUBDIR += libstrfunc
diff --git a/devel/libspice-server/Makefile b/devel/libspice-server/Makefile
new file mode 100644
index 000000000000..e25d7f0adaa1
--- /dev/null
+++ b/devel/libspice-server/Makefile
@@ -0,0 +1,56 @@
+# Created by: olevole@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@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>
diff --git a/devel/libspice-server/distinfo b/devel/libspice-server/distinfo
new file mode 100644
index 000000000000..d7dc5866ead7
--- /dev/null
+++ b/devel/libspice-server/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1514376420
+SHA256 (spice-0.14.0.tar.bz2) = 3adb9495b51650e5eab53c74dd6a74919af4b339ff21721d9ab2a45b2e3bb848
+SIZE (spice-0.14.0.tar.bz2) = 1330195
diff --git a/devel/libspice-server/files/patch-server-net-utils.c b/devel/libspice-server/files/patch-server-net-utils.c
new file mode 100644
index 000000000000..21913229f250
--- /dev/null
+++ b/devel/libspice-server/files/patch-server-net-utils.c
@@ -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
diff --git a/devel/libspice-server/files/patch-server-red-worker.c b/devel/libspice-server/files/patch-server-red-worker.c
new file mode 100644
index 000000000000..2e52726fe3ba
--- /dev/null
+++ b/devel/libspice-server/files/patch-server-red-worker.c
@@ -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;
diff --git a/devel/libspice-server/files/patch-server-sound.c b/devel/libspice-server/files/patch-server-sound.c
new file mode 100644
index 000000000000..5e1ea7ccb547
--- /dev/null
+++ b/devel/libspice-server/files/patch-server-sound.c
@@ -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>
diff --git a/devel/libspice-server/files/patch-server-tests-test-display-base.c b/devel/libspice-server/files/patch-server-tests-test-display-base.c
new file mode 100644
index 000000000000..ba3a5512de21
--- /dev/null
+++ b/devel/libspice-server/files/patch-server-tests-test-display-base.c
@@ -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>
diff --git a/devel/libspice-server/files/patch-tools-reds_stat.c b/devel/libspice-server/files/patch-tools-reds_stat.c
new file mode 100644
index 000000000000..a6963c104829
--- /dev/null
+++ b/devel/libspice-server/files/patch-tools-reds_stat.c
@@ -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;
diff --git a/devel/libspice-server/pkg-descr b/devel/libspice-server/pkg-descr
new file mode 100644
index 000000000000..f8d62b4a6c93
--- /dev/null
+++ b/devel/libspice-server/pkg-descr
@@ -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/
diff --git a/devel/libspice-server/pkg-plist b/devel/libspice-server/pkg-plist
new file mode 100644
index 000000000000..b7ca357ad4e0
--- /dev/null
+++ b/devel/libspice-server/pkg-plist
@@ -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