From 037ec937c66b95f01c2308e96028b2ef59e43609 Mon Sep 17 00:00:00 2001 From: Jannick Date: Tue, 26 Aug 2025 22:59:03 +0200 Subject: [PATCH] patchutils: Update to 0.4.3 --- ...4.3_interdiff.c-fix-MEMCPY-arguments.patch | 52 +++++++++++++++++++ patchutils/PKGBUILD | 21 ++++---- 2 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 patchutils/0001-patchutils-0.4.3_interdiff.c-fix-MEMCPY-arguments.patch diff --git a/patchutils/0001-patchutils-0.4.3_interdiff.c-fix-MEMCPY-arguments.patch b/patchutils/0001-patchutils-0.4.3_interdiff.c-fix-MEMCPY-arguments.patch new file mode 100644 index 00000000..e706880c --- /dev/null +++ b/patchutils/0001-patchutils-0.4.3_interdiff.c-fix-MEMCPY-arguments.patch @@ -0,0 +1,52 @@ +From 2303aa8bada1af6de8111cc36203b99f4587f563 Mon Sep 17 00:00:00 2001 +From: Jannick +Date: Tue, 26 Aug 2025 20:59:01 +0200 +Subject: [PATCH] interdiff.c: fix MEMCPY arguments + +--- + src/interdiff.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/interdiff.c b/src/interdiff.c +index 31fcc34..54d6c0f 100644 +--- a/src/interdiff.c ++++ b/src/interdiff.c +@@ -832,9 +832,9 @@ output_patch1_only (FILE *p1, FILE *out, int not_reverted) + + fflush (NULL); + char *argv[2 + num_diff_opts + 2 + 1]; +- memcpy (argv, (const char *[]) { DIFF, options }, 2 * sizeof (char *)); ++ memcpy (argv, ((const char *[]) { DIFF, options }), 2 * sizeof (char *)); + memcpy (argv + 2, diff_opts, num_diff_opts * sizeof (char *)); +- memcpy (argv + 2 + num_diff_opts, (char *[]) { tmpp1, tmpp2, NULL }, (2 + 1) * sizeof (char *)); ++ memcpy (argv + 2 + num_diff_opts, ((char *[]) { tmpp1, tmpp2, NULL }), (2 + 1) * sizeof (char *)); + in = xpipe (DIFF, &child, "r", argv); + + /* Eat the first line */ +@@ -1194,9 +1194,9 @@ output_delta (FILE *p1, FILE *p2, FILE *out) + fflush (NULL); + + char *argv[2 + num_diff_opts + 2 + 1]; +- memcpy (argv, (const char *[]) { DIFF, options }, 2 * sizeof (char *)); ++ memcpy (argv, ((const char *[]) { DIFF, options }), 2 * sizeof (char *)); + memcpy (argv + 2, diff_opts, num_diff_opts * sizeof (char *)); +- memcpy (argv + 2 + num_diff_opts, (char *[]) { tmpp1, tmpp2, NULL }, (2 + 1) * sizeof (char *)); ++ memcpy (argv + 2 + num_diff_opts, ((char *[]) { tmpp1, tmpp2, NULL }), (2 + 1) * sizeof (char *)); + in = xpipe (DIFF, &child, "r", argv); + + /* Eat the first line */ +@@ -1613,9 +1613,9 @@ take_diff (const char *f1, const char *f2, char *headers[2], + sprintf (options, "-U%d", max_context); + + char *argv[2 + num_diff_opts + 2 + 1]; +- memcpy (argv, (const char *[]) { DIFF, options }, 2 * sizeof (char *)); ++ memcpy (argv, ((const char *[]) { DIFF, options }), 2 * sizeof (char *)); + memcpy (argv + 2, diff_opts, num_diff_opts * sizeof (char *)); +- memcpy (argv + 2 + num_diff_opts, (const char *[]) { f1, f2, NULL }, (2 + 1) * sizeof (char *)); ++ memcpy (argv + 2 + num_diff_opts, ((const char *[]) { f1, f2, NULL }), (2 + 1) * sizeof (char *)); + if (debug) { + fputs ("+", stdout); + for (int i = 0; argv[i]; i++) { +-- +2.51.0 + diff --git a/patchutils/PKGBUILD b/patchutils/PKGBUILD index c6e6b4aa..b44a74f5 100644 --- a/patchutils/PKGBUILD +++ b/patchutils/PKGBUILD @@ -1,19 +1,24 @@ # Maintainer: Andrea Zagli pkgname=patchutils -pkgver=0.4.2 -pkgrel=3 +pkgver=0.4.3 +pkgrel=1 pkgdesc="Utilities to work with patches" arch=('i686' 'x86_64') url="http://cyberelk.net/tim/software/patchutils/" license=('GPL') -source=(http://cyberelk.net/tim/data/patchutils/stable/${pkgname}-${pkgver}.tar.xz) -sha256sums=('8875b0965fe33de62b890f6cd793be7fafe41a4e552edbf641f1fed5ebbf45ed') +source=("https://cyberelk.net/tim/data/patchutils/stable/patchutils-${pkgver}.tar.xz"{,.sig} + '0001-patchutils-0.4.3_interdiff.c-fix-MEMCPY-arguments.patch') +sha256sums=('0efc96a9565fd156fc1064fdcc54c82b6229db0d402827c4c48b02f6ef956445' + 'SKIP' + 'da5eefc0bb7493e63ad940870f35cd8fd896fdbbc4b468f79eac0d6527963bed') depends=('pcre2') -makedepends=('pcre2-devel' 'autotools' 'gcc' 'xmlto') +makedepends=('pcre2-devel' 'autotools' 'gcc' 'xmlto' 'docbook-xsl') +validpgpkeys=('4629AFE960EC20BEC12E3104B7C20D079491EA63') prepare() { cd ${srcdir}/${pkgname}-${pkgver} + patch -p1 -i '../0001-patchutils-0.4.3_interdiff.c-fix-MEMCPY-arguments.patch' autoreconf -vfi } @@ -23,10 +28,6 @@ build() { cd ${srcdir}/build-${pkgname}-${pkgver} ../${pkgname}-${pkgver}/configure -C \ - --build=${CHOST} \ - --host=${CHOST} \ - --target=${CHOST} \ - --prefix=/usr \ --with-pcre2 make @@ -34,7 +35,7 @@ build() { check() { cd ${srcdir}/build-${pkgname}-${pkgver} - # patchutils 0.4.2: all tests succeed. + # patchutils 0.4.3: all tests succeed. make check }