diff options
author | Leonardo Boshell <leonardop@gentoo.org> | 2004-05-06 06:29:34 +0000 |
---|---|---|
committer | Leonardo Boshell <leonardop@gentoo.org> | 2004-05-06 06:29:34 +0000 |
commit | e5cb0fcd2b253da6c42a5f8cd6246a5817b178e5 (patch) | |
tree | 01a2289daf34e58449180eb0e0856e4af085b7d4 /media-libs/libgphoto2 | |
parent | fixing Manifest (diff) | |
download | gentoo-2-e5cb0fcd2b253da6c42a5f8cd6246a5817b178e5.tar.gz gentoo-2-e5cb0fcd2b253da6c42a5f8cd6246a5817b178e5.tar.bz2 gentoo-2-e5cb0fcd2b253da6c42a5f8cd6246a5817b178e5.zip |
Patch to fix wrong C code that doesn't compile under gcc 2
Diffstat (limited to 'media-libs/libgphoto2')
-rw-r--r-- | media-libs/libgphoto2/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/libgphoto2/files/libgphoto2-2.1.4-gcc2_fixes.patch | 50 | ||||
-rw-r--r-- | media-libs/libgphoto2/libgphoto2-2.1.4.ebuild | 4 |
3 files changed, 58 insertions, 2 deletions
diff --git a/media-libs/libgphoto2/ChangeLog b/media-libs/libgphoto2/ChangeLog index 692d93598da6..53a2442c9504 100644 --- a/media-libs/libgphoto2/ChangeLog +++ b/media-libs/libgphoto2/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/libgphoto2 # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.26 2004/04/27 21:56:35 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.27 2004/05/06 06:29:34 leonardop Exp $ + + 06 May 2004; L. Boshell <leonardop@gentoo.org> libgphoto2-2.1.4.ebuild, + files/libgphoto2-2.1.4-gcc2_fixes.patch: + Added patch to make it compile under gcc-2. 27 Apr 2004; Aron Griffis <agriffis@gentoo.org> libgphoto2-2.1.1-r2.ebuild, libgphoto2-2.1.2-r1.ebuild, libgphoto2-2.1.3-r1.ebuild, diff --git a/media-libs/libgphoto2/files/libgphoto2-2.1.4-gcc2_fixes.patch b/media-libs/libgphoto2/files/libgphoto2-2.1.4-gcc2_fixes.patch new file mode 100644 index 000000000000..47a04870e985 --- /dev/null +++ b/media-libs/libgphoto2/files/libgphoto2-2.1.4-gcc2_fixes.patch @@ -0,0 +1,50 @@ +diff -NurdB libgphoto2-2.1.4-orig/camlibs/aox/aox.c libgphoto2-2.1.4/camlibs/aox/aox.c +--- libgphoto2-2.1.4-orig/camlibs/aox/aox.c 2004-05-06 00:19:28.000000000 -0500 ++++ libgphoto2-2.1.4/camlibs/aox/aox.c 2004-05-06 00:50:49.000000000 -0500 +@@ -39,10 +39,10 @@ + int aox_init (GPPort *port, Model *model, Info *info) + { + unsigned char c[4]; +- memset(c,0,sizeof(c)); + unsigned char hi[2]; +- memset (hi,0,2); + unsigned char lo[2]; ++ memset(c,0,sizeof(c)); ++ memset (hi,0,2); + memset (lo,0,2); + + GP_DEBUG("Running aox_init\n"); +@@ -86,11 +86,11 @@ + + int aox_get_picture_size (GPPort *port, int lo, int hi, int n, int k) + { ++ unsigned char c[4]; ++ unsigned int size; + GP_DEBUG("Running aox_get_picture_size\n"); + +- unsigned char c[4]; + memset (c,0,4); +- unsigned int size; + + if ( ( (lo) && ( n ==k ) && (k ==0)) ) { + READ(port, 0x04, 0x1, 0x1, c, 2); +diff -NurdB libgphoto2-2.1.4-orig/camlibs/aox/library.c libgphoto2-2.1.4/camlibs/aox/library.c +--- libgphoto2-2.1.4-orig/camlibs/aox/library.c 2004-05-06 00:19:28.000000000 -0500 ++++ libgphoto2-2.1.4/camlibs/aox/library.c 2004-05-06 00:20:27.000000000 -0500 +@@ -202,6 +202,7 @@ + gp_file_adjust_name_for_mime_type (file); + } + if ((w == 640)){ ++ int header_len; + /* Stripping useless header */ + p_data = data + 0x98; + /* Picture is mirror-imaged.*/ +@@ -222,7 +223,7 @@ + GP_DEBUG("size of data = %i\n", sizeof(data)); + GP_DEBUG("size of p_data = %i\n", sizeof(p_data)); + /* And now create a ppm file, with our own header */ +- int header_len = snprintf(header, 127, ++ header_len = snprintf(header, 127, + "P6\n" + "# CREATOR: gphoto2, aox library\n" + "%d %d\n" diff --git a/media-libs/libgphoto2/libgphoto2-2.1.4.ebuild b/media-libs/libgphoto2/libgphoto2-2.1.4.ebuild index bfe2566c2015..1faca221e75e 100644 --- a/media-libs/libgphoto2/libgphoto2-2.1.4.ebuild +++ b/media-libs/libgphoto2/libgphoto2-2.1.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.1.4.ebuild,v 1.6 2004/04/27 21:56:35 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.1.4.ebuild,v 1.7 2004/05/06 06:29:34 leonardop Exp $ inherit libtool eutils @@ -49,6 +49,8 @@ DEPEND="${RDEPEND} src_unpack() { unpack ${A} EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.1.2-norpm.patch + # Fix compilation under gcc-2. + epatch ${FILESDIR}/${P}-gcc2_fixes.patch } src_compile() { |