termux-packages/packages/imlib2/0002-fix-hardcoded-paths.patch
Tee KOBAYASHI 6b26dce921 imlib2: Update to 1.9.0
* Remove no longer necessary `dlopen()` hack for `libandroid-shmem`
2022-04-30 16:45:36 +09:00

40 lines
1.4 KiB
Diff

--- a/src/modules/loaders/decompress_load.c
+++ b/src/modules/loaders/decompress_load.c
@@ -8,7 +8,7 @@
ImlibLoader *loader;
int dest, res;
const char *s, *p, *q;
- char tmp[] = "/tmp/imlib2_loader_dec-XXXXXX";
+ char tmp[] = "@TERMUX_PREFIX@/tmp/imlib2_loader_dec-XXXXXX";
char *real_ext;
void *fdata;
--- a/src/modules/loaders/loader_id3.c
+++ b/src/modules/loaders/loader_id3.c
@@ -507,7 +507,7 @@
if (loader)
{
- char tmp[] = "/tmp/imlib2_loader_id3-XXXXXX";
+ char tmp[] = "@TERMUX_PREFIX@/tmp/imlib2_loader_id3-XXXXXX";
int dest, res;
if ((dest = mkstemp(tmp)) < 0)
--- a/src/modules/loaders/loader_xpm.c
+++ b/src/modules/loaders/loader_xpm.c
@@ -78,11 +78,11 @@
/* look in rgb txt database */
if (!rgb_txt)
- rgb_txt = fopen("/usr/share/X11/rgb.txt", "r");
+ rgb_txt = fopen("@TERMUX_PREFIX@/share/X11/rgb.txt", "r");
if (!rgb_txt)
- rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r");
+ rgb_txt = fopen("@TERMUX_PREFIX@/X11R6/lib/X11/rgb.txt", "r");
if (!rgb_txt)
- rgb_txt = fopen("/usr/openwin/lib/X11/rgb.txt", "r");
+ rgb_txt = fopen("@TERMUX_PREFIX@/openwin/lib/X11/rgb.txt", "r");
if (!rgb_txt)
goto done;