diff options
5 files changed, 327 insertions, 5 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 | |||
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb index b60a246a5..2d6887e37 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | |||
@@ -26,11 +26,15 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \ | |||
26 | file://0001-get_pid_from_inode-Include-limit.h.patch \ | 26 | file://0001-get_pid_from_inode-Include-limit.h.patch \ |
27 | file://0001-BUG-a2584-Fix-snmptrap-to-use-clientaddr-from-snmp.c.patch \ | 27 | file://0001-BUG-a2584-Fix-snmptrap-to-use-clientaddr-from-snmp.c.patch \ |
28 | file://0001-snmplib-UDPIPv6-transport-Add-a-missing-return-state.patch \ | 28 | file://0001-snmplib-UDPIPv6-transport-Add-a-missing-return-state.patch \ |
29 | file://0001-configure-fix-check-for-enable-perl-cc-checks.patch \ | ||
30 | file://0002-configure-fix-a-cc-check-issue.patch \ | ||
31 | file://0003-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch \ | ||
32 | file://0004-configure-fix-incorrect-variable.patch \ | ||
29 | " | 33 | " |
30 | SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee" | 34 | SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee" |
31 | SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e" | 35 | SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e" |
32 | 36 | ||
33 | inherit autotools update-rc.d siteinfo systemd pkgconfig | 37 | inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative |
34 | 38 | ||
35 | EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'" | 39 | EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'" |
36 | 40 | ||
@@ -46,8 +50,10 @@ PACKAGECONFIG[libnl] = "--with-nl, --without-nl, libnl" | |||
46 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | 50 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
47 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," | 51 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," |
48 | 52 | ||
49 | EXTRA_OECONF = "--disable-embedded-perl \ | 53 | PACKAGECONFIG[perl] = "--enable-embedded-perl --with-perl-modules=yes, --disable-embedded-perl --with-perl-modules=no,\ |
50 | --with-perl-modules=no \ | 54 | perl, perl perl-lib" |
55 | |||
56 | EXTRA_OECONF = "--enable-shared \ | ||
51 | --disable-manuals \ | 57 | --disable-manuals \ |
52 | --with-defaults \ | 58 | --with-defaults \ |
53 | --with-install-prefix=${D} \ | 59 | --with-install-prefix=${D} \ |
@@ -63,12 +69,38 @@ CACHED_CONFIGUREVARS = " \ | |||
63 | ac_cv_ETC_MNTTAB=/etc/mtab \ | 69 | ac_cv_ETC_MNTTAB=/etc/mtab \ |
64 | lt_cv_shlibpath_overrides_runpath=yes \ | 70 | lt_cv_shlibpath_overrides_runpath=yes \ |
65 | " | 71 | " |
72 | export PERLPROG="${bindir}/env perl" | ||
73 | PERLPROG_append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', '', d)}" | ||
74 | |||
75 | HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}" | ||
66 | 76 | ||
67 | do_configure_prepend() { | 77 | do_configure_prepend() { |
68 | export PERLPROG="${bindir}/env perl" | ||
69 | sed -i -e "s|I/usr/include|I${STAGING_INCDIR}|g" \ | 78 | sed -i -e "s|I/usr/include|I${STAGING_INCDIR}|g" \ |
70 | "${S}"/configure \ | 79 | "${S}"/configure \ |
71 | "${S}"/configure.d/config_os_libs2 | 80 | "${S}"/configure.d/config_os_libs2 |
81 | |||
82 | if [ "${HAS_PERL}" = "1" ]; then | ||
83 | # this may need to be changed when package perl has any change. | ||
84 | cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl/*/Config.pm ${WORKDIR}/ | ||
85 | cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl/*/Config_heavy.pl ${WORKDIR}/ | ||
86 | sed -e "s@libpth => '/usr/lib.*@libpth => '${STAGING_DIR_TARGET}/${libdir} ${STAGING_DIR_TARGET}/${base_libdir}',@g" \ | ||
87 | -e "s@privlibexp => '/usr@privlibexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
88 | -e "s@scriptdir => '/usr@scriptdir => '${STAGING_DIR_TARGET}/usr@g" \ | ||
89 | -e "s@sitearchexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
90 | -e "s@sitelibexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
91 | -e "s@vendorarchexp => '/usr@vendorarchexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
92 | -e "s@vendorlibexp => '/usr@vendorlibexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
93 | -i ${WORKDIR}/Config.pm | ||
94 | fi | ||
95 | |||
96 | } | ||
97 | |||
98 | do_configure_append() { | ||
99 | if [ "${HAS_PERL}" = "1" ]; then | ||
100 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=${STAGING_DIR_TARGET}\$\{includedir\}@g" \ | ||
101 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L${STAGING_DIR_TARGET}\$\{libdir\}@g" \ | ||
102 | -i ${B}/net-snmp-config | ||
103 | fi | ||
72 | } | 104 | } |
73 | 105 | ||
74 | do_install_append() { | 106 | do_install_append() { |
@@ -84,6 +116,12 @@ do_install_append() { | |||
84 | -i ${D}${bindir}/net-snmp-create-v3-user | 116 | -i ${D}${bindir}/net-snmp-create-v3-user |
85 | sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \ | 117 | sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \ |
86 | -i ${D}${bindir}/net-snmp-config | 118 | -i ${D}${bindir}/net-snmp-config |
119 | |||
120 | if [ "${HAS_PERL}" = "1" ]; then | ||
121 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \ | ||
122 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \ | ||
123 | -i ${D}${bindir}/net-snmp-config | ||
124 | fi | ||
87 | } | 125 | } |
88 | 126 | ||
89 | do_install_ptest() { | 127 | do_install_ptest() { |
@@ -122,9 +160,14 @@ net_snmp_sysroot_preprocess () { | |||
122 | 160 | ||
123 | PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd" | 161 | PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd" |
124 | 162 | ||
163 | # perl module | ||
164 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl-modules', '', d)}" | ||
165 | |||
125 | ALLOW_EMPTY_${PN} = "1" | 166 | ALLOW_EMPTY_${PN} = "1" |
126 | ALLOW_EMPTY_${PN}-server = "1" | 167 | ALLOW_EMPTY_${PN}-server = "1" |
127 | 168 | ||
169 | FILES_${PN}-perl-modules = "${libdir}/perl/*" | ||
170 | |||
128 | FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}" | 171 | FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}" |
129 | FILES_${PN}-mibs = "${datadir}/snmp/mibs" | 172 | FILES_${PN}-mibs = "${datadir}/snmp/mibs" |
130 | FILES_${PN}-server-snmpd = "${sbindir}/snmpd \ | 173 | FILES_${PN}-server-snmpd = "${sbindir}/snmpd \ |
@@ -158,11 +201,13 @@ SYSTEMD_PACKAGES = "${PN}-server-snmpd \ | |||
158 | SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service" | 201 | SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service" |
159 | SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service" | 202 | SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service" |
160 | 203 | ||
204 | RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'net-snmp-perl-modules', '', d)}" | ||
161 | RDEPENDS_${PN} += "net-snmp-client" | 205 | RDEPENDS_${PN} += "net-snmp-client" |
162 | RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs" | 206 | RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs" |
163 | RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd" | 207 | RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd" |
164 | RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" | 208 | RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" |
165 | RDEPENDS_${PN}-client += "net-snmp-mibs" | 209 | RDEPENDS_${PN}-client += "net-snmp-mibs net-snmp-libs" |
210 | RDEPENDS_${PN}-libs += "libpci" | ||
166 | RDEPENDS_${PN}-ptest += "perl \ | 211 | RDEPENDS_${PN}-ptest += "perl \ |
167 | perl-module-test \ | 212 | perl-module-test \ |
168 | perl-module-file-basename \ | 213 | perl-module-file-basename \ |