Packages: Fix hardcoded Termux prefix (#733)

%ci:no-build
This commit is contained in:
Yonle 2022-04-05 11:48:20 +07:00 committed by Yaksh Bariya
parent 269ac767d9
commit 7d2ce5f0d9
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
73 changed files with 200 additions and 187 deletions

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://bochs.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Bochs is a highly portable open source IA-32 (x86) PC emulator and debugger written in C++."
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_VERSION=2.6.9
TERMUX_PKG_REVISION=23
TERMUX_PKG_REVISION=24
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/bochs/bochs-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=ee5b677fd9b1b9f484b5aeb4614f43df21993088c0c0571187f93acb0866e98c
TERMUX_PKG_DEPENDS="atk, fontconfig, freetype, gdk-pixbuf, glib, gtk2, libc++, libcairo, libgraphite, libx11, libxpm, libxrandr, ncurses, pango, readline"

View File

@ -6,6 +6,6 @@ diff -uNr bochs-2.6.9/bx_debug/Makefile.in bochs-2.6.9.mod/bx_debug/Makefile.in
BX_INCLUDES = debug.h
-BX_INCDIRS = -I.. -I$(srcdir)/.. -I../@INSTRUMENT_DIR@ -I$(srcdir)/../@INSTRUMENT_DIR@ -I. -I$(srcdir)/.
+BX_INCDIRS = -I.. -I/data/data/com.termux/files/usr/include -I$(srcdir)/.. -I../@INSTRUMENT_DIR@ -I$(srcdir)/../@INSTRUMENT_DIR@ -I. -I$(srcdir)/.
+BX_INCDIRS = -I.. -I@TERMUX_PREFIX@/include -I$(srcdir)/.. -I../@INSTRUMENT_DIR@ -I$(srcdir)/../@INSTRUMENT_DIR@ -I. -I$(srcdir)/.
all: libdebug.a

View File

@ -8,7 +8,7 @@ diff -uNr fltk-1.3.5/fluid/ExternalCodeEditor_UNIX.cxx fltk-1.3.5.mod/fluid/Exte
- static char dirname[100];
- snprintf(dirname, sizeof(dirname), "/tmp/.fluid-%ld", (long)getpid());
+ static char dirname[100] = {0};
+ snprintf(dirname, sizeof(dirname), "/data/data/com.termux/files/usr/tmp/.fluid-%ld", (long)getpid());
+ snprintf(dirname, sizeof(dirname), "@TERMUX_PREFIX@/tmp/.fluid-%ld", (long)getpid());
return dirname;
}
@ -20,16 +20,16 @@ diff -uNr fltk-1.3.5/src/Fl_File_Browser.cxx fltk-1.3.5.mod/src/Fl_File_Browser.
//
- mtab = fl_fopen("/etc/mnttab", "r"); // Fairly standard
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/mnttab", "r"); // Fairly standard
+ mtab = fl_fopen("@TERMUX_PREFIX@/etc/mnttab", "r"); // Fairly standard
if (mtab == NULL)
- mtab = fl_fopen("/etc/mtab", "r"); // More standard
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/mtab", "r"); // More standard
+ mtab = fl_fopen("@TERMUX_PREFIX@/etc/mtab", "r"); // More standard
if (mtab == NULL)
- mtab = fl_fopen("/etc/fstab", "r"); // Otherwise fallback to full list
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/fstab", "r"); // Otherwise fallback to full list
+ mtab = fl_fopen("@TERMUX_PREFIX@/etc/fstab", "r"); // Otherwise fallback to full list
if (mtab == NULL)
- mtab = fl_fopen("/etc/vfstab", "r"); // Alternate full list file
+ mtab = fl_fopen("/data/data/com.termux/files/usr/etc/vfstab", "r"); // Alternate full list file
+ mtab = fl_fopen("@TERMUX_PREFIX@/etc/vfstab", "r"); // Alternate full list file
+
+ if (mtab == NULL)
+ mtab = fl_fopen("/proc/mounts", "r"); // Try to use /proc/mounts
@ -46,9 +46,9 @@ diff -uNr fltk-1.3.5/src/Fl_File_Icon2.cxx fltk-1.3.5.mod/src/Fl_File_Icon2.cxx
- if (!access("/opt/kde", F_OK)) kdedir = "/opt/kde";
- else if (!access("/usr/local/share/mimelnk", F_OK)) kdedir = "/usr/local";
- else kdedir = "/usr";
+ if (!access("/data/data/com.termux/files/usr/opt/kde", F_OK)) kdedir = "/data/data/com.termux/files/usr/opt/kde";
+ else if (!access("/data/data/com.termux/files/usr/share/mimelnk", F_OK)) kdedir = "/data/data/com.termux/files/usr";
+ else kdedir = "/data/data/com.termux/files/usr";
+ if (!access("@TERMUX_PREFIX@/opt/kde", F_OK)) kdedir = "@TERMUX_PREFIX@/opt/kde";
+ else if (!access("@TERMUX_PREFIX@/share/mimelnk", F_OK)) kdedir = "@TERMUX_PREFIX@";
+ else kdedir = "@TERMUX_PREFIX@";
}
}
@ -57,89 +57,89 @@ diff -uNr fltk-1.3.5/src/Fl_File_Icon2.cxx fltk-1.3.5.mod/src/Fl_File_Icon2.cxx
snprintf(filename, sizeof(filename), "%s/share/mimelnk", kdedir);
load_kde_icons(filename, icondir);
- } else if (!access("/usr/share/icons/folder.xpm", F_OK)) {
+ } else if (!access("/data/data/com.termux/files/usr/share/icons/folder.xpm", F_OK)) {
+ } else if (!access("@TERMUX_PREFIX@/share/icons/folder.xpm", F_OK)) {
// Load GNOME icons...
icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/share/icons/page.xpm");
+ icon->load_image("/data/data/com.termux/files/usr/share/icons/page.xpm");
+ icon->load_image("@TERMUX_PREFIX@/share/icons/page.xpm");
icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
- icon->load_image("/usr/share/icons/folder.xpm");
- } else if (!access("/usr/dt/appconfig/icons", F_OK)) {
+ icon->load_image("/data/data/com.termux/files/usr/share/icons/folder.xpm");
+ } else if (!access("/data/data/com.termux/files/usr/dt/appconfig/icons", F_OK)) {
+ icon->load_image("@TERMUX_PREFIX@/share/icons/folder.xpm");
+ } else if (!access("@TERMUX_PREFIX@/dt/appconfig/icons", F_OK)) {
// Load CDE icons...
icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtdata.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtdata.m.pm");
+ icon->load_image("@TERMUX_PREFIX@/dt/appconfig/icons/C/Dtdata.m.pm");
icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
- icon->load_image("/usr/dt/appconfig/icons/C/DtdirB.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/DtdirB.m.pm");
+ icon->load_image("@TERMUX_PREFIX@/dt/appconfig/icons/C/DtdirB.m.pm");
icon = new Fl_File_Icon("core", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtcore.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtcore.m.pm");
+ icon->load_image("@TERMUX_PREFIX@/dt/appconfig/icons/C/Dtcore.m.pm");
icon = new Fl_File_Icon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtimage.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtimage.m.pm");
+ icon->load_image("@TERMUX_PREFIX@/dt/appconfig/icons/C/Dtimage.m.pm");
icon = new Fl_File_Icon("*.{eps|pdf|ps}", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/Dtps.m.pm");
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/Dtps.m.pm");
+ icon->load_image("@TERMUX_PREFIX@/dt/appconfig/icons/C/Dtps.m.pm");
icon = new Fl_File_Icon("*.ppd", Fl_File_Icon::PLAIN);
- icon->load_image("/usr/dt/appconfig/icons/C/DtPrtpr.m.pm");
- } else if (!access("/usr/lib/filetype", F_OK)) {
+ icon->load_image("/data/data/com.termux/files/usr/dt/appconfig/icons/C/DtPrtpr.m.pm");
+ } else if (!access("/data/data/com.termux/files/usr/lib/filetype", F_OK)) {
+ icon->load_image("@TERMUX_PREFIX@/dt/appconfig/icons/C/DtPrtpr.m.pm");
+ } else if (!access("@TERMUX_PREFIX@/lib/filetype", F_OK)) {
// Load SGI icons...
icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/iconlib/generic.doc.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/iconlib/generic.doc.fti");
icon = new Fl_File_Icon("*", Fl_File_Icon::DIRECTORY);
- icon->load_fti("/usr/lib/filetype/iconlib/generic.folder.closed.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/iconlib/generic.folder.closed.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/iconlib/generic.folder.closed.fti");
icon = new Fl_File_Icon("core", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/default/iconlib/CoreFile.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/default/iconlib/CoreFile.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/default/iconlib/CoreFile.fti");
icon = new Fl_File_Icon("*.{bmp|bw|gif|jpg|pbm|pcd|pgm|ppm|png|ras|rgb|tif|xbm|xpm}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/system/iconlib/ImageFile.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/system/iconlib/ImageFile.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/system/iconlib/ImageFile.fti");
- if (!access("/usr/lib/filetype/install/iconlib/acroread.doc.fti", F_OK)) {
+ if (!access("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/acroread.doc.fti", F_OK)) {
+ if (!access("@TERMUX_PREFIX@/lib/filetype/install/iconlib/acroread.doc.fti", F_OK)) {
icon = new Fl_File_Icon("*.{eps|ps}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
icon = new Fl_File_Icon("*.pdf", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/install/iconlib/acroread.doc.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/acroread.doc.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/install/iconlib/acroread.doc.fti");
} else {
icon = new Fl_File_Icon("*.{eps|pdf|ps}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/system/iconlib/PostScriptFile.closed.fti");
}
- if (!access("/usr/lib/filetype/install/iconlib/html.fti", F_OK)) {
+ if (!access("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/html.fti", F_OK)) {
+ if (!access("@TERMUX_PREFIX@/lib/filetype/install/iconlib/html.fti", F_OK)) {
icon = new Fl_File_Icon("*.{htm|html|shtml}", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/iconlib/generic.doc.fti");
- icon->load_fti("/usr/lib/filetype/install/iconlib/html.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/iconlib/generic.doc.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/html.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/iconlib/generic.doc.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/install/iconlib/html.fti");
}
- if (!access("/usr/lib/filetype/install/iconlib/color.ps.idle.fti", F_OK)) {
+ if (!access("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/color.ps.idle.fti", F_OK)) {
+ if (!access("@TERMUX_PREFIX@/lib/filetype/install/iconlib/color.ps.idle.fti", F_OK)) {
icon = new Fl_File_Icon("*.ppd", Fl_File_Icon::PLAIN);
- icon->load_fti("/usr/lib/filetype/install/iconlib/color.ps.idle.fti");
+ icon->load_fti("/data/data/com.termux/files/usr/lib/filetype/install/iconlib/color.ps.idle.fti");
+ icon->load_fti("@TERMUX_PREFIX@/lib/filetype/install/iconlib/color.ps.idle.fti");
}
} else {
// Create the default icons...
@ -151,7 +151,7 @@ diff -uNr fltk-1.3.5/src/fl_open_uri.cxx fltk-1.3.5.mod/src/fl_open_uri.cxx
- if ((path = getenv("PATH")) == NULL) path = "/bin:/usr/bin";
+ if ((path = getenv("PATH")) == NULL) path = "/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/system/xbin:/system/bin";
+ if ((path = getenv("PATH")) == NULL) path = "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets:/system/xbin:/system/bin";
for (ptr = filename, end = filename + filesize - 1; *path; path ++) {
if (*path == ':') {
@ -173,7 +173,7 @@ diff -uNr fltk-1.3.5/src/Fl_Preferences.cxx fltk-1.3.5.mod/src/Fl_Preferences.cx
}
case SYSTEM:
- strcpy(filename, "/etc/fltk/");
+ strcpy(filename, "/data/data/com.termux/files/usr/etc/fltk/");
+ strcpy(filename, "@TERMUX_PREFIX@/etc/fltk/");
break;
}
snprintf(filename + strlen(filename), sizeof(filename) - strlen(filename),
@ -222,7 +222,7 @@ diff -uNr fltk-1.3.5/src/Fl_x.cxx fltk-1.3.5.mod/src/Fl_x.cxx
+ static char tmp_fname[52] = {0};
static Fl_Shared_Image *shared = 0;
- strcpy(tmp_fname, "/tmp/clipboardXXXXXX");
+ strcpy(tmp_fname, "/data/data/com.termux/files/usr/tmp/clipboardXXXXXX");
+ strcpy(tmp_fname, "@TERMUX_PREFIX@/tmp/clipboardXXXXXX");
int fd = mkstemp(tmp_fname);
if (fd == -1) return 0;
uchar *p = sn_buffer; ssize_t towrite = bytesread, written;
@ -234,7 +234,7 @@ diff -uNr fltk-1.3.5/src/print_panel.cxx fltk-1.3.5.mod/src/print_panel.cxx
defname[0] = '\0';
// get names of all printers and of default one
- if ((lpstat = popen("LC_MESSAGES=C LANG=C /bin/sh -c '(lpstat -p -d ) 2>&-'", "r")) != NULL) { // try first with SystemV printing system
+ if ((lpstat = popen("LC_MESSAGES=C LANG=C /data/data/com.termux/files/usr/bin/sh -c '(lpstat -p -d ) 2>&-'", "r")) != NULL) { // try first with SystemV printing system
+ if ((lpstat = popen("LC_MESSAGES=C LANG=C @TERMUX_PREFIX@/bin/sh -c '(lpstat -p -d ) 2>&-'", "r")) != NULL) { // try first with SystemV printing system
while (fgets(line, sizeof(line), lpstat)) {
if (!strncmp(line, "printer ", 8) &&
sscanf(line + 8, "%s", name) == 1) {
@ -243,7 +243,7 @@ diff -uNr fltk-1.3.5/src/print_panel.cxx fltk-1.3.5.mod/src/print_panel.cxx
}
- if (print_choice->size() == 2 && (lpstat = fopen("/etc/printcap", "r"))) { // try next with BSD printing system
+ if (print_choice->size() == 2 && (lpstat = fopen("/data/data/com.termux/files/usr/etc/printcap", "r"))) { // try next with BSD printing system
+ if (print_choice->size() == 2 && (lpstat = fopen("@TERMUX_PREFIX@/etc/printcap", "r"))) { // try next with BSD printing system
while (fgets(line, sizeof(line),lpstat)) { // get names of all known printers
if (*line == '#' || (p = strchr(line, '|')) == NULL) continue;
*p = 0;
@ -252,7 +252,7 @@ diff -uNr fltk-1.3.5/src/print_panel.cxx fltk-1.3.5.mod/src/print_panel.cxx
if (print_choice->value()) {
strcpy(status, "printer status unavailable");
- snprintf(command, sizeof(command), "/bin/sh -c \"(lpstat -p '%s' ) 2>&-\" ", printer); // try first with SystemV printing system
+ snprintf(command, sizeof(command), "/data/data/com.termux/files/usr/bin/sh -c \"(lpstat -p '%s' ) 2>&-\" ", printer); // try first with SystemV printing system
+ snprintf(command, sizeof(command), "@TERMUX_PREFIX@/bin/sh -c \"(lpstat -p '%s' ) 2>&-\" ", printer); // try first with SystemV printing system
if ((lpstat = popen(command, "r")) != NULL) {
if (fgets(status, sizeof(status), lpstat) == 0) { // if no reply
pclose(lpstat);

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Graphical user interface toolkit for X"
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.3.7
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://www.fltk.org/pub/fltk/${TERMUX_PKG_VERSION}/fltk-${TERMUX_PKG_VERSION}-source.tar.gz
TERMUX_PKG_SHA256=5d2ccb7ad94e595d3d97509c7a931554e059dd970b7b29e6fd84cb70fd5491c6
TERMUX_PKG_DEPENDS="fontconfig, glu, libc++, libjpeg-turbo, libpng, libx11, libxcursor, libxext, libxfixes, libxft, libxinerama, libxrender, mesa, zlib"

View File

@ -6,7 +6,7 @@ diff -uNr gtk-3.22.30/demos/widget-factory/widget-factory.c gtk-3.22.30.mod/demo
gtk_flow_box_insert (GTK_FLOW_BOX (flowbox), child, -1);
- location = "/usr/share/backgrounds/gnome";
+ location = "/data/data/com.termux/files/usr/share/backgrounds/gnome";
+ location = "@TERMUX_PREFIX@/share/backgrounds/gnome";
dir = g_dir_open (location, 0, &error);
if (error)
{
@ -18,7 +18,7 @@ diff -uNr gtk-3.22.30/modules/printbackends/cups/gtkprintbackendcups.c gtk-3.22.
/* Ordering matters for default preference */
static const char *lpoptions_locations[] = {
- "/etc/cups/lpoptions",
+ "/data/data/com.termux/files/usr/etc/cups/lpoptions",
+ "@TERMUX_PREFIX@/etc/cups/lpoptions",
".lpoptions",
".cups/lpoptions"
};

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="GObject-based multi-platform GUI toolkit"
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.24.33
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://gitlab.gnome.org/GNOME/gtk/-/archive/$TERMUX_PKG_VERSION/gtk-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=c43a6082093be3e0d771f595df5669d594ae1c9c6dedbfc429fada0da80431d5
TERMUX_PKG_BUILD_IN_SRC=true

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Wayland protocol library"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.17.0
TERMUX_PKG_REVISION=8
TERMUX_PKG_REVISION=9
TERMUX_PKG_SRCURL=https://wayland.freedesktop.org/releases/wayland-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4
TERMUX_PKG_DEPENDS="libandroid-support, libffi, libxml2, libexpat"
@ -14,5 +14,5 @@ termux_step_pre_configure() {
}
termux_step_post_make_install() {
sed -i 's/wayland_scanner=${exec_prefix}\/bin\/wayland-scanner/wayland_scanner=\/usr\/bin\/wayland-scanner/g' /data/data/com.termux/files/usr/lib/pkgconfig/wayland-scanner.pc
sed -i 's/wayland_scanner=${exec_prefix}\/bin\/wayland-scanner/wayland_scanner=\/usr\/bin\/wayland-scanner/g' $TERMUX_PREFIX/lib/pkgconfig/wayland-scanner.pc
}

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Highly configurable and lightweight X11 window manager"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.6.1
TERMUX_PKG_REVISION=53
TERMUX_PKG_REVISION=54
TERMUX_PKG_SRCURL=http://openbox.org/dist/openbox/openbox-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=8b4ac0760018c77c0044fab06a4f0c510ba87eae934d9983b10878483bde7ef7
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-session-management"
@ -38,12 +38,15 @@ etc/xdg/openbox/rc.xml
termux_step_post_make_install() {
## install custom variant of scripts startup scripts
cp -f "${TERMUX_PKG_BUILDER_DIR}/scripts/openbox-session" "${TERMUX_PREFIX}/bin/openbox-session"
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" "${TERMUX_PREFIX}/bin/openbox-session"
chmod 755 "${TERMUX_PREFIX}/bin/openbox-session"
cp -f "${TERMUX_PKG_BUILDER_DIR}/scripts/openbox-autostart" "${TERMUX_PREFIX}/libexec/openbox-autostart"
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" "${TERMUX_PREFIX}/libexec/openbox-autostart"
chmod 755 "${TERMUX_PREFIX}/libexec/openbox-autostart"
cp -f "${TERMUX_PKG_BUILDER_DIR}/scripts/openbox-xdg-autostart" "${TERMUX_PREFIX}/libexec/openbox-xdg-autostart"
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" "${TERMUX_PREFIX}/libexec/openbox-xdg-autostart"
chmod 755 "${TERMUX_PREFIX}/libexec/openbox-xdg-autostart"
## install custom config files

View File

@ -7,8 +7,8 @@ diff -uNr openbox-3.6.1/tools/gdm-control/gdm-control.c openbox-3.6.1.mod/tools/
-#define GDM_PROTOCOL_SOCKET_PATH1 "/var/run/gdm_socket"
-#define GDM_PROTOCOL_SOCKET_PATH2 "/tmp/.gdm_socket"
+#define GDM_PROTOCOL_SOCKET_PATH1 "/data/data/com.termux/files/usr/var/run/gdm_socket"
+#define GDM_PROTOCOL_SOCKET_PATH2 "/data/data/com.termux/files/usr/tmp/.gdm_socket"
+#define GDM_PROTOCOL_SOCKET_PATH1 "@TERMUX_PREFIX@/var/run/gdm_socket"
+#define GDM_PROTOCOL_SOCKET_PATH2 "@TERMUX_PREFIX@/tmp/.gdm_socket"
#define GDM_PROTOCOL_MSG_CLOSE "CLOSE"
#define GDM_PROTOCOL_MSG_VERSION "VERSION"

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
GLOBALAUTOSTART="/data/data/com.termux/files/usr/etc/xdg/openbox/autostart"
GLOBALAUTOSTART="@TERMUX_PREFIX@/etc/xdg/openbox/autostart"
AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart"
# Run the global openbox autostart script
@ -20,4 +20,4 @@ fi
# Run the XDG autostart stuff. These are found in /etc/xdg/autostart and
# in $HOME/.config/autostart. This requires PyXDG to be installed.
# See openbox-xdg-autostart --help for more details.
/data/data/com.termux/files/usr/libexec/openbox-xdg-autostart "$@"
@TERMUX_PREFIX@/libexec/openbox-xdg-autostart "$@"

View File

@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
if test -n "$1"; then
echo "Syntax: openbox-session"
@ -13,10 +13,10 @@ xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
-remove _NET_CURRENT_DESKTOP 2> /dev/null
# Set up the environment
A="/data/data/com.termux/files/usr/etc/xdg/openbox/environment"
A="@TERMUX_PREFIX@/etc/xdg/openbox/environment"
test -r $A && . $A
A="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/environment"
test -r $A && . $A
# Run Openbox, and have it run the autostart stuff
exec /data/data/com.termux/files/usr/bin/openbox --startup "/data/data/com.termux/files/usr/libexec/openbox-autostart OPENBOX" "$@"
exec @TERMUX_PREFIX@/bin/openbox --startup "@TERMUX_PREFIX@/libexec/openbox-autostart OPENBOX" "$@"

View File

@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/env python
#!@TERMUX_PREFIX@/bin/env python
# openbox-xdg-autostart runs things based on the XDG autostart specification
# Copyright (C) 2008 Dana Jansens

View File

@ -6,7 +6,7 @@ diff -uNr PyPanel-2.4/ppmodule.c PyPanel-2.4.mod/ppmodule.c
*/
-#include <Python.h>
+#include </data/data/com.termux/files/usr/include/python2.7/Python.h>
+#include <@TERMUX_PREFIX@/include/python2.7/Python.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <Imlib2.h>
@ -15,7 +15,7 @@ diff -uNr PyPanel-2.4/ppmodule.c PyPanel-2.4.mod/ppmodule.c
you're reading this and know of a proper solution, please let me know ..
*/
- handle = dlopen("/usr/lib/libImlib2.so.1", RTLD_NOW|RTLD_GLOBAL);
+ handle = dlopen("/data/data/com.termux/files/usr/lib/libImlib2.so", RTLD_NOW|RTLD_GLOBAL);
+ handle = dlopen("@TERMUX_PREFIX@/lib/libImlib2.so", RTLD_NOW|RTLD_GLOBAL);
if (!handle) {
printf("Imlib2 dlopen failed: %s\n", dlerror());

View File

@ -3,7 +3,7 @@ diff -uNr PyPanel-2.4/pypanel PyPanel-2.4.mod/pypanel
+++ PyPanel-2.4.mod/pypanel 2017-12-12 17:52:16.987058639 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python -OO
+#!/data/data/com.termux/files/usr/bin/python2
+#!@TERMUX_PREFIX@/bin/python2
"""
PyPanel v2.4 - Lightweight panel/taskbar for X11 window managers
Copyright (c) 2003-2005 Jon Gelo (ziljian@users.sourceforge.net)
@ -17,10 +17,10 @@ diff -uNr PyPanel-2.4/pypanel PyPanel-2.4.mod/pypanel
+ home = os.getenv("HOME")
+
+ if not home:
+ home = "/data/data/com.termux/files/home"
+ home = "@TERMUX_HOME@"
+
+ if os.access("/data/data/com.termux/files/usr/etc/pypanelrc", os.F_OK|os.R_OK):
+ src = "/data/data/com.termux/files/usr/etc/pypanelrc"
+ if os.access("@TERMUX_PREFIX@/etc/pypanelrc", os.F_OK|os.R_OK):
+ src = "@TERMUX_PREFIX@/etc/pypanelrc"
execfile(src)
if not os.access("%s/.pypanelrc" % home, os.F_OK|os.R_OK):
# Create ~/.pypanelrc from /etc/pypanelrc if it exists else

View File

@ -6,11 +6,11 @@ diff -uNr PyPanel-2.4/setup.py PyPanel-2.4.mod/setup.py
# Full paths to imlib2-config and freetype-config, adjust as needed -
-configs = ["/usr/bin/freetype-config", "/usr/bin/imlib2-config"]
+configs = ["/data/data/com.termux/files/usr/bin/freetype-config", "/data/data/com.termux/files/usr/bin/imlib2-config"]
+configs = ["@TERMUX_PREFIX@/bin/freetype-config", "@TERMUX_PREFIX@/bin/imlib2-config"]
# Adjust or add any additional include directories here -
-idirs = ["/usr/X11R6/include"]
+idirs = ["/data/data/com.termux/files/usr/include"]
+idirs = ["@TERMUX_PREFIX@/include"]
# Add any additional library directories here -
ldirs = []
@ -19,7 +19,7 @@ diff -uNr PyPanel-2.4/setup.py PyPanel-2.4.mod/setup.py
# Full path to libImlib2 shared library
-imlib2 = "/usr/lib/libImlib2.so.1"
+imlib2 = "/data/data/com.termux/files/usr/lib/libImlib2.so.1"
+imlib2 = "@TERMUX_PREFIX@/lib/libImlib2.so.1"
#------------------------------------------------------------------------------
# The rest of this script should not need to be modified!

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A lightweight panel/taskbar for X11 window managers writ
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.4
TERMUX_PKG_REVISION=34
TERMUX_PKG_REVISION=35
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/pypanel/PyPanel-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=4e612b43c61b3a8af7d57a0364f6cd89df481dc41e20728afa643e9e3546e911
TERMUX_PKG_DEPENDS="freetype, imlib2, libandroid-shmem, libx11, libxft, python2, python2-xlib"
@ -20,9 +20,9 @@ termux_step_make() {
-fPIC \
-DHAVE_XFT=1 \
-DIMLIB2_FIX=1 \
-I/data/data/com.termux/files/usr/include \
-I/data/data/com.termux/files/usr/include/freetype2 \
-I/data/data/com.termux/files/usr/include/libpng16 \
-I$TERMUX_PREFIX/include \
-I$TERMUX_PREFIX/include/freetype2 \
-I$TERMUX_PREFIX/include/libpng16 \
-c ppmodule.c \
-o ppmodule.o \

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A fully functional X client library for Python programs"
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.24
TERMUX_PKG_REVISION=22
TERMUX_PKG_REVISION=23
TERMUX_PKG_SRCURL=https://github.com/python-xlib/python-xlib/releases/download/${TERMUX_PKG_VERSION}/python-xlib-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=7ecf32b18b59be2c06848410bae848792ead119ac31084f487730581b3ab598c
TERMUX_PKG_DEPENDS="libx11, python2, python2-six"

View File

@ -6,7 +6,7 @@ diff -uNr python-xlib-0.20/Xlib/support/unix_connect.py python-xlib-0.20.mod/Xli
# Else use Unix socket
else:
- address = '/tmp/.X11-unix/X%d' % dno
+ address = '/data/data/com.termux/files/usr/tmp/.X11-unix/X%d' % dno
+ address = '@TERMUX_PREFIX@/tmp/.X11-unix/X%d' % dno
if not os.path.exists(address):
# Use abstract address.
address = '\0' + address

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A cross-platform application and UI framework"
TERMUX_PKG_LICENSE="LGPL-3.0"
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
TERMUX_PKG_VERSION=5.15.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/5.15/${TERMUX_PKG_VERSION}/submodules/qtbase-everywhere-opensource-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=26394ec9375d52c1592bd7b689b1619c6b8dbe9b6f91fdd5c355589787f3a0b6
TERMUX_PKG_DEPENDS="dbus, double-conversion, harfbuzz, libandroid-shmem, libandroid-sysv-semaphore, libc++, libice, libicu, libjpeg-turbo, libpng, libsm, libuuid, libx11, libxcb, libxi, libxkbcommon, openssl, pcre2, ttf-dejavu, freetype, xcb-util-image, xcb-util-keysyms, xcb-util-renderutil, xcb-util-wm, zlib, glib"
@ -213,5 +213,6 @@ termux_step_create_debscripts() {
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
}

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
PREFIX="/data/data/com.termux/files/usr"
PREFIX="@TERMUX_PREFIX@"
if [ `uname -o` = 'Android' ]; then
echo "Patching Qt installation configuration files ..."

View File

@ -22,9 +22,9 @@ diff -uNr qtbase/mkspecs/termux/qmake.conf qtbase.mod/mkspecs/termux/qmake.conf
+QMAKE_PKG_CONFIG = pkg-config
+QMAKE_STRIP = strip
+
+QMAKE_CFLAGS += -I/data/data/com.termux/files/usr/include
+QMAKE_CXXFLAGS += -I/data/data/com.termux/files/usr/include
+QMAKE_LFLAGS += -L/data/data/com.termux/files/usr/lib
+QMAKE_CFLAGS += -I@TERMUX_PREFIX@/include
+QMAKE_CXXFLAGS += -I@TERMUX_PREFIX@/include
+QMAKE_LFLAGS += -L@TERMUX_PREFIX@/lib
+QMAKE_LFLAGS_SHLIB += -shared
+QMAKE_LFLAGS_PLUGIN += -shared
+

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="The Qt Declarative module provides classes for using GUI
TERMUX_PKG_LICENSE="LGPL-3.0"
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
TERMUX_PKG_VERSION=5.15.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/5.15/${TERMUX_PKG_VERSION}/submodules/qtdeclarative-everywhere-opensource-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=33f15a5caa451bddf8298466442ccf7ca65e4cf90453928ddbb95216c4374062
TERMUX_PKG_DEPENDS="qt5-qtbase"
@ -159,4 +160,5 @@ termux_step_create_debscripts() {
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
}

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
PREFIX="/data/data/com.termux/files/usr"
PREFIX="@TERMUX_PREFIX@"
if [ `uname -o` = 'Android' ]; then
echo "Patching Qt installation configuration files ..."

View File

@ -3,27 +3,27 @@
@@ -1,2 +1,5 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/gstreamer-1.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/glib-2.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/lib/glib-2.0/include"
--- src/config.tests/gstreamer_photography/gstreamer_photography.pro 2020-10-15 06:53:20.000000000 +0000
+++ src.mod/config.tests/gstreamer_photography/gstreamer_photography.pro 2021-05-16 13:59:57.407079643 +0000
@@ -1 +1,4 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/gstreamer-1.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/glib-2.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/lib/glib-2.0/include"
--- src/config.tests/gstreamer_appsrc/gstreamer_appsrc.pro 2020-10-15 06:53:20.000000000 +0000
+++ src.mod/config.tests/gstreamer_appsrc/gstreamer_appsrc.pro 2021-05-16 14:03:35.948676966 +0000
@@ -1 +1,4 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/gstreamer-1.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/glib-2.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/lib/glib-2.0/include"
--- src/config.tests/gstreamer_encodingprofiles/gstreamer_encodingprofiles.pro 2020-10-15 06:53:20.000000000 +0000
+++ src.mod/config.tests/gstreamer_encodingprofiles/gstreamer_encodingprofiles.pro 2021-05-16 14:02:47.817110561 +0000
@@ -1 +1,4 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/gstreamer-1.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/include/glib-2.0/"
+INCLUDEPATH += "@TERMUX_PREFIX@/lib/glib-2.0/include"

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Qt Development Tools (Linguist, Assistant, Designer, etc
TERMUX_PKG_LICENSE="LGPL-3.0"
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
TERMUX_PKG_VERSION=5.15.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/5.15/${TERMUX_PKG_VERSION}/submodules/qttools-everywhere-opensource-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=463b2fe71a085e7ab4e39333ae360ab0ec857b966d7a08f752c427e5df55f90d
TERMUX_PKG_DEPENDS="qt5-qtbase, qt5-qtdeclarative"
@ -228,4 +229,5 @@ termux_step_create_debscripts() {
# Some clean-up is happening via `postinst`
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./postinst
}

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
PREFIX="/data/data/com.termux/files/usr"
PREFIX="@TERMUX_PREFIX@"
if [ `uname -o` = 'Android' ]; then
echo "Patching Qt installation configuration files ..."

View File

@ -6,13 +6,13 @@ diff -uNr SDL-1.2.15/src/cdrom/linux/SDL_syscdrom.c SDL-1.2.15.mod/src/cdrom/lin
#define _PATH_MNTTAB MNTTAB
#else
-#define _PATH_MNTTAB "/etc/fstab"
+#define _PATH_MNTTAB "/data/data/com.termux/files/usr/etc/fstab"
+#define _PATH_MNTTAB "@TERMUX_PREFIX@/etc/fstab"
#endif
#endif /* !_PATH_MNTTAB */
#ifndef _PATH_MOUNTED
-#define _PATH_MOUNTED "/etc/mtab"
+#define _PATH_MOUNTED "/data/data/com.termux/files/usr/etc/mtab"
+#define _PATH_MOUNTED "@TERMUX_PREFIX@/etc/mtab"
#endif /* !_PATH_MOUNTED */
#ifndef MNTTYPE_CDROM

View File

@ -34,7 +34,7 @@ diff -uNr SDL-1.2.15/src/video/fbcon/SDL_fbvideo.c SDL-1.2.15.mod/src/video/fbco
};
-#define FB_MODES_DB "/etc/fb.modes"
+#define FB_MODES_DB "/data/data/com.termux/files/usr/etc/fb.modes"
+#define FB_MODES_DB "@TERMUX_PREFIX@/etc/fb.modes"
static int read_fbmodes_line(FILE*f, char* line, int length)
{

View File

@ -6,7 +6,7 @@ diff -uNr SDL-1.2.15/src/video/ipod/SDL_ipodvideo.c SDL-1.2.15.mod/src/video/ipo
int i, tty0_fd;
- dbgout = fdopen (open ("/etc/sdlpod.log", O_WRONLY | O_SYNC | O_APPEND), "a");
+ dbgout = fdopen (open ("/data/data/com.termux/files/usr/etc/sdlpod.log", O_WRONLY | O_SYNC | O_APPEND), "a");
+ dbgout = fdopen (open ("@TERMUX_PREFIX@/etc/sdlpod.log", O_WRONLY | O_SYNC | O_APPEND), "a");
if (dbgout) {
setbuf (dbgout, 0);
fprintf (dbgout, "--> Started SDL <--\n");

View File

@ -6,7 +6,7 @@ diff -uNr SDL-1.2.15/src/video/photon/SDL_ph_gl.h SDL-1.2.15.mod/src/video/photo
#include "SDL_ph_video.h"
-#define DEFAULT_OPENGL "/usr/lib/libGL.so"
+#define DEFAULT_OPENGL "/data/data/com.termux/files/usr/lib/libGL.so"
+#define DEFAULT_OPENGL "@TERMUX_PREFIX@/lib/libGL.so"
#if SDL_VIDEO_OPENGL
void ph_GL_SwapBuffers(_THIS);

View File

@ -6,7 +6,7 @@ diff -uNr SDL-1.2.15/src/video/x11/SDL_x11gl.c SDL-1.2.15.mod/src/video/x11/SDL_
#define DEFAULT_OPENGL "libGL.so"
#elif defined(__MACOSX__)
-#define DEFAULT_OPENGL "/usr/X11R6/lib/libGL.1.dylib"
+#define DEFAULT_OPENGL "/data/data/com.termux/files/usr/X11R6/lib/libGL.1.dylib"
+#define DEFAULT_OPENGL "@TERMUX_PREFIX@/X11R6/lib/libGL.1.dylib"
#elif defined(__QNXNTO__)
#define DEFAULT_OPENGL "libGL.so.3"
#elif defined(__OpenBSD__)

View File

@ -6,7 +6,7 @@ diff -uNr SDL-1.2.15/src/video/x11/SDL_x11modes.c SDL-1.2.15.mod/src/video/x11/S
FILE *metro_fp;
- metro_fp = fopen("/usr/X11R6/lib/X11/Metro/.version", "r");
+ metro_fp = fopen("/data/data/com.termux/files/usr/X11R6/lib/X11/Metro/.version", "r");
+ metro_fp = fopen("@TERMUX_PREFIX@/X11R6/lib/X11/Metro/.version", "r");
if ( metro_fp != NULL ) {
int major, minor, patch, version, scannum;
major = 0; minor = 0; patch = 0;

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A library for portable low-level access to a video frame
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.2.15
TERMUX_PKG_REVISION=43
TERMUX_PKG_REVISION=44
TERMUX_PKG_SRCURL=https://www.libsdl.org/release/SDL-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00
TERMUX_PKG_DEPENDS="libandroid-glob, libflac, libogg, libsndfile, libvorbis, libx11, libxext, libxrandr, libxrender, pulseaudio"

View File

@ -3,13 +3,14 @@ TERMUX_PKG_DESCRIPTION="Freedesktop.org Shared MIME Info"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.1
TERMUX_PKG_REVISION=6
TERMUX_PKG_REVISION=7
TERMUX_PKG_SRCURL=https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/${TERMUX_PKG_VERSION}/shared-mime-info-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=3aeeee25ad445f257f614ed53837dee79fab70524b56e59b767f0d69e11fdff9
TERMUX_PKG_DEPENDS="coreutils, glib, libxml2"
termux_step_create_debscripts() {
cp "${TERMUX_PKG_BUILDER_DIR}/postinst" ./postinst
cp "${TERMUX_PKG_BUILDER_DIR}/postrm" ./postrm
cp "${TERMUX_PKG_BUILDER_DIR}/triggers" ./triggers
cp "${TERMUX_PKG_BUILDER_DIR}/postinst" ./postinst
cp "${TERMUX_PKG_BUILDER_DIR}/postrm" ./postrm
cp "${TERMUX_PKG_BUILDER_DIR}/triggers" ./triggers
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./{post{inst,rm},triggers}
}

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
set -e
PREFIX="/data/data/com.termux/files/usr"
PREFIX="@TERMUX_PREFIX@"
if [ "${1}" = "triggered" ]; then
if [ -x "${PREFIX}/bin/update-mime-database" ]; then

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/bash
#!@TERMUX_PREFIX@/bin/bash
set -e
PREFIX="/data/data/com.termux/files/usr"
PREFIX="@TERMUX_PREFIX@"
if [ "${1}" = purge ]; then
MIMEDIR="${PREFIX}/share/mime"

View File

@ -1 +1 @@
interest-noawait /data/data/com.termux/files/usr/share/mime/packages
interest-noawait @TERMUX_PREFIX@/share/mime/packages

View File

@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
# No update anymore. v1.11.x requires support of PAM.
TERMUX_PKG_VERSION=(1.10.1
1.20.0)
TERMUX_PKG_REVISION=22
TERMUX_PKG_REVISION=23
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
@ -66,4 +66,5 @@ termux_step_post_make_install() {
## use custom variant of vncserver script
cp -f "${TERMUX_PKG_BUILDER_DIR}/vncserver" "${TERMUX_PREFIX}/bin/vncserver"
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" "${TERMUX_PREFIX}/bin/vncserver"
}

View File

@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/env perl
#!@TERMUX_PREFIX@/bin/env perl
#
# Copyright (C) 2009-2010 D. R. Commander. All Rights Reserved.
# Copyright (C) 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
@ -45,13 +45,13 @@ $vncClasses = "";
$geometry = "1024x768";
#$depth = 16;
$vncJavaFiles = (((-d "$vncClasses") && "$vncClasses") ||
((-d "/data/data/com.termux/files/usr/share/vnc/classes") && "/data/data/com.termux/files/usr/share/vnc/classes") ||
((-d "/data/data/com.termux/files/usr/vnc/classes") && "/data/data/com.termux/files/usr/vnc/classes"));
((-d "@TERMUX_PREFIX@/share/vnc/classes") && "@TERMUX_PREFIX@/share/vnc/classes") ||
((-d "@TERMUX_PREFIX@/vnc/classes") && "@TERMUX_PREFIX@/vnc/classes"));
$vncUserDir = "$ENV{HOME}/.vnc";
$vncUserConfig = "$vncUserDir/config";
$vncSystemConfigDir = "/data/data/com.termux/files/usr/etc/tigervnc";
$vncSystemConfigDir = "@TERMUX_PREFIX@/etc/tigervnc";
$vncSystemConfigDefaultsFile = "$vncSystemConfigDir/vncserver-config-defaults";
$vncSystemConfigMandatoryFile = "$vncSystemConfigDir/vncserver-config-mandatory";
@ -60,7 +60,7 @@ $xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority";
$xstartupFile = $vncUserDir . "/xstartup";
$defaultXStartup
= ("#!/data/data/com.termux/files/usr/bin/sh\n".
= ("#!@TERMUX_PREFIX@/bin/sh\n".
"## This file is executed during VNC server\n".
"## startup.\n\n".
"# Launch terminal emulator Aterm.\n".
@ -83,15 +83,15 @@ $defaultConfig
chop($host = `uname -n`);
if (-d "/data/data/com.termux/files/usr/etc/X11/fontpath.d") {
$fontPath = "catalogue:/data/data/com.termux/files/usr/etc/X11/fontpath.d";
if (-d "@TERMUX_PREFIX@/etc/X11/fontpath.d") {
$fontPath = "catalogue:@TERMUX_PREFIX@/etc/X11/fontpath.d";
}
@fontpaths = ('/data/data/com.termux/files/usr/share/X11/fonts', '/data/data/com.termux/files/usr/share/fonts', '/data/data/com.termux/files/usr/share/fonts/X11/');
if (! -l "/data/data/com.termux/files/usr/lib/X11") {push(@fontpaths, '/data/data/com.termux/files/usr/lib/X11/fonts');}
if (! -l "/data/data/com.termux/files/usr/X11") {push(@fontpaths, '/data/data/com.termux/files/usrX11/lib/X11/fonts');}
if (! -l "/data/data/com.termux/files/usr/X11R6") {push(@fontpaths, '/data/data/com.termux/files/usr/X11R6/lib/X11/fonts');}
push(@fontpaths, '/data/data/com.termux/files/usr/share/fonts/default');
@fontpaths = ('@TERMUX_PREFIX@/share/X11/fonts', '@TERMUX_PREFIX@/share/fonts', '@TERMUX_PREFIX@/share/fonts/X11/');
if (! -l "@TERMUX_PREFIX@/lib/X11") {push(@fontpaths, '@TERMUX_PREFIX@/lib/X11/fonts');}
if (! -l "@TERMUX_PREFIX@/X11") {push(@fontpaths, '@TERMUX_PREFIX@X11/lib/X11/fonts');}
if (! -l "@TERMUX_PREFIX@/X11R6") {push(@fontpaths, '@TERMUX_PREFIX@/X11R6/lib/X11/fonts');}
push(@fontpaths, '@TERMUX_PREFIX@/share/fonts/default');
@fonttypes = ('misc',
'75dpi',
@ -317,7 +317,7 @@ foreach my $k (sort keys %default_opts) {
}
# Add color database stuff here, e.g.:
# $cmd .= " -co /usr/lib/X11/rgb";
# $cmd .= " -co @TERMUX_PREFIX@/lib/X11/rgb";
foreach $arg (@ARGV) {
$cmd .= " " . &quotedString($arg);
@ -389,8 +389,8 @@ warn "Log file is $desktopLog\n\n";
# If the unix domain socket exists then use that (DISPLAY=:n) otherwise use
# TCP (DISPLAY=host:n)
if (-e "/data/data/com.termux/files/usr/tmp/.X11-unix/X$displayNumber" ||
-e "/data/data/com.termux/files/usr/spool/sockets/X11/$displayNumber")
if (-e "@TERMUX_PREFIX@/tmp/.X11-unix/X$displayNumber" ||
-e "@TERMUX_PREFIX@/spool/sockets/X11/$displayNumber")
{
$ENV{DISPLAY}= ":$displayNumber";
} else {
@ -531,21 +531,21 @@ sub CheckDisplayNumber
}
close(S);
if (-e "/data/data/com.termux/files/usr/tmp/.X$n-lock") {
warn "\nWarning: $host:$n is taken because of /data/data/com.termux/files/usr/tmp/.X$n-lock\n";
if (-e "@TERMUX_PREFIX@/tmp/.X$n-lock") {
warn "\nWarning: $host:$n is taken because of @TERMUX_PREFIX@/tmp/.X$n-lock\n";
warn "Remove this file if there is no X server $host:$n\n";
return 0;
}
if (-e "/data/data/com.termux/files/usr/tmp/.X11-unix/X$n") {
warn "\nWarning: $host:$n is taken because of /data/data/com.termux/files/usr/tmp/.X11-unix/X$n\n";
if (-e "@TERMUX_PREFIX@/tmp/.X11-unix/X$n") {
warn "\nWarning: $host:$n is taken because of @TERMUX_PREFIX@/tmp/.X11-unix/X$n\n";
warn "Remove this file if there is no X server $host:$n\n";
return 0;
}
if (-e "/data/data/com.termux/files/usr/spool/sockets/X11/$n") {
if (-e "@TERMUX_PREFIX@/spool/sockets/X11/$n") {
warn("\nWarning: $host:$n is taken because of ".
"/data/data/com.termux/files/usr/spool/sockets/X11/$n\n");
"@TERMUX_PREFIX@/spool/sockets/X11/$n\n");
warn "Remove this file if there is no X server $host:$n\n";
return 0;
}
@ -745,15 +745,15 @@ sub Kill
warn "Xvnc process ID $pid already killed\n";
$opt{'-kill'} =~ s/://;
if (-e "/data/data/com.termux/files/usr/tmp/.X11-unix/X$opt{'-kill'}") {
if (-e "@TERMUX_PREFIX@/tmp/.X11-unix/X$opt{'-kill'}") {
print "Xvnc did not appear to shut down cleanly.";
print " Removing /data/data/com.termux/files/usr/tmp/.X11-unix/X$opt{'-kill'}\n";
unlink "/data/data/com.termux/files/usr/tmp/.X11-unix/X$opt{'-kill'}";
print " Removing @TERMUX_PREFIX@/tmp/.X11-unix/X$opt{'-kill'}\n";
unlink "@TERMUX_PREFIX@/tmp/.X11-unix/X$opt{'-kill'}";
}
if (-e "/data/data/com.termux/files/usr/tmp/.X$opt{'-kill'}-lock") {
if (-e "@TERMUX_PREFIX@/tmp/.X$opt{'-kill'}-lock") {
print "Xvnc did not appear to shut down cleanly.";
print " Removing /data/data/com.termux/files/usr/tmp/.X$opt{'-kill'}-lock\n";
unlink "/data/data/com.termux/files/usr/tmp/.X$opt{'-kill'}-lock";
print " Removing @TERMUX_PREFIX@/tmp/.X$opt{'-kill'}-lock\n";
unlink "@TERMUX_PREFIX@/tmp/.X$opt{'-kill'}-lock";
}
}
@ -862,7 +862,7 @@ sub SanityCheck
# eval, and if it fails we try 'require "sys/socket.ph"'. If this fails,
# we just guess at the values. If you find perl moaning here, just
# hard-code the values of AF_INET and SOCK_STREAM. You can find these out
# for your platform by looking in /usr/include/sys/socket.h and related
# for your platform by looking in @TERMUX_PREFIX@/include/sys/socket.h and related
# files.
#

View File

@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
# vim should only be updated every 50 releases on multiples of 50.
TERMUX_PKG_VERSION=8.2.3700
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/vim/vim/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c6ec0fbfc1493c4538050cc154c6285441ad4a5ebc424ab6cad33df0eac89ba9
@ -59,5 +59,6 @@ termux_step_pre_configure() {
termux_step_post_make_install() {
install -Dm600 $TERMUX_PKG_BUILDER_DIR/vimrc $TERMUX_PREFIX/share/vim/vimrc
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" $TERMUX_PREFIX/share/vim/vimrc
ln -sfr $TERMUX_PREFIX/bin/vim $TERMUX_PREFIX/bin/vi
}

View File

@ -77,7 +77,7 @@ if has('path_extra')
endif
if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276'))
set shell=/data/data/com.termux/files/usr/bin/env\ bash
set shell=@TERMUX_PREFIX@/bin/env\ bash
endif
set autoread

View File

@ -15,4 +15,5 @@ termux_step_create_debscripts() {
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
cp -f "${TERMUX_PKG_BUILDER_DIR}/postrm" ./
cp -f "${TERMUX_PKG_BUILDER_DIR}/triggers" ./
sed -i "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" ./{post{inst,rm},triggers}
}

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
set -e
PREFIX="/data/data/com.termux/files/usr"
PREFIX="@TERMUX_PREFIX@"
if [ -d "${PREFIX}/share/fonts" ]; then
for dir in $(find "${PREFIX}/share/fonts" -mindepth 1 -type d -printf '%p/\n'); do

View File

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
#!@TERMUX_PREFIX@/bin/sh
set -e
PREFIX="/data/data/com.termux/files/usr"
PREFIX="@TERMUX_PREFIX@"
if [ -d "${PREFIX}/share/fonts" ]; then
rm -f "${PREFIX}/share/fonts/.uuid"

View File

@ -1 +1 @@
interest-noawait /data/data/com.termux/files/usr/share/fonts
interest-noawait @TERMUX_PREFIX@/share/fonts

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/hw/xfree86/common/xf86Config.c xorg-server-1.20.1.m
#endif
#ifndef PROJECTROOT
-#define PROJECTROOT "/usr/X11R6"
+#define PROJECTROOT "/data/data/com.termux/files/usr/X11R6"
+#define PROJECTROOT "@TERMUX_PREFIX@/X11R6"
#endif
static ModuleDefault ModuleDefaults[] = {

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_acpi.c xorg-server-
#include <errno.h>
-#define ACPI_SOCKET "/var/run/acpid.socket"
+#define ACPI_SOCKET "/data/data/com.termux/files/usr/var/run/acpid.socket"
+#define ACPI_SOCKET "@TERMUX_PREFIX@/var/run/acpid.socket"
#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
#define ACPI_VIDEO_NOTIFY_PROBE 0x81

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/hw/xquartz/mach-startup/bundle-main.c xorg-server-1
#define DEFAULT_CLIENT X11BINDIR "/xterm"
#define DEFAULT_STARTX X11BINDIR "/startx -- " X11BINDIR "/Xquartz"
-#define DEFAULT_SHELL "/bin/sh"
+#define DEFAULT_SHELL "/data/data/com.termux/files/usr/bin/sh"
+#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh"
#ifndef BUILD_DATE
#define BUILD_DATE ""
@ -15,7 +15,7 @@ diff -uNr xorg-server-1.20.1/hw/xquartz/mach-startup/bundle-main.c xorg-server-1
if (temp == NULL || temp[0] == 0) {
snprintf(buf, sizeof(buf),
- "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:%s",
+ "/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:%s",
+ "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets:%s",
dir);
setenv("PATH", buf, TRUE);
}

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/hw/xwin/InitOutput.c xorg-server-1.20.1.mod/hw/xwin
BOOL binary = TRUE;
- mnt = setmntent("/etc/mtab", "r");
+ mnt = setmntent("/data/data/com.termux/files/usr/etc/mtab", "r");
+ mnt = setmntent("@TERMUX_PREFIX@/etc/mtab", "r");
if (mnt == NULL) {
ErrorF("setmntent failed");
return;
@ -15,7 +15,7 @@ diff -uNr xorg-server-1.20.1/hw/xwin/InitOutput.c xorg-server-1.20.1.mod/hw/xwin
BOOL sys = (winCheckMntOpt(ent, "user") != NULL);
BOOL root = (strcmp(ent->mnt_dir, "/") == 0);
- BOOL tmp = (strcmp(ent->mnt_dir, "/tmp") == 0);
+ BOOL tmp = (strcmp(ent->mnt_dir, "/data/data/com.termux/files/usr/tmp") == 0);
+ BOOL tmp = (strcmp(ent->mnt_dir, "@TERMUX_PREFIX@/tmp") == 0);
if (sys) {
if (root)

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/include/site.h xorg-server-1.20.1.mod/include/site.
*/
#ifndef COMPILEDDEFAULTFONTPATH
-#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/"
+#define COMPILEDDEFAULTFONTPATH "/data/data/com.termux/files/usr/share/fonts/X11/misc/"
+#define COMPILEDDEFAULTFONTPATH "@TERMUX_PREFIX@/share/fonts/X11/misc/"
#endif
/*

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/access.c xorg-server-1.20.1.mod/os/access.c
#define ETC_HOST_PREFIX "X"
#else
-#define ETC_HOST_PREFIX "/etc/X"
+#define ETC_HOST_PREFIX "/data/data/com.termux/files/usr/etc/X"
+#define ETC_HOST_PREFIX "@TERMUX_PREFIX@/etc/X"
#endif
#define ETC_HOST_SUFFIX ".hosts"
fnamelen = strlen(ETC_HOST_PREFIX) + strlen(ETC_HOST_SUFFIX) +

View File

@ -13,7 +13,7 @@ diff -uNr xorg-server-1.20.1/os/backtrace.c xorg-server-1.20.1.mod/os/backtrace.
snprintf(parent, sizeof(parent), "%d", getppid());
- execle("/usr/bin/pstack", "pstack", parent, NULL);
+ execle("/data/data/com.termux/files/usr/bin/pstack", "pstack", parent, NULL);
+ execle("@TERMUX_PREFIX@/bin/pstack", "pstack", parent, NULL);
exit(1);
}
else {

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/connection.c xorg-server-1.20.1.mod/os/connectio
const char *display_env = getenv("DISPLAY");
- if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
+ if (display_env && (strncmp(display_env, "/data/data/com.termux/files/usr/tmp/launch", 11) == 0)) {
+ if (display_env && (strncmp(display_env, "@TERMUX_PREFIX@/tmp/launch", 11) == 0)) {
/* Make the path the launchd socket if our DISPLAY is set right */
strcpy(port, display_env);
}

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/osinit.c xorg-server-1.20.1.mod/os/osinit.c
#ifndef ADMPATH
-#define ADMPATH "/usr/adm/X%smsgs"
+#define ADMPATH "/data/data/com.termux/files/usr/adm/X%smsgs"
+#define ADMPATH "@TERMUX_PREFIX@/adm/X%smsgs"
#endif
#ifdef RLIMIT_DATA

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
* if the user forgets to give them different display numbers.
*/
-#define LOCK_DIR "/tmp"
+#define LOCK_DIR "/data/data/com.termux/files/usr/tmp"
+#define LOCK_DIR "@TERMUX_PREFIX@/tmp"
#define LOCK_TMP_PREFIX "/.tX"
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
@ -28,7 +28,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
- if (setuid(getuid()) == -1)
- _exit(127);
- execl("/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("/data/data/com.termux/files/usr/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, (char *) NULL);
_exit(127);
default: /* parent */
do {
@ -48,7 +48,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
close(pdes[1]);
}
- execl("/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("/data/data/com.termux/files/usr/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, (char *) NULL);
_exit(127);
}
@ -89,7 +89,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
return getenv("TMP");
else
- return "/tmp";
+ return "/data/data/com.termux/files/usr/tmp";
+ return "@TERMUX_PREFIX@/tmp";
}
int

View File

@ -7,8 +7,8 @@ diff -uNr xorg-server-1.20.1/xkb/ddxLoad.c xorg-server-1.20.1.mod/xkb/ddxLoad.c
#endif
- if (strlen("/tmp/") < size) {
- (void) strcpy(outdir, "/tmp/");
+ if (strlen("/data/data/com.termux/files/usr/tmp/") < size) {
+ (void) strcpy(outdir, "/data/data/com.termux/files/usr/tmp/");
+ if (strlen("@TERMUX_PREFIX@/tmp/") < size) {
+ (void) strcpy(outdir, "@TERMUX_PREFIX@/tmp/");
}
}

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/hw/xfree86/common/xf86Config.c xorg-server-1.20.1.m
#endif
#ifndef PROJECTROOT
-#define PROJECTROOT "/usr/X11R6"
+#define PROJECTROOT "/data/data/com.termux/files/usr/X11R6"
+#define PROJECTROOT "@TERMUX_PREFIX@/X11R6"
#endif
static ModuleDefault ModuleDefaults[] = {

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_acpi.c xorg-server-
#include <errno.h>
-#define ACPI_SOCKET "/var/run/acpid.socket"
+#define ACPI_SOCKET "/data/data/com.termux/files/usr/var/run/acpid.socket"
+#define ACPI_SOCKET "@TERMUX_PREFIX@/var/run/acpid.socket"
#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
#define ACPI_VIDEO_NOTIFY_PROBE 0x81

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/include/site.h xorg-server-1.20.1.mod/include/site.
*/
#ifndef COMPILEDDEFAULTFONTPATH
-#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/"
+#define COMPILEDDEFAULTFONTPATH "/data/data/com.termux/files/usr/share/fonts/X11/misc/"
+#define COMPILEDDEFAULTFONTPATH "@TERMUX_PREFIX@/share/fonts/X11/misc/"
#endif
/*

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/access.c xorg-server-1.20.1.mod/os/access.c
#define ETC_HOST_PREFIX "X"
#else
-#define ETC_HOST_PREFIX "/etc/X"
+#define ETC_HOST_PREFIX "/data/data/com.termux/files/usr/etc/X"
+#define ETC_HOST_PREFIX "@TERMUX_PREFIX@/etc/X"
#endif
#define ETC_HOST_SUFFIX ".hosts"
fnamelen = strlen(ETC_HOST_PREFIX) + strlen(ETC_HOST_SUFFIX) +

View File

@ -13,7 +13,7 @@ diff -uNr xorg-server-1.20.1/os/backtrace.c xorg-server-1.20.1.mod/os/backtrace.
snprintf(parent, sizeof(parent), "%d", getppid());
- execle("/usr/bin/pstack", "pstack", parent, NULL);
+ execle("/data/data/com.termux/files/usr/bin/pstack", "pstack", parent, NULL);
+ execle("@TERMUX_PREFIX@/bin/pstack", "pstack", parent, NULL);
exit(1);
}
else {

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/connection.c xorg-server-1.20.1.mod/os/connectio
const char *display_env = getenv("DISPLAY");
- if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
+ if (display_env && (strncmp(display_env, "/data/data/com.termux/files/usr/tmp/launch", 11) == 0)) {
+ if (display_env && (strncmp(display_env, "@TERMUX_PREFIX@/tmp/launch", 11) == 0)) {
/* Make the path the launchd socket if our DISPLAY is set right */
strcpy(port, display_env);
}

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/osinit.c xorg-server-1.20.1.mod/os/osinit.c
#ifndef ADMPATH
-#define ADMPATH "/usr/adm/X%smsgs"
+#define ADMPATH "/data/data/com.termux/files/usr/adm/X%smsgs"
+#define ADMPATH "@TERMUX_PREFIX@/adm/X%smsgs"
#endif
#ifdef RLIMIT_DATA

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
* if the user forgets to give them different display numbers.
*/
-#define LOCK_DIR "/tmp"
+#define LOCK_DIR "/data/data/com.termux/files/usr/tmp"
+#define LOCK_DIR "@TERMUX_PREFIX@/tmp"
#define LOCK_TMP_PREFIX "/.tX"
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
@ -28,7 +28,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
- if (setuid(getuid()) == -1)
- _exit(127);
- execl("/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("/data/data/com.termux/files/usr/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, (char *) NULL);
_exit(127);
default: /* parent */
do {
@ -48,7 +48,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
close(pdes[1]);
}
- execl("/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("/data/data/com.termux/files/usr/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, (char *) NULL);
_exit(127);
}
@ -89,7 +89,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
return getenv("TMP");
else
- return "/tmp";
+ return "/data/data/com.termux/files/usr/tmp";
+ return "@TERMUX_PREFIX@/tmp";
}
int

View File

@ -7,8 +7,8 @@ diff -uNr xorg-server-1.20.1/xkb/ddxLoad.c xorg-server-1.20.1.mod/xkb/ddxLoad.c
#endif
- if (strlen("/tmp/") < size) {
- (void) strcpy(outdir, "/tmp/");
+ if (strlen("/data/data/com.termux/files/usr/tmp/") < size) {
+ (void) strcpy(outdir, "/data/data/com.termux/files/usr/tmp/");
+ if (strlen("@TERMUX_PREFIX@/tmp/") < size) {
+ (void) strcpy(outdir, "@TERMUX_PREFIX@/tmp/");
}
}

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Wayland X11 server"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.20.5
TERMUX_PKG_REVISION=12
TERMUX_PKG_REVISION=13
TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d
TERMUX_PKG_DEPENDS="libandroid-shmem, libdrm, libpciaccess, libpixman, libx11, libxau, libxfont2, libxinerama, libxkbfile, libxshmfence, mesa, openssl, xkeyboard-config, xorg-xkbcomp, libwayland, libwayland-protocols, libepoxy"

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/include/site.h xorg-server-1.20.1.mod/include/site.
*/
#ifndef COMPILEDDEFAULTFONTPATH
-#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/"
+#define COMPILEDDEFAULTFONTPATH "/data/data/com.termux/files/usr/share/fonts/X11/misc/"
+#define COMPILEDDEFAULTFONTPATH "@TERMUX_PREFIX@/share/fonts/X11/misc/"
#endif
/*

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/access.c xorg-server-1.20.1.mod/os/access.c
#define ETC_HOST_PREFIX "X"
#else
-#define ETC_HOST_PREFIX "/etc/X"
+#define ETC_HOST_PREFIX "/data/data/com.termux/files/usr/etc/X"
+#define ETC_HOST_PREFIX "@TERMUX_PREFIX@/etc/X"
#endif
#define ETC_HOST_SUFFIX ".hosts"
fnamelen = strlen(ETC_HOST_PREFIX) + strlen(ETC_HOST_SUFFIX) +

View File

@ -13,7 +13,7 @@ diff -uNr xorg-server-1.20.1/os/backtrace.c xorg-server-1.20.1.mod/os/backtrace.
snprintf(parent, sizeof(parent), "%d", getppid());
- execle("/usr/bin/pstack", "pstack", parent, NULL);
+ execle("/data/data/com.termux/files/usr/bin/pstack", "pstack", parent, NULL);
+ execle("@TERMUX_PREFIX@/bin/pstack", "pstack", parent, NULL);
exit(1);
}
else {

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/connection.c xorg-server-1.20.1.mod/os/connectio
const char *display_env = getenv("DISPLAY");
- if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
+ if (display_env && (strncmp(display_env, "/data/data/com.termux/files/usr/tmp/launch", 11) == 0)) {
+ if (display_env && (strncmp(display_env, "@TERMUX_PREFIX@/tmp/launch", 11) == 0)) {
/* Make the path the launchd socket if our DISPLAY is set right */
strcpy(port, display_env);
}

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/osinit.c xorg-server-1.20.1.mod/os/osinit.c
#ifndef ADMPATH
-#define ADMPATH "/usr/adm/X%smsgs"
+#define ADMPATH "/data/data/com.termux/files/usr/adm/X%smsgs"
+#define ADMPATH "@TERMUX_PREFIX@/adm/X%smsgs"
#endif
#ifdef RLIMIT_DATA

View File

@ -6,7 +6,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
* if the user forgets to give them different display numbers.
*/
-#define LOCK_DIR "/tmp"
+#define LOCK_DIR "/data/data/com.termux/files/usr/tmp"
+#define LOCK_DIR "@TERMUX_PREFIX@/tmp"
#define LOCK_TMP_PREFIX "/.tX"
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
@ -28,7 +28,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
- if (setuid(getuid()) == -1)
- _exit(127);
- execl("/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("/data/data/com.termux/files/usr/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, (char *) NULL);
_exit(127);
default: /* parent */
do {
@ -48,7 +48,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
close(pdes[1]);
}
- execl("/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("/data/data/com.termux/files/usr/bin/sh", "sh", "-c", command, (char *) NULL);
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, (char *) NULL);
_exit(127);
}
@ -89,7 +89,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c
return getenv("TMP");
else
- return "/tmp";
+ return "/data/data/com.termux/files/usr/tmp";
+ return "@TERMUX_PREFIX@/tmp";
}
int

View File

@ -7,8 +7,8 @@ diff -uNr xorg-server-1.20.1/xkb/ddxLoad.c xorg-server-1.20.1.mod/xkb/ddxLoad.c
#endif
- if (strlen("/tmp/") < size) {
- (void) strcpy(outdir, "/tmp/");
+ if (strlen("/data/data/com.termux/files/usr/tmp/") < size) {
+ (void) strcpy(outdir, "/data/data/com.termux/files/usr/tmp/");
+ if (strlen("@TERMUX_PREFIX@/tmp/") < size) {
+ (void) strcpy(outdir, "@TERMUX_PREFIX@/tmp/");
}
}