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
```
This commit is contained in:
Đoàn Trần Công Danh 2021-06-19 10:03:21 +07:00 committed by Đoàn Trần Công Danh
parent 986c0a7d5e
commit 1a06b0d5d7
24 changed files with 29 additions and 39 deletions

View File

@ -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 */

View File

@ -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"

View File

@ -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
*/

View File

@ -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"

View File

@ -1,5 +1,5 @@
--- meson.build.orig
+++ meson.build
--- a/meson.build
+++ b/meson.build
@@ -192,10 +192,11 @@
else
extra_cflags = []

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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 @@
<factory name="com.icl.saxon.TransformerFactoryImpl"/>
<xmlcatalog>

View File

@ -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

View File

@ -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 {

View File

@ -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 <stdio.h>
#include <stdlib.h>

View File

@ -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

View File

@ -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"

View File

@ -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 <bstream.hh>
#include <debug.hh>

View File

@ -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 @@
//______________________________________________________________________

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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 <malat@debian.org>
+# BSD (Same as jxrlib)

View File

@ -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"