summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-06-04 15:09:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-18 17:32:30 +0100
commit83b53d32eb57c644d5a03a4b278d717a81ca7375 (patch)
tree0e8ee7eb7dd6b0e37fe2a7dc8ff932fdadbb7e29 /meta/recipes-extended
parentde8b25deb349e55167deb9d1a0048681d6ed0612 (diff)
downloadpoky-83b53d32eb57c644d5a03a4b278d717a81ca7375.tar.gz
libzypp: Fix build with uclibc
cstdio is included indrectly with eglibc based systems but not with uclibc based systems and use of functions like ::eof are then reported as warnings. Therefore we include cstdio explicitly. (From OE-Core rev: c9c74b1316aa671e7106962c9dae5b6046cd9946) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/libzypp/libzypp/cstdio.patch49
-rw-r--r--meta/recipes-extended/libzypp/libzypp_git.bb10
2 files changed, 57 insertions, 2 deletions
diff --git a/meta/recipes-extended/libzypp/libzypp/cstdio.patch b/meta/recipes-extended/libzypp/libzypp/cstdio.patch
new file mode 100644
index 0000000000..a021d589d3
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/cstdio.patch
@@ -0,0 +1,49 @@
1include cstdio to get definitions of ::xxx functions which
2are now reported by gcc-4.7 as wanrings and warnings are treated
3as errors
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6Upstream-Status: Pending
7
8Index: git/zypp/ExternalProgram.cc
9===================================================================
10--- git.orig/zypp/ExternalProgram.cc 2012-06-01 16:25:17.098304709 -0700
11+++ git/zypp/ExternalProgram.cc 2012-06-01 16:25:37.254305681 -0700
12@@ -22,6 +22,7 @@
13 #include <cstring> // strsignal
14 #include <iostream>
15 #include <sstream>
16+#include <cstdio>
17
18 #include "zypp/base/Logger.h"
19 #include "zypp/base/String.h"
20Index: git/zypp/PluginScript.cc
21===================================================================
22--- git.orig/zypp/PluginScript.cc 2012-06-01 16:21:37.814294089 -0700
23+++ git/zypp/PluginScript.cc 2012-06-01 16:24:41.002302961 -0700
24@@ -14,6 +14,7 @@
25
26 #include <iostream>
27 #include <sstream>
28+#include <cstdio>
29
30 #include "zypp/base/LogTools.h"
31 #include "zypp/base/DefaultIntegral.h"
32@@ -336,7 +337,7 @@
33 if ( fd == -1 )
34 ZYPP_THROW( PluginScriptException( "Bad file descriptor" ) );
35
36- ::clearerr( filep );
37+ std::clearerr( filep );
38 std::string data;
39 {
40 PluginDebugBuffer _debug( data ); // dump receive buffer if PLUGIN_DEBUG
41@@ -370,7 +371,7 @@
42 int retval = select( fd+1, &rfds, NULL, NULL, &tv );
43 if ( retval > 0 ) // FD_ISSET( fd, &rfds ) will be true.
44 {
45- ::clearerr( filep );
46+ std::clearerr( filep );
47 }
48 else if ( retval == 0 )
49 {
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index 9375640a14..3a323e7e15 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -11,7 +11,7 @@ DEPENDS = "rpm boost curl libxml2 zlib sat-solver expat openssl udev libproxy"
11S = "${WORKDIR}/git" 11S = "${WORKDIR}/git"
12SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433" 12SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433"
13PV = "0.0-git${SRCPV}" 13PV = "0.0-git${SRCPV}"
14PR = "r22" 14PR = "r23"
15 15
16SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \ 16SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \
17 file://no-doc.patch \ 17 file://no-doc.patch \
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \
24 file://hardcode-lib-fix.patch \ 24 file://hardcode-lib-fix.patch \
25 file://close.patch \ 25 file://close.patch \
26 file://libzypp-rpm549.patch \ 26 file://libzypp-rpm549.patch \
27 file://cstdio.patch \
27 " 28 "
28 29
29SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" 30SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
@@ -32,7 +33,10 @@ SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
32SRC_URI_append_arm = " file://arm-workaround-global-constructor.patch" 33SRC_URI_append_arm = " file://arm-workaround-global-constructor.patch"
33 34
34# rpmdb2solv from sat-solver is run from libzypp 35# rpmdb2solv from sat-solver is run from libzypp
35RDEPENDS_${PN} = "sat-solver rpm-libs gzip gnupg" 36RDEPENDS_${PN} = "sat-solver rpm-libs gzip ${RDEPGNUPG}"
37
38RDEPGNUPG = "gnupg"
39RDEPGNUPG_libc-uclibc = ""
36 40
37PACKAGES =+ "${PN}-pkgmgt" 41PACKAGES =+ "${PN}-pkgmgt"
38 42
@@ -47,6 +51,8 @@ FILES_${PN}-pkgmgt = "${bindir}/package-manager \
47EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" 51EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
48OECMAKE_CXX_LINK_FLAGS_libc-uclibc += "-pthread" 52OECMAKE_CXX_LINK_FLAGS_libc-uclibc += "-pthread"
49 53
54LDFLAGS += "-lpthread"
55
50PACKAGE_ARCH = "${MACHINE_ARCH}" 56PACKAGE_ARCH = "${MACHINE_ARCH}"
51 57
52AVOID_CONSTRUCTOR = "" 58AVOID_CONSTRUCTOR = ""