From 75403cef76a93199456befdcb8884fbac39adbb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 19 Jun 2021 10:03:21 +0700 Subject: [PATCH] srcpkgs/[0-9]*: convert patches to -Np1 ```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ``` --- srcpkgs/0ad/patches/build-fcollada-once.patch | 4 +-- srcpkgs/0ad/patches/musl.patch | 4 +-- srcpkgs/0ad/patches/ppc-musl.patch | 4 +-- srcpkgs/0ad/patches/ppc64.patch | 26 +++++++++---------- srcpkgs/0ad/template | 1 - srcpkgs/64tass/patches/fix-lines-limit.patch | 4 +-- srcpkgs/64tass/template | 1 - srcpkgs/66-tools/patches/fix-man.patch | 4 +-- srcpkgs/66-tools/template | 1 - srcpkgs/7kaa/patches/default-data.patch | 4 +-- srcpkgs/7kaa/template | 1 - srcpkgs/9base/patches/yydebug.patch | 4 +-- srcpkgs/9base/template | 1 - srcpkgs/9mount/patches/fix-trans-fd.patch | 4 +-- srcpkgs/9mount/patches/no-ipv6-lookup.patch | 4 +-- srcpkgs/9mount/template | 1 - 16 files changed, 31 insertions(+), 37 deletions(-) diff --git a/srcpkgs/0ad/patches/build-fcollada-once.patch b/srcpkgs/0ad/patches/build-fcollada-once.patch index f65fdcf7d81..b2a553d6a7c 100644 --- a/srcpkgs/0ad/patches/build-fcollada-once.patch +++ b/srcpkgs/0ad/patches/build-fcollada-once.patch @@ -1,7 +1,7 @@ Index: libraries/source/fcollada/src/Makefile =================================================================== ---- libraries/source/fcollada/src/Makefile.orig -+++ libraries/source/fcollada/src/Makefile +--- a/libraries/source/fcollada/src/Makefile ++++ b/libraries/source/fcollada/src/Makefile @@ -224,7 +224,7 @@ OBJECTS_RELEASE = $(addprefix output/rel OBJECTS_TEST = $(addprefix output/test/,$(SOURCE:.cpp=.o) $(TEST_SOURCE:.cpp=.o)) OBJECTS_ALL = $(OBJECTS_DEBUG) $(OBJECTS_RELEASE) $(OBJECTS_TEST) diff --git a/srcpkgs/0ad/patches/musl.patch b/srcpkgs/0ad/patches/musl.patch index 768ebc01932..3be502fb534 100644 --- a/srcpkgs/0ad/patches/musl.patch +++ b/srcpkgs/0ad/patches/musl.patch @@ -1,5 +1,5 @@ ---- source/lib/sysdep/os/linux/ldbg.cpp.orig 2018-06-16 16:27:55.639277094 +0200 -+++ source/lib/sysdep/os/linux/ldbg.cpp 2018-06-16 16:28:17.342014019 +0200 +--- a/source/lib/sysdep/os/linux/ldbg.cpp 2018-06-16 16:27:55.639277094 +0200 ++++ b/source/lib/sysdep/os/linux/ldbg.cpp 2018-06-16 16:28:17.342014019 +0200 @@ -33,7 +33,7 @@ #include "lib/sysdep/sysdep.h" #include "lib/debug.h" diff --git a/srcpkgs/0ad/patches/ppc-musl.patch b/srcpkgs/0ad/patches/ppc-musl.patch index a10b97af3aa..a8b41175e76 100644 --- a/srcpkgs/0ad/patches/ppc-musl.patch +++ b/srcpkgs/0ad/patches/ppc-musl.patch @@ -1,5 +1,5 @@ ---- libraries/source/nvtt/src/src/nvcore/Debug.cpp 2021-02-27 11:38:49.764811556 +0100 -+++ libraries/source/nvtt/src/src/nvcore/Debug.cpp 2021-02-27 11:39:48.919032920 +0100 +--- a/libraries/source/nvtt/src/src/nvcore/Debug.cpp 2021-02-27 11:38:49.764811556 +0100 ++++ b/libraries/source/nvtt/src/src/nvcore/Debug.cpp 2021-02-27 11:39:48.919032920 +0100 @@ -40,6 +40,11 @@ # include #endif diff --git a/srcpkgs/0ad/patches/ppc64.patch b/srcpkgs/0ad/patches/ppc64.patch index f95a2ecba77..20688372e42 100644 --- a/srcpkgs/0ad/patches/ppc64.patch +++ b/srcpkgs/0ad/patches/ppc64.patch @@ -1,5 +1,5 @@ ---- build/premake/premake5.lua -+++ build/premake/premake5.lua +--- a/build/premake/premake5.lua ++++ b/build/premake/premake5.lua @@ -85,6 +85,8 @@ else arch = "arm" elseif string.find(machine, "aarch64") == 1 then @@ -19,7 +19,7 @@ table.insert(source_dirs, "lib/sysdep/arch/e2k"); end --- /dev/null -+++ source/lib/sysdep/arch/ppc64/ppc64.cpp ++++ b/source/lib/sysdep/arch/ppc64/ppc64.cpp @@ -0,0 +1,50 @@ +/* Copyright (C) 2012 Wildfire Games + * Copyright (C) 2018 Raptor Engineering, LLC @@ -71,8 +71,8 @@ +{ + return "IBM POWER"; // TODO +} ---- source/lib/byte_order.h.orig 2021-02-28 16:59:34.041933978 +0100 -+++ source/lib/byte_order.h 2021-02-28 16:59:59.311582587 +0100 +--- a/source/lib/byte_order.h 2021-02-28 16:59:34.041933978 +0100 ++++ b/source/lib/byte_order.h 2021-02-28 16:59:59.311582587 +0100 @@ -33,7 +33,7 @@ #ifndef BYTE_ORDER # define LITTLE_ENDIAN 0x4321 @@ -82,8 +82,8 @@ # define BYTE_ORDER LITTLE_ENDIAN # else # define BYTE_ORDER BIG_ENDIAN ---- source/ps/GameSetup/HWDetect.cpp.orig 2021-02-28 18:09:30.331118437 +0100 -+++ source/ps/GameSetup/HWDetect.cpp 2021-02-28 18:09:52.209822367 +0100 +--- a/source/ps/GameSetup/HWDetect.cpp 2021-02-28 18:09:30.331118437 +0100 ++++ b/source/ps/GameSetup/HWDetect.cpp 2021-02-28 18:09:52.209822367 +0100 @@ -124,6 +124,7 @@ scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM); scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64); @@ -92,8 +92,8 @@ #ifdef NDEBUG scriptInterface.SetProperty(settings, "build_debug", 0); ---- source/lib/sysdep/arch.h.orig 2021-02-28 18:45:28.761727174 +0100 -+++ source/lib/sysdep/arch.h 2021-02-28 18:46:03.270251202 +0100 +--- a/source/lib/sysdep/arch.h 2021-02-28 18:45:28.761727174 +0100 ++++ b/source/lib/sysdep/arch.h 2021-02-28 18:46:03.270251202 +0100 @@ -76,9 +76,15 @@ #else # define ARCH_E2K 0 @@ -111,8 +111,8 @@ # error "architecture not correctly detected (either none or multiple ARCH_* defined)" #endif ---- libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h -+++ libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h +--- a/libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h ++++ b/libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h @@ -27,10 +27,7 @@ #ifndef NV_SIMD_VECTOR_VE_H #define NV_SIMD_VECTOR_VE_H @@ -126,8 +126,8 @@ diff --git a/source/nvtt/src/src/nvtt/squish/simd_ve.h b/source/nvtt/src/src/nvtt/squish/simd_ve.h index 5a11858..e256c54 100644 ---- libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h -+++ libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h +--- a/libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h ++++ b/libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h @@ -27,10 +27,7 @@ #ifndef SQUISH_SIMD_VE_H #define SQUISH_SIMD_VE_H diff --git a/srcpkgs/0ad/template b/srcpkgs/0ad/template index 18393608493..d6bbdb48310 100644 --- a/srcpkgs/0ad/template +++ b/srcpkgs/0ad/template @@ -17,7 +17,6 @@ distfiles="https://releases.wildfiregames.com/${pkgname}-${version}-alpha-unix-b checksum=325c23c9b6bfc16eb636af6a7a7bdaadbf19214b6eed0422d74cc0090bf137a8 nocross="uses bundled third-party libraries that do not cross-compile" lib32disabled=yes -patch_args=-Np0 CXXFLAGS="-fpermissive" # Use BFD linker to avoid erroneous detection of llvm pr8927 with *-musl diff --git a/srcpkgs/64tass/patches/fix-lines-limit.patch b/srcpkgs/64tass/patches/fix-lines-limit.patch index 66ddc27291c..07c4b21af0a 100644 --- a/srcpkgs/64tass/patches/fix-lines-limit.patch +++ b/srcpkgs/64tass/patches/fix-lines-limit.patch @@ -1,5 +1,5 @@ ---- file.c 2020-04-07 21:18:24.000000000 +0200 -+++ file.c 2020-04-22 20:11:45.714713362 +0200 +--- a/file.c 2020-04-07 21:18:24.000000000 +0200 ++++ b/file.c 2020-04-22 20:11:45.714713362 +0200 @@ -493,7 +493,8 @@ tmp->data = (uint8_t *)malloc(len2); if (tmp->data != NULL) tmp->len = len2; diff --git a/srcpkgs/64tass/template b/srcpkgs/64tass/template index 5cb4cefd818..ae06411d48b 100644 --- a/srcpkgs/64tass/template +++ b/srcpkgs/64tass/template @@ -13,4 +13,3 @@ license="GPL-2.0-or-later" homepage="http://tass64.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/tass64/64tass-${version}-src.zip" checksum=067d0a54cb3c473b26aa5d69ea3f1f956be7cccc9044f1117fc20cb84aa63880 -patch_args=-Np0 diff --git a/srcpkgs/66-tools/patches/fix-man.patch b/srcpkgs/66-tools/patches/fix-man.patch index fe77c2775f5..667520f6f78 100644 --- a/srcpkgs/66-tools/patches/fix-man.patch +++ b/srcpkgs/66-tools/patches/fix-man.patch @@ -1,5 +1,5 @@ ---- doc/make-man.sh -+++ doc/make-man.sh +--- a/doc/make-man.sh ++++ b/doc/make-man.sh @@ -10,11 +10,9 @@ done for i in ${man1}; do diff --git a/srcpkgs/66-tools/template b/srcpkgs/66-tools/template index ca916507c9a..b9c5e7c66a7 100644 --- a/srcpkgs/66-tools/template +++ b/srcpkgs/66-tools/template @@ -17,7 +17,6 @@ homepage="http://web.obarun.org/software/index.html" changelog="https://framagit.org/Obarun/66-tools/-/raw/master/doc/upgrade.md" distfiles="https://framagit.org/Obarun/66-tools/-/archive/v${version}/66-tools-v${version}.tar.gz" checksum=c8cbe0d6c104e4d87d588d5980201770a6fd2fad11f99ff138a37ff918d68491 -patch_args=-Np0 post_install() { vlicense LICENSE diff --git a/srcpkgs/7kaa/patches/default-data.patch b/srcpkgs/7kaa/patches/default-data.patch index 51f494edc16..3b1b6741caa 100644 --- a/srcpkgs/7kaa/patches/default-data.patch +++ b/srcpkgs/7kaa/patches/default-data.patch @@ -1,5 +1,5 @@ ---- src/OSYS.cpp.orig 2020-10-09 21:04:48.099663838 +0700 -+++ src/OSYS.cpp 2020-10-09 21:06:49.111299505 +0700 +--- a/src/OSYS.cpp 2020-10-09 21:04:48.099663838 +0700 ++++ b/src/OSYS.cpp 2020-10-09 21:06:49.111299505 +0700 @@ -2777,6 +2777,8 @@ // test environment variable SKDATA for the path diff --git a/srcpkgs/7kaa/template b/srcpkgs/7kaa/template index b776195a806..7aa6e152c8f 100644 --- a/srcpkgs/7kaa/template +++ b/srcpkgs/7kaa/template @@ -15,7 +15,6 @@ distfiles="https://github.com/the3dfxdude/7kaa/releases/download/v${version}/${p checksum="f0265c077025d77b435f1c10b8ba178bdb16329e51ab735330ebaa71a104fbf8 b0d767b6e25719a14f5f34a93744a8022d7bc24af66275bee54dfc788695c1c3" replaces="7kaa-data>=0" -patch_args=-Np0 post_extract() { mv ../7kaa-music . diff --git a/srcpkgs/9base/patches/yydebug.patch b/srcpkgs/9base/patches/yydebug.patch index 11e5a64e744..bffb6c61b6b 100644 --- a/srcpkgs/9base/patches/yydebug.patch +++ b/srcpkgs/9base/patches/yydebug.patch @@ -1,5 +1,5 @@ ---- lib9/main.c 2018-08-17 19:38:18.000000000 +0200 -+++ lib9/main.c 2018-08-17 19:43:21.042771643 +0200 +--- a/lib9/main.c 2018-08-17 19:38:18.000000000 +0200 ++++ b/lib9/main.c 2018-08-17 19:43:21.042771643 +0200 @@ -4,6 +4,8 @@ extern void p9main(int, char**); diff --git a/srcpkgs/9base/template b/srcpkgs/9base/template index 74ed0a369e0..e7cee72701f 100644 --- a/srcpkgs/9base/template +++ b/srcpkgs/9base/template @@ -17,7 +17,6 @@ distfiles="https://alpha.de.repo.voidlinux.org/distfiles/9base-${_githash}.tar.g checksum=b315509470c25db88595bd0e9478428dea54d7836fe2ba9d07279ae9496366fb conflicts="plan9port" provides="plan9port-20160418_4" -patch_args=-Np0 CFLAGS="-fcommon" diff --git a/srcpkgs/9mount/patches/fix-trans-fd.patch b/srcpkgs/9mount/patches/fix-trans-fd.patch index 04e10b5c4e2..3c07da50533 100644 --- a/srcpkgs/9mount/patches/fix-trans-fd.patch +++ b/srcpkgs/9mount/patches/fix-trans-fd.patch @@ -7,8 +7,8 @@ Fix trans=fd mount options diff -r c6da9cac8d01 -r 4228419b4791 9mount.c ---- 9mount.c Thu Apr 10 19:43:27 2014 +0800 -+++ 9mount.c Tue Oct 18 09:22:55 2016 +0800 +--- a/9mount.c Thu Apr 10 19:43:27 2014 +0800 ++++ b/9mount.c Tue Oct 18 09:22:55 2016 +0800 @@ -165,7 +165,7 @@ if (strcmp(dial, "-") == 0) { proto = "fd"; diff --git a/srcpkgs/9mount/patches/no-ipv6-lookup.patch b/srcpkgs/9mount/patches/no-ipv6-lookup.patch index 7872b2c8bd2..2bafcca23f9 100644 --- a/srcpkgs/9mount/patches/no-ipv6-lookup.patch +++ b/srcpkgs/9mount/patches/no-ipv6-lookup.patch @@ -7,8 +7,8 @@ Avoid ipv6 addresses since v9fs only supports ipv4. diff -r 97da3749d798 -r c6da9cac8d01 9mount.c ---- 9mount.c Mon Nov 17 17:06:17 2008 +0900 -+++ 9mount.c Thu Apr 10 19:43:27 2014 +0800 +--- a/9mount.c Mon Nov 17 17:06:17 2008 +0900 ++++ b/9mount.c Thu Apr 10 19:43:27 2014 +0800 @@ -253,8 +253,12 @@ if (strcmp(proto, "tcp") == 0) { diff --git a/srcpkgs/9mount/template b/srcpkgs/9mount/template index 6cf8f4e2fc9..5b1160ad204 100644 --- a/srcpkgs/9mount/template +++ b/srcpkgs/9mount/template @@ -10,7 +10,6 @@ license="ISC" homepage="http://sqweek.net/code/9mount/" distfiles="http://sqweek.net/9p/$pkgname-$version.tar.gz" checksum=820d80b9b478d05ecb022ad658477b37cfc2414a8669c3af17d192a522064c17 -patch_args=-Np0 pre_build() { sed -i '/chown/d' Makefile