diff --git a/packages/libdevil/DevIL-src-IL-src-il_jp2.cpp.patch b/packages/libdevil/DevIL-src-IL-src-il_jp2.cpp.patch new file mode 100644 index 000000000..33db8972b --- /dev/null +++ b/packages/libdevil/DevIL-src-IL-src-il_jp2.cpp.patch @@ -0,0 +1,18 @@ +--- a/DevIL/src-IL/src/il_jp2.cpp ++++ b/DevIL/src-IL/src/il_jp2.cpp +@@ -314,13 +314,13 @@ + + + +-static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) ++static ssize_t iJp2_file_read(jas_stream_obj_t *obj, char *buf, size_t cnt) + { + obj; + return iread(buf, 1, cnt); + } + +-static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt) ++static ssize_t iJp2_file_write(jas_stream_obj_t *obj, const char *buf, size_t cnt) + { + obj; + return iwrite(buf, 1, cnt); diff --git a/packages/libdevil/build.sh b/packages/libdevil/build.sh index 631476231..94ab0acb9 100644 --- a/packages/libdevil/build.sh +++ b/packages/libdevil/build.sh @@ -3,9 +3,10 @@ TERMUX_PKG_DESCRIPTION="A cross-platform image library utilizing a simple syntax TERMUX_PKG_LICENSE="LGPL-2.1" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=1.8.0 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/DentonW/DevIL/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=52129f247b26fcb5554643c9e6bbee75c4b9717735fdbf3c6ebff08cee38ad37 -TERMUX_PKG_DEPENDS="libc++, libjasper, libjpeg-turbo, libpng, libtiff, zlib" +TERMUX_PKG_DEPENDS="libc++, libjasper, libjpeg-turbo, libpng, libtiff" termux_step_pre_configure() { TERMUX_PKG_SRCDIR+="/DevIL" diff --git a/packages/libdevil/libdevil-1.8.0-jasper.patch b/packages/libdevil/libdevil-1.8.0-jasper.patch deleted file mode 100644 index b68825558..000000000 --- a/packages/libdevil/libdevil-1.8.0-jasper.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 42a62648e727e9a0217280474546de3ac69cbff1 Mon Sep 17 00:00:00 2001 -From: Mitchell Blank Jr -Date: Thu, 10 Dec 2020 01:26:00 +0000 -Subject: [PATCH] Compile against newer versions of Jasper - -jasper changed the callback API (twice!) This is the workaround that -gdal used to deal with the problem (reference in the code comment) - -fixes #90 ---- - DevIL/src-IL/src/il_jp2.cpp | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp -index 730afee8..89075a52 100644 ---- a/DevIL/src-IL/src/il_jp2.cpp -+++ b/DevIL/src-IL/src/il_jp2.cpp -@@ -314,13 +314,32 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image) - - - -+// Hack to compile against different versions of Jasper which expect -+// slightly different function types for their callbacks. The defined() -+// checks are just looking for sybols that happen to have arrived around -+// the same time as the API change, so no reason they won't break in the -+// future :-( Hopefully by the time it does nobody will care about pre-2.0.20 -+// versions of jasper -+// -+// see: https://github.com/OSGeo/gdal/commit/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334 -+// https://github.com/DentonW/DevIL/issues/90 -+#if defined(PRIjas_seqent) -+static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned cnt) -+#else - static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) -+#endif - { - obj; - return iread(buf, 1, cnt); - } - -+#if defined(JAS_INCLUDE_JP2_CODEC) -+static int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, unsigned cnt) -+#elif defined(PRIjas_seqent) -+static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, unsigned cnt) -+#else - static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt) -+#endif - { - obj; - return iwrite(buf, 1, cnt);