diff --git a/packages/cabextract/build.sh b/packages/cabextract/build.sh index e0442203b1..2c4725725d 100644 --- a/packages/cabextract/build.sh +++ b/packages/cabextract/build.sh @@ -1,8 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://www.cabextract.org.uk/ TERMUX_PKG_DESCRIPTION="A program to extract Microsoft cabinet (.CAB) files" -TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=1.9.1 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_VERSION=1.10 TERMUX_PKG_SRCURL=https://cabextract.org.uk/cabextract-$TERMUX_PKG_VERSION.tar.gz -TERMUX_PKG_SHA256=afc253673c8ef316b4d5c29cc4aa8445844bee14afffbe092ee9469405851ca7 +TERMUX_PKG_SHA256=edfc785ef252460cab7fdfa6fb2599058a6f5618f7f48a4ad22da816da8cb117 diff --git a/packages/cabextract/mspack-system.h.patch b/packages/cabextract/mspack-system.h.patch new file mode 100644 index 0000000000..7104c0b2c5 --- /dev/null +++ b/packages/cabextract/mspack-system.h.patch @@ -0,0 +1,31 @@ +--- a/mspack/system.h ++++ b/mspack/system.h +@@ -27,19 +27,25 @@ + #else + /* but if no default system wanted, avoid using entirely, + * to avoid linking to even these standard C library functions */ +-static inline int memcmp(const void *s1, const void *s2, size_t n) { ++static inline int mspack_memcmp(const void *s1, const void *s2, size_t n) { + const unsigned char *a = s1, *b = s2; + while (n--) if (*a++ != *b++) return a[-1] - b[-1]; + return 0; + } +-static inline void *memset(void *s, int c, size_t n) { ++#undef memcmp ++#define memcmp mspack_memcmp ++static inline void *mspack_memset(void *s, int c, size_t n) { + unsigned char *s2 = s, c2 = (unsigned char) c; + while (n--) *s2++ = c2; + return s; + } +-static inline size_t strlen(const char *s) { ++#undef memset ++#define memset mspack_memset ++static inline size_t mspack_strlen(const char *s) { + size_t c = 0; while (*s++) c++; return c; + } ++#undef strlen ++#define strlen mspack_strlen + #endif + + /* fix for problem with GCC 4 and glibc (thanks to Ville Skytta)