mirror of
https://github.com/termux-pacman/glibc-packages.git
synced 2024-11-27 06:08:57 +00:00
1002e6f9c3
gpkg/box64 gpkg/box86 gpkg/git gpkg/libdrm gpkg/libedit gpkg/liblzma gpkg/mariadb gpkg/ncurses gpkg/cmake gpkg/fakeroot gpkg/fribidi gpkg/libopus gpkg/openssl gpkg/pcre2 gpkg/vulkan-headers gpkg/vulkan-icd-loader gpkg/vulkan-tools
115 lines
5.8 KiB
Diff
115 lines
5.8 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 7f9e5d6..a0fd4b4 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -944,15 +944,15 @@ if(NOT _x86 AND NOT _x86_64)
|
|
if(NOT NO_CONF_INSTALL)
|
|
configure_file(system/box64.conf.cmake system/box64.conf)
|
|
if(NOT TERMUX)
|
|
- install(FILES ${CMAKE_BINARY_DIR}/system/box64.conf DESTINATION /etc/binfmt.d/)
|
|
- install(FILES ${CMAKE_SOURCE_DIR}/system/box64.box64rc DESTINATION /etc/)
|
|
+ install(FILES ${CMAKE_BINARY_DIR}/system/box64.conf DESTINATION @TERMUX_PREFIX@/etc/binfmt.d/)
|
|
+ install(FILES ${CMAKE_SOURCE_DIR}/system/box64.box64rc DESTINATION @TERMUX_PREFIX@/etc/)
|
|
else()
|
|
install(FILES ${CMAKE_BINARY_DIR}/system/box64.conf DESTINATION ${TERMUX_PATH}/usr/etc/binfmt.d/)
|
|
install(FILES ${CMAKE_SOURCE_DIR}/system/box64.box64rc DESTINATION ${TERMUX_PATH}/usr/etc/)
|
|
endif()
|
|
|
|
endif()
|
|
- set(INSTALL_PATH "/usr/lib/x86_64-linux-gnu/")
|
|
+ set(INSTALL_PATH "@TERMUX_PREFIX@/lib/x86_64-linux-gnu/")
|
|
if(NOT NO_LIB_INSTALL)
|
|
if(NOT TERMUX)
|
|
install(FILES ${CMAKE_SOURCE_DIR}/x64lib/libstdc++.so.5 DESTINATION ${INSTALL_PATH})
|
|
diff --git a/src/core.c b/src/core.c
|
|
index b1a552b..b9d924a 100644
|
|
--- a/src/core.c
|
|
+++ b/src/core.c
|
|
@@ -1658,7 +1658,7 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf
|
|
printf("See 'box64 --help' for more information.\n");
|
|
exit(0);
|
|
}
|
|
- if(argc>1 && !strcmp(argv[1], "/usr/bin/gdb") && getenv("BOX64_TRACE_FILE"))
|
|
+ if(argc>1 && !strcmp(argv[1], "@TERMUX_PREFIX@/bin/gdb") && getenv("BOX64_TRACE_FILE"))
|
|
exit(0);
|
|
// uname -m is redirected to box64 -m
|
|
if(argc==2 && (!strcmp(argv[1], "-m") || !strcmp(argv[1], "-p") || !strcmp(argv[1], "-i")))
|
|
diff --git a/src/steam.c b/src/steam.c
|
|
index 52461a3..0e14ad7 100644
|
|
--- a/src/steam.c
|
|
+++ b/src/steam.c
|
|
@@ -39,13 +39,13 @@ void pressure_vessel(int argc, const char** argv, int nextarg, const char* prog)
|
|
if(is_usr) {
|
|
// transform RESSURE_VESSEL_APP_LD_LIBRARY_PATH to BOX86_ / BOX64_ LD_LIBRARY_PATH
|
|
char tmp[strlen(argv[nextarg])+150];
|
|
- strcpy(tmp, "BOX86_LD_LIBRARY_PATH=/lib/box86:/usr/lib/box86:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/i686-pc-linux-gnu:/usr/lib32:");
|
|
+ strcpy(tmp, "BOX86_LD_LIBRARY_PATH=@TERMUX_PREFIX@/lib/box86:@TERMUX_PREFIX@/lib/i386-linux-gnu:@TERMUX_PREFIX@/lib/i686-pc-linux-gnu:@TERMUX_PREFIX@/lib32:");
|
|
strcat(tmp, argv[nextarg]+strlen("--env-if-host=STEAM_RUNTIME_LIBRARY_PATH="));
|
|
char *p = strchr(tmp, '=');
|
|
*p ='\0'; ++p;
|
|
setenv(tmp, p, 1);
|
|
printf_log(LOG_DEBUG, "setenv(%s, %s, 1)\n", tmp, p);
|
|
- strcpy(tmp, "BOX64_LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:");
|
|
+ strcpy(tmp, "BOX64_LD_LIBRARY_PATH=@TERMUX_PREFIX@/lib/x86_64-linux-gnu:");
|
|
strcat(tmp, argv[nextarg]+strlen("--env-if-host=STEAM_RUNTIME_LIBRARY_PATH="));
|
|
p = strchr(tmp, '=');
|
|
*p ='\0'; ++p;
|
|
@@ -81,14 +81,8 @@ void pressure_vessel(int argc, const char** argv, int nextarg, const char* prog)
|
|
strcat(sniper, "/files"); // this is the sniper root
|
|
// do LD_LIBRARY_PATH
|
|
{
|
|
- const char* usrsbinldconfig = "/usr/sbin/ldconfig";
|
|
- const char* sbinldconfig = "/sbin/ldconfig";
|
|
const char* ldconfig = "ldconfig";
|
|
const char* ldcmd = ldconfig;
|
|
- if(FileExist(usrsbinldconfig, IS_FILE))
|
|
- ldcmd = usrsbinldconfig;
|
|
- else if(FileExist(sbinldconfig, IS_FILE))
|
|
- ldcmd = sbinldconfig;
|
|
char tmp[MAX_PATH*4] = {0};
|
|
// prepare folders, using ldconfig
|
|
snprintf(tmp, sizeof(tmp), "%s -i -n %s/lib/x86_64-linux-gnu", ldcmd, sniper);
|
|
diff --git a/src/tools/fileutils.c b/src/tools/fileutils.c
|
|
index 327f798..79d22c8 100644
|
|
--- a/src/tools/fileutils.c
|
|
+++ b/src/tools/fileutils.c
|
|
@@ -17,9 +17,9 @@
|
|
|
|
static const char* x86lib = "\x7f" "ELF" "\x01" "\x01" "\x01" "\x03" "\x00" "\x00" "\x00" "\x00" "\x00" "\x00" "\x00" "\x00" "\x02" "\x00" "\x03" "\x00";
|
|
static const char* x64lib = "\x7f" "ELF" "\x02" "\x01" "\x01" "\x03" "\x00" "\x00" "\x00" "\x00" "\x00" "\x00" "\x00" "\x00" "\x02" "\x00" "\x3e" "\x00";
|
|
-static const char* bashsign= "#!/bin/bash";
|
|
-static const char* shsign = "#!/bin/sh";
|
|
-static const char* bashsign2="#!/usr/bin/env bash";
|
|
+static const char* bashsign= "#!@TERMUX_PREFIX@/bin/bash";
|
|
+static const char* shsign = "#!@TERMUX_PREFIX@/bin/sh";
|
|
+static const char* bashsign2="#!@TERMUX_PREFIX@/bin/env bash";
|
|
|
|
int FileExist(const char* filename, int flags)
|
|
{
|
|
diff --git a/src/wrapped/wrappedd3dadapter9.c b/src/wrapped/wrappedd3dadapter9.c
|
|
index de962ee..67a786f 100644
|
|
--- a/src/wrapped/wrappedd3dadapter9.c
|
|
+++ b/src/wrapped/wrappedd3dadapter9.c
|
|
@@ -98,7 +98,7 @@ static int my_GetDirect3D(x64emu_t* emu, void* This, void*** ppD3D9);
|
|
|
|
const char* d3dadapter9Name = "d3dadapter9.so.1";
|
|
#define LIBNAME d3dadapter9
|
|
-#define ALTNAME "/usr/lib/aarch64-linux-gnu/d3d/d3dadapter9.so.1"
|
|
+#define ALTNAME "@TERMUX_PREFIX@/lib/aarch64-linux-gnu/d3d/d3dadapter9.so.1"
|
|
|
|
typedef void* (*pFp_t)(void*);
|
|
|
|
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c
|
|
index 2725285..fd94673 100644
|
|
--- a/src/wrapped/wrappedlibdl.c
|
|
+++ b/src/wrapped/wrappedlibdl.c
|
|
@@ -101,7 +101,7 @@ void* my_dlopen(x64emu_t* emu, void *filename, int flag)
|
|
if(sys)
|
|
return sys;
|
|
}
|
|
- if(!strcmp(rfilename, "/usr/lib/x86_64-linux-gnu/d3d")) {
|
|
+ if(!strcmp(rfilename, "@TERMUX_PREFIX@/lib/x86_64-linux-gnu/d3d")) {
|
|
void* sys = my_dlopen(emu, "d3dadapter9.so.1", flag);
|
|
if(sys)
|
|
return sys;
|