diff --git a/x11-packages/qtermwidget/build.sh b/x11-packages/qtermwidget/build.sh new file mode 100644 index 000000000..4326dbc35 --- /dev/null +++ b/x11-packages/qtermwidget/build.sh @@ -0,0 +1,13 @@ +TERMUX_PKG_HOMEPAGE=https://lxqt.github.io +TERMUX_PKG_DESCRIPTION="A terminal emulator widget for Qt 5" +TERMUX_PKG_LICENSE="GPL-2.0-or-later" +TERMUX_PKG_MAINTAINER="Simeon Huang " +TERMUX_PKG_VERSION=0.17.0 +TERMUX_PKG_SRCURL="https://github.com/lxqt/${TERMUX_PKG_NAME}/releases/download/${TERMUX_PKG_VERSION}/${TERMUX_PKG_NAME}-${TERMUX_PKG_VERSION}.tar.xz" +TERMUX_PKG_SHA256=4e04b2fb71d7382266a1ea168bf02d1283e04df6127a42f760a30389cb219b82 +TERMUX_PKG_DEPENDS="qt5-qtbase" +TERMUX_PKG_BUILD_DEPENDS="cmake, lxqt-build-tools, qt5-qttools-cross-tools" + +termux_step_install_license () { + install -Dm644 "${TERMUX_PKG_SRCDIR}/LICENSE" "${TERMUX_PREFIX}/share/doc/${TERMUX_PKG_NAME}/LICENSE" +} diff --git a/x11-packages/qtermwidget/utmp_android.patch b/x11-packages/qtermwidget/utmp_android.patch new file mode 100644 index 000000000..4a32c4ff6 --- /dev/null +++ b/x11-packages/qtermwidget/utmp_android.patch @@ -0,0 +1,49 @@ +--- src/lib/kpty.cpp 2021-05-12 15:09:15.461686000 +0000 ++++ src.mod/lib/kpty.cpp 2021-05-12 15:24:03.750599000 +0000 +@@ -32,6 +32,10 @@ + #define HAVE_LIBUTIL_H + #endif + ++#if defined(__ANDROID__) ++#define HAVE_PTY_H ++#endif ++ + #if defined(__OpenBSD__) + #define HAVE_LOGIN + #define HAVE_UTIL_H +@@ -588,10 +592,12 @@ + # endif + # else + utmpname(_PATH_UTMP); ++#ifndef __ANDROID__ + setutent(); + pututline(&l_struct); + endutent(); + updwtmp(_PATH_WTMP, &l_struct); ++#endif + # endif + # endif + #endif +@@ -641,7 +647,12 @@ + # else + utmpname(_PATH_UTMP); + setutent(); ++ ++#ifndef __ANDROID__ + if ((ut = getutline(&l_struct))) { ++#else ++ if ((ut = getutent())) { ++#endif + # endif + # ifdef HAVE_UTMPX + memset(ut->ut_user, 0, sizeof(*ut->ut_user)); +@@ -662,7 +673,9 @@ + endutxent(); + # else + ut->ut_time = time(nullptr); ++#ifndef __ANDROID__ + pututline(ut); ++#endif + } + endutent(); + # endif