termux-packages/x11-packages/tigervnc/build.sh

70 lines
2.7 KiB
Bash
Raw Normal View History

2019-01-26 23:05:10 +01:00
TERMUX_PKG_HOMEPAGE=https://tigervnc.org/
TERMUX_PKG_DESCRIPTION="Suite of VNC servers. Based on the VNC 4 branch of TightVNC."
TERMUX_PKG_LICENSE="GPL-2.0"
2019-05-17 00:18:48 +02:00
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
2018-09-10 00:42:26 +02:00
TERMUX_PKG_VERSION=1.9.0
2019-05-25 19:17:07 +02:00
TERMUX_PKG_REVISION=24
2018-09-10 00:42:26 +02:00
TERMUX_PKG_SRCURL=https://github.com/TigerVNC/tigervnc/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f15ced8500ec56356c3bf271f52e58ed83729118361c7103eab64a618441f740
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"
TERMUX_PKG_BUILD_DEPENDS="xorgproto, xorg-font-util, xorg-util-macros, xorg-server-xvfb, xtrans"
TERMUX_PKG_SUGGESTS="aterm, xorg-twm"
2018-09-10 00:42:26 +02:00
TERMUX_PKG_FOLDERNAME=tigervnc-${TERMUX_PKG_VERSION}
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
termux_step_pre_configure() {
mkdir -p ${TERMUX_PKG_BUILDDIR}/unix/xserver
2018-09-10 00:42:26 +02:00
## TigerVNC requires sources of X server (either Xorg or Xvfb).
cd ${TERMUX_PKG_BUILDDIR}/unix/xserver/ && {
termux_download \
https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.20.3.tar.bz2 \
xorg-server-src.tar.bz2 \
1b3ce466c12cacbe2252b3ad5b0ed561972eef9d09e75900d65fb1e21f9201de
tar xf xorg-server-src.tar.bz2 --strip-components=1
rm -f xorg-server-src.tar.bz2
for p in "$TERMUX_SCRIPTDIR/packages/xorg-server-xvfb"/*.patch; do
sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" "$p" | \
sed "s%\@TERMUX_HOME\@%${TERMUX_ANDROID_HOME}%g" | \
patch --silent -p1
done
}
2018-09-10 00:42:26 +02:00
patch -p1 -i ${TERMUX_PKG_SRCDIR}/unix/xserver120.patch
2018-09-10 00:42:26 +02:00
export ACLOCAL="aclocal -I ${TERMUX_PREFIX}/share/aclocal"
autoreconf -fi
2018-09-10 00:42:26 +02:00
CFLAGS="${CFLAGS} -DFNDELAY=O_NDELAY -DINITARGS=void"
CPPFLAGS="${CPPFLAGS} -I${TERMUX_PREFIX}/include/libdrm"
LDFLAGS="${LDFLAGS} -llog"
2018-09-10 00:42:26 +02:00
./configure \
--host="${TERMUX_HOST_PLATFORM}" \
--prefix="${TERMUX_PREFIX}" \
--disable-static \
--disable-nls \
--enable-debug \
`TERMUX_PREFIX=${TERMUX_PREFIX} bash ${TERMUX_SCRIPTDIR}/packages/xorg-server-xvfb/build.sh xorg_server_flags`
2018-09-10 00:42:26 +02:00
LDFLAGS="${LDFLAGS} -landroid-shmem"
# 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
}
termux_step_post_make_install() {
cd ${TERMUX_PKG_BUILDDIR}/unix/xserver
make -j ${TERMUX_MAKE_PROCESSES}
2018-09-10 00:42:26 +02:00
cd ${TERMUX_PKG_BUILDDIR}/unix/xserver/hw/vnc
make install
2018-09-10 00:42:26 +02: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
}