blob: c45fc028fccd9efd0f313e0a546bbd8d65eec456 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001DESCRIPTION = "TigerVNC remote display system"
2HOMEPAGE = "http://www.tigervnc.com/"
3LICENSE = "GPLv2+"
4SECTION = "x11/utils"
Andrew Geisslerf103a7f2021-05-07 16:09:40 -05005DEPENDS = "xserver-xorg gnutls jpeg libxtst gettext-native fltk libpam"
6RDEPENDS_${PN} = "coreutils hicolor-icon-theme perl bash"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08007
8LIC_FILES_CHKSUM = "file://LICENCE.TXT;md5=75b02c2872421380bbd47781d2bd75d3"
9
10S = "${WORKDIR}/git"
11
Brad Bishop8410d612019-11-25 09:40:59 -050012inherit features_check
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050013REQUIRED_DISTRO_FEATURES = "x11 pam"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014
15inherit autotools cmake
16B = "${S}"
17
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050018SRCREV = "540bfc3278e396321124d4b18a798ac2bc18b6ca"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050020SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.11-branch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021 file://0002-do-not-build-tests-sub-directory.patch \
22 file://0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch \
23 file://0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch \
24"
25
26# Keep sync with xorg-server in oe-core
27XORG_PN ?= "xorg-server"
Brad Bishope42b3e32020-01-15 22:08:42 -050028XORG_PV ?= "1.20.6"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029SRC_URI += "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${XORG_PV}.tar.bz2;name=xorg"
30XORG_S = "${WORKDIR}/${XORG_PN}-${XORG_PV}"
Brad Bishope42b3e32020-01-15 22:08:42 -050031SRC_URI[xorg.md5sum] = "a98170084f2c8fed480d2ff601f8a14b"
32SRC_URI[xorg.sha256sum] = "6316146304e6e8a36d5904987ae2917b5d5b195dc9fc63d67f7aca137e5a51d1"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033
34# It is the directory containing the Xorg source for the
35# machine on which you are building TigerVNC.
36XSERVER_SOURCE_DIR="${S}/unix/xserver"
37
38do_patch[postfuncs] += "do_patch_xserver"
39do_patch_xserver () {
40 for subdir in Xext xkb GL hw/xquartz/bundle hw/xfree86/common; do
41 install -d ${XSERVER_SOURCE_DIR}/$subdir
42 done
43
44 for subdir in hw/dmx/doc man doc hw/dmx/doxygen; do
45 install -d ${XSERVER_SOURCE_DIR}/$subdir
46 done
47
48 sources="hw/xquartz/bundle/cpprules.in man/Xserver.man doc/smartsched \
49 hw/dmx/doxygen/doxygen.conf.in xserver.ent.in xkb/README.compiled \
50 hw/xfree86/xorgconf.cpp hw/xfree86/Xorg.sh.in"
51 for i in ${sources}; do
52 install -m 0644 ${XORG_S}/$i ${XSERVER_SOURCE_DIR}/$i;
53 done
54
55 cd ${XORG_S}
56 find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | \
57 xargs tar cf - | (cd ${XSERVER_SOURCE_DIR} && tar xf -)
58
59 cd ${XSERVER_SOURCE_DIR}
Brad Bishope42b3e32020-01-15 22:08:42 -050060 xserverpatch="${S}/unix/xserver120.patch"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080061 echo "Apply $xserverpatch"
62 patch -p1 -b --suffix .vnc < $xserverpatch
63}
64
65EXTRA_OECONF = "--disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
66 --disable-xwin --disable-xephyr --disable-kdrive --with-pic \
67 --disable-static --disable-xinerama \
68 --with-xkb-output=${localstatedir}/lib/xkb \
69 --disable-glx --disable-dri --disable-dri2 \
70 --disable-config-hal \
71 --disable-config-udev \
72 --without-dtrace \
73 --disable-unit-tests \
74 --disable-devel-docs \
75 --disable-selective-werror \
76 --disable-xshmfence \
77 --disable-config-udev \
78 --disable-dri3 \
79 --disable-libunwind \
80 --without-xmlto \
81 --enable-systemd-logind=no \
82 --disable-xinerama \
83 --disable-xwayland \
84"
85
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050086EXTRA_OECMAKE += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DCMAKE_INSTALL_UNITDIR=${systemd_unitdir}', '-DINSTALL_SYSTEMD_UNITS=OFF', d)}"
87
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080088do_configure_append () {
89 olddir=`pwd`
90 cd ${XSERVER_SOURCE_DIR}
91
92 rm -rf aclocal-copy/
93 rm -f aclocal.m4
94
95 export ACLOCALDIR="${XSERVER_SOURCE_DIR}/aclocal-copy"
96 mkdir -p ${ACLOCALDIR}/
97 if [ -d ${STAGING_DATADIR_NATIVE}/aclocal ]; then
98 cp-noerror ${STAGING_DATADIR_NATIVE}/aclocal/ ${ACLOCALDIR}/
99 fi
100 if [ -d ${STAGING_DATADIR}/aclocal -a "${STAGING_DATADIR_NATIVE}/aclocal" != "${STAGING_DATADIR}/aclocal" ]; then
101 cp-noerror ${STAGING_DATADIR}/aclocal/ ${ACLOCALDIR}/
102 fi
103 ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed."
104 chmod +x ./configure
105 ${CACHED_CONFIGUREVARS} ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
106 cd $olddir
107}
108
109do_compile_append () {
110 olddir=`pwd`
111 cd ${XSERVER_SOURCE_DIR}
112
113 oe_runmake
114
115 cd $olddir
116}
117
118do_install_append() {
119 olddir=`pwd`
120 cd ${XSERVER_SOURCE_DIR}/hw/vnc
121
122 oe_runmake 'DESTDIR=${D}' install
123
124 cd $olddir
125}
126
127FILES_${PN} += " \
128 ${libdir}/xorg/modules/extensions \
129 ${datadir}/icons \
Andrew Geisslerf103a7f2021-05-07 16:09:40 -0500130 ${systemd_unitdir} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800131"
132
133FILES_${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"