blob: 8de0e39ad7b3aa4f721adb71709745957b72e913 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001# Copyright (C) 2010-2012 O.S. Systems Software Ltda. All Rights Reserved
2# Released under the MIT license
3
4DESCRIPTION = "FreeRDP RDP client & server library"
5HOMEPAGE = "http://www.freerdp.com"
6DEPENDS = "openssl alsa-lib libusb1"
7SECTION = "net"
8LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
10
11inherit pkgconfig cmake gitpkgv
12
13PE = "1"
14PKGV = "${GITPKGVTAG}"
15
16SRCREV = "a38c1be9eee39a9bc22b511fffe96e63fdf8ebe7"
17SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \
18 file://winpr-makecert-Build-with-install-RPATH.patch \
19 file://0001-Fix-const-qualifier-error.patch \
Patrick Williamsf52e3dd2024-01-26 13:04:43 -060020 file://0002-Do-not-install-tools-a-CMake-targets.patch \
Patrick Williamsac13d5f2023-11-24 18:59:46 -060021 "
22
23S = "${WORKDIR}/git"
24
25EXTRA_OECMAKE += " \
26 -DWITH_ALSA=ON \
27 -DWITH_FFMPEG=OFF \
28 -DWITH_CUNIT=OFF \
29 -DWITH_NEON=OFF \
30 -DBUILD_STATIC_LIBS=OFF \
31 -DCMAKE_POSITION_INDEPENDANT_CODE=ON \
32 -DWITH_MANPAGES=OFF \
33 -DPROXY_PLUGINDIR=${libdir}/freerdp/proxy/plugins \
34"
35
36PACKAGECONFIG ??= " \
37 ${@bb.utils.filter('DISTRO_FEATURES', 'directfb pam pulseaudio wayland x11', d)}\
38 gstreamer cups pcsc server \
39"
40
41X11_DEPS = "virtual/libx11 libxinerama libxext libxcursor libxv libxi libxrender libxfixes libxdamage libxrandr libxkbfile"
42PACKAGECONFIG[x11] = "-DWITH_X11=ON -DWITH_XINERAMA=ON -DWITH_XEXT=ON -DWITH_XCURSOR=ON -DWITH_XV=ON -DWITH_XI=ON -DWITH_XRENDER=ON -DWITH_XFIXES=ON -DWITH_XDAMAGE=ON -DWITH_XRANDR=ON -DWITH_XKBFILE=ON,-DWITH_X11=OFF,${X11_DEPS}"
43PACKAGECONFIG[wayland] = "-DWITH_WAYLAND=ON,-DWITH_WAYLAND=OFF,wayland wayland-native libxkbcommon"
44PACKAGECONFIG[directfb] = "-DWITH_DIRECTFB=ON,-DWITH_DIRECTFB=OFF,directfb"
45PACKAGECONFIG[pam] = "-DWITH_PAM=ON,-DWITH_PAM=OFF,libpam"
46PACKAGECONFIG[pcsc] = "-DWITH_PCSC=ON,-DWITH_PCSC=OFF,pcsc-lite"
47PACKAGECONFIG[pulseaudio] = "-DWITH_PULSEAUDIO=ON,-DWITH_PULSEAUDIO=OFF,pulseaudio"
48PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER_1_0=ON,-DWITH_GSTREAMER_1_0=OFF,gstreamer1.0 gstreamer1.0-plugins-base"
49PACKAGECONFIG[cups] = "-DWITH_CUPS=ON,-DWITH_CUPS=OFF,cups"
50PACKAGECONFIG[server] = "-DWITH_SERVER=ON,-DWITH_SERVER=OFF"
51
52PACKAGES =+ "libfreerdp"
53
54LEAD_SONAME = "libfreerdp.so"
55FILES:libfreerdp = "${libdir}/lib*${SOLIBS}"
56
57PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*"
58
59do_configure:append() {
60 sed -i -e 's|${WORKDIR}||g' ${B}/buildflags.h
61}
62
63# we will need winpr-makecert to generate TLS certificates
64do_install:append () {
65 install -d ${D}${bindir}
66 install -m755 winpr/tools/makecert-cli/winpr-makecert ${D}${bindir}
Patrick Williamsac13d5f2023-11-24 18:59:46 -060067 rm -rf ${D}${libdir}/freerdp
68}
69
70python populate_packages:prepend () {
71 freerdp_root = d.expand('${libdir}/freerdp')
72
73 do_split_packages(d, freerdp_root, r'^(audin_.*)\.so$',
74 output_pattern='libfreerdp-plugin-%s',
75 description='FreeRDP plugin %s',
76 prepend=True, extra_depends='libfreerdp-plugin-audin')
77
78 do_split_packages(d, freerdp_root, r'^(rdpsnd_.*)\.so$',
79 output_pattern='libfreerdp-plugin-%s',
80 description='FreeRDP plugin %s',
81 prepend=True, extra_depends='libfreerdp-plugin-rdpsnd')
82
83 do_split_packages(d, freerdp_root, r'^(tsmf_.*)\.so$',
84 output_pattern='libfreerdp-plugin-%s',
85 description='FreeRDP plugin %s',
86 prepend=True, extra_depends='libfreerdp-plugin-tsmf')
87
88 do_split_packages(d, freerdp_root, r'^([^-]*)\.so$',
89 output_pattern='libfreerdp-plugin-%s',
90 description='FreeRDP plugin %s',
91 prepend=True, extra_depends='')
92}