From 1a06b0d5d7660be431b2150f146f27aea2b2adda 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/j*: 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/j/patches/fix-cip.c-includes.patch | 4 ++-- srcpkgs/j/template | 1 - srcpkgs/jack/patches/fix-execinfo.patch | 4 ++-- srcpkgs/jack/template | 1 - srcpkgs/janet/patches/dynlink.patch | 4 ++-- srcpkgs/janet/template | 1 - srcpkgs/jbig2dec/patches/2002_abi_compat.patch | 4 ++-- srcpkgs/jbig2dec/template | 1 - srcpkgs/jedit/patches/system-docbook.patch | 4 ++-- srcpkgs/jedit/template | 1 - srcpkgs/jfsutils/patches/flush-before-read-musl.patch | 4 ++-- srcpkgs/jfsutils/patches/jfsutils-1.1.15-sysmacros.patch | 4 ++-- srcpkgs/jfsutils/patches/portability.patch | 8 ++++---- srcpkgs/jfsutils/template | 1 - srcpkgs/jigdo/patches/md5sum.patch | 4 ++-- srcpkgs/jigdo/patches/sizewidth.patch | 4 ++-- srcpkgs/jigdo/patches/string.patch | 4 ++-- srcpkgs/jigdo/template | 1 - srcpkgs/jsonnet/patches/Makefile.patch | 4 ++-- srcpkgs/jsonnet/template | 1 - srcpkgs/jwm/patches/fix_dvorak.patch | 4 ++-- srcpkgs/jwm/template | 1 - srcpkgs/jxrlib/patches/usecmake.patch | 2 +- srcpkgs/jxrlib/template | 1 - 24 files changed, 29 insertions(+), 39 deletions(-) diff --git a/srcpkgs/j/patches/fix-cip.c-includes.patch b/srcpkgs/j/patches/fix-cip.c-includes.patch index 9782839ff1d..7601d170062 100644 --- a/srcpkgs/j/patches/fix-cip.c-includes.patch +++ b/srcpkgs/j/patches/fix-cip.c-includes.patch @@ -1,5 +1,5 @@ ---- jsrc/cip.c 2020-01-30 13:31:22.463687182 +0900 -+++ jsrc/cip.c 2020-01-30 13:33:47.707458248 +0900 +--- a/jsrc/cip.c 2020-01-30 13:31:22.463687182 +0900 ++++ b/jsrc/cip.c 2020-01-30 13:33:47.707458248 +0900 @@ -3,9 +3,9 @@ /* */ /* Conjunctions: Inner Product */ diff --git a/srcpkgs/j/template b/srcpkgs/j/template index c1681088ec1..c9b0c669497 100644 --- a/srcpkgs/j/template +++ b/srcpkgs/j/template @@ -14,7 +14,6 @@ license="GPL-3.0-or-later" homepage="https://jsoftware.com/" distfiles="https://github.com/jsoftware/jsource/archive/j${_vrel}.tar.gz" checksum=6b1cdcc1a0c3d955e400cf676f115de51ef9d1da495d08721ee999f48f6f9209 -patch_args=-Np0 _jsz="j${XBPS_TARGET_WORDSIZE}" _jtype="release" diff --git a/srcpkgs/jack/patches/fix-execinfo.patch b/srcpkgs/jack/patches/fix-execinfo.patch index 0f3a04bbe6a..816ff355892 100644 --- a/srcpkgs/jack/patches/fix-execinfo.patch +++ b/srcpkgs/jack/patches/fix-execinfo.patch @@ -1,5 +1,5 @@ ---- dbus/sigsegv.c -+++ dbus/sigsegv.c +--- a/dbus/sigsegv.c ++++ b/dbus/sigsegv.c @@ -11,6 +11,8 @@ * Copyright (C) 2005 - 2008 Jaco Kroon */ diff --git a/srcpkgs/jack/template b/srcpkgs/jack/template index 5ab29e6a32b..092d7292d34 100644 --- a/srcpkgs/jack/template +++ b/srcpkgs/jack/template @@ -17,7 +17,6 @@ homepage="https://jackaudio.org/" distfiles="https://github.com/jackaudio/jack2/archive/v${version}.tar.gz" checksum=5a1d64118034d58529d68a9af42710f9d4843536257c496118065ea3d3e4ae2c python_version=3 -patch_args=-Np0 # Package build options build_options="ffado zalsa" diff --git a/srcpkgs/janet/patches/dynlink.patch b/srcpkgs/janet/patches/dynlink.patch index 81397b105b4..05a8ccfdd58 100644 --- a/srcpkgs/janet/patches/dynlink.patch +++ b/srcpkgs/janet/patches/dynlink.patch @@ -1,5 +1,5 @@ ---- meson.build.orig -+++ meson.build +--- a/meson.build ++++ b/meson.build @@ -192,10 +192,11 @@ else extra_cflags = [] diff --git a/srcpkgs/janet/template b/srcpkgs/janet/template index 5805a21c011..d3c71796a07 100644 --- a/srcpkgs/janet/template +++ b/srcpkgs/janet/template @@ -10,7 +10,6 @@ license="MIT" homepage="https://janet-lang.org/" distfiles="https://github.com/janet-lang/janet/archive/v${version}.tar.gz" checksum=ed9350ad7f0270e67f18a78dae4910b9534f19cd3f20f7183b757171e8cc79a5 -patch_args=-Np0 post_install() { vlicense LICENSE diff --git a/srcpkgs/jbig2dec/patches/2002_abi_compat.patch b/srcpkgs/jbig2dec/patches/2002_abi_compat.patch index bd4f4c4b72f..04f3deec8da 100644 --- a/srcpkgs/jbig2dec/patches/2002_abi_compat.patch +++ b/srcpkgs/jbig2dec/patches/2002_abi_compat.patch @@ -6,8 +6,8 @@ Forwarded: no Last-Update: 2019-09-19 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- jbig2.c -+++ jbig2.c +--- a/jbig2.c ++++ b/jbig2.c @@ -99,6 +99,13 @@ return -1; } diff --git a/srcpkgs/jbig2dec/template b/srcpkgs/jbig2dec/template index 3ccef4e8ea2..d0c23438982 100644 --- a/srcpkgs/jbig2dec/template +++ b/srcpkgs/jbig2dec/template @@ -13,7 +13,6 @@ license="AGPL-3.0-or-later" homepage="https://www.jbig2dec.com" distfiles="https://github.com/ArtifexSoftware/jbig2dec/archive/${version}.tar.gz" checksum=e81b787ad0b147a437a52d9ce7de1a8f429655e8aa030383b6b2dd8919373717 -patch_args=-Np0 pre_configure() { sed -i '$ d' autogen.sh diff --git a/srcpkgs/jedit/patches/system-docbook.patch b/srcpkgs/jedit/patches/system-docbook.patch index d5fe9faf6eb..c5fc036c329 100644 --- a/srcpkgs/jedit/patches/system-docbook.patch +++ b/srcpkgs/jedit/patches/system-docbook.patch @@ -9,8 +9,8 @@ Subject: [PATCH] use system stylesheets diff --git build.xml build.xml index 57916c0..7adc89a 100644 ---- build.xml -+++ build.xml +--- a/build.xml ++++ b/build.xml @@ -718,9 +718,9 @@ diff --git a/srcpkgs/jedit/template b/srcpkgs/jedit/template index 9c5c764194b..cf7ac8cdd20 100644 --- a/srcpkgs/jedit/template +++ b/srcpkgs/jedit/template @@ -11,7 +11,6 @@ license="GPL-2.0-or-later" homepage="http://jedit.org" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${version}/${pkgname}${version}source.tar.bz2" checksum=76c16ae0168d9b64ecddd8bf08aa49ab352adb2c9687191bc71895a96a8dfe1d -patch_args=-Np0 post_patch() { # skip junit stuff, fails in chroot diff --git a/srcpkgs/jfsutils/patches/flush-before-read-musl.patch b/srcpkgs/jfsutils/patches/flush-before-read-musl.patch index e7f090c19c4..134bfea4ccc 100644 --- a/srcpkgs/jfsutils/patches/flush-before-read-musl.patch +++ b/srcpkgs/jfsutils/patches/flush-before-read-musl.patch @@ -1,7 +1,7 @@ diff --git mkfs/mkfs.c mkfs/mkfs.c index 3a1d628..bf0caff 100644 ---- mkfs/mkfs.c -+++ mkfs/mkfs.c +--- a/mkfs/mkfs.c ++++ b/mkfs/mkfs.c @@ -924,6 +924,7 @@ int main(int argc, char *argv[]) } do { diff --git a/srcpkgs/jfsutils/patches/jfsutils-1.1.15-sysmacros.patch b/srcpkgs/jfsutils/patches/jfsutils-1.1.15-sysmacros.patch index ee02922edf9..82f9d632ac5 100644 --- a/srcpkgs/jfsutils/patches/jfsutils-1.1.15-sysmacros.patch +++ b/srcpkgs/jfsutils/patches/jfsutils-1.1.15-sysmacros.patch @@ -1,7 +1,7 @@ https://bugs.gentoo.org/580056 ---- libfs/devices.c -+++ libfs/devices.c +--- a/libfs/devices.c ++++ b/libfs/devices.c @@ -30,6 +30,10 @@ #include #include diff --git a/srcpkgs/jfsutils/patches/portability.patch b/srcpkgs/jfsutils/patches/portability.patch index a5f8038f110..ae82b578c1c 100644 --- a/srcpkgs/jfsutils/patches/portability.patch +++ b/srcpkgs/jfsutils/patches/portability.patch @@ -1,5 +1,5 @@ ---- libfs/devices.h 2005-11-23 07:43:55.000000000 +1100 -+++ libfs/devices.h 2013-01-06 11:30:25.381538024 +1100 +--- a/libfs/devices.h 2005-11-23 07:43:55.000000000 +1100 ++++ b/libfs/devices.h 2013-01-06 11:30:25.381538024 +1100 @@ -40,6 +40,8 @@ #define ERROR_INVALID_PARAMETER 87 #define ERROR_DISK_FULL 112 @@ -9,8 +9,8 @@ struct stat; int ujfs_get_dev_size(FILE *, int64_t * size); ---- libfs/fssubs.c.orig 2015-06-03 19:18:02.225624388 +0200 -+++ libfs/fssubs.c 2015-06-03 19:18:46.216543510 +0200 +--- a/libfs/fssubs.c 2015-06-03 19:18:02.225624388 +0200 ++++ b/libfs/fssubs.c 2015-06-03 19:18:46.216543510 +0200 @@ -30,8 +30,9 @@ #undef HAVE_GETMNTINFO /* we don't want both */ #endif diff --git a/srcpkgs/jfsutils/template b/srcpkgs/jfsutils/template index 98d7a0c90fd..22f153adb29 100644 --- a/srcpkgs/jfsutils/template +++ b/srcpkgs/jfsutils/template @@ -10,6 +10,5 @@ license="GPL-2.0-or-later" homepage="http://jfs.sourceforge.net" distfiles="http://jfs.sourceforge.net/project/pub/${pkgname}-${version}.tar.gz" checksum=244a15f64015ce3ea17e49bdf6e1a0fb4f9af92b82fa9e05aa64cb30b5f07a4d -patch_args=-Np0 CFLAGS="-fcommon" diff --git a/srcpkgs/jigdo/patches/md5sum.patch b/srcpkgs/jigdo/patches/md5sum.patch index 722d52152d6..4e37eb66718 100644 --- a/srcpkgs/jigdo/patches/md5sum.patch +++ b/srcpkgs/jigdo/patches/md5sum.patch @@ -1,5 +1,5 @@ ---- src/util/md5sum.hh.orig 2016-12-14 02:01:19.734059134 +0100 -+++ src/util/md5sum.hh 2016-12-14 02:01:52.943060147 +0100 +--- a/src/util/md5sum.hh 2016-12-14 02:01:19.734059134 +0100 ++++ b/src/util/md5sum.hh 2016-12-14 02:01:52.943060147 +0100 @@ -35,6 +35,7 @@ #include #include diff --git a/srcpkgs/jigdo/patches/sizewidth.patch b/srcpkgs/jigdo/patches/sizewidth.patch index 12309709c02..4cd8a8f2b35 100644 --- a/srcpkgs/jigdo/patches/sizewidth.patch +++ b/srcpkgs/jigdo/patches/sizewidth.patch @@ -1,7 +1,7 @@ SIZE_WIDTH is already defined stdint.h ---- src/mkimage.cc.orig 2005-07-09 21:14:46.000000000 +0200 -+++ src/mkimage.cc 2018-01-15 19:36:50.781708093 +0100 +--- a/src/mkimage.cc 2005-07-09 21:14:46.000000000 +0200 ++++ b/src/mkimage.cc 2018-01-15 19:36:50.781708093 +0100 @@ -285,27 +285,27 @@ //______________________________________________________________________ diff --git a/srcpkgs/jigdo/patches/string.patch b/srcpkgs/jigdo/patches/string.patch index 9fb1ea944e0..a488b96d3fc 100644 --- a/srcpkgs/jigdo/patches/string.patch +++ b/srcpkgs/jigdo/patches/string.patch @@ -1,5 +1,5 @@ ---- src/util/string.hh.orig 2016-12-14 02:07:50.302071056 +0100 -+++ src/util/string.hh 2016-12-14 02:08:04.396071486 +0100 +--- a/src/util/string.hh 2016-12-14 02:07:50.302071056 +0100 ++++ b/src/util/string.hh 2016-12-14 02:08:04.396071486 +0100 @@ -18,6 +18,7 @@ #define STRING_HH diff --git a/srcpkgs/jigdo/template b/srcpkgs/jigdo/template index aff25631a6f..16edbc817c8 100644 --- a/srcpkgs/jigdo/template +++ b/srcpkgs/jigdo/template @@ -12,4 +12,3 @@ license="GPL-2" homepage="http://atterer.org/jigdo/" distfiles="http://atterer.org/sites/atterer/files/2009-08/${pkgname}/${pkgname}-${version}.tar.bz2" checksum="875c069abad67ce67d032a9479228acdb37c8162236c0e768369505f264827f0" -patch_args=-Np0 diff --git a/srcpkgs/jsonnet/patches/Makefile.patch b/srcpkgs/jsonnet/patches/Makefile.patch index c645c99d986..87ca1e2fac1 100644 --- a/srcpkgs/jsonnet/patches/Makefile.patch +++ b/srcpkgs/jsonnet/patches/Makefile.patch @@ -1,5 +1,5 @@ ---- Makefile 2020-02-09 23:22:27.000000000 +0100 -+++ Makefile 2020-02-14 14:14:31.131124997 +0100 +--- a/Makefile 2020-02-09 23:22:27.000000000 +0100 ++++ b/Makefile 2020-02-14 14:14:31.131124997 +0100 @@ -127,11 +127,11 @@ install: bins libs diff --git a/srcpkgs/jsonnet/template b/srcpkgs/jsonnet/template index 1f0d020e16e..b09df3187a0 100644 --- a/srcpkgs/jsonnet/template +++ b/srcpkgs/jsonnet/template @@ -9,7 +9,6 @@ license="Apache-2.0" homepage="https://github.com/google/jsonnet" distfiles="https://github.com/google/jsonnet/archive/v${version}.tar.gz" checksum=076b52edf888c01097010ad4299e3b2e7a72b60a41abbc65af364af1ed3c8dbe -patch_args=-Np0 CXXFLAGS="-fPIC -Iinclude -Ithird_party/json -Ithird_party/md5" diff --git a/srcpkgs/jwm/patches/fix_dvorak.patch b/srcpkgs/jwm/patches/fix_dvorak.patch index fa9816f8b7c..6bef1082369 100644 --- a/srcpkgs/jwm/patches/fix_dvorak.patch +++ b/srcpkgs/jwm/patches/fix_dvorak.patch @@ -1,7 +1,7 @@ diff --git src/key.c src/key.c index 4b00d26..caefe42 100644 ---- src/key.c -+++ src/key.c +--- a/src/key.c ++++ b/src/key.c @@ -18,6 +18,8 @@ #include "root.h" #include "tray.h" diff --git a/srcpkgs/jwm/template b/srcpkgs/jwm/template index 08c2501eecf..96efe18d60c 100644 --- a/srcpkgs/jwm/template +++ b/srcpkgs/jwm/template @@ -15,7 +15,6 @@ conf_files="/etc/system.jwmrc" homepage="http://joewing.net/projects/jwm" distfiles="http://joewing.net/projects/jwm/releases/jwm-$version.tar.xz" checksum=745d2f5df3a4ce9ecc8e75445edb3fbe31dd46c0c26d129cc14de7ad8b665326 -patch_args=-Np0 post_install() { vinstall ${FILESDIR}/jwm.desktop 644 usr/share/xsessions diff --git a/srcpkgs/jxrlib/patches/usecmake.patch b/srcpkgs/jxrlib/patches/usecmake.patch index ef2e7de79b5..37b215b49d3 100644 --- a/srcpkgs/jxrlib/patches/usecmake.patch +++ b/srcpkgs/jxrlib/patches/usecmake.patch @@ -5,7 +5,7 @@ Forwarded: https://jxrlib.codeplex.com/discussions/440294 Index: jxrlib-1.1/CMakeLists.txt =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ CMakeLists.txt 2014-03-26 17:05:04.429637801 +0100 ++++ b/CMakeLists.txt 2014-03-26 17:05:04.429637801 +0100 @@ -0,0 +1,134 @@ +# Copyright Mathieu Malaterre +# BSD (Same as jxrlib) diff --git a/srcpkgs/jxrlib/template b/srcpkgs/jxrlib/template index c9ed1e4c14a..48f02dceab6 100644 --- a/srcpkgs/jxrlib/template +++ b/srcpkgs/jxrlib/template @@ -9,7 +9,6 @@ license="GPL-2.0-or-later" homepage="https://github.com/glencoesoftware/jxrlib" distfiles="${homepage}/archive/v${version}.tar.gz" checksum=d1fbc5759a665949e7cb82de03c3258788bd07323f195a9e8ea9322504627cc3 -patch_args=-Np0 jxrlib-devel_package() { short_desc+=" - development files"