From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org,
Joe MacDonald <joe_macdonald@mentor.com>
Cc: openembedded-commits@lists.openembedded.org
Subject: Re: [oe-commits] Joe MacDonald : libpcap: add pkg-config support
Date: Sun, 1 Mar 2015 08:37:08 +0100 [thread overview]
Message-ID: <20150301073708.GS2309@jama> (raw)
In-Reply-To: <20150301073455.1C4FA502DD@opal.openembedded.org>
[-- Attachment #1: Type: text/plain, Size: 5452 bytes --]
On Sun, Mar 01, 2015 at 07:34:55AM +0000, git@git.openembedded.org wrote:
> Module: openembedded-core.git
> Branch: master-next
> Commit: 0f51c1260ac53aa4843e29b00cd600eb64074260
> URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0f51c1260ac53aa4843e29b00cd600eb64074260
>
> Author: Joe MacDonald <joe_macdonald@mentor.com>
> Date: Tue Feb 24 23:39:01 2015 -0500
>
> libpcap: add pkg-config support
>
> libpcap was not previously installing a pkg-config file. Add a basic one
> that will allow using 'pkg-config --libs libpcap', for example, in recipes
> rather than 'pcap-config', which frequently returns incorrect information.
>
> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> ---
>
> meta/recipes-connectivity/libpcap/libpcap.inc | 2 +-
> .../libpcap/libpcap-pkgconfig-support.patch | 71 ++++++++++++++++++++++
> meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb | 6 +-
> 3 files changed, 77 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
> index 979665c..0c608b5 100644
> --- a/meta/recipes-connectivity/libpcap/libpcap.inc
> +++ b/meta/recipes-connectivity/libpcap/libpcap.inc
> @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
> file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
> DEPENDS = "flex-native bison-native"
>
> -inherit bluetooth
> +inherit bluetooth pkgconfig
>
> PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
> PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
> diff --git a/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch b/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
> new file mode 100644
> index 0000000..9cfb9df
> --- /dev/null
> +++ b/meta/recipes-connectivity/libpcap/libpcap/libpcap-pkgconfig-support.patch
> @@ -0,0 +1,71 @@
> +From 8887132e85892a72a84ca3878e60f254ad2ce939 Mon Sep 17 00:00:00 2001
> +From: Joe MacDonald <joe_macdonald@mentor.com>
> +Date: Tue, 24 Feb 2015 15:56:06 -0500
> +Subject: [PATCH] libpcap: pkgconfig support
> +
> +Adding basic structure to support pkg-config.
> +
> +Upstream-status: Inappropriate [embedded specific]
Is this really embedded specific? It looks like useful patch for
upstream.
> +
> +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
> +---
> + Makefile.in | 5 +++++
> + configure.in | 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 1c2d745..1f25faf 100644
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -60,6 +60,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)
> +
> +@@ -275,6 +279,7 @@ EXTRA_DIST = \
> + lbl/os-solaris2.h \
> + lbl/os-sunos4.h \
> + lbl/os-ultrix4.h \
> ++ libpcap.pc \
> + missing/snprintf.c \
> + mkdep \
> + msdos/bin2c.c \
> +diff --git a/configure.in b/configure.in
> +index 8f5c86b..fb51b35 100644
> +--- a/configure.in
> ++++ b/configure.in
> +@@ -1700,6 +1700,7 @@ esac
> + 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}
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
> index a2d5ef4..611543e 100644
> --- a/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
> +++ b/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
> @@ -1,6 +1,8 @@
> require libpcap.inc
>
> -SRC_URI += "file://aclocal.patch"
> +SRC_URI += "file://aclocal.patch \
> + file://libpcap-pkgconfig-support.patch \
> + "
> SRC_URI[md5sum] = "5f14191c1a684a75532c739c2c4059fa"
> SRC_URI[sha256sum] = "5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690"
>
> @@ -19,4 +21,6 @@ do_install_prepend () {
> install -d ${D}${bindir}
> oe_runmake install-shared DESTDIR=${D}
> oe_libinstall -a -so libpcap ${D}${libdir}
> + sed "s|@VERSION@|${PV}|" -i ${B}/libpcap.pc
> + install -D -m 0644 libpcap.pc ${D}${libdir}/pkgconfig/libpcap.pc
> }
>
> --
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
parent reply other threads:[~2015-03-01 7:36 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20150301073455.1C4FA502DD@opal.openembedded.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150301073708.GS2309@jama \
--to=martin.jansa@gmail.com \
--cc=joe_macdonald@mentor.com \
--cc=openembedded-commits@lists.openembedded.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.