Patchwork [3/4] pth: add pkgconfig support

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Nov. 26, 2012, 9:36 a.m.
Message ID <a530860b0ad79ae553563108eabb8dd042ac46a7.1353582422.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/39571/
State New
Headers show

Comments

Qi.Chen@windriver.com - Nov. 26, 2012, 9:36 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Add pkgconfig support for pth

[YOCTO# 2453]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../pth/files/pth-add-pkgconfig-support.patch      |   44 ++++++++++++++++++++
 meta/recipes-support/pth/pth_2.0.7.bb              |   12 ++++--
 2 files changed, 53 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch

Patch

diff --git a/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch b/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
new file mode 100644
index 0000000..b92c977
--- /dev/null
+++ b/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
@@ -0,0 +1,44 @@ 
+Upstream-Status: Inappropriate [distribution]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+Index: configure.ac
+==========================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -656,6 +657,13 @@ pth_acmac.h dnl
+ chmod +rx pthread-config
+ chmod +rx pth-config
+ )dnl
++
++PTH_VERSION=`echo $PTH_VERSION_STR | cut -d' ' -f1`
++AC_SUBST(PTH_VERSION)
++
++AC_CONFIG_FILES([pth.pc])
++AC_OUTPUT
++
+ if test ".$enable_pthread" = .no; then
+     rm -f pthread-config
+     rm -f pthread.h
+
+Index: pth.pc.in
+=========================================================
+--- /dev/null
++++ b/pth.pc.in
+@@ -0,0 +1,16 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++bindir=@bindir@
++mandir=@mandir@
++datadir=@datadir@
++acdir=@datadir@/aclocal
++
++Name: pth
++Description: GNU Portable Threads
++Requires:
++Version: @PTH_VERSION@
++Libs: -L${libdir} -lpth
++Libs.private: 
++Cflags: -I${includedir}
diff --git a/meta/recipes-support/pth/pth_2.0.7.bb b/meta/recipes-support/pth/pth_2.0.7.bb
index 83a03b3..e1119c3 100644
--- a/meta/recipes-support/pth/pth_2.0.7.bb
+++ b/meta/recipes-support/pth/pth_2.0.7.bb
@@ -3,7 +3,7 @@  HOMEPAGE = "http://www.gnu.org/software/pth/"
 SECTION = "libs"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;beginline=12;endline=15;md5=a48af114a80c222cafd37f24370a77b1"
-PR = "r2"
+PR = "r3"
 
 python __anonymous () {
     import re
@@ -13,16 +13,22 @@  python __anonymous () {
 }
 
 SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz \
-          "
+          file://pth-add-pkgconfig-support.patch"
 
 SRC_URI[md5sum] = "9cb4a25331a4c4db866a31cbe507c793"
 SRC_URI[sha256sum] = "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232"
 
 PARALLEL_MAKE=""
 
-inherit autotools binconfig
+inherit autotools binconfig pkgconfig
 
 do_configure() {
 	gnu-configize
+	autoconf
 	oe_runconf
 }
+
+do_install_append() {
+	install -d ${D}/${libdir}/pkgconfig
+	install -m 0644 ${S}/pth.pc ${D}/${libdir}/pkgconfig/
+}