Skip to content

Commit fce2826

Browse files
moto-timorpurdie
authored andcommitted
libxml-parser-perl: upgrade 2.46 -> 2.47
* Drop CheckLib.pm patch; no longer applies * Change to CPAN_MIRROR for SRC_URI * Drop SRC_URI[md5sum] * Drop redundant ptest-perl/run-ptest; ptest-perl inherit does this * Drop sed for Expat/Makefile; no longer shipped * Inherit pkgconfig to find expat lib * Patch Makefile.PL to not try to load host expat License-Update: Use LICENSE file; change to Artistic-2.0 https://metacpan.org/dist/XML-Parser/changes 2.47 2023-12-28 (by Todd Rinaldo) - #84 use $fh instead of $foo - #85 Fix typo in documentation - #89 Devel::CheckLib to from 0.99 -> 1.14 - Devel::CheckLibn 1.16 - #91 POD fix for verbatim text - #97 Add a LICENSE file - #94 Don't ship Expat/Makefile - Various github workflow improvements. Windows is still not working. Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent fe797bc commit fce2826

File tree

4 files changed

+70
-83
lines changed

4 files changed

+70
-83
lines changed

meta/recipes-devtools/perl/files/0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From bd9b0e10843da72276982bd1394ade734fea0289 Mon Sep 17 00:00:00 2001
2+
From: Tim Orling <tim.orling@konsulko.com>
3+
Date: Fri, 2 Feb 2024 21:15:34 -0800
4+
Subject: [PATCH] Makefile.PL: make check_lib cross friendly
5+
6+
lib => qw(expat) does not seem to respect EXPATLIBPATH and
7+
EXPATINCPATH when we are cross-compiling.
8+
9+
Upstream-Status: Inappropriate [OE specific]
10+
11+
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
12+
---
13+
Makefile.PL | 2 +-
14+
1 file changed, 1 insertion(+), 1 deletion(-)
15+
16+
diff --git a/Makefile.PL b/Makefile.PL
17+
index 505d1df..19f428b 100644
18+
--- a/Makefile.PL
19+
+++ b/Makefile.PL
20+
@@ -30,7 +30,7 @@ foreach (@ARGV) {
21+
22+
unless (
23+
check_lib( # fill in what you prompted the user for here
24+
- lib => [qw(expat)],
25+
+ #lib => [qw(expat)],
26+
header => ['expat.h'],
27+
incpath => $expat_incpath,
28+
( $expat_libpath ? ( libpath => $expat_libpath ) : () ),

meta/recipes-devtools/perl/libxml-parser-perl_2.46.bb

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
SUMMARY = "XML::Parser - A perl module for parsing XML documents"
2+
HOMEPAGE = "https://libexpat.github.io/"
3+
SECTION = "libs"
4+
LICENSE = "Artistic-2.0"
5+
LIC_FILES_CHKSUM = "file://LICENSE;md5=4342f85bf14a1fdd6a751573f1e61c03"
6+
7+
DEPENDS += "expat"
8+
9+
SRC_URI = "${CPAN_MIRROR}/modules/by-module/XML/XML-Parser-${PV}.tar.gz \
10+
file://0001-Makefile.PL-make-check_lib-cross-friendly.patch \
11+
"
12+
13+
SRC_URI[sha256sum] = "ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8"
14+
15+
S = "${WORKDIR}/XML-Parser-${PV}"
16+
17+
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
18+
19+
inherit cpan pkgconfig ptest-perl
20+
21+
do_compile() {
22+
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
23+
cpan_do_compile
24+
}
25+
26+
do_compile:class-native() {
27+
cpan_do_compile
28+
}
29+
30+
do_install_ptest() {
31+
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
32+
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
33+
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
34+
sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
35+
cp -r ${B}/samples ${D}${PTEST_PATH}
36+
chown -R root:root ${D}${PTEST_PATH}/samples
37+
}
38+
39+
RDEPENDS:${PN} += "perl-module-carp perl-module-file-spec"
40+
RDEPENDS:${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more"
41+
42+
BBCLASSEXTEND="native nativesdk"

0 commit comments

Comments
 (0)