Tuesday, August 11, 2026

freerdp 3.x

Fabien Romano found that freerdp 3.x is working again in current versions, it seems something has got fixed with the timer issues we were running into with my earlier updates. Here's an update diff, plus changes to dependent ports (I already knocked out the dep in guacamole, that's in the too-hard basket at the moment) security/hydra: I updated this to a version which handles freerdp3 earlier, diff switches the libs over. x11/remmina: update to handle freerdp3. builds, runs, am able to connect via simple RDP. x11/gnome/connections: handles freerdp3 already, diff switches libs over. runs, am able to connect via simple RDP. x11/kde-applications/krdc: currently marked BROKEN because it needs freerdp3; diff takes things part of the way but build still fails at present. anyone want to test these (or freerdp itself) further before it goes in? (one diff for all the above; apply with patch -d /usr/ports -E -p0) Index: x11/freerdp/Makefile =================================================================== RCS file: /cvs/ports/x11/freerdp/Makefile,v diff -u -p -r1.80 Makefile --- x11/freerdp/Makefile 21 May 2026 17:02:48 -0000 1.80 +++ x11/freerdp/Makefile 11 Aug 2026 23:18:17 -0000 @@ -1,34 +1,27 @@ COMMENT = client for Microsoft RDP (remote desktop protocol) -# 3.x needs posix timers, epoll-shim is no longer enough to workaround -DISTNAME = freerdp-2.11.8 -REVISION = 1 +DISTNAME = freerdp-3.30.0 CATEGORIES = x11 net DPB_PROPERTIES = parallel -SHARED_LIBS += freerdp-client2 1.1 -SHARED_LIBS += freerdp2 3.0 -SHARED_LIBS += winpr-tools2 1.0 -SHARED_LIBS += winpr2 2.1 +SHARED_LIBS += freerdp-client3 0.0 # 0.0 +SHARED_LIBS += freerdp3 0.0 # 0.0 +SHARED_LIBS += winpr-tools3 0.0 # 0.0 +SHARED_LIBS += winpr3 0.0 # 0.0 HOMEPAGE = https://www.freerdp.com/ SITES = https://pub.freerdp.com/releases/ -# add sndio patchset, not yet in 2.x branch -# mirrored from https://github.com/FreeRDP/FreeRDP/commit/b3a2042103a192d9e4482691ce9e7d73f9475b09.patch -# (github patch files aren't stable) -SITES.sndio = https://spacehopper.org/mirrors/ -PATCHFILES.sndio = freerdp-sndio-upd2.patch -PATCH_DIST_STRIP = -p1 - # Apache 2.0 PERMIT_PACKAGE = Yes -WANTLIB += X11 Xcursor Xext Xfixes Xi Xinerama Xrandr Xrender Xv -WANTLIB += avcodec avutil c crypto cups epoll-shim execinfo m pthread sndio -WANTLIB += ssl swresample usb-1.0 xkbfile +WANTLIB += ICE SM X11 Xcursor Xext Xfixes Xi Xinerama Xrandr Xrender +WANTLIB += Xv avcodec avdevice avfilter avformat avutil c crypto +WANTLIB += cups epoll-shim execinfo icudata icui18n icuio icuuc +WANTLIB += jansson m pthread sndio ssl swresample swscale uriparser +WANTLIB += usb-1.0 xkbfile z DEBUG_PACKAGES = ${BUILD_PACKAGES} @@ -37,7 +30,6 @@ COMPILER = base-clang ports-gcc COMPILER_LANGS = c MODULES = devel/cmake -MODCMAKE_POLICY_VERSION_OVERRIDE = Yes CFLAGS += -I${X11BASE}/include \ -I${LOCALBASE}/include @@ -47,31 +39,47 @@ BUILD_DEPENDS = security/pcsc-lite \ LIB_DEPENDS = devel/libusb1 \ print/cups,-libs \ - graphics/ffmpeg + graphics/ffmpeg \ + textproc/icu4c \ + devel/jansson \ + www/uriparser # used to work-around lack of posix timers. # not quite everything is correct, but works well enough for most use. LIB_DEPENDS += devel/epoll-shim CONFIGURE_ARGS += \ + -DUSE_VERSION_FROM_GIT_TAG=OFF \ + -DUSE_GIT_FOR_REVISION=OFF \ -DBUILD_TESTING=ON \ -DWITH_CCACHE=OFF \ -DWITH_CUPS=ON \ -DWITH_DIRECTFB=OFF \ + -DWITH_FUSE=OFF \ -DWITH_GSTREAMER_0_10=OFF \ -DWITH_GSTREAMER_1_0=OFF \ + -DWITH_KRB5=OFF \ -DWITH_OPENSLES=OFF \ -DWITH_PCSC=ON \ -DWITH_LIBSYSTEMD=OFF \ -DWITH_OSS=OFF \ -DWITH_SNDIO=ON -.if ${MACHINE_ARCH} == "sparc64" -CONFIGURE_ARGS += -DWITH_NEON=OFF -.endif +# experimental, pulls in libpam +CONFIGURE_ARGS += -DWITH_SERVER=OFF -pre-configure: - sed -i 's,/usr/local,${LOCALBASE},g' ${WRKSRC}/{,winpr/libwinpr/}CMakeLists.txt +# SDL 2.x experimental, disabled by default +# SDL 3.x on by default but needs devel/sdl3 devel/sdl3-ttf (the latter unported) +# is SDL support worth the extra deps? +# if so, maybe subpackage to reduce them for the common case? +CONFIGURE_ARGS += -DWITH_CLIENT_SDL=OFF +# wants at least LDEP on wayland/wayland x11/xkbcommon +CONFIGURE_ARGS += -DWITH_WAYLAND=OFF + +# might no longer be needed +.if ${MACHINE_ARCH} == "sparc64" +CONFIGURE_ARGS += -DWITH_SIMD=OFF +.endif .include <bsd.port.mk> Index: x11/freerdp/distinfo =================================================================== RCS file: /cvs/ports/x11/freerdp/distinfo,v diff -u -p -r1.31 distinfo --- x11/freerdp/distinfo 26 Feb 2026 09:23:13 -0000 1.31 +++ x11/freerdp/distinfo 11 Aug 2026 23:18:17 -0000 @@ -1,4 +1,2 @@ -SHA256 (freerdp-2.11.8.tar.gz) = vhGaNLBtP2l7eO/+GrfIHe6As5rjM9haF1NeZHhqEts= -SHA256 (freerdp-sndio-upd2.patch) = aQEVS0+WMH4D0tPX56gdMHgpiEL1d0Pv3g8QgHno6jk= -SIZE (freerdp-2.11.8.tar.gz) = 7330711 -SIZE (freerdp-sndio-upd2.patch) = 23241 +SHA256 (freerdp-3.30.0.tar.gz) = 4mh9At6m/t4ATTY5HawadM5XohD4hn/ZUDMXHUkJWQw= +SIZE (freerdp-3.30.0.tar.gz) = 11070523 Index: x11/freerdp/patches/patch-CMakeLists_txt =================================================================== RCS file: x11/freerdp/patches/patch-CMakeLists_txt diff -N x11/freerdp/patches/patch-CMakeLists_txt --- x11/freerdp/patches/patch-CMakeLists_txt 28 Feb 2026 18:03:04 -0000 1.17 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,58 +0,0 @@ -Index: CMakeLists.txt ---- CMakeLists.txt.orig -+++ CMakeLists.txt -@@ -85,7 +85,7 @@ if ($ENV{BUILD_NUMBER}) - endif() - set(WITH_LIBRARY_VERSIONING "ON") - --set(RAW_VERSION_STRING "2.11.8-dev") -+set(RAW_VERSION_STRING "2.11.8") - if(EXISTS "${CMAKE_SOURCE_DIR}/.source_tag") - file(READ ${CMAKE_SOURCE_DIR}/.source_tag RAW_VERSION_STRING) - elseif(USE_VERSION_FROM_GIT_TAG) -@@ -202,12 +202,14 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "BSD") - set(BSD TRUE) - if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - set(FREEBSD TRUE) -+ set(EPOLLSHIM TRUE) - endif() - if(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") - set(KFREEBSD TRUE) - endif() - if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") - set(OPENBSD TRUE) -+ set(EPOLLSHIM TRUE) - endif() - endif() - -@@ -216,11 +218,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly") - set(FREEBSD TRUE) - endif() - --if(FREEBSD) -+if(EPOLLSHIM) - find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) - find_library(EPOLLSHIM_LIBS NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) - endif() - -+find_library(EXECINFO_LIBS NAMES execinfo) -+ - # Configure MSVC Runtime - if(MSVC) - include(MSVCRuntime) -@@ -656,12 +660,13 @@ if(UNIX OR CYGWIN) - if (HAVE_SYS_EVENTFD_H) - check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE) - endif() -- if (FREEBSD) -+ if (EPOLLSHIM) - list(APPEND CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR}) - endif() - check_include_files(sys/timerfd.h HAVE_SYS_TIMERFD_H) -- if (FREEBSD) -+ if (EPOLLSHIM) - list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR}) -+ list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${EXECINFO_INCLUDE_DIR}) - endif() - check_include_files(poll.h HAVE_POLL_H) - list(APPEND CMAKE_REQUIRED_LIBRARIES m) Index: x11/freerdp/patches/patch-channels_rdpdr_client_rdpdr_main_c =================================================================== RCS file: /cvs/ports/x11/freerdp/patches/patch-channels_rdpdr_client_rdpdr_main_c,v diff -u -p -r1.7 patch-channels_rdpdr_client_rdpdr_main_c --- x11/freerdp/patches/patch-channels_rdpdr_client_rdpdr_main_c 10 Feb 2024 17:52:47 -0000 1.7 +++ x11/freerdp/patches/patch-channels_rdpdr_client_rdpdr_main_c 11 Aug 2026 23:18:17 -0000 @@ -1,16 +1,28 @@ +#1: no hotplug on openbsd +#2: static mount table returned by getmntinfo(3) on freebsd/openbsd cannot be freed +#3: no hotplug on openbsd + Index: channels/rdpdr/client/rdpdr_main.c --- channels/rdpdr/client/rdpdr_main.c.orig +++ channels/rdpdr/client/rdpdr_main.c -@@ -254,7 +254,7 @@ static UINT rdpdr_send_device_list_remove_request(rdpd +@@ -247,7 +247,7 @@ static UINT rdpdr_send_device_list_remove_request(rdpd return rdpdr_send(rdpdr, s); } -#if defined(_UWP) || defined(__IOS__) +#if defined(_UWP) || defined(__IOS__) || defined(__OpenBSD__) - void first_hotplug(rdpdrPlugin* rdpdr) - { -@@ -1101,7 +1101,7 @@ out: + static UINT handle_hotplug(WINPR_ATTR_UNUSED RdpdrClientContext* context, + WINPR_ATTR_UNUSED RdpdrHotplugEventType type) +@@ -842,7 +842,6 @@ static UINT handle_platform_mounts_bsd(wLog* log, hotp + { + handle_mountpoint(dev_array, size, mntbuf[idx].f_mntonname); + } +- free(mntbuf); + return ERROR_SUCCESS; + } +

No comments:

Post a Comment