diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-01-31 12:57:01 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-01-31 12:57:01 +0000 |
commit | 0f83d8a6276e0688aa09c4023a88729336d15218 (patch) | |
tree | 6dee11a428a830c5bba0f0750149e2ba00aad3f9 | |
parent | Initial commit. Ebuild based on the one by Wang Jiajun in gentoo-zh overlay. (diff) | |
download | gentoo-2-0f83d8a6276e0688aa09c4023a88729336d15218.tar.gz gentoo-2-0f83d8a6276e0688aa09c4023a88729336d15218.tar.bz2 gentoo-2-0f83d8a6276e0688aa09c4023a88729336d15218.zip |
dev-libs/libexplain: Version BUmp; add fix for bison-2.6, #429552; backport fix for recent changes in linux-header regarding v4l2, #438486
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
-rw-r--r-- | dev-libs/libexplain/ChangeLog | 12 | ||||
-rw-r--r-- | dev-libs/libexplain/files/libexplain-1.1-v4l2.patch | 158 | ||||
-rw-r--r-- | dev-libs/libexplain/files/libexplain-1.1-yacc.patch | 15 | ||||
-rw-r--r-- | dev-libs/libexplain/libexplain-1.1.ebuild | 50 | ||||
-rw-r--r-- | dev-libs/libexplain/metadata.xml | 2 |
5 files changed, 234 insertions, 3 deletions
diff --git a/dev-libs/libexplain/ChangeLog b/dev-libs/libexplain/ChangeLog index 97be219440dc..31930677c3bb 100644 --- a/dev-libs/libexplain/ChangeLog +++ b/dev-libs/libexplain/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-libs/libexplain -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libexplain/ChangeLog,v 1.21 2012/05/30 07:07:12 radhermit Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libexplain/ChangeLog,v 1.22 2013/01/31 12:57:01 jlec Exp $ + +*libexplain-1.1 (31 Jan 2013) + + 31 Jan 2013; Justin Lecher <jlec@gentoo.org> +libexplain-1.1.ebuild, + +files/libexplain-1.1-v4l2.patch, +files/libexplain-1.1-yacc.patch, + metadata.xml: + Version BUmp; add fix for bison-2.6, #429552; backport fix for recent changes + in linux-header regarding v4l2, #438486 30 May 2012; Tim Harder <radhermit@gentoo.org> -libexplain-0.51.ebuild: Remove old. diff --git a/dev-libs/libexplain/files/libexplain-1.1-v4l2.patch b/dev-libs/libexplain/files/libexplain-1.1-v4l2.patch new file mode 100644 index 000000000000..5d17ce1c1a15 --- /dev/null +++ b/dev-libs/libexplain/files/libexplain-1.1-v4l2.patch @@ -0,0 +1,158 @@ + etc/configure.ac | 15 +++++++++++++++ + libexplain/buffer/v4l2_buf_flags.c | 4 +++- + libexplain/buffer/v4l2_buffer.c | 4 +++- + libexplain/config.h.in | 4 ++++ + test/05/t0570a.sh | 18 +++++++++++++++--- + test_config/configured.h | 7 +++++++ + 6 files changed, 47 insertions(+), 5 deletions(-) + +diff --git a/etc/configure.ac b/etc/configure.ac +index 54b7dd3..ddf3683 100644 +--- a/etc/configure.ac ++++ b/etc/configure.ac +@@ -1326,6 +1326,21 @@ AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no]), + AC_MSG_RESULT(cross)) + ++AC_MSG_CHECKING([whether <linux/videodev2.h> defines struct v4l2_buffer::input]) ++AC_TRY_RUN([ ++#include <linux/videodev2.h> ++int main(argc, argv)int argc; char **argv;{ ++struct v4l2_buffer x; ++printf("%d\n", (int)x.input); ++return 0; ++}] ++, AC_DEFINE(LINUX_VIDEODEV2_H_struct_v4l2_buffer_input,1, ++[Define this symbol if your system has <linux/videodev2.h> AND it ++defines struct v4l2_buffer AND it has an 'input' member.]) ++AC_MSG_RESULT([yes]), ++AC_MSG_RESULT([no]), ++AC_MSG_RESULT(cross)) ++ + dnl! + dnl! Look for the NAME_MAX symbol. This is the maximum length of a + dnl! pathname component (between th slashes) in a path. +diff --git a/libexplain/buffer/v4l2_buf_flags.c b/libexplain/buffer/v4l2_buf_flags.c +index 4888040..eec4cb0 100644 +--- a/libexplain/buffer/v4l2_buf_flags.c ++++ b/libexplain/buffer/v4l2_buf_flags.c +@@ -1,6 +1,6 @@ + /* + * libexplain - a library of system-call-specific strerror replacements +- * Copyright (C) 2011 Peter Miller ++ * Copyright (C) 2011, 2012 Peter Miller + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as +@@ -40,7 +40,9 @@ explain_buffer_v4l2_buf_flags(explain_string_buffer_t *sb, int value) + { "V4L2_BUF_FLAG_ERROR", V4L2_BUF_FLAG_ERROR }, + #endif + { "V4L2_BUF_FLAG_TIMECODE", V4L2_BUF_FLAG_TIMECODE }, ++#ifdef V4L2_BUF_FLAG_INPUT + { "V4L2_BUF_FLAG_INPUT", V4L2_BUF_FLAG_INPUT }, ++#endif + }; + + explain_parse_bits_print(sb, value, table, SIZEOF(table)); +diff --git a/libexplain/buffer/v4l2_buffer.c b/libexplain/buffer/v4l2_buffer.c +index d38d074..e5f82b3 100644 +--- a/libexplain/buffer/v4l2_buffer.c ++++ b/libexplain/buffer/v4l2_buffer.c +@@ -1,6 +1,6 @@ + /* + * libexplain - a library of system-call-specific strerror replacements +- * Copyright (C) 2011 Peter Miller ++ * Copyright (C) 2011, 2012 Peter Miller + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as +@@ -87,8 +87,10 @@ explain_buffer_v4l2_buffer(explain_string_buffer_t *sb, + } + explain_string_buffer_puts(sb, ", length = "); + explain_buffer_uint32_t(sb, data->length); ++#ifdef LINUX_VIDEODEV2_H_struct_v4l2_buffer_input + explain_string_buffer_puts(sb, ", input = "); + explain_buffer_uint32_t(sb, data->input); ++#endif + if (data->reserved) + { + explain_string_buffer_puts(sb, ", reserved = "); +diff --git a/libexplain/config.h.in b/libexplain/config.h.in +index 56ec796..ae83dbd 100644 +--- a/libexplain/config.h.in ++++ b/libexplain/config.h.in +@@ -1041,6 +1041,10 @@ + ustat. */ + #undef LINUX_TYPES_H_STRUCT_USTAT + ++/* Define this symbol if your system has <linux/videodev2.h> AND it defines ++ struct v4l2_buffer AND it has an 'input' member. */ ++#undef LINUX_VIDEODEV2_H_struct_v4l2_buffer_input ++ + /* Define this symbol if your system is able to include <net/if.h> and + <linux/if.h> in the compilation unit. */ + #undef NET_IF_LINUX_IF_PLAY_NICE +diff --git a/test/05/t0570a.sh b/test/05/t0570a.sh +index ba1f79e..e653eed 100644 +--- a/test/05/t0570a.sh ++++ b/test/05/t0570a.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + # + # libexplain - a library of system-call-specific strerror replacements +-# Copyright (C) 2011 Peter Miller ++# Copyright (C) 2011, 2012 Peter Miller + # Written by Peter Miller <pmiller@opensource.org.au> + # + # This program is free software; you can redistribute it and/or modify it +@@ -23,7 +23,7 @@ TEST_SUBJECT="ioctl VIDIOC_QBUF" + + test_config HAVE_LINUX_VIDEODEV2_H || pass + +-cat > test.ok << 'fubar' ++cat > test.ok.1 << 'fubar' + ioctl(fildes = 42, request = VIDIOC_QBUF, struct v4l2_buffer *data = { + index = 0, type = 0, bytesused = 0, flags = 0, field = V4L2_FIELD_ANY, + timestamp = { 0 seconds }, timecode = { type = 0, flags = 0, frames = 0, +@@ -33,10 +33,22 @@ argument was incorrectly specified + fubar + test $? -eq 0 || no_result + ++cat > test.ok.2 << 'fubar' ++ioctl(fildes = 42, request = VIDIOC_QBUF, struct v4l2_buffer *data = { ++index = 0, type = 0, bytesused = 0, flags = 0, field = V4L2_FIELD_ANY, ++timestamp = { 0 seconds }, timecode = { type = 0, flags = 0, frames = 0, ++seconds = 0, minutes = 0, hours = 0 }, sequence = 0, memory = 0, length = 0 ++}) failed, Invalid argument (EINVAL) because the data->type argument was ++incorrectly specified ++fubar ++test $? -eq 0 || no_result ++ + explain -e EINVAL ioctl 42 VIDIOC_QBUF > test.out + test $? -eq 0 || fail + +-diff test.ok test.out ++diff test.ok.2 test.out > /dev/null 2>&1 && pass ++ ++diff test.ok.1 test.out + test $? -eq 0 || fail + + # +diff --git a/test_config/configured.h b/test_config/configured.h +index e29cb55..7fc6a77 100644 +--- a/test_config/configured.h ++++ b/test_config/configured.h +@@ -2329,6 +2329,13 @@ + 0 + #endif + }, ++{ "LINUX_VIDEODEV2_H_struct_v4l2_buffer_input", ++#ifdef LINUX_VIDEODEV2_H_struct_v4l2_buffer_input ++1 ++#else ++0 ++#endif ++}, + { "NET_IF_LINUX_IF_PLAY_NICE", + #ifdef NET_IF_LINUX_IF_PLAY_NICE + 1 diff --git a/dev-libs/libexplain/files/libexplain-1.1-yacc.patch b/dev-libs/libexplain/files/libexplain-1.1-yacc.patch new file mode 100644 index 000000000000..159bc2c675d3 --- /dev/null +++ b/dev-libs/libexplain/files/libexplain-1.1-yacc.patch @@ -0,0 +1,15 @@ + codegen/gram.y | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/codegen/gram.y b/codegen/gram.y +index f0294ae..0934643 100644 +--- a/codegen/gram.y ++++ b/codegen/gram.y +@@ -258,7 +258,6 @@ yyerror(const char *s) + } + + +-static int yyparse(void); + static node_t *result; + #if YYDEBUG + extern int yydebug; diff --git a/dev-libs/libexplain/libexplain-1.1.ebuild b/dev-libs/libexplain/libexplain-1.1.ebuild new file mode 100644 index 000000000000..87591af79a62 --- /dev/null +++ b/dev-libs/libexplain/libexplain-1.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libexplain/libexplain-1.1.ebuild,v 1.1 2013/01/31 12:57:01 jlec Exp $ + +EAPI=5 + +AUTOTOOLS_AUTORECONF=yes +AUTOTOOLS_IN_SOURCE_BUILD=1 + +inherit autotools-utils + +MY_P="${P}.D001" + +DESCRIPTION="Library which may be used to explain Unix and Linux system call errors" +HOMEPAGE="http://libexplain.sourceforge.net/" +SRC_URI="http://libexplain.sourceforge.net/${MY_P}.tar.gz" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +LICENSE="GPL-3" +IUSE="static-libs" + +RDEPEND=" + >=sys-kernel/linux-headers-2.6.35 + sys-libs/libcap + >=sys-libs/glibc-2.11" +DEPEND="${DEPEND} + app-text/ghostscript-gpl" + +S=${WORKDIR}/${MY_P} + +DOCS=( README ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.45-configure.patch + "${FILESDIR}"/${P}-v4l2.patch + "${FILESDIR}"/${P}-yacc.patch +) + +src_prepare() { + # Portage incompatible test + sed \ + -e '/t0524a/d' \ + -e '/t0363a/d' \ + -i Makefile.in || die + + cp "${S}"/etc/configure.ac "${S}" || die + + autotools-utils_src_prepare +} diff --git a/dev-libs/libexplain/metadata.xml b/dev-libs/libexplain/metadata.xml index 40149c995561..f23b9cae1593 100644 --- a/dev-libs/libexplain/metadata.xml +++ b/dev-libs/libexplain/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <herd>shell-tools</herd> + <herd>shell-tools</herd> </pkgmetadata> |