diff options
3 files changed, 117 insertions, 2 deletions
diff --git a/meta/recipes-core/libxcrypt/files/0001-Make-BuildCommon.pm-compatible-with-latest-perl.patch b/meta/recipes-core/libxcrypt/files/0001-Make-BuildCommon.pm-compatible-with-latest-perl.patch new file mode 100644 index 0000000000..b3e43d5815 --- /dev/null +++ b/meta/recipes-core/libxcrypt/files/0001-Make-BuildCommon.pm-compatible-with-latest-perl.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From c3ec04f1aee68970b82e4b033bee1477e76798f9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Leon Timmermans <fawaka@gmail.com> | ||
| 3 | Date: Tue, 6 Jun 2023 17:03:57 +0200 | ||
| 4 | Subject: [PATCH] Make BuildCommon.pm compatible with latest perl | ||
| 5 | |||
| 6 | It was previously using an experimental feature that has since been dropped. | ||
| 7 | This removes the use of that feature. | ||
| 8 | |||
| 9 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 10 | Upstream-Status: Backport [v4.4.35 https://github.com/besser82/libxcrypt/commit/ce562f4d33dc090fcd8f6ea1af3ba32cdc2b3c9c] | ||
| 11 | --- | ||
| 12 | build-aux/scripts/BuildCommon.pm | 9 ++++----- | ||
| 13 | 1 file changed, 4 insertions(+), 5 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/build-aux/scripts/BuildCommon.pm b/build-aux/scripts/BuildCommon.pm | ||
| 16 | index 0e6f2a3..c38ba21 100644 | ||
| 17 | --- a/build-aux/scripts/BuildCommon.pm | ||
| 18 | +++ b/build-aux/scripts/BuildCommon.pm | ||
| 19 | @@ -11,7 +11,6 @@ use v5.14; # implicit use strict, use feature ':5.14' | ||
| 20 | use warnings FATAL => 'all'; | ||
| 21 | use utf8; | ||
| 22 | use open qw(:utf8); | ||
| 23 | -no if $] >= 5.018, warnings => 'experimental::smartmatch'; | ||
| 24 | no if $] >= 5.022, warnings => 'experimental::re_strict'; | ||
| 25 | use if $] >= 5.022, re => 'strict'; | ||
| 26 | |||
| 27 | @@ -519,19 +518,19 @@ sub parse_symver_args { | ||
| 28 | my $COMPAT_ABI; | ||
| 29 | local $_; | ||
| 30 | for (@args) { | ||
| 31 | - when (/^SYMVER_MIN=(.+)$/) { | ||
| 32 | + if (/^SYMVER_MIN=(.+)$/) { | ||
| 33 | $usage_error->() if defined $SYMVER_MIN; | ||
| 34 | $SYMVER_MIN = $1; | ||
| 35 | } | ||
| 36 | - when (/^SYMVER_FLOOR=(.+)$/) { | ||
| 37 | + elsif (/^SYMVER_FLOOR=(.+)$/) { | ||
| 38 | $usage_error->() if defined $SYMVER_FLOOR; | ||
| 39 | $SYMVER_FLOOR = $1; | ||
| 40 | } | ||
| 41 | - when (/^COMPAT_ABI=(.+)$/) { | ||
| 42 | + elsif (/^COMPAT_ABI=(.+)$/) { | ||
| 43 | $usage_error->() if defined $COMPAT_ABI; | ||
| 44 | $COMPAT_ABI = $1; | ||
| 45 | } | ||
| 46 | - default { | ||
| 47 | + else { | ||
| 48 | $usage_error->() if defined $map_in; | ||
| 49 | $map_in = $_; | ||
| 50 | } | ||
diff --git a/meta/recipes-core/libxcrypt/files/0002-Remove-smartmatch-usage-from-gen-crypt-h.patch b/meta/recipes-core/libxcrypt/files/0002-Remove-smartmatch-usage-from-gen-crypt-h.patch new file mode 100644 index 0000000000..603f52f792 --- /dev/null +++ b/meta/recipes-core/libxcrypt/files/0002-Remove-smartmatch-usage-from-gen-crypt-h.patch | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | From 95d6e03ae37f4ec948474d111105bbdd2938aba2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org> | ||
| 3 | Date: Sun, 25 Jun 2023 01:35:08 +0200 | ||
| 4 | Subject: [PATCH] Remove smartmatch usage from gen-crypt-h | ||
| 5 | |||
| 6 | Needed for Perl 5.38 | ||
| 7 | |||
| 8 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 9 | Upstream-Status: Backport [v4.4.36 https://github.com/besser82/libxcrypt/commit/95d6e03ae37f4ec948474d111105bbdd2938aba2] | ||
| 10 | --- | ||
| 11 | build-aux/scripts/gen-crypt-h | 31 ++++++++++++++----------------- | ||
| 12 | 1 file changed, 14 insertions(+), 17 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/build-aux/scripts/gen-crypt-h b/build-aux/scripts/gen-crypt-h | ||
| 15 | index 12aecf6..b113b79 100644 | ||
| 16 | --- a/build-aux/scripts/gen-crypt-h | ||
| 17 | +++ b/build-aux/scripts/gen-crypt-h | ||
| 18 | @@ -12,7 +12,6 @@ use v5.14; # implicit use strict, use feature ':5.14' | ||
| 19 | use warnings FATAL => 'all'; | ||
| 20 | use utf8; | ||
| 21 | use open qw(:std :utf8); | ||
| 22 | -no if $] >= 5.018, warnings => 'experimental::smartmatch'; | ||
| 23 | no if $] >= 5.022, warnings => 'experimental::re_strict'; | ||
| 24 | use if $] >= 5.022, re => 'strict'; | ||
| 25 | |||
| 26 | @@ -37,22 +36,20 @@ sub process_config_h { | ||
| 27 | local $_; | ||
| 28 | while (<$fh>) { | ||
| 29 | chomp; | ||
| 30 | - # Yes, 'given $_' is really required here. | ||
| 31 | - given ($_) { | ||
| 32 | - when ('#define HAVE_SYS_CDEFS_H 1') { | ||
| 33 | - $have_sys_cdefs_h = 1; | ||
| 34 | - } | ||
| 35 | - when ('#define HAVE_SYS_CDEFS_BEGIN_END_DECLS 1') { | ||
| 36 | - $have_sys_cdefs_begin_end_decls = 1; | ||
| 37 | - } | ||
| 38 | - when ('#define HAVE_SYS_CDEFS_THROW 1') { | ||
| 39 | - $have_sys_cdefs_throw = 1; | ||
| 40 | - } | ||
| 41 | - when (/^#define PACKAGE_VERSION "((\d+)\.(\d+)\.\d+)"$/) { | ||
| 42 | - $substs{XCRYPT_VERSION_STR} = $1; | ||
| 43 | - $substs{XCRYPT_VERSION_MAJOR} = $2; | ||
| 44 | - $substs{XCRYPT_VERSION_MINOR} = $3; | ||
| 45 | - } | ||
| 46 | + | ||
| 47 | + if ($_ eq '#define HAVE_SYS_CDEFS_H 1') { | ||
| 48 | + $have_sys_cdefs_h = 1; | ||
| 49 | + } | ||
| 50 | + elsif ($_ eq '#define HAVE_SYS_CDEFS_BEGIN_END_DECLS 1') { | ||
| 51 | + $have_sys_cdefs_begin_end_decls = 1; | ||
| 52 | + } | ||
| 53 | + elsif ($_ eq '#define HAVE_SYS_CDEFS_THROW 1') { | ||
| 54 | + $have_sys_cdefs_throw = 1; | ||
| 55 | + } | ||
| 56 | + elsif (/^#define PACKAGE_VERSION "((\d+)\.(\d+)\.\d+)"$/) { | ||
| 57 | + $substs{XCRYPT_VERSION_STR} = $1; | ||
| 58 | + $substs{XCRYPT_VERSION_MAJOR} = $2; | ||
| 59 | + $substs{XCRYPT_VERSION_MINOR} = $3; | ||
| 60 | } | ||
| 61 | } | ||
| 62 | |||
diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc index 454a55d73d..342cbd0d06 100644 --- a/meta/recipes-core/libxcrypt/libxcrypt.inc +++ b/meta/recipes-core/libxcrypt/libxcrypt.inc | |||
| @@ -11,9 +11,12 @@ inherit autotools pkgconfig | |||
| 11 | 11 | ||
| 12 | SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https" | 12 | SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https" |
| 13 | SRCREV = "d7fe1ac04c326dba7e0440868889d1dccb41a175" | 13 | SRCREV = "d7fe1ac04c326dba7e0440868889d1dccb41a175" |
| 14 | SRCBRANCH ?= "develop" | 14 | SRCBRANCH ?= "master" |
| 15 | 15 | ||
| 16 | SRC_URI += "file://fix_cflags_handling.patch" | 16 | SRC_URI += "file://fix_cflags_handling.patch \ |
| 17 | file://0001-Make-BuildCommon.pm-compatible-with-latest-perl.patch \ | ||
| 18 | file://0002-Remove-smartmatch-usage-from-gen-crypt-h.patch \ | ||
| 19 | " | ||
| 17 | 20 | ||
| 18 | PROVIDES = "virtual/crypt" | 21 | PROVIDES = "virtual/crypt" |
| 19 | 22 | ||
