* Re: [PR PATCH] [Updated] [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
@ 2022-03-29 23:20 ` tibequadorian
2022-03-31 18:58 ` [PR REVIEW] " paper42
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tibequadorian @ 2022-03-29 23:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]
There is an updated pull request by tibequadorian against master on the void-packages repository
https://github.com/tibequadorian/void-packages do-patch-input
https://github.com/void-linux/void-packages/pull/36409
[RFC] patch_args: allow use of --directory parameter
`patch(1)` has a `-d/--directory` parameter which allows us to specify a directory where the patch will be applied.
This is especially useful when we have multiple distfiles and want to patch in $build_wrksrc because that's where the patch is usually applied. So far, these patches had to be updated if $build_wrksrc changes, which is suboptimal.
Problem is, that the `-i` parameter is also relative to the the `-d` parameter and thus fails to find the patch, when `-d` is set.
This PR tries to solve that by using standard input instead of `-i`.
Included is an example with wine making use of that change.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/36409.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-do-patch-input-36409.patch --]
[-- Type: text/x-diff, Size: 4028 bytes --]
From f43cf4f469eef09a7473a030742620a00391622f Mon Sep 17 00:00:00 2001
From: tibequadorian <tibequadorian@posteo.de>
Date: Wed, 30 Mar 2022 00:38:27 +0200
Subject: [PATCH 1/2] do-patch: allow use of --directory parameter
---
common/hooks/do-patch/00-patches.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/hooks/do-patch/00-patches.sh b/common/hooks/do-patch/00-patches.sh
index 9f7e21f017dc..64659dc30280 100644
--- a/common/hooks/do-patch/00-patches.sh
+++ b/common/hooks/do-patch/00-patches.sh
@@ -31,7 +31,7 @@ _process_patch() {
cd "$wrksrc"
msg_normal "$pkgver: patching: ${_patch}.\n"
- patch -s ${_args} -i ${_patch} 2>/dev/null
+ patch -s ${_args} <${_patch} 2>/dev/null
}
hook() {
From 6dccb4ef9c2176fbc394bb9ea33d6174ef5bcd2c Mon Sep 17 00:00:00 2001
From: tibequadorian <tibequadorian@posteo.de>
Date: Wed, 30 Mar 2022 00:57:00 +0200
Subject: [PATCH 2/2] wine: patch into $build_wrksrc
---
srcpkgs/wine/patches/musl-limits.patch | 4 ++--
srcpkgs/wine/patches/musl-rpath.patch | 8 ++++----
srcpkgs/wine/patches/musl-uid-t.patch | 4 ++--
srcpkgs/wine/template | 3 +++
4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/srcpkgs/wine/patches/musl-limits.patch b/srcpkgs/wine/patches/musl-limits.patch
index 45cb7cbd5106..6a46158221b4 100644
--- a/srcpkgs/wine/patches/musl-limits.patch
+++ b/srcpkgs/wine/patches/musl-limits.patch
@@ -1,5 +1,5 @@
---- a/wine-7.5/dlls/winebus.sys/bus_udev.c 2021-10-23 15:38:33.225064731 +0200
-+++ b/wine-7.5/dlls/winebus.sys/bus_udev.c 2021-10-23 15:39:06.662064765 +0200
+--- a/dlls/winebus.sys/bus_udev.c 2021-10-23 15:38:33.225064731 +0200
++++ b/dlls/winebus.sys/bus_udev.c 2021-10-23 15:39:06.662064765 +0200
@@ -29,7 +29,8 @@
#include <stdlib.h>
#include <stdio.h>
diff --git a/srcpkgs/wine/patches/musl-rpath.patch b/srcpkgs/wine/patches/musl-rpath.patch
index 4ed5e2642d9f..68b25589b42b 100644
--- a/srcpkgs/wine/patches/musl-rpath.patch
+++ b/srcpkgs/wine/patches/musl-rpath.patch
@@ -1,7 +1,7 @@
diff --git a/configure b/configure
index 774a95ce003..d408e77cc78 100755
---- a/wine-7.5/configure
-+++ b/wine-7.5/configure
+--- a/configure
++++ b/configure
@@ -11137,6 +11137,38 @@ fi
LIBWINE_DEPENDS="wine.map"
@@ -43,8 +43,8 @@ index 774a95ce003..d408e77cc78 100755
diff --git a/configure.ac b/configure.ac
index 8c5066a3de6..01ede86df1e 100644
---- a/wine-7.5/configure.ac
-+++ b/wine-7.5/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -916,6 +916,9 @@ case $host_os in
AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version")
AC_SUBST(LIBWINE_DEPENDS,"wine.map")
diff --git a/srcpkgs/wine/patches/musl-uid-t.patch b/srcpkgs/wine/patches/musl-uid-t.patch
index a358997c3963..ac8dfca3bb2f 100644
--- a/srcpkgs/wine/patches/musl-uid-t.patch
+++ b/srcpkgs/wine/patches/musl-uid-t.patch
@@ -1,5 +1,5 @@
---- a/wine-7.5/server/security.h 2022-01-29 08:23:43.759508270 +0100
-+++ b/wine-7.5/server/security.h 2022-01-29 08:24:07.976443565 +0100
+--- a/server/security.h 2022-01-29 08:23:43.759508270 +0100
++++ b/server/security.h 2022-01-29 08:24:07.976443565 +0100
@@ -22,6 +22,7 @@
#define __WINE_SERVER_SECURITY_H
diff --git a/srcpkgs/wine/template b/srcpkgs/wine/template
index e9598ba932a0..242bc3b57536 100644
--- a/srcpkgs/wine/template
+++ b/srcpkgs/wine/template
@@ -25,6 +25,8 @@ desc_option_xshm="Enable support for the X Shared Memory Extension"
lib32mode=full
archs="i686* x86_64*"
+patch_args="-Np1 --directory=${build_wrksrc}"
+
_nopie=no
if [ "$XBPS_TARGET_MACHINE" = i686-musl ]; then
# build system adds -fno-PIC for 32bit builds, which,
@@ -48,6 +50,7 @@ makedepends="gettext-devel ncurses-devel glu-devel libSM-devel
depends="libXi libXinerama libXcomposite libXcursor libOSMesa
desktop-file-utils hicolor-icon-theme liberation-fonts-ttf
gnutls SDL2 wine-common>=${version}_${revision} libwine>=${version}_${revision}"
+# This testsuite might hang indefinitely
make_check=extended
case $XBPS_TARGET_MACHINE in
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
2022-03-29 23:20 ` [PR PATCH] [Updated] " tibequadorian
@ 2022-03-31 18:58 ` paper42
2022-03-31 19:19 ` tibequadorian
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paper42 @ 2022-03-31 18:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/36409#discussion_r839928819
Comment:
Can we use += here?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
2022-03-29 23:20 ` [PR PATCH] [Updated] " tibequadorian
2022-03-31 18:58 ` [PR REVIEW] " paper42
@ 2022-03-31 19:19 ` tibequadorian
2022-03-31 19:26 ` paper42
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tibequadorian @ 2022-03-31 19:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
New review comment by tibequadorian on void-packages repository
https://github.com/void-linux/void-packages/pull/36409#discussion_r839943959
Comment:
afaik we don't do this anywhere else
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
` (2 preceding siblings ...)
2022-03-31 19:19 ` tibequadorian
@ 2022-03-31 19:26 ` paper42
2022-03-31 19:59 ` tibequadorian
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paper42 @ 2022-03-31 19:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/36409#discussion_r839949022
Comment:
but we could :slightly_smiling_face:
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
` (3 preceding siblings ...)
2022-03-31 19:26 ` paper42
@ 2022-03-31 19:59 ` tibequadorian
2022-03-31 20:45 ` paper42
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tibequadorian @ 2022-03-31 19:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
New review comment by tibequadorian on void-packages repository
https://github.com/void-linux/void-packages/pull/36409#discussion_r839971784
Comment:
Oh you mean `patch_args+=" --directory=${build_wrksrc}"`? I think this won't work because it overwrites `_args`.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
` (4 preceding siblings ...)
2022-03-31 19:59 ` tibequadorian
@ 2022-03-31 20:45 ` paper42
2022-04-09 11:03 ` paper42
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paper42 @ 2022-03-31 20:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/36409#discussion_r840003181
Comment:
That's true and because the file is sourced multiple times, it wouldn't produce what we want.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
` (5 preceding siblings ...)
2022-03-31 20:45 ` paper42
@ 2022-04-09 11:03 ` paper42
2022-04-09 11:38 ` [PR PATCH] [Updated] " tibequadorian
2022-04-10 9:06 ` [PR PATCH] [Merged]: " paper42
8 siblings, 0 replies; 10+ messages in thread
From: paper42 @ 2022-04-09 11:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
New comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/36409#issuecomment-1093909570
Comment:
Could you rebase and include this PR description in the commit message?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
` (6 preceding siblings ...)
2022-04-09 11:03 ` paper42
@ 2022-04-09 11:38 ` tibequadorian
2022-04-10 9:06 ` [PR PATCH] [Merged]: " paper42
8 siblings, 0 replies; 10+ messages in thread
From: tibequadorian @ 2022-04-09 11:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]
There is an updated pull request by tibequadorian against master on the void-packages repository
https://github.com/tibequadorian/void-packages do-patch-input
https://github.com/void-linux/void-packages/pull/36409
[RFC] patch_args: allow use of --directory parameter
`patch(1)` has a `-d/--directory` parameter which allows us to specify a directory where the patch will be applied.
This is especially useful when we have multiple distfiles and want to patch in $build_wrksrc because that's where the patch is usually applied. So far, these patches had to be updated if $build_wrksrc changes, which is suboptimal.
Problem is, that the `-i` parameter is also relative to the the `-d` parameter and thus fails to find the patch, when `-d` is set.
This PR tries to solve that by using standard input instead of `-i`.
Included is an example with wine making use of that change.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/36409.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-do-patch-input-36409.patch --]
[-- Type: text/x-diff, Size: 8167 bytes --]
From 3bb9b1e4450e1102fdd878f7fcff4fa18dc2d724 Mon Sep 17 00:00:00 2001
From: tibequadorian <tibequadorian@posteo.de>
Date: Wed, 30 Mar 2022 00:38:27 +0200
Subject: [PATCH 1/3] patch_args: allow use of --directory parameter
patch(1) has a -d/--directory parameter which allows us to specify a directory
where the patch will be applied. This is especially useful when we have
multiple distfiles and want to patch in $build_wrksrc because that's where the
patch is usually applied.
Problem is, that the -i parameter is also relative to the the -d parameter and
thus fails to find the patch, when -d is set. We solve that by using standard
input instead of -i.
---
common/hooks/do-patch/00-patches.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/hooks/do-patch/00-patches.sh b/common/hooks/do-patch/00-patches.sh
index 9f7e21f017dc..64659dc30280 100644
--- a/common/hooks/do-patch/00-patches.sh
+++ b/common/hooks/do-patch/00-patches.sh
@@ -31,7 +31,7 @@ _process_patch() {
cd "$wrksrc"
msg_normal "$pkgver: patching: ${_patch}.\n"
- patch -s ${_args} -i ${_patch} 2>/dev/null
+ patch -s ${_args} <${_patch} 2>/dev/null
}
hook() {
From b3e2f235779c4b1eb43973f61630aa6e04e6363d Mon Sep 17 00:00:00 2001
From: tibequadorian <tibequadorian@posteo.de>
Date: Wed, 30 Mar 2022 00:57:00 +0200
Subject: [PATCH 2/3] wine: patch into $build_wrksrc
---
srcpkgs/wine/patches/musl-limits.patch | 4 ++--
srcpkgs/wine/patches/musl-rpath.patch | 9 +++++++--
srcpkgs/wine/patches/musl-uid-t.patch | 4 ++--
srcpkgs/wine/template | 3 +++
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/wine/patches/musl-limits.patch b/srcpkgs/wine/patches/musl-limits.patch
index 7546d45c7609..6a46158221b4 100644
--- a/srcpkgs/wine/patches/musl-limits.patch
+++ b/srcpkgs/wine/patches/musl-limits.patch
@@ -1,5 +1,5 @@
---- a/wine-7.6/dlls/winebus.sys/bus_udev.c 2021-10-23 15:38:33.225064731 +0200
-+++ b/wine-7.6/dlls/winebus.sys/bus_udev.c 2021-10-23 15:39:06.662064765 +0200
+--- a/dlls/winebus.sys/bus_udev.c 2021-10-23 15:38:33.225064731 +0200
++++ b/dlls/winebus.sys/bus_udev.c 2021-10-23 15:39:06.662064765 +0200
@@ -29,7 +29,8 @@
#include <stdlib.h>
#include <stdio.h>
diff --git a/srcpkgs/wine/patches/musl-rpath.patch b/srcpkgs/wine/patches/musl-rpath.patch
index e0b6f8626637..f522f7ecea2d 100644
--- a/srcpkgs/wine/patches/musl-rpath.patch
+++ b/srcpkgs/wine/patches/musl-rpath.patch
@@ -1,7 +1,7 @@
diff --git a/configure b/configure
index 774a95ce003..d408e77cc78 100755
---- a/wine-7.6/configure
-+++ b/wine-7.6/configure
+--- a/configure
++++ b/configure
@@ -11137,6 +11137,38 @@ fi
LIBWINE_DEPENDS="wine.map"
@@ -43,8 +43,13 @@ index 774a95ce003..d408e77cc78 100755
diff --git a/configure.ac b/configure.ac
index 8c5066a3de6..01ede86df1e 100644
+<<<<<<< HEAD
--- a/wine-7.6/configure.ac
+++ b/wine-7.6/configure.ac
+=======
+--- a/configure.ac
++++ b/configure.ac
+>>>>>>> 6dccb4ef9c (wine: patch into $build_wrksrc)
@@ -916,6 +916,9 @@ case $host_os in
AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version")
AC_SUBST(LIBWINE_DEPENDS,"wine.map")
diff --git a/srcpkgs/wine/patches/musl-uid-t.patch b/srcpkgs/wine/patches/musl-uid-t.patch
index a95011e3cca0..ac8dfca3bb2f 100644
--- a/srcpkgs/wine/patches/musl-uid-t.patch
+++ b/srcpkgs/wine/patches/musl-uid-t.patch
@@ -1,5 +1,5 @@
---- a/wine-7.6/server/security.h 2022-01-29 08:23:43.759508270 +0100
-+++ b/wine-7.6/server/security.h 2022-01-29 08:24:07.976443565 +0100
+--- a/server/security.h 2022-01-29 08:23:43.759508270 +0100
++++ b/server/security.h 2022-01-29 08:24:07.976443565 +0100
@@ -22,6 +22,7 @@
#define __WINE_SERVER_SECURITY_H
diff --git a/srcpkgs/wine/template b/srcpkgs/wine/template
index 86d0acf0883b..beb10898af92 100644
--- a/srcpkgs/wine/template
+++ b/srcpkgs/wine/template
@@ -25,6 +25,8 @@ desc_option_xshm="Enable support for the X Shared Memory Extension"
lib32mode=full
archs="i686* x86_64*"
+patch_args="-Np1 --directory=${build_wrksrc}"
+
_nopie=no
if [ "$XBPS_TARGET_MACHINE" = i686-musl ]; then
# build system adds -fno-PIC for 32bit builds, which,
@@ -48,6 +50,7 @@ makedepends="gettext-devel ncurses-devel glu-devel libSM-devel
depends="libXi libXinerama libXcomposite libXcursor libOSMesa
desktop-file-utils hicolor-icon-theme liberation-fonts-ttf
gnutls SDL2 wine-common>=${version}_${revision} libwine>=${version}_${revision}"
+# This testsuite might hang indefinitely
make_check=extended
case $XBPS_TARGET_MACHINE in
From 01b113900a54485feaf6b1670d7d7f3fb848cc6e Mon Sep 17 00:00:00 2001
From: tibequadorian <tibequadorian@posteo.de>
Date: Sat, 9 Apr 2022 13:38:04 +0200
Subject: [PATCH 3/3] chatterino2: patch into $build_wrksrc
---
.../patches/0001-fix-desktop-icon-name.patch | 4 ++--
srcpkgs/chatterino2/patches/cmake.patch | 12 ++++++------
srcpkgs/chatterino2/template | 5 +++--
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/srcpkgs/chatterino2/patches/0001-fix-desktop-icon-name.patch b/srcpkgs/chatterino2/patches/0001-fix-desktop-icon-name.patch
index 9f41d03190b7..1b0a6d6140e4 100644
--- a/srcpkgs/chatterino2/patches/0001-fix-desktop-icon-name.patch
+++ b/srcpkgs/chatterino2/patches/0001-fix-desktop-icon-name.patch
@@ -1,7 +1,7 @@
diff --git a/resources/com.chatterino.chatterino.desktop b/resources/com.chatterino.chatterino.desktop
index 6ee45354..ece81f5c 100644
---- a/chatterino2/resources/com.chatterino.chatterino.desktop
-+++ b/chatterino2/resources/com.chatterino.chatterino.desktop
+--- a/resources/com.chatterino.chatterino.desktop
++++ b/resources/com.chatterino.chatterino.desktop
@@ -4,7 +4,7 @@ Version=1.0
Name=Chatterino
Comment=Chat client for Twitch
diff --git a/srcpkgs/chatterino2/patches/cmake.patch b/srcpkgs/chatterino2/patches/cmake.patch
index a59d0a4eb9f0..8a5643566957 100644
--- a/srcpkgs/chatterino2/patches/cmake.patch
+++ b/srcpkgs/chatterino2/patches/cmake.patch
@@ -1,7 +1,7 @@
diff --git a/cmake/FindLRUCache.cmake b/cmake/FindLRUCache.cmake
index 82905436..b0b89a4e 100644
---- a/chatterino2/cmake/FindLRUCache.cmake
-+++ b/chatterino2/cmake/FindLRUCache.cmake
+--- a/cmake/FindLRUCache.cmake
++++ b/cmake/FindLRUCache.cmake
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)
@@ -12,8 +12,8 @@ index 82905436..b0b89a4e 100644
diff --git a/cmake/FindPajladaSerialize.cmake b/cmake/FindPajladaSerialize.cmake
index 4671874c..119284c2 100644
---- a/chatterino2/cmake/FindPajladaSerialize.cmake
-+++ b/chatterino2/cmake/FindPajladaSerialize.cmake
+--- a/cmake/FindPajladaSerialize.cmake
++++ b/cmake/FindPajladaSerialize.cmake
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)
@@ -24,8 +24,8 @@ index 4671874c..119284c2 100644
diff --git a/cmake/FindPajladaSignals.cmake b/cmake/FindPajladaSignals.cmake
index f4c964ec..75efba20 100644
---- a/chatterino2/cmake/FindPajladaSignals.cmake
-+++ b/chatterino2/cmake/FindPajladaSignals.cmake
+--- a/cmake/FindPajladaSignals.cmake
++++ b/cmake/FindPajladaSignals.cmake
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)
diff --git a/srcpkgs/chatterino2/template b/srcpkgs/chatterino2/template
index e1f99ac9e9fc..7bf7d6a37d04 100644
--- a/srcpkgs/chatterino2/template
+++ b/srcpkgs/chatterino2/template
@@ -9,7 +9,7 @@ _signals_commit="baf5bb04bd13b090e405e0447c89a811f7e23ddc"
_qtkeychain_commit="de954627363b0b4bff9a2616f1a409b7e14d5df9"
_sanitizers_cmake_commit="99e159ec9bc8dd362b08d18436bd40ff0648417b"
create_wrksrc=yes
-build_wrksrc="chatterino2"
+build_wrksrc="chatterino2-${version}"
build_style=cmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-multimedia-devel qt5-svg-devel
@@ -40,8 +40,9 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
LIBS="-latomic"
fi
+patch_args="-Np1 --directory=${build_wrksrc}"
+
post_extract() {
- mv "chatterino2-${version}" "${build_wrksrc}"
rmdir ${build_wrksrc}/lib/libcommuni ${build_wrksrc}/lib/serialize \
${build_wrksrc}/lib/settings ${build_wrksrc}/lib/signals \
${build_wrksrc}/lib/rapidjson ${build_wrksrc}/lib/websocketpp \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Merged]: [RFC] patch_args: allow use of --directory parameter
2022-03-29 23:10 [PR PATCH] [RFC] patch_args: allow use of --directory parameter tibequadorian
` (7 preceding siblings ...)
2022-04-09 11:38 ` [PR PATCH] [Updated] " tibequadorian
@ 2022-04-10 9:06 ` paper42
8 siblings, 0 replies; 10+ messages in thread
From: paper42 @ 2022-04-10 9:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]
There's a merged pull request on the void-packages repository
[RFC] patch_args: allow use of --directory parameter
https://github.com/void-linux/void-packages/pull/36409
Description:
`patch(1)` has a `-d/--directory` parameter which allows us to specify a directory where the patch will be applied.
This is especially useful when we have multiple distfiles and want to patch in $build_wrksrc because that's where the patch is usually applied. So far, these patches had to be updated if $build_wrksrc changes, which is suboptimal.
Problem is, that the `-i` parameter is also relative to the the `-d` parameter and thus fails to find the patch, when `-d` is set.
This PR tries to solve that by using standard input instead of `-i`.
Included are examples with wine and chatterino2 making use of that change.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 10+ messages in thread