void-packages/srcpkgs/pidgin/patches/02-libpurple-nm_state.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```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
```
2021-06-20 13:17:29 +07:00

19 lines
619 B
Diff

--- a/libpurple/network.c 2018-03-06 07:00:49.000000000 +0100
+++ b/libpurple/network.c 2020-02-11 04:30:20.163644344 +0100
@@ -939,8 +939,16 @@
#if NM_CHECK_VERSION(0,8,992)
case NM_STATE_DISCONNECTING:
#endif
+#if NM_CHECK_VERSION(0,8,992)
+ if (prev != NM_STATE_CONNECTED_LOCAL &&
+ prev != NM_STATE_CONNECTED_SITE &&
+ prev != NM_STATE_CONNECTED_GLOBAL &&
+ prev != NM_STATE_UNKNOWN)
+ break;
+#else
if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
break;
+#endif
if (ui_ops != NULL && ui_ops->network_disconnected != NULL)
ui_ops->network_disconnected();
break;