mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
libvncserver: add recipe for version 0.9.11
This commit is contained in:
85
net-libs/libvncserver/libvncserver-0.9.11.recipe
Normal file
85
net-libs/libvncserver/libvncserver-0.9.11.recipe
Normal file
@@ -0,0 +1,85 @@
|
||||
SUMMARY="Library for creating vnc servers"
|
||||
DESCRIPTION="LibVNCServer/LibVNCClient are cross-platform C libraries that \
|
||||
allow you to easily implement VNC server or client functionality in your \
|
||||
program."
|
||||
HOMEPAGE="https://libvnc.github.io/"
|
||||
COPYRIGHT="2001-2017 Johannes E. Schindelin"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="193d630372722a532136fd25c5326b2ca1a636cbb8bf9bb115ef869c804d2894"
|
||||
SOURCE_DIR="libvncserver-LibVNCServer-$portVersion"
|
||||
PATCHES="libvncserver-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
libvncserver$secondaryArchSuffix = $portVersion
|
||||
lib:libvncserver$secondaryArchSuffix = $portVersion
|
||||
lib:libvncclient$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libgcrypt$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
lib:libgnutls$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libvncserver${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libvncclient$secondaryArchSuffix = $portVersion
|
||||
devel:libvncserver$secondaryArchSuffix = $portVersion
|
||||
cmd:libvncserver_config$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libvncserver$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgcrypt$secondaryArchSuffix
|
||||
devel:libgnutls$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoreconf
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
./autogen.sh
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
mkdir -p $includeDir
|
||||
mv $prefix/include/* $includeDir
|
||||
rm -rf $prefix/include
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libvncclient \
|
||||
libvncserver
|
||||
packageEntries devel \
|
||||
$binDir \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
68
net-libs/libvncserver/patches/libvncserver-0.9.11.patchset
Normal file
68
net-libs/libvncserver/patches/libvncserver-0.9.11.patchset
Normal file
@@ -0,0 +1,68 @@
|
||||
From 0a6b75074845152af54f99b57543e261b18af04c Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Mon, 4 Dec 2017 16:05:26 +0300
|
||||
Subject: Fix build on Haiku
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f13edb4..de9847d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -486,7 +486,7 @@ AC_ARG_WITH(ipv6,
|
||||
[ --without-ipv6 disable IPv6 support],,)
|
||||
if test "x$with_ipv6" != "xno"; then
|
||||
AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(IPv6,1),
|
||||
- AC_CHECK_LIB(socket, getaddrinfo, AC_DEFINE(IPv6,1), [
|
||||
+ AC_CHECK_LIB(network, getaddrinfo, AC_DEFINE(IPv6,1), [
|
||||
AC_MSG_CHECKING([for getaddrinfo in -lws2_32])
|
||||
LIBS="$LIBS -lws2_32"
|
||||
AC_TRY_LINK([#include <ws2tcpip.h>], [getaddrinfo(0, 0, 0, 0);], [
|
||||
@@ -537,7 +537,8 @@ if test "x$uname_s" = "xHP-UX"; then
|
||||
LDFLAGS="$LDFLAGS -lsec"
|
||||
fi
|
||||
|
||||
-AC_CHECK_FUNCS([ftime gethostbyname gethostname gettimeofday inet_ntoa memmove memset mmap mkfifo select socket strchr strcspn strdup strerror strstr])
|
||||
+AC_CHECK_FUNCS([ftime gethostbyname gethostname inet_ntoa memmove memset mmap mkfifo select socket strchr strcspn strdup strerror strstr])
|
||||
+AC_DEFINE([HAVE_GETTIMEOFDAY],[1],[Haiku has gettimeofday])
|
||||
|
||||
# check, if shmget is in cygipc.a
|
||||
AC_CHECK_LIB(cygipc,shmget)
|
||||
diff --git a/examples/Makefile.am b/examples/Makefile.am
|
||||
index 829f735..7241db7 100644
|
||||
--- a/examples/Makefile.am
|
||||
+++ b/examples/Makefile.am
|
||||
@@ -21,7 +21,7 @@ endif
|
||||
noinst_HEADERS=radon.h rotatetemplate.c
|
||||
|
||||
noinst_PROGRAMS=example pnmshow regiontest pnmshow24 fontsel \
|
||||
- vncev storepasswd colourmaptest simple simple15 $(MAC) \
|
||||
+ storepasswd colourmaptest simple simple15 $(MAC) \
|
||||
$(FILETRANSFER) backchannel $(BLOOPTEST) camera rotate \
|
||||
zippy repeater
|
||||
|
||||
diff --git a/examples/vncev.c b/examples/vncev.c
|
||||
index b185746..11f33d9 100644
|
||||
--- a/examples/vncev.c
|
||||
+++ b/examples/vncev.c
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <rfb/rfb.h>
|
||||
#include <rfb/default8x16.h>
|
||||
|
||||
+#define getpeername be_getpeername
|
||||
+
|
||||
#define width 100
|
||||
#define height 100
|
||||
static char f[width*height];
|
||||
@@ -101,7 +103,8 @@ static enum rfbNewClientAction newclient(rfbClientPtr cl)
|
||||
struct sockaddr_in addr;
|
||||
socklen_t len=sizeof(addr);
|
||||
unsigned int ip;
|
||||
-
|
||||
+ int getpeername(int, struct sockaddr *, int *);
|
||||
+
|
||||
getpeername(cl->sock,(struct sockaddr*)&addr,&len);
|
||||
ip=ntohl(addr.sin_addr.s_addr);
|
||||
sprintf(buffer,"Client connected from ip %d.%d.%d.%d",
|
||||
--
|
||||
2.15.0
|
||||
|
||||
Reference in New Issue
Block a user