blob: 16937792ebbb4621725b928d683d39c2c81efa1f [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"
5DEPENDS = "xserver-xorg gnutls jpeg libxtst gettext-native fltk"
Brad Bishope42b3e32020-01-15 22:08:42 -05006RDEPENDS_${PN} = "chkconfig coreutils hicolor-icon-theme perl"
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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013REQUIRED_DISTRO_FEATURES = "x11"
14
15inherit autotools cmake
16B = "${S}"
17
Brad Bishope42b3e32020-01-15 22:08:42 -050018SRCREV = "4739493b635372bd40a34640a719f79fa90e4dba"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019
Brad Bishope42b3e32020-01-15 22:08:42 -050020SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.10-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
86do_configure_append () {
87 olddir=`pwd`
88 cd ${XSERVER_SOURCE_DIR}
89
90 rm -rf aclocal-copy/
91 rm -f aclocal.m4
92
93 export ACLOCALDIR="${XSERVER_SOURCE_DIR}/aclocal-copy"
94 mkdir -p ${ACLOCALDIR}/
95 if [ -d ${STAGING_DATADIR_NATIVE}/aclocal ]; then
96 cp-noerror ${STAGING_DATADIR_NATIVE}/aclocal/ ${ACLOCALDIR}/
97 fi
98 if [ -d ${STAGING_DATADIR}/aclocal -a "${STAGING_DATADIR_NATIVE}/aclocal" != "${STAGING_DATADIR}/aclocal" ]; then
99 cp-noerror ${STAGING_DATADIR}/aclocal/ ${ACLOCALDIR}/
100 fi
101 ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed."
102 chmod +x ./configure
103 ${CACHED_CONFIGUREVARS} ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
104 cd $olddir
105}
106
107do_compile_append () {
108 olddir=`pwd`
109 cd ${XSERVER_SOURCE_DIR}
110
111 oe_runmake
112
113 cd $olddir
114}
115
116do_install_append() {
117 olddir=`pwd`
118 cd ${XSERVER_SOURCE_DIR}/hw/vnc
119
120 oe_runmake 'DESTDIR=${D}' install
121
122 cd $olddir
123}
124
125FILES_${PN} += " \
126 ${libdir}/xorg/modules/extensions \
127 ${datadir}/icons \
128"
129
130FILES_${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"