summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl-cross
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-06-04 11:14:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-06-06 23:16:51 +0100
commit53cf53147fbd8fc6cb870e50572210672d5dbf19 (patch)
tree8a59b937af1413ebdd13af3cd534f936bc153076 /meta/recipes-devtools/perl-cross
parentd39cef3f8263334b8b9ff1b531fd5e963dfe715b (diff)
downloadpoky-53cf53147fbd8fc6cb870e50572210672d5dbf19.tar.gz
perl: split perl-cross into its own recipe
As perl and perl-cross need to be updated (and patches rebased) in lockstep, devtool upgrade (and therefore AUH) can't cope with it. Manually updating is still possible, but painful. Split determinism.patch into perl and perl-cross parts, move the rest of the perl-cross patches. (From OE-Core rev: 60dcb230f65fb1a0f23341c379676f82213d6240) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl-cross')
-rw-r--r--meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch69
-rw-r--r--meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch29
-rw-r--r--meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch27
-rw-r--r--meta/recipes-devtools/perl-cross/files/README.md29
-rw-r--r--meta/recipes-devtools/perl-cross/files/determinism.patch46
-rw-r--r--meta/recipes-devtools/perl-cross/perlcross_1.3.5.bb38
6 files changed, 238 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch b/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
new file mode 100644
index 0000000000..3b0fc453e5
--- /dev/null
+++ b/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
@@ -0,0 +1,69 @@
1From 19c1987b455998d2959a5fdf3d1ed911d35e70f2 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 2 Jan 2019 17:55:35 +0100
4Subject: [PATCH] configure_path.sh: do not hardcode $prefix/lib as library
5 path
6
7Upstream-Status: Pending
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9
10---
11 cnf/configure_args.sh | 2 +-
12 cnf/configure_path.sh | 11 ++++++-----
13 2 files changed, 7 insertions(+), 6 deletions(-)
14
15diff --git a/cnf/configure_args.sh b/cnf/configure_args.sh
16index 29ca4f5..3297fb3 100644
17--- a/cnf/configure_args.sh
18+++ b/cnf/configure_args.sh
19@@ -155,7 +155,7 @@ while [ $i -le $# -o -n "$n" ]; do
20 help) mode="help" ;;
21 regen|regenerate) mode="regen" ;;
22 keeplog) defuser "$a" 1 ;;
23- prefix|html[13]dir|libsdir) defuser $a "$v" ;;
24+ prefix|html[13]dir|libsdir|libdir) defuser $a "$v" ;;
25 man[13]dir|otherlibsdir) defuser $a "$v" ;;
26 siteprefix|sitehtml[13]dir) defuser $a "$v" ;;
27 siteman[13]dir|vendorman[13]dir)defuser $a "$v" ;;
28diff --git a/cnf/configure_path.sh b/cnf/configure_path.sh
29index fe7eac7..bcba8b8 100644
30--- a/cnf/configure_path.sh
31+++ b/cnf/configure_path.sh
32@@ -30,6 +30,7 @@ definst() {
33 define "$1" "$installpath$v"
34 }
35
36+define libdir "$prefix/lib"
37 define sharedir "$prefix/share"
38 define html1dir "$sharedir/doc/$perlname/html"
39 define html3dir "$sharedir/doc/$perlname/html"
40@@ -38,16 +39,16 @@ define man1ext "1"
41 define man3dir "$sharedir/man/man3"
42 define man3ext "3"
43 define bin "$prefix/bin"
44-define lib "$prefix/lib"
45+define lib "$libdir"
46 define scriptdir "$prefix/bin"
47 define libsdirs ' '
48-defrel privlib "$prefix/lib/$package/$version"
49-defrel archlib "$prefix/lib/$package/$version/$archname"
50+defrel privlib "$libdir/$package/$version"
51+defrel archlib "$libdir/$package/$version/$archname"
52 define perlpath "$prefix/bin/$perlname"
53 define d_archlib 'define'
54
55 define sitebin "$prefix/bin"
56-defrel sitelib_stem "$prefix/lib/$package/site_perl"
57+defrel sitelib_stem "$libdir/$package/site_perl"
58 define sitelib "$sitelib_stem/$version"
59 define sitearch "$sitelib_stem/$version/$archname"
60 define siteprefix "$prefix"
61@@ -145,7 +146,7 @@ vendortest() {
62 }
63
64 vendorpath vendorbin "$vendorprefix/bin"
65-vendorpath vendorlib_stem "$vendorprefix/lib/$package/vendor_perl"
66+vendorpath vendorlib_stem "$libdir/$package/vendor_perl"
67 vendorpath vendorlib "$vendorlib_stem/$version"
68 vendorpath vendorarch "$vendorlib_stem/$version/$archname"
69 vendorpath vendorscript "$vendorprefix/bin"
diff --git a/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch b/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
new file mode 100644
index 0000000000..0aaeaa29eb
--- /dev/null
+++ b/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
@@ -0,0 +1,29 @@
1From a66811c487ecf8ba8724879c253bb10dfa82aeb5 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 1 Jun 2018 19:57:32 +0300
4Subject: [PATCH] configure_tool.sh: do not quote the argument to 'command'
5
6As it seems to break things if the argument has spaces and arguments in it.
7
8Upstream-Status: Pending
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 cnf/configure_tool.sh | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/cnf/configure_tool.sh b/cnf/configure_tool.sh
15index 32201c0..461bc68 100644
16--- a/cnf/configure_tool.sh
17+++ b/cnf/configure_tool.sh
18@@ -2,7 +2,7 @@
19
20 tryprog() {
21 log "trying $1=$2"
22- if command -v "$2" 1>/dev/null 2>/dev/null; then
23+ if command -v $2 1>/dev/null 2>/dev/null; then
24 define "$1" "$2"
25 result "$2"
26 return 0
27--
282.17.0
29
diff --git a/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch b/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
new file mode 100644
index 0000000000..e7985036a0
--- /dev/null
+++ b/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
@@ -0,0 +1,27 @@
1From f824cbec9ac8f113a4ae35d57bd18625d415a71b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 27 Nov 2018 15:37:40 +0100
4Subject: [PATCH] perl-cross: add LDFLAGS when linking libperl
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 Makefile | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/Makefile b/Makefile
13index 01644cd..be811a7 100644
14--- a/Makefile
15+++ b/Makefile
16@@ -180,7 +180,7 @@ endif
17
18 ifeq ($(useshrplib),true)
19 $(LIBPERL):
20- $(CC) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS)
21+ $(CC) $(LDFLAGS) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS)
22 else
23 $(LIBPERL):
24 $(AR) cru $@ $(filter %$o,$^)
25--
262.17.1
27
diff --git a/meta/recipes-devtools/perl-cross/files/README.md b/meta/recipes-devtools/perl-cross/files/README.md
new file mode 100644
index 0000000000..93217245c8
--- /dev/null
+++ b/meta/recipes-devtools/perl-cross/files/README.md
@@ -0,0 +1,29 @@
1**perl-cross** provides configure script, top-level Makefile
2and some auxiliary files for [perl](http://www.perl.org),
3with the primary emphasis on cross-compiling the source.
4
5 # Get perl and perl-cross sources
6 curl -L -O http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz
7 curl -L -O https://github.com/arsv/perl-cross/releases/download/1.1.3/perl-cross-1.1.3.tar.gz
8
9 # Unpack perl-cross over perl, overwriting Makefile
10 tar -zxf perl-5.24.1.tar.gz
11 cd perl-5.24.1
12 tar --strip-components=1 -zxf ../perl-cross-1.1.3.tar.gz
13
14 # Proceed as usual with most autoconfed packages
15 ./configure --target=arm-linux-gnueabi --prefix=/usr -Duseshrplib
16 make -j4
17 make DESTDIR=/path/to/staging/dir install
18
19Unlike mainline Perl, this configure never runs any target executables,
20relying solely on compile/link tests and pre-defined hints.
21On the flip side, it is only meant to run on resonably sane modern unix systems.
22
23Check [project pages](http://arsv.github.io/perl-cross/) for more info.
24In particular, [configure usage](http://arsv.github.io/perl-cross/usage.html)
25lists available configure options.
26
27Perl-cross is a free software licensed under the same terms
28as the original perl source.
29See LICENSE, Copying and Artistic files.
diff --git a/meta/recipes-devtools/perl-cross/files/determinism.patch b/meta/recipes-devtools/perl-cross/files/determinism.patch
new file mode 100644
index 0000000000..e9bf752bcb
--- /dev/null
+++ b/meta/recipes-devtools/perl-cross/files/determinism.patch
@@ -0,0 +1,46 @@
1Fixes to make the perl build reproducible:
2
3a) Remove the \n from configure_attr.sh since it gets quoted differently depending on
4 whether the shell is bash or dash which can cause the test result to be incorrect.
5 Reported upstream: https://github.com/arsv/perl-cross/issues/87
6
7b) Sort the order of the module lists from configure_mods.sh since otherwise
8 the result isn't the same leading to makefile differences.
9 Reported upstream: https://github.com/arsv/perl-cross/issues/88
10
11c) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst
12 there for good measure)
13 This needs to go to upstream perl (not done)
14
15d) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash
16 and "" with dash
17 Reported upstream: https://github.com/arsv/perl-cross/issues/87
18
19RP 2020/2/7
20
21Upstream-Status: Pending [75% submitted]
22Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
23
24Index: perl-5.30.1/cnf/configure_mods.sh
25===================================================================
26--- perl-5.30.1.orig/cnf/configure_mods.sh
27+++ perl-5.30.1/cnf/configure_mods.sh
28@@ -82,7 +82,7 @@ extonlyif() {
29 }
30
31 definetrimspaces() {
32- v=`echo "$2" | sed -r -e 's/\s+/ /g' -e 's/^\s+//' -e 's/\s+$//'`
33+ v=`echo "$2" | sed -r -e 's/\s+/ /g' -e 's/^\s+//' -e 's/\s+$//' | xargs -n1 | LANG=C sort | xargs`
34 define $1 "$v"
35 }
36
37Index: perl-5.30.1/cnf/configure
38===================================================================
39--- perl-5.30.1.orig/cnf/configure
40+++ perl-5.30.1/cnf/configure
41@@ -1,4 +1,4 @@
42-#!/bin/sh
43+#!/bin/bash
44
45 base=${0%/*}; test -z "$base" && base=.
46
diff --git a/meta/recipes-devtools/perl-cross/perlcross_1.3.5.bb b/meta/recipes-devtools/perl-cross/perlcross_1.3.5.bb
new file mode 100644
index 0000000000..0d81d4d0f1
--- /dev/null
+++ b/meta/recipes-devtools/perl-cross/perlcross_1.3.5.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Perl-cross build system"
2HOMEPAGE = "https://github.com/arsv/perl-cross"
3DESCRIPTION = "perl-cross provides configure script, top-level Makefile and some auxiliary files for perl, \
4with the primary emphasis on cross-compiling the source."
5SECTION = "devel"
6LICENSE = "Artistic-1.0 | GPL-1.0+"
7# README.md is taken from https://github.com/arsv/perl-cross/blob/master/README.md
8# but is not provided inside the release tarballs
9LIC_FILES_CHKSUM = "file://${WORKDIR}/README.md;md5=252fcce2026b765fee1ad74d2fb07a3b"
10
11inherit allarch
12
13SRC_URI = "https://github.com/arsv/perl-cross/releases/download/${PV}/perl-cross-${PV}.tar.gz;name=perl-cross \
14 file://README.md \
15 file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
16 file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
17 file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
18 file://determinism.patch \
19"
20UPSTREAM_CHECK_URI = "https://github.com/arsv/perl-cross/releases/"
21
22SRC_URI[perl-cross.sha256sum] = "91c66f6b2b99fccfd4fee14660b677380b0c98f9456359e91449798c2ad2ef25"
23
24S = "${WORKDIR}/perl-cross-${PV}"
25
26do_configure () {
27}
28
29do_compile () {
30}
31
32do_install_class-native() {
33 mkdir -p ${D}/${datadir}/perl-cross/
34 cp -rf ${S}/* ${D}/${datadir}/perl-cross/
35}
36
37BBCLASSEXTEND = "native"
38