diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-12-02 05:35:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-12-02 05:35:17 +0000 |
commit | f371bc98edde4c61b4ae5b4c384c7499e4a09e3a (patch) | |
tree | 15799fe22bc12cf62319c9ff1972d9825daa6407 /sys-block | |
parent | Whitespace (diff) | |
download | gentoo-2-f371bc98edde4c61b4ae5b4c384c7499e4a09e3a.tar.gz gentoo-2-f371bc98edde4c61b4ae5b4c384c7499e4a09e3a.tar.bz2 gentoo-2-f371bc98edde4c61b4ae5b4c384c7499e4a09e3a.zip |
Version bump #493010 by Agostino Sarubbo.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/nbd/ChangeLog | 9 | ||||
-rw-r--r-- | sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch | 59 | ||||
-rw-r--r-- | sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch | 38 | ||||
-rw-r--r-- | sys-block/nbd/nbd-3.5.ebuild | 43 |
4 files changed, 148 insertions, 1 deletions
diff --git a/sys-block/nbd/ChangeLog b/sys-block/nbd/ChangeLog index af4e4018b49f..d8f423fcd361 100644 --- a/sys-block/nbd/ChangeLog +++ b/sys-block/nbd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-block/nbd # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/nbd/ChangeLog,v 1.82 2013/09/01 18:40:08 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/nbd/ChangeLog,v 1.83 2013/12/02 05:35:17 vapier Exp $ + +*nbd-3.5 (02 Dec 2013) + + 02 Dec 2013; Mike Frysinger <vapier@gentoo.org> + +files/nbd-3.5-gznbd-printf-u64.patch, +files/nbd-3.5-gznbd-zlib.patch, + +nbd-3.5.ebuild: + Version bump #493010 by Agostino Sarubbo. *nbd-3.4 (01 Sep 2013) diff --git a/sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch b/sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch new file mode 100644 index 000000000000..eff90faa1962 --- /dev/null +++ b/sys-block/nbd/files/nbd-3.5-gznbd-printf-u64.patch @@ -0,0 +1,59 @@ +From 90024f17b682e20a34f35a6ccb437edc10eb5c3b Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 2 Dec 2013 00:22:46 -0500 +Subject: [PATCH 1/2] gznbd: use PRId64 for printing 64bit types + +Gcc complains about printing these 64bit types: + +gznbd.c:199:1: warning: format '%Ld' expects argument of type 'long long int', + but argument 5 has type 'u64' [-Wformat] + +Use the standard defines from inttypes.h to avoid this issue. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + gznbd/gznbd.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/gznbd/gznbd.c b/gznbd/gznbd.c +index 09f3d49..bb41156 100644 +--- a/gznbd/gznbd.c ++++ b/gznbd/gznbd.c +@@ -40,6 +40,7 @@ + #include <fcntl.h> + #include <syslog.h> + #include <unistd.h> ++#include <inttypes.h> + + #include <sys/ioctl.h> + #include <sys/types.h> +@@ -95,7 +96,7 @@ int main(int argc, char **argv) + fprintf(stderr,"%s: %s does not appear to be a valid size\n",argv[0],argv[3]); + exit(1); + } +- printf("%s: file=%s, size=%Ld\n",argv[0],argv[2],size); ++ printf("%s: file=%s, size=%"PRId64"\n",argv[0],argv[2],size); + } else { + char buffer[BLOCK]; + int result; +@@ -110,7 +111,7 @@ int main(int argc, char **argv) + } + + if(result==0){ +- printf("size=%Ld\n",size); ++ printf("size=%"PRId64"\n",size); + } else { + printf("failed\n"); + if(result<0){ +@@ -195,7 +196,7 @@ int main(int argc, char **argv) + from=ntohll(request.from); + + #ifdef TRACE +-fprintf(stderr,"%s: len=%d, from=%Ld\n",argv[0],len,from); ++fprintf(stderr,"%s: len=%d, from=%"PRId64"\n",argv[0],len,from); + #endif + + if(request.magic!=htonl(NBD_REQUEST_MAGIC)){ +-- +1.8.4.3 + diff --git a/sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch b/sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch new file mode 100644 index 000000000000..e4609e03ab7a --- /dev/null +++ b/sys-block/nbd/files/nbd-3.5-gznbd-zlib.patch @@ -0,0 +1,38 @@ +From 172a5a7c5824237537051247f203a39cc39e3aef Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 2 Dec 2013 00:24:01 -0500 +Subject: [PATCH 2/2] gznbd: fix warning with newer zlib + +When you build against newer zlib, you get a lot of warnings like so: + +gznbd.c: In function 'main': +gznbd.c:87:5: warning: assignment from incompatible pointer type [enabled by default] +gznbd.c:109:5: warning: passing argument 1 of 'gzread' from incompatible pointer type [enabled by default] +In file included from gznbd.c:37:0: +/usr/include/zlib.h:1313:21: note: expected 'gzFile' but argument is of type 'struct gzFile_s **' +gznbd.c:118:9: warning: passing argument 1 of 'gzerror' from incompatible pointer type [enabled by default] + +This is because the zlib API uses just gzFile everywhere, not a pointer +to a gzFile. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + gznbd/gznbd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gznbd/gznbd.c b/gznbd/gznbd.c +index bb41156..803c1c1 100644 +--- a/gznbd/gznbd.c ++++ b/gznbd/gznbd.c +@@ -68,7 +68,7 @@ int main(int argc, char **argv) + int pr[2]; + int sk; + int nbd; +- gzFile *gz; ++ gzFile gz; + int gzerr; + + char chunk[CHUNK]; +-- +1.8.4.3 + diff --git a/sys-block/nbd/nbd-3.5.ebuild b/sys-block/nbd/nbd-3.5.ebuild new file mode 100644 index 000000000000..2184a4bf0ba5 --- /dev/null +++ b/sys-block/nbd/nbd-3.5.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/nbd/nbd-3.5.ebuild,v 1.1 2013/12/02 05:35:17 vapier Exp $ + +EAPI="4" + +inherit toolchain-funcs eutils + +DESCRIPTION="Userland client/server for kernel network block device" +HOMEPAGE="http://nbd.sourceforge.net/" +SRC_URI="mirror://sourceforge/nbd/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug zlib" + +RDEPEND=">=dev-libs/glib-2.0 + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gznbd-printf-u64.patch + epatch "${FILESDIR}"/${P}-gznbd-zlib.patch +} + +src_configure() { + econf \ + --enable-lfs \ + --enable-syslog \ + $(use_enable debug) +} + +src_compile() { + default + use zlib && emake -C gznbd CC="$(tc-getCC)" +} + +src_install() { + default + use zlib && dobin gznbd/gznbd +} |