```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 ```
56 lines
1.1 KiB
Diff
56 lines
1.1 KiB
Diff
From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
|
|
---
|
|
configure.in | 24 ++++++++++++++++++++++--
|
|
1 file changed, 22 insertions(+), 2 deletions(-)
|
|
|
|
diff --git configure.in configure.in
|
|
index 6570a07..0e4c9d1 100755
|
|
--- a/configure.in
|
|
+++ b/configure.in
|
|
@@ -486,6 +486,25 @@ AC_LANG_PROGRAM([[
|
|
|
|
AC_MSG_CHECKING([if any value exists for WNOHANG])
|
|
rm -rf wnohang
|
|
+AC_COMPILE_IFELSE([
|
|
+AC_LANG_PROGRAM([[
|
|
+#include <sys/wait.h>
|
|
+]],[[
|
|
+#ifdef WNOHANG
|
|
+ int wnohang_value = WNOHANG;
|
|
+#else
|
|
+ #error no value
|
|
+#endif
|
|
+]])],
|
|
+ AC_MSG_RESULT(yes)
|
|
+,
|
|
+ AC_MSG_RESULT(no)
|
|
+ expect_cv_wnohang_value=1
|
|
+)
|
|
+
|
|
+AC_CACHE_CHECK([value of WNOHANG], [expect_cv_wnohang_value],
|
|
+[
|
|
+rm -rf wnohang
|
|
AC_TRY_RUN([
|
|
#include <stdio.h>
|
|
#include <sys/wait.h>
|
|
@@ -500,14 +519,15 @@ main() {
|
|
#endif
|
|
}],
|
|
AC_MSG_RESULT(yes)
|
|
- AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
|
|
rm -f wnohang
|
|
,
|
|
AC_MSG_RESULT(no)
|
|
- AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
|
|
,
|
|
AC_MSG_ERROR([Expect can't be cross compiled])
|
|
)
|
|
+])
|
|
+
|
|
+AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, $expect_cv_wnohang_value)
|
|
|
|
#
|
|
# check how signals work
|
|
--
|
|
2.26.0.292.g33ef6b2f38
|
|
|