void-packages/srcpkgs/exo/patches/configure-crosscompile.patch
Đoàn Trần Công Danh a03d116397 srcpkgs/e*: 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
```
2021-06-20 13:17:29 +07:00

47 lines
1.3 KiB
Diff

--- a/configure.ac
+++ b/configure.ac
@@ -137,22 +137,29 @@ AC_FUNC_MMAP()
dnl ***************************************
dnl *** Check for strftime() extensions ***
dnl ***************************************
-AC_TRY_RUN([
- #include <string.h>
- #include <time.h>
- int
- main (int argc, char **argv)
- {
- struct tm tm;
- char buffer[16];
- tm.tm_year = 81;
- if (strftime (buffer, 16, "%EY", &tm) == 4 && strcmp (buffer, "1981") == 0)
- return 0;
- return 1;
- }
-], [
+AC_CACHE_CHECK([Define if strftime supports %E and %O modifiers], ac_cv_strftime_extensions,
+ [AC_TRY_RUN([
+ #include <string.h>
+ #include <time.h>
+ int
+ main (int argc, char **argv)
+ {
+ struct tm tm;
+ char buffer[16];
+ tm.tm_year = 81;
+ if (strftime (buffer, 16, "%EY", &tm) == 4 && strcmp (buffer, "1981") == 0)
+ return 0;
+ return 1;
+ }
+ ],
+ ac_cv_strftime_extensions=yes,
+ ac_cv_strftime_extensions=no,
+ [AC_MSG_ERROR([cross-compiling, preset ac_cv_strftime_extensions=yes/no])]
+ )]
+)
+if test x"$ac_cv_strftime_extensions" = x"yes"; then
AC_DEFINE([HAVE_STRFTIME_EXTENSION], 1, [Define if strftime supports %E and %O modifiers.])
-])
+fi
dnl ******************************
dnl *** Check for i18n support ***