2019-01-26 23:05:10 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://tigervnc.org/
|
2019-01-21 17:50:21 +01:00
|
|
|
TERMUX_PKG_DESCRIPTION="Suite of VNC servers. Based on the VNC 4 branch of TightVNC."
|
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2021-08-25 12:47:33 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2020-11-23 16:30:06 +01:00
|
|
|
# No update anymore. v1.11.x requires support of PAM.
|
2022-02-21 21:40:51 +01:00
|
|
|
TERMUX_PKG_VERSION=(1.10.1
|
|
|
|
1.20.0)
|
|
|
|
TERMUX_PKG_REVISION=18
|
|
|
|
TERMUX_PKG_SRCURL=(https://github.com/TigerVNC/tigervnc/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
|
|
|
https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION[1]}.tar.bz2)
|
|
|
|
TERMUX_PKG_SHA256=(19fcc80d7d35dd58115262e53cac87d8903180261d94c2a6b0c19224f50b58c4
|
|
|
|
9d967d185f05709274ee0c4f861a4672463986e550ca05725ce27974f550d3e6)
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2019-01-27 17:56:25 +01:00
|
|
|
TERMUX_PKG_DEPENDS="freetype, libandroid-shmem, libbz2, libc++, libdrm, libexpat, libgnutls, libjpeg-turbo, libpixman, libpng, libuuid, libx11, libxau, libxcb, libxdamage, libxdmcp, libxext, libxxf86vm, libxfixes, libxfont2, libxshmfence, mesa, openssl, perl, xkeyboard-config, xorg-xauth, xorg-xkbcomp"
|
2019-05-27 01:58:55 +02:00
|
|
|
TERMUX_PKG_BUILD_DEPENDS="xorgproto, xorg-font-util, xorg-util-macros, xtrans"
|
2018-10-17 15:49:24 +02:00
|
|
|
TERMUX_PKG_SUGGESTS="aterm, xorg-twm"
|
2018-09-10 00:42:26 +02:00
|
|
|
|
|
|
|
TERMUX_PKG_FOLDERNAME=tigervnc-${TERMUX_PKG_VERSION}
|
2019-04-20 21:22:26 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DBUILD_VIEWER=ON -DENABLE_NLS=OFF -DENABLE_PAM=OFF -DENABLE_GNUTLS=ON -DFLTK_MATH_LIBRARY=libm.a"
|
2018-09-10 00:42:26 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
2022-02-21 21:40:51 +01:00
|
|
|
termux_step_post_get_source() {
|
2019-01-27 21:45:19 +01:00
|
|
|
## TigerVNC requires sources of X server (either Xorg or Xvfb).
|
2022-02-21 21:40:51 +01:00
|
|
|
cp -r xorg-server-${TERMUX_PKG_VERSION[1]}/* unix/xserver/
|
2019-01-27 21:45:19 +01:00
|
|
|
|
2022-02-21 21:40:51 +01:00
|
|
|
cd ${TERMUX_PKG_BUILDDIR}/unix/xserver
|
|
|
|
for p in "$TERMUX_SCRIPTDIR/packages/xorg-server-xvfb"/*.patch; do
|
|
|
|
echo "$p"
|
|
|
|
sed -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \
|
|
|
|
-e "s%\@TERMUX_HOME\@%${TERMUX_ANDROID_HOME}%g" "$p" \
|
|
|
|
| patch -p1
|
|
|
|
done
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2019-01-21 17:50:21 +01:00
|
|
|
patch -p1 -i ${TERMUX_PKG_SRCDIR}/unix/xserver120.patch
|
2022-02-21 21:40:51 +01:00
|
|
|
}
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2022-02-21 21:40:51 +01:00
|
|
|
termux_step_pre_configure() {
|
|
|
|
cd ${TERMUX_PKG_BUILDDIR}/unix/xserver
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2022-02-21 21:40:51 +01:00
|
|
|
autoreconf -fi
|
2021-03-01 21:10:21 +01:00
|
|
|
|
2019-05-27 13:05:23 +02:00
|
|
|
CFLAGS="${CFLAGS/-Os/-Oz} -DFNDELAY=O_NDELAY -DINITARGS=void"
|
2019-01-21 17:50:21 +01:00
|
|
|
CPPFLAGS="${CPPFLAGS} -I${TERMUX_PREFIX}/include/libdrm"
|
|
|
|
LDFLAGS="${LDFLAGS} -llog"
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2022-02-21 21:37:24 +01:00
|
|
|
local xorg_server_xvfb_configure_args="$(. $TERMUX_SCRIPTDIR/packages/xorg-server-xvfb/build.sh; echo $TERMUX_PKG_EXTRA_CONFIGURE_ARGS)"
|
2019-01-21 17:50:21 +01:00
|
|
|
./configure \
|
|
|
|
--host="${TERMUX_HOST_PLATFORM}" \
|
|
|
|
--prefix="${TERMUX_PREFIX}" \
|
|
|
|
--disable-static \
|
|
|
|
--disable-nls \
|
|
|
|
--enable-debug \
|
2022-02-21 21:37:24 +01:00
|
|
|
${xorg_server_xvfb_configure_args}
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2019-01-21 17:50:21 +01:00
|
|
|
LDFLAGS="${LDFLAGS} -landroid-shmem"
|
2019-04-20 21:22:26 +02:00
|
|
|
|
|
|
|
# Fix for FLTK_MATH_LIBRARY.
|
|
|
|
cp "$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/libm.a" "$TERMUX_PKG_SRCDIR"/
|
2018-09-10 00:42:26 +02:00
|
|
|
}
|
|
|
|
|
2019-01-21 17:50:21 +01:00
|
|
|
termux_step_post_make_install() {
|
|
|
|
cd ${TERMUX_PKG_BUILDDIR}/unix/xserver
|
|
|
|
make -j ${TERMUX_MAKE_PROCESSES}
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2019-01-21 17:50:21 +01:00
|
|
|
cd ${TERMUX_PKG_BUILDDIR}/unix/xserver/hw/vnc
|
|
|
|
make install
|
2018-09-10 00:42:26 +02:00
|
|
|
|
2019-01-21 17:50:21 +01:00
|
|
|
## use custom variant of vncserver script
|
|
|
|
cp -f "${TERMUX_PKG_BUILDER_DIR}/vncserver" "${TERMUX_PREFIX}/bin/vncserver"
|
2018-09-10 00:42:26 +02:00
|
|
|
}
|