diff --git a/sys-apps/file/file-5.25.recipe b/sys-apps/file/file-5.26.recipe similarity index 92% rename from sys-apps/file/file-5.25.recipe rename to sys-apps/file/file-5.26.recipe index 608d06d8c..b3af3d6af 100644 --- a/sys-apps/file/file-5.25.recipe +++ b/sys-apps/file/file-5.26.recipe @@ -10,8 +10,8 @@ COPYRIGHT="1986-1999 Ian F. Darwin LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="ftp://ftp.astron.com/pub/file/file-$portVersion.tar.gz" -CHECKSUM_SHA256="3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca" -PATCHES="file-5.25.patch" +CHECKSUM_SHA256="2ef32b4ec936b0ff7b59a021dce56086a716663b6df1138c7ea597d396bf50cf" +PATCHES="file-$portVersion.patchset" ARCHITECTURES="x86 x86_gcc2 x86_64" SECONDARY_ARCHITECTURES="x86" diff --git a/sys-apps/file/patches/file-5.25.patch b/sys-apps/file/patches/file-5.25.patch deleted file mode 100644 index e4165586f..000000000 --- a/sys-apps/file/patches/file-5.25.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up file-5.25/configure.ac.orig file-5.25/configure.ac ---- file-5.25/configure.ac.orig 2015-09-16 13:51:05.000000000 +0000 -+++ file-5.25/configure.ac -@@ -128,14 +128,14 @@ else - WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \ - -Wmissing-declarations -Wredundant-decls -Wnested-externs \ - -Wsign-compare -Wreturn-type -Wswitch -Wshadow \ -- -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2" -+ -Wcast-qual -Wwrite-strings" - fi], [ - if test "$GCC" = yes; then - AC_MSG_RESULT(yes) - WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \ - -Wmissing-declarations -Wredundant-decls -Wnested-externs \ - -Wsign-compare -Wreturn-type -Wswitch -Wshadow \ -- -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2" -+ -Wcast-qual -Wwrite-strings" - else - WARNINGS= - AC_MSG_RESULT(no) diff --git a/sys-apps/file/patches/file-5.26.patchset b/sys-apps/file/patches/file-5.26.patchset new file mode 100644 index 000000000..be4b74afd --- /dev/null +++ b/sys-apps/file/patches/file-5.26.patchset @@ -0,0 +1,104 @@ +From 7dd472c907c0ec240c6ab74c435d937fc7311552 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 May 2016 19:46:43 +0000 +Subject: Haiku patch + + +diff --git a/configure.ac b/configure.ac +index 676c0fb..6647330 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -128,14 +128,14 @@ else + WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \ + -Wmissing-declarations -Wredundant-decls -Wnested-externs \ + -Wsign-compare -Wreturn-type -Wswitch -Wshadow \ +- -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2" ++ -Wcast-qual -Wwrite-strings" + fi], [ + if test "$GCC" = yes; then + AC_MSG_RESULT(yes) + WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \ + -Wmissing-declarations -Wredundant-decls -Wnested-externs \ + -Wsign-compare -Wreturn-type -Wswitch -Wshadow \ +- -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2" ++ -Wcast-qual -Wwrite-strings" + else + WARNINGS= + AC_MSG_RESULT(no) +diff --git a/src/der.c b/src/der.c +index e003795..1c74e68 100644 +--- a/src/der.c ++++ b/src/der.c +@@ -194,6 +194,7 @@ static int + der_data(char *buf, size_t blen, uint32_t tag, const void *q, uint32_t len) + { + const uint8_t *d = q; ++ uint32_t i; + switch (tag) { + case DER_TAG_PRINTABLE_STRING: + case DER_TAG_UTF8_STRING: +@@ -204,7 +205,7 @@ der_data(char *buf, size_t blen, uint32_t tag, const void *q, uint32_t len) + break; + } + +- for (uint32_t i = 0; i < len; i++) { ++ for (i = 0; i < len; i++) { + uint32_t z = i << 1; + if (z < blen - 2) + snprintf(buf + z, blen - z, "%.2x", d[i]); +@@ -217,12 +218,13 @@ der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) + { + const uint8_t *b = CAST(const void *, ms->search.s); + size_t offs = 0, len = ms->search.rm_len ? ms->search.rm_len : nbytes; ++ uint32_t tlen; + + if (gettag(b, &offs, len) == DER_BAD) + return -1; + DPRINTF(("%s1: %d %zu %u\n", __func__, ms->offset, offs, m->offset)); + +- uint32_t tlen = getlength(b, &offs, len); ++ tlen = getlength(b, &offs, len); + if (tlen == DER_BAD) + return -1; + DPRINTF(("%s2: %d %zu %u\n", __func__, ms->offset, offs, tlen)); +@@ -251,6 +253,7 @@ der_cmp(struct magic_set *ms, struct magic *m) + size_t offs = 0, len = ms->search.s_len; + uint32_t tag, tlen; + char buf[128]; ++ size_t slen; + + tag = gettag(b, &offs, len); + if (tag == DER_BAD) +@@ -264,7 +267,7 @@ der_cmp(struct magic_set *ms, struct magic *m) + if ((ms->flags & MAGIC_DEBUG) != 0) + fprintf(stderr, "%s: tag %p got=%s exp=%s\n", __func__, b, + buf, s); +- size_t slen = strlen(buf); ++ slen = strlen(buf); + + if (strncmp(buf, s, slen) != 0) + return 0; +diff --git a/src/readelf.c b/src/readelf.c +index 39598f7..84a5196 100644 +--- a/src/readelf.c ++++ b/src/readelf.c +@@ -909,6 +909,7 @@ do_auxv_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, + const char *tag; + int is_string; + size_t nval; ++ size_t off; + + if (type != NT_AUXV || (*flags & FLAGS_IS_CORE) == 0) + return 0; +@@ -916,7 +917,7 @@ do_auxv_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, + *flags |= FLAGS_DID_AUXV; + + nval = 0; +- for (size_t off = 0; off + elsize <= descsz; off += elsize) { ++ for (off = 0; off + elsize <= descsz; off += elsize) { + (void)memcpy(xauxv_addr, &nbuf[doff + off], xauxv_sizeof); + /* Limit processing to 50 vector entries to prevent DoS */ + if (nval++ >= 50) { +-- +2.7.0 +