这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/jsoncpp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@ TERMUX_PKG_DESCRIPTION="C++ library for interacting with JSON"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.9.5
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/open-source-parsers/jsoncpp/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libc++"
TERMUX_PKG_BREAKS="jsoncpp-dev"
TERMUX_PKG_REPLACES="jsoncpp-dev"

TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBUILD_SHARED_LIBS=ON
-DJSONCPP_WITH_TESTS=OFF
-DCCACHE_FOUND=OFF
"
TERMUX_PKG_RM_AFTER_INSTALL="
lib/objects-*
"

termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
Expand Down
1 change: 1 addition & 0 deletions scripts/build/termux_step_install_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ termux_step_install_license() {
INSTALLED_LICENSES=()
COUNTER=1
while read -r LICENSE; do
[ -z "${LICENSE}" ] && continue
if [ ! -f "$TERMUX_PKG_SRCDIR/$LICENSE" ]; then
termux_error_exit "$TERMUX_PKG_SRCDIR/$LICENSE does not exist"
fi
Expand Down
11 changes: 5 additions & 6 deletions x11-packages/feathernotes/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
TERMUX_PKG_HOMEPAGE=https://github.com/tsujan/FeatherNotes
TERMUX_PKG_DESCRIPTION="Lightweight Qt Notes-Manager for Linux"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@Yisus7u7"
TERMUX_PKG_VERSION="1.1.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.2.0"
TERMUX_PKG_SRCURL=https://github.com/tsujan/FeatherNotes/archive/refs/tags/V${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=27dde444e5250637861cf89c2878be864e10a6760dc8523d3f2be9920dc55ae5
TERMUX_PKG_SHA256=fd9d0c4c361196a6b513dc14808810b112c8c30dbcdb277497e46dcc34af2cce
TERMUX_PKG_DEPENDS="hunspell, libc++, libx11, qt6-qtbase, qt6-qtsvg"
TERMUX_PKG_RECOMMENDS="hicolor-icon-theme"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
TERMUX_PKG_DEPENDS="hunspell, libc++, libx11, qt5-qtbase, qt5-qtsvg, qt5-qtx11extras"
TERMUX_PKG_RECOMMENDS="hicolor-icon-theme"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools, qt5-qttools-cross-tools"
9 changes: 4 additions & 5 deletions x11-packages/featherpad/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://github.com/tsujan/FeatherPad
TERMUX_PKG_DESCRIPTION="Lightweight Qt Plain-Text Editor"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.4.1"
TERMUX_PKG_VERSION="1.5.1"
TERMUX_PKG_SRCURL=https://github.com/tsujan/FeatherPad/releases/download/V${TERMUX_PKG_VERSION}/FeatherPad-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=f57d7e9392afe3819998049dac1a74528e29728b1132632a2b802c897497e621
TERMUX_PKG_SHA256=7ea930530d2d910dff1e8ff6fa1a2677653639929a9fc6e24010262b495ac345
TERMUX_PKG_DEPENDS="hunspell, libc++, libx11, qt6-qtbase, qt6-qtsvg"
TERMUX_PKG_RECOMMENDS="hicolor-icon-theme"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
TERMUX_PKG_DEPENDS="hunspell, libc++, libx11, qt5-qtbase, qt5-qtsvg, qt5-qtx11extras"
TERMUX_PKG_RECOMMENDS="hicolor-icon-theme"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools, qt5-qttools-cross-tools"
8 changes: 4 additions & 4 deletions x11-packages/mkvtoolnix/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ TERMUX_PKG_HOMEPAGE=https://www.bunkus.org/videotools/mkvtoolnix/
TERMUX_PKG_DESCRIPTION="Set of tools to create, edit and inspect Matroska files"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="81.0"
TERMUX_PKG_VERSION="84.0"
TERMUX_PKG_SRCURL=git+https://gitlab.com/mbunkus/mkvtoolnix
TERMUX_PKG_GIT_BRANCH=release-$TERMUX_PKG_VERSION
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+"
TERMUX_PKG_DEPENDS="boost, file, libc++, libebml, libflac, libiconv, libmatroska, libogg, libvorbis, pcre2, zlib, qt5-qtbase"
TERMUX_PKG_BUILD_DEPENDS="boost-headers, qt5-qtbase-cross-tools"
TERMUX_PKG_DEPENDS="boost, libc++, libebml, libflac, libgmp, libiconv, libmatroska, libogg, libvorbis, qt6-qtbase, zlib"
TERMUX_PKG_BUILD_DEPENDS="boost-headers, qt6-qtbase-cross-tools"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
ac_cv_fmt=no
Expand All @@ -17,7 +17,7 @@ enable_gui=no
--with-boost-filesystem=boost_filesystem
--with-boost-system=boost_system
--with-boost-date-time=boost_date_time
--with-qmake=${TERMUX_PREFIX}/opt/qt/cross/bin/qmake
--with-qmake6=${TERMUX_PREFIX}/lib/qt6/bin/qmake6
"

termux_step_pre_configure() {
Expand Down
133 changes: 133 additions & 0 deletions x11-packages/qt6-qtbase/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
TERMUX_PKG_DESCRIPTION="A cross-platform application and UI framework"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_LICENSE_FILE="LICENSES/GPL-3.0-only.txt"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="6.7.1"
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/${TERMUX_PKG_VERSION%.*}/${TERMUX_PKG_VERSION}/submodules/qtbase-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=b7338da1bdccb4d861e714efffaa83f174dfe37e194916bfd7ec82279a6ace19
TERMUX_PKG_DEPENDS="brotli, double-conversion, freetype, glib, harfbuzz, libandroid-shmem, libandroid-sysv-semaphore, libc++, libdrm, libice, libicu, libjpeg-turbo, libpng, libsm, libsqlite, libuuid, libx11, libxcb, libxi, libxkbcommon, libwayland, opengl, openssl, pcre2, vulkan-loader, xcb-util-cursor, xcb-util-image, xcb-util-keysyms, xcb-util-renderutil, xcb-util-wm, zlib, zstd"
TERMUX_PKG_BUILD_DEPENDS="libwayland-protocols, vulkan-headers, vulkan-loader-generic"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_FORCE_CMAKE=true
TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS
-DCMAKE_SYSTEM_NAME=Linux
-DFEATURE_journald=OFF
-DFEATURE_no_direct_extern_access=ON
-DFEATURE_openssl_linked=ON
-DFEATURE_system_sqlite=ON
-DINSTALL_ARCHDATADIR=lib/qt6
-DINSTALL_BINDIR=lib/qt6/bin
-DINSTALL_DATADIR=share/qt6
-DINSTALL_DOCDIR=share/doc/qt6
-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples
-DINSTALL_INCLUDEDIR=include/qt6
-DINSTALL_LIBEXECDIR=lib/qt6
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs
-DINSTALL_PUBLICBINDIR=${TERMUX_PREFIX}/bin
-DQT_ALLOW_SYMLINK_IN_PATHS=OFF
-DQT_FEATURE_freetype=ON
-DQT_FEATURE_gui=ON
-DQT_FEATURE_harfbuzz=ON
-DQT_FEATURE_widgets=ON
-DQT_FEATURE_zstd=ON
-DQT_HOST_PATH=${TERMUX_PREFIX}/opt/qt6/cross
"
TERMUX_PKG_NO_SHEBANG_FIX_FILES="
lib/qt6/bin/qmake
lib/qt6/bin/qmake6
lib/qt6/bin/qt-cmake
lib/qt6/bin/qt-cmake-create
lib/qt6/bin/qt-configure-module
lib/qt6/bin/qtpaths
lib/qt6/bin/qtpaths6
opt/qt6/cross/lib/cmake/Qt6/libexec/qt-internal-ninja.in
opt/qt6/cross/lib/cmake/Qt6/libexec/qt-internal-strip.in
opt/qt6/cross/lib/qt6/bin/qt-cmake
opt/qt6/cross/lib/qt6/bin/qt-cmake-create
opt/qt6/cross/lib/qt6/bin/qt-configure-module
opt/qt6/cross/lib/qt6/mkspecs/features/data/mac/objc_namespace.sh
opt/qt6/cross/lib/qt6/mkspecs/features/uikit/device_destinations.sh
opt/qt6/cross/lib/qt6/mkspecs/features/uikit/devices.py
opt/qt6/cross/lib/qt6/qt-cmake-private
opt/qt6/cross/lib/qt6/qt-cmake-standalone-test
opt/qt6/cross/lib/qt6/qt-internal-configure-examples
opt/qt6/cross/lib/qt6/qt-internal-configure-tests
opt/qt6/cross/lib/qt6/qt-testrunner.py
opt/qt6/cross/lib/qt6/sanitizer-testrunner.py
"
TERMUX_PKG_RM_AFTER_INSTALL="
lib/objects-*
opt/qt6/cross/lib/objects-*
"

termux_step_host_build() {
termux_setup_cmake
termux_setup_ninja

cmake \
-G Ninja \
-S ${TERMUX_PKG_SRCDIR} \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=${TERMUX_PREFIX}/opt/qt6/cross \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS \
-DFEATURE_journald=OFF \
-DFEATURE_openssl_linked=ON \
-DFEATURE_system_sqlite=ON \
-DINSTALL_ARCHDATADIR=lib/qt6 \
-DINSTALL_BINDIR=lib/qt6/bin \
-DINSTALL_DATADIR=share/qt6 \
-DINSTALL_DOCDIR=share/doc/qt6 \
-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
-DINSTALL_INCLUDEDIR=include/qt6 \
-DINSTALL_LIBEXECDIR=lib/qt6 \
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
-DINSTALL_PUBLICBINDIR=${TERMUX_PREFIX}/opt/qt6/cross/bin \
-DQT_ALLOW_SYMLINK_IN_PATHS=OFF \
-DQT_FEATURE_freetype=ON \
-DQT_FEATURE_gui=ON \
-DQT_FEATURE_harfbuzz=ON \
-DQT_FEATURE_widgets=ON \
-DQT_FEATURE_zstd=OFF
ninja \
-j ${TERMUX_MAKE_PROCESSES} \
install

mkdir -p ${TERMUX_PREFIX}/opt/qt6/cross/bin
find "$PWD" -type f -name user_facing_tool_links.txt \
-exec echo "{}" \; \
-exec cat "{}" \; \
-exec sed -e "s|^${TERMUX_PREFIX}/opt/qt6/cross|..|g" -i "{}" \;
cat $PWD/user_facing_tool_links.txt | xargs -P${TERMUX_MAKE_PROCESSES} -L1 ln -sv
find ${TERMUX_PREFIX}/opt/qt6/cross -type f -name target_qt.conf \
-exec echo "{}" \; \
-exec cat "{}" \;
}

termux_step_pre_configure() {
termux_setup_cmake
termux_setup_ninja
[[ "${TERMUX_ARCH}" == "arm" ]] && termux_setup_no_integrated_as

LDFLAGS+=" -landroid-shmem -landroid-sysv-semaphore"

TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="
-DCMAKE_C_COMPILER_AR=$(command -v llvm-ar)
-DCMAKE_C_COMPILER_RANLIB=$(command -v llvm-ranlib)
-DCMAKE_CXX_COMPILER_AR=$(command -v llvm-ar)
-DCMAKE_CXX_COMPILER_RANLIB=$(command -v llvm-ranlib)
"
}

termux_step_post_make_install() {
find ${TERMUX_PKG_BUILDDIR} -type f -name user_facing_tool_links.txt \
-exec echo "{}" \; \
-exec cat "{}" \;
find ${TERMUX_PREFIX}/lib/qt6 -type f -name target_qt.conf \
-exec echo "{}" \; \
-exec cat "{}" \;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/cmake/QtInstallHelpers.cmake
+++ b/cmake/QtInstallHelpers.cmake
@@ -170,7 +170,7 @@
" string(PREPEND qt_full_install_prefix \"$ENV\{DESTDIR}\")"
" endif()"
" message(STATUS \"Creating hard link ${original} -> ${linkname}\")"
- " file(CREATE_LINK \"${original}\" \"${linkname}\" COPY_ON_ERROR)")
+ " file(CREATE_LINK \"${original}\" \"${linkname}\" COPY_ON_ERROR SYMBOLIC)")

if(QT_GENERATOR_IS_MULTI_CONFIG)
# Wrap the code in a configuration check,
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TERMUX_SUBPKG_DESCRIPTION="Tools for cross build on the host (NOT for Termux)"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
TERMUX_SUBPKG_INCLUDE="
opt/qt6/cross
"
109 changes: 109 additions & 0 deletions x11-packages/qt6-qtbase/qt6-qtbase.patch.beforehostbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
@@ -78,7 +78,7 @@
# define Q_OS_WEBOS
# define Q_OS_LINUX
#elif defined(__ANDROID__) || defined(ANDROID)
-# define Q_OS_ANDROID
+# define Q_OS_ANDROID_EMBEDDED
# define Q_OS_LINUX
#elif defined(__CYGWIN__)
# define Q_OS_CYGWIN
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -66,7 +66,7 @@
#endif
#endif

-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(__ANDROID__)
// statx() is disabled on Android because quite a few systems
// come with sandboxes that kill applications that make system calls outside a
// whitelist and several Android vendors can't be bothered to update the list.
@@ -82,7 +82,7 @@
using namespace Qt::StringLiterals;

enum {
-#ifdef Q_OS_ANDROID
+#if defined(Q_OS_ANDROID) || defined(__ANDROID__)
// On Android, the link(2) system call has been observed to always fail
// with EACCES, regardless of whether there are permission problems or not.
SupportsHardlinking = false
@@ -644,7 +644,7 @@
{
Q_CHECK_FILE_NAME(entry, entry);

-#if !defined(Q_OS_DARWIN) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L
+#if !defined(Q_OS_DARWIN) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L && !defined(__ANDROID__)
// realpath(X,0) is not supported
Q_UNUSED(data);
return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));
@@ -667,7 +667,7 @@
# endif
};
std::unique_ptr<char, decltype (resolved_path_deleter)> resolved_name {nullptr, resolved_path_deleter};
-# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID)
+# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) || defined(__ANDROID__)
// On some Android and macOS versions, realpath() will return a path even if
// it does not exist. To work around this, we check existence in advance.
if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute))
@@ -798,7 +798,7 @@

#if !defined(Q_OS_INTEGRITY) && !defined(Q_OS_WASM)
struct group *gr = nullptr;
-#if QT_CONFIG(thread) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID) && (__ANDROID_API__ >= 24))
+#if QT_CONFIG(thread) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS) && (!defined(Q_OS_ANDROID) || !defined(__ANDROID__) || defined(Q_OS_ANDROID) && (__ANDROID_API__ >= 24))
size_max = sysconf(_SC_GETGR_R_SIZE_MAX);
if (size_max == -1)
size_max = 1024;
--- a/src/corelib/io/qtemporaryfile_p.h
+++ b/src/corelib/io/qtemporaryfile_p.h
@@ -22,7 +22,7 @@
#include "private/qfile_p.h"
#include "qtemporaryfile.h"

-#if defined(Q_OS_LINUX) && QT_CONFIG(linkat)
+#if defined(Q_OS_LINUX) && !defined(__ANDROID__) && QT_CONFIG(linkat)
# include <fcntl.h>
# ifdef O_TMPFILE
// some early libc support had the wrong values for O_TMPFILE
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -61,7 +61,7 @@
# define SCHED_IDLE 5
#endif

-#if defined(Q_OS_DARWIN) || !defined(Q_OS_ANDROID) && !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#if !defined(__ANDROID__) && (defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0))
#define QT_HAS_THREAD_PRIORITY_SCHEDULING
#endif

@@ -742,7 +742,7 @@

void QThread::terminate()
{
-#if !defined(Q_OS_ANDROID)
+#if !defined(__ANDROID__)
Q_D(QThread);
QMutexLocker locker(&d->mutex);

@@ -785,7 +785,7 @@
"Current thread was not started with QThread.");

Q_UNUSED(thr);
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(__ANDROID__)
Q_UNUSED(enabled);
#else
pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, nullptr);
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -2958,6 +2958,7 @@
ba("/etc/openssl/certs/"), // BlackBerry
ba("/opt/openssl/certs/"), // HP-UX
ba("/etc/ssl/"), // OpenBSD
+ ba("@TERMUX_PREFIX@/etc/tls/"), // Termux
};
return QList<QByteArray>::fromReadOnlyData(dirs);
}

Loading