summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
blob: afaa3bea9bfcf121e89f7d0fe4e399dcab3464dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From 2796129af52901dd68595e5e88a639308541def9 Mon Sep 17 00:00:00 2001
From: Fabio Berton <fabio.berton@ossystems.com.br>
Date: Thu, 3 Nov 2016 17:56:29 -0200
Subject: [PATCH] libpcap: pkgconfig support
Organization: O.S. Systems Software LTDA.

Adding basic structure to support pkg-config.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
---
 Makefile.in   |  5 +++++
 configure.ac  |  1 +
 libpcap.pc.in | 10 ++++++++++
 3 files changed, 16 insertions(+)
 create mode 100644 libpcap.pc.in

diff --git a/Makefile.in b/Makefile.in
index e71d973..d7004ed 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -61,6 +61,10 @@ V_RPATH_OPT = @V_RPATH_OPT@
 DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
 PROG=libpcap
 
+# pkgconfig support
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libpcap.pc
+
 # Standard CFLAGS
 FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
 
@@ -286,6 +290,7 @@ EXTRA_DIST = \
 	lbl/os-solaris2.h \
 	lbl/os-sunos4.h \
 	lbl/os-ultrix4.h \
+	libpcap.pc \
 	missing/getopt.c \
 	missing/getopt.h \
 	missing/snprintf.c \
diff --git a/configure.ac b/configure.ac
index da2f940..4fc67bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1805,6 +1805,7 @@ fi
 AC_PROG_INSTALL
 
 AC_CONFIG_HEADER(config.h)
+AC_CONFIG_FILES([libpcap.pc])
 
 AC_OUTPUT_COMMANDS([if test -f .devel; then
 	echo timestamp > stamp-h
diff --git a/libpcap.pc.in b/libpcap.pc.in
new file mode 100644
index 0000000..4f78ad8
--- /dev/null
+++ b/libpcap.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libpcap
+Description: System-independent interface for user-level packet capture.
+Version: @VERSION@
+Libs: -L${libdir} -lpcap
+Cflags: -I${includedir}
-- 
2.1.4