diff options
author | Wenlin Kang <wenlin.kang@windriver.com> | 2017-05-24 17:57:14 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-06-28 10:26:48 -0400 |
commit | e86c3fd9c575da66315c39afad0c6ce84fd8a4f8 (patch) | |
tree | a68331ea82b1b7b0b20a1e6ca413c3f28748fd61 /meta-networking/recipes-protocols/net-snmp/net-snmp | |
parent | 3491e039312e69907ab841948108f1f33a4eb956 (diff) | |
download | meta-openembedded-e86c3fd9c575da66315c39afad0c6ce84fd8a4f8.tar.gz |
net-snmp: supported cross compile for the perl embedded and perl modules
The patch solves two issues:
1. Supported cross compile for the perl embedded and perl modules.
2. Solved runtime depend issue.
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-protocols/net-snmp/net-snmp')
4 files changed, 277 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-configure-fix-check-for-enable-perl-cc-checks.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-configure-fix-check-for-enable-perl-cc-checks.patch new file mode 100644 index 000000000..b87e9eec2 --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-configure-fix-check-for-enable-perl-cc-checks.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From c6304a3e4b8441ff0a6464c0f1f6c5229092fa32 Mon Sep 17 00:00:00 2001 | ||
2 | From: Niels Baggesen <nba@users.sourceforge.net> | ||
3 | Date: Wed, 24 May 2017 16:40:03 +0800 | ||
4 | Subject: [PATCH 1/4] configure: fix check for --enable-perl-cc-checks | ||
5 | |||
6 | This patch comes from git://git.code.sf.net/p/net-snmp/code, | ||
7 | the commit is 8f431d410b803603dc809d82e0893509615d9a11. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> | ||
12 | --- | ||
13 | configure.d/config_project_perl_python | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/configure.d/config_project_perl_python b/configure.d/config_project_perl_python | ||
17 | index 23f8c7e..475c843 100644 | ||
18 | --- a/configure.d/config_project_perl_python | ||
19 | +++ b/configure.d/config_project_perl_python | ||
20 | @@ -84,7 +84,7 @@ if test "x$install_perl" != "xno" ; then | ||
21 | |||
22 | # What compiler was used to build the perl binary? | ||
23 | # | ||
24 | - if test "xenable_perl_cc_checks" != "xno" ; then | ||
25 | + if test "x$enable_perl_cc_checks" != "xno" ; then | ||
26 | AC_MSG_CHECKING([for Perl cc]) | ||
27 | changequote(, ) | ||
28 | PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'` | ||
29 | -- | ||
30 | 1.9.1 | ||
31 | |||
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch new file mode 100644 index 000000000..999976d27 --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0002-configure-fix-a-cc-check-issue.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 94e7e4969bc84c945dfea12d67a1e10f61973948 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenlin Kang <wenlin.kang@windriver.com> | ||
3 | Date: Wed, 24 May 2017 16:45:34 +0800 | ||
4 | Subject: [PATCH 2/4] configure: fix a cc check issue. | ||
5 | |||
6 | When has "." in cc value, the expression | ||
7 | $myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);' | ||
8 | can't get corretly the cc's value. | ||
9 | |||
10 | Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> | ||
11 | --- | ||
12 | configure.d/config_project_perl_python | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/configure.d/config_project_perl_python b/configure.d/config_project_perl_python | ||
16 | index 475c843..22d2ad3 100644 | ||
17 | --- a/configure.d/config_project_perl_python | ||
18 | +++ b/configure.d/config_project_perl_python | ||
19 | @@ -87,7 +87,7 @@ if test "x$install_perl" != "xno" ; then | ||
20 | if test "x$enable_perl_cc_checks" != "xno" ; then | ||
21 | AC_MSG_CHECKING([for Perl cc]) | ||
22 | changequote(, ) | ||
23 | - PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'` | ||
24 | + PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\.\w\s\/]+).;\s*/$1/);'` | ||
25 | changequote([, ]) | ||
26 | if test "x$PERLCC" != "x" ; then | ||
27 | AC_MSG_RESULT([$PERLCC]) | ||
28 | -- | ||
29 | 1.9.1 | ||
30 | |||
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0003-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0003-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch new file mode 100644 index 000000000..7951234a4 --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0003-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch | |||
@@ -0,0 +1,186 @@ | |||
1 | From e57fc809ad6ae522670f3dc157aadde20d968ca7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bart Van Assche <bvanassche@acm.org> | ||
3 | Date: Wed, 24 May 2017 17:05:03 +0800 | ||
4 | Subject: [PATCH 3/4] CHANGES: BUG: 2712: Fix Perl module compilation | ||
5 | |||
6 | Avoid that building the Net-SNMP Perl modules fails as follows: | ||
7 | |||
8 | ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assignment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229. | ||
9 | |||
10 | See also https://sourceforge.net/p/net-snmp/bugs/2712/. | ||
11 | |||
12 | This patch comes from git://git.code.sf.net/p/net-snmp/code, | ||
13 | the commit is 4e793461e96a2b4fd81142ab312d074d5c8841fa. | ||
14 | |||
15 | Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> | ||
16 | --- | ||
17 | perl/ASN/Makefile.PL | 4 +--- | ||
18 | perl/Makefile.PL | 4 +--- | ||
19 | perl/OID/Makefile.PL | 5 +---- | ||
20 | perl/SNMP/Makefile.PL | 5 +---- | ||
21 | perl/TrapReceiver/Makefile.PL | 5 +---- | ||
22 | perl/agent/Makefile.PL | 5 +---- | ||
23 | perl/agent/Support/Makefile.PL | 5 +---- | ||
24 | perl/agent/default_store/Makefile.PL | 5 +---- | ||
25 | perl/default_store/Makefile.PL | 5 +---- | ||
26 | 9 files changed, 9 insertions(+), 34 deletions(-) | ||
27 | |||
28 | diff --git a/perl/ASN/Makefile.PL b/perl/ASN/Makefile.PL | ||
29 | index 4576781..c33d8ba 100644 | ||
30 | --- a/perl/ASN/Makefile.PL | ||
31 | +++ b/perl/ASN/Makefile.PL | ||
32 | @@ -7,9 +7,7 @@ my $lib_version; | ||
33 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence | ||
34 | # the contents of the Makefile that is written. | ||
35 | |||
36 | -%MakeParams = InitMakeParams(); | ||
37 | - | ||
38 | -WriteMakefile(%MakeParams); | ||
39 | +WriteMakefile(InitMakeParams()); | ||
40 | |||
41 | Check_Version(); | ||
42 | |||
43 | diff --git a/perl/Makefile.PL b/perl/Makefile.PL | ||
44 | index 31fdc40..48aba2a 100644 | ||
45 | --- a/perl/Makefile.PL | ||
46 | +++ b/perl/Makefile.PL | ||
47 | @@ -3,9 +3,7 @@ use Config; | ||
48 | use Getopt::Long; | ||
49 | require 5; | ||
50 | |||
51 | -%MakeParams = InitMakeParams(); | ||
52 | - | ||
53 | -WriteMakefile(%MakeParams); | ||
54 | +WriteMakefile(InitMakeParams()); | ||
55 | |||
56 | sub InitMakeParams { | ||
57 | $nsconfig="net-snmp-config"; # in path by default | ||
58 | diff --git a/perl/OID/Makefile.PL b/perl/OID/Makefile.PL | ||
59 | index 6bb1616..2589985 100644 | ||
60 | --- a/perl/OID/Makefile.PL | ||
61 | +++ b/perl/OID/Makefile.PL | ||
62 | @@ -6,11 +6,8 @@ require 5; | ||
63 | use Config; | ||
64 | use Getopt::Long; | ||
65 | my $lib_version; | ||
66 | -my %MakeParams = (); | ||
67 | |||
68 | -%MakeParams = InitMakeParams(); | ||
69 | - | ||
70 | -WriteMakefile(%MakeParams); | ||
71 | +WriteMakefile(InitMakeParams()); | ||
72 | |||
73 | Check_Version(); | ||
74 | |||
75 | diff --git a/perl/SNMP/Makefile.PL b/perl/SNMP/Makefile.PL | ||
76 | index e617cb7..8aab9a9 100644 | ||
77 | --- a/perl/SNMP/Makefile.PL | ||
78 | +++ b/perl/SNMP/Makefile.PL | ||
79 | @@ -3,15 +3,12 @@ require 5; | ||
80 | use Config; | ||
81 | use Getopt::Long; | ||
82 | my $lib_version; | ||
83 | -my %MakeParams = (); | ||
84 | my $opts; | ||
85 | |||
86 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence | ||
87 | # the contents of the Makefile that is written. | ||
88 | |||
89 | -%MakeParams = InitMakeParams(); | ||
90 | - | ||
91 | -WriteMakefile(%MakeParams); | ||
92 | +WriteMakefile(InitMakeParams()); | ||
93 | |||
94 | Check_Version(); | ||
95 | |||
96 | diff --git a/perl/TrapReceiver/Makefile.PL b/perl/TrapReceiver/Makefile.PL | ||
97 | index 874ee21..7e9e58e 100644 | ||
98 | --- a/perl/TrapReceiver/Makefile.PL | ||
99 | +++ b/perl/TrapReceiver/Makefile.PL | ||
100 | @@ -3,11 +3,8 @@ require 5; | ||
101 | use Config; | ||
102 | use Getopt::Long; | ||
103 | my $lib_version; | ||
104 | -my %MakeParams = (); | ||
105 | |||
106 | -%MakeParams = InitMakeParams(); | ||
107 | - | ||
108 | -WriteMakefile(%MakeParams); | ||
109 | +WriteMakefile(InitMakeParams()); | ||
110 | |||
111 | Check_Version(); | ||
112 | |||
113 | diff --git a/perl/agent/Makefile.PL b/perl/agent/Makefile.PL | ||
114 | index 4f7bee3..003c0d1 100644 | ||
115 | --- a/perl/agent/Makefile.PL | ||
116 | +++ b/perl/agent/Makefile.PL | ||
117 | @@ -3,11 +3,8 @@ require 5; | ||
118 | use Config; | ||
119 | use Getopt::Long; | ||
120 | my $lib_version; | ||
121 | -my %MakeParams = (); | ||
122 | |||
123 | -%MakeParams = InitMakeParams(); | ||
124 | - | ||
125 | -WriteMakefile(%MakeParams); | ||
126 | +WriteMakefile(InitMakeParams()); | ||
127 | |||
128 | Check_Version(); | ||
129 | |||
130 | diff --git a/perl/agent/Support/Makefile.PL b/perl/agent/Support/Makefile.PL | ||
131 | index 48815b6..2325e10 100644 | ||
132 | --- a/perl/agent/Support/Makefile.PL | ||
133 | +++ b/perl/agent/Support/Makefile.PL | ||
134 | @@ -3,14 +3,11 @@ require 5; | ||
135 | use Config; | ||
136 | use Getopt::Long; | ||
137 | my $lib_version; | ||
138 | -my %MakeParams = (); | ||
139 | |||
140 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence | ||
141 | # the contents of the Makefile that is written. | ||
142 | |||
143 | -%MakeParams = InitMakeParams(); | ||
144 | - | ||
145 | -WriteMakefile(%MakeParams); | ||
146 | +WriteMakefile(InitMakeParams()); | ||
147 | |||
148 | Check_Version(); | ||
149 | |||
150 | diff --git a/perl/agent/default_store/Makefile.PL b/perl/agent/default_store/Makefile.PL | ||
151 | index ed6483a..31cfbee 100644 | ||
152 | --- a/perl/agent/default_store/Makefile.PL | ||
153 | +++ b/perl/agent/default_store/Makefile.PL | ||
154 | @@ -3,11 +3,8 @@ require 5; | ||
155 | use Config; | ||
156 | use Getopt::Long; | ||
157 | my $lib_version; | ||
158 | -my %MakeParams = (); | ||
159 | |||
160 | -%MakeParams = InitMakeParams(); | ||
161 | - | ||
162 | -WriteMakefile(%MakeParams); | ||
163 | +WriteMakefile(InitMakeParams()); | ||
164 | |||
165 | Check_Version(); | ||
166 | |||
167 | diff --git a/perl/default_store/Makefile.PL b/perl/default_store/Makefile.PL | ||
168 | index 7c671b8..01c8dd0 100644 | ||
169 | --- a/perl/default_store/Makefile.PL | ||
170 | +++ b/perl/default_store/Makefile.PL | ||
171 | @@ -3,11 +3,8 @@ require 5; | ||
172 | use Config; | ||
173 | use Getopt::Long; | ||
174 | my $lib_version; | ||
175 | -my %MakeParams = (); | ||
176 | |||
177 | -%MakeParams = InitMakeParams(); | ||
178 | - | ||
179 | -WriteMakefile(%MakeParams); | ||
180 | +WriteMakefile(InitMakeParams()); | ||
181 | |||
182 | |||
183 | sub InitMakeParams { | ||
184 | -- | ||
185 | 1.9.1 | ||
186 | |||
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch new file mode 100644 index 000000000..2b03f9e9a --- /dev/null +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0004-configure-fix-incorrect-variable.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 4ad98ef125eb4e7d7a1a93146042002f78254d36 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenlin Kang <wenlin.kang@windriver.com> | ||
3 | Date: Wed, 24 May 2017 17:10:20 +0800 | ||
4 | Subject: [PATCH 4/4] configure: fix incorrect variable | ||
5 | |||
6 | For cross compile platform, this variable will not be correct, so fix it. | ||
7 | |||
8 | Upstream-Status: Inappropriate [cross compile specific] | ||
9 | |||
10 | Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> | ||
11 | --- | ||
12 | Makefile.in | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/Makefile.in b/Makefile.in | ||
16 | index cfcdf73..164df05 100644 | ||
17 | --- a/Makefile.in | ||
18 | +++ b/Makefile.in | ||
19 | @@ -171,7 +171,7 @@ OTHERCLEANTODOS=perlclean @PYTHONCLEANTARGS@ cleanfeatures perlcleanfeatures pyt | ||
20 | # | ||
21 | # override LD_RUN_PATH to avoid dependencies on the build directory | ||
22 | perlmodules: perlmakefiles subdirs | ||
23 | - @(cd perl ; $(MAKE) LD_RUN_PATH="$(libdir):`$(PERL) -e 'use Config; print qq($$Config{archlibexp}/CORE);'`") ; \ | ||
24 | + @(cd perl ; $(MAKE) LD_RUN_PATH="$(libdir):`$(PERL) -e 'use Config; print qq($$Config{installprivlib}/CORE);'`") ; \ | ||
25 | if test $$? != 0 ; then \ | ||
26 | exit 1 ; \ | ||
27 | fi | ||
28 | -- | ||
29 | 1.9.1 | ||
30 | |||