From 8b25a1449b84c70ff9da8b955c3838b6beaf1762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 18 Jun 2021 07:38:20 +0700 Subject: [PATCH] do-patch: switch default patch_args to -Np1 All templates that require -Np0 have patch_args appended. Let's flip the switch. --- Manual.md | 4 ++-- common/hooks/do-patch/00-patches.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Manual.md b/Manual.md index 238db04f04b..78f58d18e0d 100644 --- a/Manual.md +++ b/Manual.md @@ -601,7 +601,7 @@ current directory with respect to the install. - `patch_args` The arguments to be passed in to the `patch(1)` command when applying patches to the package sources during `do_patch()`. Patches are stored in -`srcpkgs//patches` and must be in `-p0` format. By default set to `-Np0`. +`srcpkgs//patches` and must be in `-p1` format. By default set to `-Np1`. - `disable_parallel_build` If set the package won't be built in parallel and `XBPS_MAKEJOBS` has no effect. @@ -874,7 +874,7 @@ been found or to fix compilation with new software. To handle this, xbps-src has patching functionality. It will look for all files that match the glob `srcpkgs/$pkgname/patches/*.{diff,patch}` and will -automatically apply all files it finds using `patch(1)` with `-Np0`. This happens +automatically apply all files it finds using `patch(1)` with `-Np1`. This happens during the `do_patch()` phase. The variable `PATCHESDIR` is available in the template, pointing to the `patches` directory. diff --git a/common/hooks/do-patch/00-patches.sh b/common/hooks/do-patch/00-patches.sh index 64e934c3981..f8ce2d37fee 100644 --- a/common/hooks/do-patch/00-patches.sh +++ b/common/hooks/do-patch/00-patches.sh @@ -3,7 +3,7 @@ _process_patch() { local _args= _patch= i=$1 - _args="-Np0" + _args="-Np1" _patch=${i##*/} if [ -f $PATCHESDIR/${_patch}.args ]; then