summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorCarlos J. Puga Medina <cpm@FreeBSD.org>2018-01-01 19:57:37 +0000
committerCarlos J. Puga Medina <cpm@FreeBSD.org>2018-01-01 19:57:37 +0000
commit249552cac0bd189727c0c98706aa215ad6ce4b3c (patch)
treedc3453a93a32f558d4109a7d8b56131c7b136f04 /net
parentkicad-devel now needs wx(python) during build and run... (diff)
net/freerdp: enable Wayland client, wlfreerdp
- Add WAYLAND support option and enabled it by default - Sort options helpers - Bump PORTREVISION PR: 223913 Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: cpm, kevans Approved by: kevans (maintainer)
Notes
Notes: svn path=/head/; revision=457792
Diffstat (limited to 'net')
-rw-r--r--net/freerdp/Makefile20
-rw-r--r--net/freerdp/files/patch-uwac_libuwac_CMakeLists.txt21
-rw-r--r--net/freerdp/files/patch-uwac_libuwac_uwac-os.c29
-rw-r--r--net/freerdp/pkg-plist12
4 files changed, 76 insertions, 6 deletions
diff --git a/net/freerdp/Makefile b/net/freerdp/Makefile
index 44842d48f360..086dba47649b 100644
--- a/net/freerdp/Makefile
+++ b/net/freerdp/Makefile
@@ -3,7 +3,7 @@
PORTNAME= freerdp
DISTVERSION= 2.0.0-rc0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net comms ipv6
MAINTAINER= kevans@FreeBSD.org
@@ -20,13 +20,13 @@ USES= alias cmake:outsource compiler:c++11-lib cpe gettext localbase pathfix pk
USE_LDCONFIG= yes
CPE_VENDOR= freerdp_project
-CMAKE_ARGS+= -DWITH_LIBSYSTEMD=OFF -DWITH_WAYLAND=OFF -DWITH_GSTREAMER_0_10=OFF ${CMAKE_ARGS_${ARCH}}
+CMAKE_ARGS+= -DWITH_LIBSYSTEMD=OFF -DWITH_GSTREAMER_0_10=OFF ${CMAKE_ARGS_${ARCH}}
CMAKE_ARGS_aarch64= -DWITH_NEON=ON
CFLAGS_aarch64= -D__ARM_NEON__=__ARM_NEON # clang
-OPTIONS_DEFINE= ALSA CUPS FFMPEG GSTREAMER PULSEAUDIO X11
-OPTIONS_DEFAULT= CUPS GSTREAMER X11
+OPTIONS_DEFINE= ALSA CUPS FFMPEG GSTREAMER PULSEAUDIO WAYLAND X11
+OPTIONS_DEFAULT= CUPS GSTREAMER WAYLAND X11
OPTIONS_SUB= yes
OPTIONS_DEFINE_armv6= NEON
@@ -46,7 +46,7 @@ FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \
FFMPEG_CMAKE_BOOL= WITH_FFMPEG
GSTREAMER_CMAKE_BOOL= WITH_GSTREAMER_1_0
-GSTREAMER_USE= gnome=glib20 gstreamer1=yes xorg=x11,xextproto,xext,xrandr
+GSTREAMER_USE= gnome=glib20 gstreamer1=yes xorg=x11,xext,xextproto,xrandr
GSTREAMER_LIB_DEPENDS= libgstbase-1.0.so:multimedia/gstreamer1
NEON_DESC= Enable Media Processing Engine instructions
@@ -60,11 +60,19 @@ PULSEAUDIO_CMAKE_BOOL= WITH_PULSE
SSE_CMAKE_BOOL= WITH_SSE2
+WAYLAND_DESC= Build FreeRDP Wayland client
+WAYLAND_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat
+WAYLAND_LIB_DEPENDS= libepoll-shim.so:devel/libepoll-shim \
+ libwayland-client.so:graphics/wayland \
+ libwayland-cursor.so:graphics/wayland \
+ libxkbcommon.so:x11/libxkbcommon
+WAYLAND_CMAKE_BOOL= WITH_WAYLAND
+
X11_DESC= Build FreeRDP X11 client
X11_BUILD_DEPENDS= xmlto:textproc/xmlto
X11_CMAKE_BOOL= WITH_X11
X11_CMAKE_OFF= -DWITH_XKBFILE=OFF
-X11_USE= xorg=x11,xkbfile,xcursor,xextproto,xv,xinerama,xext,xrandr,xi,xfixes,xrender
+X11_USE= xorg=x11,xcursor,xext,xextproto,xfixes,xi,xinerama,xkbfile,xrandr,xrender,xv
.include <bsd.port.pre.mk>
diff --git a/net/freerdp/files/patch-uwac_libuwac_CMakeLists.txt b/net/freerdp/files/patch-uwac_libuwac_CMakeLists.txt
new file mode 100644
index 000000000000..fa5e346d84e0
--- /dev/null
+++ b/net/freerdp/files/patch-uwac_libuwac_CMakeLists.txt
@@ -0,0 +1,21 @@
+--- uwac/libuwac/CMakeLists.txt.orig 2017-11-27 16:59:34 UTC
++++ uwac/libuwac/CMakeLists.txt
+@@ -40,6 +40,9 @@ generate_protocol_file(xdg-shell)
+ generate_protocol_file(ivi-application)
+ generate_protocol_file(fullscreen-shell)
+
++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)
++include_directories(${EPOLLSHIM_INCLUDE_DIR})
+ include_directories(${WAYLAND_INCLUDE_DIR})
+ include_directories(${XKBCOMMON_INCLUDE_DIR})
+ include_directories("${CMAKE_SOURCE_DIR}/uwac/include")
+@@ -69,7 +72,7 @@ if (WITH_LIBRARY_VERSIONING)
+ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${UWAC_VERSION} SOVERSION ${UWAC_API_VERSION})
+ endif()
+
+-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${PRIVATE_KEYWORD} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} freerdp)
++target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${PRIVATE_KEYWORD} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} ${EPOLLSHIM_LIBS} freerdp)
+
+ install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT uwac)
+
diff --git a/net/freerdp/files/patch-uwac_libuwac_uwac-os.c b/net/freerdp/files/patch-uwac_libuwac_uwac-os.c
new file mode 100644
index 000000000000..541d6e07aeb4
--- /dev/null
+++ b/net/freerdp/files/patch-uwac_libuwac_uwac-os.c
@@ -0,0 +1,29 @@
+--- uwac/libuwac/uwac-os.c.orig 2017-11-27 16:54:50 UTC
++++ uwac/libuwac/uwac-os.c
+@@ -31,6 +31,7 @@
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <sys/mman.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>
+@@ -153,17 +154,7 @@ static int create_tmpfile_cloexec(char *tmpname)
+ {
+ int fd;
+
+-#ifdef HAVE_MKOSTEMP
+- fd = mkostemp(tmpname, O_CLOEXEC);
+- if (fd >= 0)
+- unlink(tmpname);
+-#else
+- fd = mkstemp(tmpname);
+- if (fd >= 0) {
+- fd = set_cloexec_or_close(fd);
+- unlink(tmpname);
+- }
+-#endif
++ fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
+
+ return fd;
+ }
diff --git a/net/freerdp/pkg-plist b/net/freerdp/pkg-plist
index c98718c810a3..b08d4d8baf7f 100644
--- a/net/freerdp/pkg-plist
+++ b/net/freerdp/pkg-plist
@@ -1,5 +1,6 @@
bin/winpr-hash
bin/winpr-makecert
+%%WAYLAND%%bin/wlfreerdp
%%X11%%bin/xfreerdp
include/freerdp2/freerdp/addin.h
include/freerdp2/freerdp/altsec.h
@@ -123,6 +124,8 @@ include/freerdp2/freerdp/utils/signal.h
include/freerdp2/freerdp/utils/stopwatch.h
include/freerdp2/freerdp/version.h
include/freerdp2/freerdp/window.h
+%%WAYLAND%%include/uwac0/uwac/uwac-tools.h
+%%WAYLAND%%include/uwac0/uwac/uwac.h
include/winpr2/winpr/asn1.h
include/winpr2/winpr/bcrypt.h
include/winpr2/winpr/bitstream.h
@@ -196,6 +199,9 @@ lib/libfreerdp-client2.so.2.0.0
lib/libfreerdp2.so
lib/libfreerdp2.so.2
lib/libfreerdp2.so.2.0.0
+%%WAYLAND%%lib/libuwac0.so
+%%WAYLAND%%lib/libuwac0.so.0
+%%WAYLAND%%lib/libuwac0.so.0.0.1
lib/libwinpr-tools2.so
lib/libwinpr-tools2.so.2
lib/libwinpr-tools2.so.2.0.0
@@ -204,6 +210,7 @@ lib/libwinpr2.so.2
lib/libwinpr2.so.2.0.0
libdata/pkgconfig/freerdp-client2.pc
libdata/pkgconfig/freerdp2.pc
+%%WAYLAND%%libdata/pkgconfig/uwac0.pc
libdata/pkgconfig/winpr-tools2.pc
libdata/pkgconfig/winpr2.pc
share/cmake/Modules/FreeRDP-Client2/FreeRDP-ClientConfig.cmake
@@ -214,11 +221,16 @@ share/cmake/Modules/FreeRDP2/FreeRDPConfig.cmake
share/cmake/Modules/FreeRDP2/FreeRDPConfigVersion.cmake
share/cmake/Modules/FreeRDP2/FreeRDPTargets-%%CMAKE_BUILD_TYPE%%.cmake
share/cmake/Modules/FreeRDP2/FreeRDPTargets.cmake
+%%WAYLAND%%share/cmake/Modules/uwac0/uwac-%%CMAKE_BUILD_TYPE%%.cmake
+%%WAYLAND%%share/cmake/Modules/uwac0/uwac.cmake
+%%WAYLAND%%share/cmake/Modules/uwac0/uwacConfig.cmake
+%%WAYLAND%%share/cmake/Modules/uwac0/uwacConfigVersion.cmake
share/cmake/Modules/WinPR2/WinPRConfig.cmake
share/cmake/Modules/WinPR2/WinPRConfigVersion.cmake
share/cmake/Modules/WinPR2/WinPRTargets-%%CMAKE_BUILD_TYPE%%.cmake
share/cmake/Modules/WinPR2/WinPRTargets.cmake
share/man/man1/winpr-hash.1
share/man/man1/winpr-makecert.1
+%%WAYLAND%%share/man/man1/wlfreerdp.1
%%X11%%share/man/man1/xfreerdp.1
share/man/man7/wlog.7