libvncserver: bump version

This commit is contained in:
Jerome Duval
2022-02-25 12:20:23 +01:00
parent a498b46f7e
commit 0752a204af
3 changed files with 85 additions and 82 deletions

View File

@@ -5,9 +5,9 @@ program."
HOMEPAGE="https://libvnc.github.io/"
COPYRIGHT="2001-2017 Johannes E. Schindelin"
LICENSE="GNU GPL v2"
REVISION="2"
REVISION="1"
SOURCE_URI="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-$portVersion.tar.gz"
CHECKSUM_SHA256="193d630372722a532136fd25c5326b2ca1a636cbb8bf9bb115ef869c804d2894"
CHECKSUM_SHA256="0ae5bb9175dc0a602fe85c1cf591ac47ee5247b87f2bf164c16b05f87cbfa81a"
SOURCE_DIR="libvncserver-LibVNCServer-$portVersion"
PATCHES="libvncserver-$portVersion.patchset"
@@ -48,34 +48,29 @@ BUILD_REQUIRES="
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
./autogen.sh
runConfigure ./configure
make $jobArgs
cmake -S. -Bbuild \
-DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs
make -C build $jobArgs
}
INSTALL()
{
make install
mkdir -p $includeDir
mv $prefix/include/* $includeDir
rm -rf $prefix/include
make -C build install
prepareInstalledDevelLibs \
libvncclient \
libvncserver
fixPkgconfig
packageEntries devel \
$binDir \
$developDir
}

View File

@@ -1,68 +0,0 @@
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

View File

@@ -0,0 +1,76 @@
From f8374cc154fccc51dbdd90c13de9d158185a8487 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 25 Feb 2022 11:43:14 +0100
Subject: Haiku: requires libnetwork
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b6228a..f0d0a4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,6 +183,10 @@ if(NOT HAVE_STDINT_H)
message(FATAL_ERROR "Could NOT find required header stdint.h")
endif()
+if(HAIKU)
+ set(CMAKE_REQUIRED_LIBRARIES network)
+endif(HAIKU)
+
check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY)
check_function_exists(vfork LIBVNCSERVER_HAVE_VFORK)
check_function_exists(vprintf LIBVNCSERVER_HAVE_VPRINTF)
@@ -569,6 +573,10 @@ if(ANDROID)
)
endif(ANDROID)
+if(HAIKU)
+ find_library(NETWORK_LIBRARY network)
+endif(HAIKU)
+
set(LIBVNCCLIENT_EXAMPLES
backchannel
ppmtest
@@ -603,14 +611,14 @@ foreach(e ${LIBVNCSERVER_EXAMPLES})
add_executable(examples_${e} ${LIBVNCSRVEXAMPLE_DIR}/${e}.c)
set_target_properties(examples_${e} PROPERTIES OUTPUT_NAME ${e})
set_target_properties(examples_${e} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples)
- target_link_libraries(examples_${e} vncserver ${CMAKE_THREAD_LIBS_INIT} ${CARBON_LIBRARY} ${IOKIT_LIBRARY} ${IOSURFACE_LIBRARY})
+ target_link_libraries(examples_${e} vncserver ${CMAKE_THREAD_LIBS_INIT} ${CARBON_LIBRARY} ${IOKIT_LIBRARY} ${IOSURFACE_LIBRARY} ${NETWORK_LIBRARY})
endforeach(e ${LIBVNCSERVER_EXAMPLES})
foreach(e ${LIBVNCCLIENT_EXAMPLES})
add_executable(client_examples_${e} ${LIBVNCCLIEXAMPLE_DIR}/${e}.c ${LIBVNCCLIEXAMPLE_DIR}/${${e}_EXTRA_SOURCES} )
set_target_properties(client_examples_${e} PROPERTIES OUTPUT_NAME ${e})
set_target_properties(client_examples_${e} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/client_examples)
- target_link_libraries(client_examples_${e} vncclient ${CMAKE_THREAD_LIBS_INIT} ${SDL2_LIBRARY} ${GTK2_LIBRARIES} ${FFMPEG_LIBRARIES})
+ target_link_libraries(client_examples_${e} vncclient ${CMAKE_THREAD_LIBS_INIT} ${SDL2_LIBRARY} ${GTK2_LIBRARIES} ${FFMPEG_LIBRARIES} ${NETWORK_LIBRARY})
endforeach(e ${LIBVNCCLIENT_EXAMPLES})
--
2.30.2
From 644d0240c8551537f2ba2fa29e7687e99df97af4 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 25 Feb 2022 12:08:32 +0100
Subject: undef min on Haiku
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
index 9fd96a6..d33b7e5 100644
--- a/libvncserver/websockets.c
+++ b/libvncserver/websockets.c
@@ -98,6 +98,9 @@ static int webSocketsEncodeHybi(rfbClientPtr cl, const char *src, int len, char
static int ws_read(void *cl, char *buf, size_t len);
+#ifdef __HAIKU__
+#undef min
+#endif
static int
min (int a, int b) {
--
2.30.2