void-packages/srcpkgs/xar/patches/openssl1.1.patch
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

54 lines
1.9 KiB
Diff

Reason: The OpenSSL_add_all_ciphers api doesn't was removed in OpenSSL 1.1
so we just replace the check with something that exists in OpenSSL and LibreSSL
---
--- a/configure 2012-09-17 13:30:07.000000000 +0200
+++ b/configure 2012-09-17 13:30:07.000000000 +0200
@@ -4878,9 +4878,9 @@
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL_add_all_ciphers in -lcrypto" >&5
-$as_echo_n "checking for OpenSSL_add_all_ciphers in -lcrypto... " >&6; }
-if ${ac_cv_lib_crypto_OpenSSL_add_all_ciphers+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_crypto in -lcrypto" >&5
+$as_echo_n "checking for OPENSSL_init_crypto in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_OPENSSL_init_crypto+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4894,27 +4894,27 @@
#ifdef __cplusplus
extern "C"
#endif
-char OpenSSL_add_all_ciphers ();
+char OPENSSL_init_crypto ();
int
main ()
{
-return OpenSSL_add_all_ciphers ();
+return OPENSSL_init_crypto ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_crypto_OpenSSL_add_all_ciphers=yes
+ ac_cv_lib_crypto_OPENSSL_init_crypto=yes
else
- ac_cv_lib_crypto_OpenSSL_add_all_ciphers=no
+ ac_cv_lib_crypto_OPENSSL_init_crypto=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&5
-$as_echo "$ac_cv_lib_crypto_OpenSSL_add_all_ciphers" >&6; }
-if test "x$ac_cv_lib_crypto_OpenSSL_add_all_ciphers" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_OPENSSL_init_crypto" >&5
+$as_echo "$ac_cv_lib_crypto_OPENSSL_init_crypto" >&6; }
+if test "x$ac_cv_lib_crypto_OPENSSL_init_crypto" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCRYPTO 1
_ACEOF