summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorJeremy Puhlman <jpuhlman@mvista.com>2020-02-19 16:29:12 -0800
committerKhem Raj <raj.khem@gmail.com>2020-02-20 08:22:38 -0800
commitfd53a1ab86839930219017c16d4441289e4cace6 (patch)
tree323bec97119b8ae9da6cab1abfdf739915255cfa /meta-networking
parent883966a8bf4dede057559d8fb903494f797cf3b5 (diff)
downloadmeta-openembedded-fd53a1ab86839930219017c16d4441289e4cace6.tar.gz
net-snmp: Add pkgconfig file support
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-pkg-config-support-for-building-applications-and.patch170
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb1
2 files changed, 171 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-pkg-config-support-for-building-applications-and.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-pkg-config-support-for-building-applications-and.patch
new file mode 100644
index 000000000..6cb9588eb
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-pkg-config-support-for-building-applications-and.patch
@@ -0,0 +1,170 @@
1From aea8c2f0bf8004c8da8ca9acb04ab07798cd8068 Mon Sep 17 00:00:00 2001
2From: Hugh McMaster <hugh.mcmaster@outlook.com>
3Date: Wed, 3 Apr 2019 21:36:03 +1100
4Subject: [PATCH] Add pkg-config support for building applications and
5 sub-agents
6
7The netsnmp package should be used when building Net-SNMP applications.
8The netsnmp-agent package should be used when building Net-SNMP subagents.
9
10Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
11[ bvanassche: edited makefile code and .pc files; added ./configure changes ]
12
13
14Upstream-Status: Backport
15https://sourceforge.net/p/net-snmp/patches/_discuss/thread/a0d66e91dd/f940/attachment/0001-Add-pkg-config-support-for-building-applications-and.patch
16
17---
18 Makefile.in | 2 ++
19 Makefile.rules | 30 ++++++++++++++++++++++++++----
20 configure | 4 ++++
21 configure.ac | 1 +
22 netsnmp-agent.pc.in | 12 ++++++++++++
23 netsnmp.pc.in | 12 ++++++++++++
24 6 files changed, 57 insertions(+), 4 deletions(-)
25 create mode 100644 netsnmp-agent.pc.in
26 create mode 100644 netsnmp.pc.in
27
28diff --git a/Makefile.in b/Makefile.in
29index 9dbdde1353b1..ec972636c279 100644
30--- a/Makefile.in
31+++ b/Makefile.in
32@@ -35,6 +35,7 @@ INSTALLBUILTHEADERS=include/net-snmp/net-snmp-config.h
33 INSTALLBUILTINCLUDEHEADERS=@FEATUREHEADERS@
34 INSTALLBINSCRIPTS=net-snmp-config net-snmp-create-v3-user
35 INSTALLUCDHEADERS=ucd-snmp-config.h version.h mib_module_config.h
36+INSTALL_PKGCONFIG=netsnmp.pc netsnmp-agent.pc
37
38 #
39 # other install rules.
40@@ -275,6 +276,7 @@ configclean: makefileclean
41 libtool include/net-snmp/net-snmp-config.h \
42 net-snmp-config net-snmp-config-x configure-summary \
43 net-snmp-create-v3-user net-snmp-create-v3-user-x
44+ rm -f *.pc
45 rm -f mibs/.index
46 rm -f include/net-snmp/agent/mib_module_config.h \
47 include/net-snmp/agent/agent_module_config.h \
48diff --git a/Makefile.rules b/Makefile.rules
49index 9e9e9009e5d2..e714f91e725e 100644
50--- a/Makefile.rules
51+++ b/Makefile.rules
52@@ -85,12 +85,14 @@ subdirs:
53 # installlibs handles local, ucd and subdir libs. need to do subdir libs
54 # before bins, sinze those libs may be needed for successful linking
55 install: installlocalheaders @installucdheaders@ \
56- installlibs \
57- installlocalbin installlocalsbin \
58+ installlibs install_pkgconfig \
59+ installlocalbin installlocalsbin \
60 installsubdirs $(OTHERINSTALL)
61
62-uninstall: uninstalllibs uninstallbin uninstallsbin uninstallheaders \
63- uninstallsubdirs $(OTHERUNINSTALL)
64+uninstall: uninstalllibs uninstall_pkgconfig \
65+ uninstallbin uninstallsbin \
66+ uninstallheaders \
67+ uninstallsubdirs $(OTHERUNINSTALL)
68
69 installprogs: installbin installsbin
70
71@@ -287,6 +289,26 @@ uninstalllibs:
72 done \
73 fi
74
75+#
76+# pkg-config files
77+#
78+install_pkgconfig: $(INSTALL_PKGCONFIG)
79+ @if test "x$(INSTALL_PKGCONFIG)" != x; then \
80+ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(libdir)/pkgconfig; \
81+ for i in $(INSTALL_PKGCONFIG); do \
82+ echo "installing $$i in $(INSTALL_PREFIX)$(libdir)/pkgconfig"; \
83+ done; \
84+ $(INSTALL) $(INSTALL_PKGCONFIG) $(INSTALL_PREFIX)$(libdir)/pkgconfig; \
85+ fi
86+
87+uninstall_pkgconfig:
88+ @if test "x$(INSTALL_PKGCONFIG)" != x; then \
89+ for i in $(INSTALL_PKGCONFIG); do \
90+ echo "removing $$i from $(INSTALL_PREFIX)$(libdir)/pkgconfig"; \
91+ $(UNINSTALL) $(INSTALL_PREFIX)$(libdir)/pkgconfig/$$i;\
92+ done; \
93+ fi
94+
95 #
96 # normal bin binaries
97 #
98diff --git a/configure b/configure
99index 5ec44f5ce082..5103a4dc9d88 100755
100--- a/configure
101+++ b/configure
102@@ -30422,6 +30422,8 @@ ac_config_files="$ac_config_files net-snmp-config:net-snmp-config.in"
103
104 ac_config_files="$ac_config_files net-snmp-create-v3-user:net-snmp-create-v3-user.in"
105
106+ac_config_files="$ac_config_files netsnmp.pc:netsnmp.pc.in netsnmp-agent.pc:netsnmp-agent.pc.in"
107+
108 ac_config_files="$ac_config_files dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in"
109
110 ac_config_files="$ac_config_files local/snmpconf"
111@@ -31445,6 +31447,8 @@ do
112 "mibs/Makefile") CONFIG_FILES="$CONFIG_FILES mibs/Makefile:Makefile.top:mibs/Makefile.in:Makefile.rules" ;;
113 "net-snmp-config") CONFIG_FILES="$CONFIG_FILES net-snmp-config:net-snmp-config.in" ;;
114 "net-snmp-create-v3-user") CONFIG_FILES="$CONFIG_FILES net-snmp-create-v3-user:net-snmp-create-v3-user.in" ;;
115+ "netsnmp.pc") CONFIG_FILES="$CONFIG_FILES netsnmp.pc:netsnmp.pc.in" ;;
116+ "netsnmp-agent.pc") CONFIG_FILES="$CONFIG_FILES netsnmp-agent.pc:netsnmp-agent.pc.in" ;;
117 "dist/generation-scripts/gen-variables") CONFIG_FILES="$CONFIG_FILES dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in" ;;
118 "local/snmpconf") CONFIG_FILES="$CONFIG_FILES local/snmpconf" ;;
119 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
120diff --git a/configure.ac b/configure.ac
121index 4c4dce09d488..d62a02da5d88 100644
122--- a/configure.ac
123+++ b/configure.ac
124@@ -136,6 +136,7 @@ AC_CONFIG_FILES([net-snmp-config:net-snmp-config.in],
125 [chmod +x net-snmp-config])
126 AC_CONFIG_FILES([net-snmp-create-v3-user:net-snmp-create-v3-user.in],
127 [chmod +x net-snmp-create-v3-user])
128+AC_CONFIG_FILES([netsnmp.pc:netsnmp.pc.in netsnmp-agent.pc:netsnmp-agent.pc.in])
129 AC_CONFIG_FILES([dist/generation-scripts/gen-variables:dist/generation-scripts/gen-variables.in])
130 AC_CONFIG_FILES([local/snmpconf])
131
132diff --git a/netsnmp-agent.pc.in b/netsnmp-agent.pc.in
133new file mode 100644
134index 000000000000..3a1c77bbf814
135--- /dev/null
136+++ b/netsnmp-agent.pc.in
137@@ -0,0 +1,12 @@
138+prefix=@prefix@
139+exec_prefix=@exec_prefix@
140+includedir=@includedir@
141+libdir=@libdir@
142+
143+Name: netsnmp-agent (@PACKAGE_NAME@)
144+Description: SNMP (Simple Network Management Protocol) sub-agent SDK.
145+URL: http://www.net-snmp.org
146+Version: @PACKAGE_VERSION@
147+Cflags: -I${includedir}
148+Libs: -L${libdir} -lnetsnmpmibs -lnetsnmpagent -lnetsnmp
149+Libs.private: @LDFLAGS@ @LMIBLIBS@ @LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@ @LNETSNMPLIBS@ @LIBS@
150diff --git a/netsnmp.pc.in b/netsnmp.pc.in
151new file mode 100644
152index 000000000000..0a1f5785a4f4
153--- /dev/null
154+++ b/netsnmp.pc.in
155@@ -0,0 +1,12 @@
156+prefix=@prefix@
157+exec_prefix=@exec_prefix@
158+includedir=@includedir@
159+libdir=@libdir@
160+
161+Name: netsnmp (@PACKAGE_NAME@)
162+Description: SNMP (Simple Network Management Protocol) daemon and applications.
163+URL: http://www.net-snmp.org
164+Version: @PACKAGE_VERSION@
165+Cflags: -I${includedir}
166+Libs: -L${libdir} -lnetsnmp
167+Libs.private: @LDFLAGS@ @LNETSNMPLIBS@ @LIBS@ @PERLLDOPTS_FOR_APPS@
168--
1692.21.0.196.g041f5ea1cf98
170
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
index 192b6b506..317350e94 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
@@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
27 file://reproducibility-have-printcap.patch \ 27 file://reproducibility-have-printcap.patch \
28 file://reproducibility-accept-configure-options-from-env.patch \ 28 file://reproducibility-accept-configure-options-from-env.patch \
29 file://0001-net-snmp-fix-compile-error-disable-des.patch \ 29 file://0001-net-snmp-fix-compile-error-disable-des.patch \
30 file://0001-Add-pkg-config-support-for-building-applications-and.patch \
30 " 31 "
31SRC_URI[md5sum] = "63bfc65fbb86cdb616598df1aff6458a" 32SRC_URI[md5sum] = "63bfc65fbb86cdb616598df1aff6458a"
32SRC_URI[sha256sum] = "b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf" 33SRC_URI[sha256sum] = "b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf"