mtpaint: use fork (by wjaguar) as upstream
Unlike official sources, this fork is maintained.
This commit is contained in:
parent
dbea662068
commit
f873412d05
@ -2,10 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://sourceforge.net/projects/mtpaint/
|
||||
TERMUX_PKG_DESCRIPTION="Simple paint program for creating icons and pixel based artwork"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=3.40
|
||||
TERMUX_PKG_REVISION=5
|
||||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/mtpaint/mtpaint-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=ef321d2b404839c7b909bdf5283eb22a37fbdd35b4cc9e380ddc400573d7c890
|
||||
TERMUX_PKG_VERSION=3.49.15
|
||||
_COMMIT=91676e939e1198fa536a0cdefbcd9331c70efc4c
|
||||
TERMUX_PKG_SRCURL=https://github.com/wjaguar/mtPaint/archive/${_COMMIT}.zip
|
||||
TERMUX_PKG_SHA256=94cbb124219f11664639492114eb65185b6f0ffe04f505609f6784842e718554
|
||||
TERMUX_PKG_DEPENDS="atk, fontconfig, freetype, gdk-pixbuf, giflib, glib, gtk2, libandroid-glob, libandroid-shmem, libcairo-x, libjpeg-turbo, littlecms, pango-x, libpng, libtiff, libx11, zlib"
|
||||
TERMUX_PKG_RECOMMENDS="gifsicle"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
56
x11-packages/mtpaint/fix-hardcoded-paths.patch
Normal file
56
x11-packages/mtpaint/fix-hardcoded-paths.patch
Normal file
@ -0,0 +1,56 @@
|
||||
diff -uNr mtpaint/src/font.c mtpaint.mod/src/font.c
|
||||
--- mtpaint/src/font.c 2019-05-09 22:29:43.000000000 +0300
|
||||
+++ mtpaint.mod/src/font.c 2019-05-19 18:17:33.792226029 +0300
|
||||
@@ -1436,8 +1436,8 @@
|
||||
FILE *fp;
|
||||
char buf[4096], buf2[128], *s;
|
||||
|
||||
- if (!(fp = fopen("/etc/X11/xorg.conf", "r")))
|
||||
- fp = fopen("/etc/X11/XF86Config", "r");
|
||||
+ if (!(fp = fopen("@TERMUX_PREFIX@/etc/X11/xorg.conf", "r")))
|
||||
+ fp = fopen("@TERMUX_PREFIX@/etc/X11/XF86Config", "r");
|
||||
|
||||
// If these files are not found the user will have to manually enter directories
|
||||
|
||||
@@ -1463,7 +1463,7 @@
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
- if (!new_dirs && (fp = fopen("/etc/fonts/fonts.conf", "r")))
|
||||
+ if (!new_dirs && (fp = fopen("@TERMUX_PREFIX@/etc/fonts/fonts.conf", "r")))
|
||||
{
|
||||
char *s1, *s2;
|
||||
|
||||
diff -uNr mtpaint/src/main.c mtpaint.mod/src/main.c
|
||||
--- mtpaint/src/main.c 2019-05-09 22:29:43.000000000 +0300
|
||||
+++ mtpaint.mod/src/main.c 2019-05-19 18:17:33.794226039 +0300
|
||||
@@ -299,7 +299,7 @@
|
||||
/* Enable threading for GLib, but NOT for GTK+ (at least, not yet) */
|
||||
g_thread_init(NULL);
|
||||
#endif
|
||||
- inifile_init("/etc/mtpaint/mtpaintrc", "~/.mtpaint");
|
||||
+ inifile_init("@TERMUX_PREFIX@/etc/mtpaint/mtpaintrc", "~/.mtpaint");
|
||||
|
||||
#ifdef U_NLS
|
||||
#if GTK_MAJOR_VERSION == 1
|
||||
diff -uNr mtpaint/src/spawn.c mtpaint.mod/src/spawn.c
|
||||
--- mtpaint/src/spawn.c 2019-05-09 22:29:43.000000000 +0300
|
||||
+++ mtpaint.mod/src/spawn.c 2019-05-19 18:17:23.999173630 +0300
|
||||
@@ -783,8 +783,7 @@
|
||||
#else /* Linux */
|
||||
|
||||
#define HANDBOOK_BROWSER "seamonkey"
|
||||
-#define HANDBOOK_LOCATION "/usr/doc/mtpaint/index.html"
|
||||
-#define HANDBOOK_LOCATION2 "/usr/share/doc/mtpaint/index.html"
|
||||
+#define HANDBOOK_LOCATION "@TERMUX_PREFIX@/share/doc/mtpaint/index.html"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -812,7 +811,6 @@
|
||||
if (!docs || !docs[0])
|
||||
{
|
||||
docs = HANDBOOK_LOCATION;
|
||||
- if (valid_file(docs) < 0) docs = HANDBOOK_LOCATION2;
|
||||
}
|
||||
#endif
|
||||
else docs = gtkncpy(buf + 1, docs, PATHBUF);
|
@ -1,23 +0,0 @@
|
||||
diff -uNr mtpaint-3.40/src/font.c mtpaint-3.40.mod/src/font.c
|
||||
--- mtpaint-3.40/src/font.c 2011-12-29 20:03:08.000000000 +0200
|
||||
+++ mtpaint-3.40.mod/src/font.c 2018-06-24 23:31:22.212225544 +0300
|
||||
@@ -1510,8 +1510,8 @@
|
||||
FILE *fp;
|
||||
char buf[4096], buf2[128], *s;
|
||||
|
||||
- if (!(fp = fopen("/etc/X11/xorg.conf", "r")))
|
||||
- fp = fopen("/etc/X11/XF86Config", "r");
|
||||
+ if (!(fp = fopen("@TERMUX_PREFIX@/etc/X11/xorg.conf", "r")))
|
||||
+ fp = fopen("@TERMUX_PREFIX@/etc/X11/XF86Config", "r");
|
||||
|
||||
// If these files are not found the user will have to manually enter directories
|
||||
|
||||
@@ -1537,7 +1537,7 @@
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
- if (!new_dirs && (fp = fopen("/etc/fonts/fonts.conf", "r")))
|
||||
+ if (!new_dirs && (fp = fopen("@TERMUX_PREFIX@/etc/fonts/fonts.conf", "r")))
|
||||
{
|
||||
char *s1, *s2;
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -uNr mtpaint-3.40/src/main.c mtpaint-3.40.mod/src/main.c
|
||||
--- mtpaint-3.40/src/main.c 2011-10-30 23:29:17.000000000 +0200
|
||||
+++ mtpaint-3.40.mod/src/main.c 2018-06-24 23:31:22.215558878 +0300
|
||||
@@ -287,7 +287,7 @@
|
||||
/* Enable threading for GLib, but NOT for GTK+ (at least, not yet) */
|
||||
g_thread_init(NULL);
|
||||
#endif
|
||||
- inifile_init("/etc/mtpaint/mtpaintrc", "~/.mtpaint");
|
||||
+ inifile_init("@TERMUX_PREFIX@/etc/mtpaint/mtpaintrc", "~/.mtpaint");
|
||||
|
||||
#ifdef U_NLS
|
||||
#if GTK_MAJOR_VERSION == 1
|
@ -1,69 +0,0 @@
|
||||
diff -uNr mtpaint-3.40/src/png.c mtpaint-3.40.mod/src/png.c
|
||||
--- mtpaint-3.40/src/png.c 2011-10-27 23:56:24.000000000 +0300
|
||||
+++ mtpaint-3.40.mod/src/png.c 2018-06-24 23:31:47.945560204 +0300
|
||||
@@ -1510,7 +1510,7 @@
|
||||
int res, val, disposal, bpp, cmask, lastzero = FALSE;
|
||||
|
||||
|
||||
- if (!(giffy = DGifOpenFileName(file_name))) return (-1);
|
||||
+ if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1);
|
||||
|
||||
/* Init state structure */
|
||||
memset(&stat, 0, sizeof(stat));
|
||||
@@ -1608,7 +1608,7 @@
|
||||
}
|
||||
res = 1;
|
||||
fail: mem_free_chanlist(w_set.img);
|
||||
- DGifCloseFile(giffy);
|
||||
+ DGifCloseFile(giffy, NULL);
|
||||
return (res);
|
||||
}
|
||||
|
||||
@@ -1621,7 +1621,7 @@
|
||||
int delay = settings->gif_delay, trans = -1;//, disposal = 0;
|
||||
|
||||
|
||||
- if (!(giffy = DGifOpenFileName(file_name))) return (-1);
|
||||
+ if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1);
|
||||
|
||||
/* Get global palette */
|
||||
settings->colors = convert_gif_palette(settings->pal, giffy->SColorMap);
|
||||
@@ -1659,7 +1659,7 @@
|
||||
}
|
||||
}
|
||||
res = 1;
|
||||
-fail: DGifCloseFile(giffy);
|
||||
+fail: DGifCloseFile(giffy, NULL);
|
||||
return (res);
|
||||
}
|
||||
|
||||
@@ -1682,10 +1682,10 @@
|
||||
nc |= nc >> 1; nc |= nc >> 2; nc |= nc >> 4;
|
||||
nc += !nc + 1; // No less than 2 colors
|
||||
|
||||
- gif_map = MakeMapObject(nc, NULL);
|
||||
+ gif_map = GifMakeMapObject(nc, NULL);
|
||||
if (!gif_map) return -1;
|
||||
|
||||
- giffy = EGifOpenFileName(file_name, FALSE);
|
||||
+ giffy = EGifOpenFileName(file_name, FALSE, NULL);
|
||||
if (!giffy) goto fail0;
|
||||
|
||||
for (i = 0; i < settings->colors; i++)
|
||||
@@ -1725,14 +1725,14 @@
|
||||
if (!settings->silent) progress_end();
|
||||
msg = 0;
|
||||
|
||||
-fail: EGifCloseFile(giffy);
|
||||
+fail: EGifCloseFile(giffy, NULL);
|
||||
#ifndef WIN32
|
||||
/* giflib creates files with 0600 permissions, which is nasty - WJ */
|
||||
mode = umask(0022);
|
||||
umask(mode);
|
||||
chmod(file_name, 0666 & ~mode);
|
||||
#endif
|
||||
-fail0: FreeMapObject(gif_map);
|
||||
+fail0: GifFreeMapObject(gif_map);
|
||||
|
||||
return (msg);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
diff -uNr mtpaint-3.40/src/spawn.c mtpaint-3.40.mod/src/spawn.c
|
||||
--- mtpaint-3.40/src/spawn.c 2011-10-30 23:30:53.000000000 +0200
|
||||
+++ mtpaint-3.40.mod/src/spawn.c 2018-06-24 23:31:22.228892213 +0300
|
||||
@@ -45,7 +45,7 @@
|
||||
#ifdef WIN32
|
||||
env = "\\";
|
||||
#else
|
||||
- env = "/tmp";
|
||||
+ env = "@TERMUX_PREFIX@/tmp";
|
||||
#endif
|
||||
return (env);
|
||||
}
|
||||
@@ -758,8 +758,8 @@
|
||||
#else /* Linux */
|
||||
|
||||
#define HANDBOOK_BROWSER "firefox"
|
||||
-#define HANDBOOK_LOCATION "/usr/doc/mtpaint/index.html"
|
||||
-#define HANDBOOK_LOCATION2 "/usr/share/doc/mtpaint/index.html"
|
||||
+#define HANDBOOK_LOCATION "@TERMUX_PREFIX@/doc/mtpaint/index.html"
|
||||
+#define HANDBOOK_LOCATION2 "@TERMUX_PREFIX@/share/doc/mtpaint/index.html"
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user