summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2012-12-03 18:22:27 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-06 12:30:35 +0000
commitc5f14ef7797394bcee1b0e295cc2dac4b62e55e2 (patch)
treeec3263080a1b4344f56bd72746785e3c5a04b7e7 /meta
parenta0b553bf00f819c3f0d6744461189179f578a75e (diff)
downloadopenembedded-core-c5f14ef7797394bcee1b0e295cc2dac4b62e55e2.tar.gz
openembedded-core-c5f14ef7797394bcee1b0e295cc2dac4b62e55e2.tar.bz2
openembedded-core-c5f14ef7797394bcee1b0e295cc2dac4b62e55e2.zip
pth: add pkgconfig support
Add pkgconfig support to pth. [YOCTO #2453] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch105
-rw-r--r--meta/recipes-support/pth/pth_2.0.7.bb7
2 files changed, 109 insertions, 3 deletions
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 0000000000..67a28ab77a
--- /dev/null
+++ b/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
@@ -0,0 +1,105 @@
+Upstream-Status: Pending
+
+Add pkgconfig support to pth.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+Index: Makefile.in
+===========================================================
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -47,6 +47,9 @@ datadir = @datadir@
+
+ DESTDIR =
+
++pkgconfigdir = ${libdir}/pkgconfig
++pkgconfig_DATA = pth.pc
++
+ ##
+ ## ____ TOOL DEFINITIONS ___________________________________________
+ ##
+@@ -216,7 +219,7 @@ test_pthread: test_pthread.o test_common.o libpthread.la
+
+ # install the package
+ install: all-for-install
+- @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@
++ @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
+ @touch .done-install >/dev/null 2>&1 || $(TRUE)
+ @$(MAKE) $(MKFLAGS) what-next
+ install-dirs:
+@@ -227,6 +230,7 @@ install-dirs:
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)/aclocal
++ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(pkgconfigdir)
+ install-pth:
+ $(SHTOOL) install -c -m 755 pth-config $(DESTDIR)$(bindir)/pth-config
+ $(SHTOOL) install -c -m 644 $(S)pth-config.1 $(DESTDIR)$(mandir)/man1/pth-config.1
+@@ -242,12 +246,16 @@ install-pthread:
+ $(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3
+ @umask 022; $(LIBTOOL) --mode=install \
+ $(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la
++install-pkgconfigDATA: $(pkgconfig_DATA)
++ $(SHTOOL) install -c -m 644 $(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
+
+ # uninstall the package
+ uninstall:
+- @$(MAKE) $(MKFLAGS) @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
++ @$(MAKE) $(MKFLAGS) uninstall-pkgconfigDATA @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
+ @touch .done-uninstall >/dev/null 2>&1 || $(TRUE)
+ @$(MAKE) $(MKFLAGS) what-next
++uninstall-pkgconfigDATA:
++ $(RM) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
+ uninstall-pthread:
+ $(RM) $(DESTDIR)$(bindir)/pthread-config
+ $(RM) $(DESTDIR)$(mandir)/man1/pthread-config.1
+@@ -271,6 +279,7 @@ uninstall-dirs:
+ -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
++ -$(RMDIR) $(DESTDIR)$(pkgconfigdir) > /dev/null 2>&1 ||$(TRUE)
+
+ # strip down the source tree to its minimum
+ striptease:
+Index: configure.ac
+===========================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -656,6 +656,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}
+--
+1.7.5.4
+
diff --git a/meta/recipes-support/pth/pth_2.0.7.bb b/meta/recipes-support/pth/pth_2.0.7.bb
index 83a03b334f..fc9ed16aca 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,17 @@ 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
}