summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-07-29 12:00:46 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-07-29 12:00:46 +0000
commit8779688e21be2e6f6b3ed09ff3c1699966ba48df (patch)
treeb44f442502d07afcb3ab6a09667b3c567532a1f2 /games-action
parentminor fix to elog (diff)
downloadgentoo-2-8779688e21be2e6f6b3ed09ff3c1699966ba48df.tar.gz
gentoo-2-8779688e21be2e6f6b3ed09ff3c1699966ba48df.tar.bz2
gentoo-2-8779688e21be2e6f6b3ed09ff3c1699966ba48df.zip
fix compilation for zlib-1.2.[67] wrt #428496
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'games-action')
-rw-r--r--games-action/openclonk/ChangeLog6
-rw-r--r--games-action/openclonk/files/openclonk-5.2.2-zlib-1.2.6.patch271
-rw-r--r--games-action/openclonk/openclonk-5.2.2.ebuild5
3 files changed, 280 insertions, 2 deletions
diff --git a/games-action/openclonk/ChangeLog b/games-action/openclonk/ChangeLog
index 2c81ea2ad975..9f0bf4717166 100644
--- a/games-action/openclonk/ChangeLog
+++ b/games-action/openclonk/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-action/openclonk
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/openclonk/ChangeLog,v 1.6 2012/07/10 13:42:06 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/openclonk/ChangeLog,v 1.7 2012/07/29 12:00:46 hasufell Exp $
+
+ 29 Jul 2012; Julian Ospald <hasufell@gentoo.org> openclonk-5.2.2.ebuild,
+ +files/openclonk-5.2.2-zlib-1.2.6.patch:
+ fix compilation for zlib-1.2.[67] wrt #428496
10 Jul 2012; Julian Ospald <hasufell@gentoo.org> openclonk-5.2.2.ebuild:
add WANT_AUTOMAKE to fix bug #425576
diff --git a/games-action/openclonk/files/openclonk-5.2.2-zlib-1.2.6.patch b/games-action/openclonk/files/openclonk-5.2.2-zlib-1.2.6.patch
new file mode 100644
index 000000000000..f963338784f9
--- /dev/null
+++ b/games-action/openclonk/files/openclonk-5.2.2-zlib-1.2.6.patch
@@ -0,0 +1,271 @@
+From: upstream
+Date: Tue Feb 21 17:12:00 2012 +0100
+Subject: fix compilation for zlib-1.2.[67]
+
+backported upstream commits including:
+http://hg.openclonk.org/openclonk/rev/7a5ee23b58aa
+
+bug report:
+https://bugs.gentoo.org/show_bug.cgi?id=428496
+
+--- src/c4group/CStdFile.h
++++ src/c4group/CStdFile.h
+@@ -26,11 +26,10 @@
+ #include <stdio.h>
+ #include <StdFile.h>
+ #include <StdBuf.h>
++#include <zlib.h> // for gzFile
+
+ const int CStdFileBufSize = 4096;
+
+-typedef void* gzFile;
+-
+ class CStdStream
+ {
+ public:
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Jul 29 11:29:27 UTC 2012
+Subject:
+
+--- /dev/null
++++ src/zlib/gzio.h
+@@ -0,0 +1,35 @@
++/*
++ * Copyright (C) 2012 Armin Burgmeier
++ */
++
++#ifndef C4_GZIO_H
++#define C4_GZIO_H
++
++#include <zlib.h>
++
++extern "C"
++{
++
++gzFile ZEXPORT c4_gzopen (const char* path, const char* mode);
++gzFile ZEXPORT c4_gzdopen (int fd, const char* mode);
++int ZEXPORT c4_gzsetparams (gzFile file, int level, int strategy);
++int ZEXPORT c4_gzread (gzFile file, voidp buf, unsigned len);
++int ZEXPORT c4_gzgetc(gzFile file);
++int ZEXPORT c4_gzungetc(int c, gzFile file);
++char * ZEXPORT c4_gzgets(gzFile file, char* buf, int len);
++int ZEXPORT c4_gzwrite (gzFile file, voidpc buf, unsigned len);
++int ZEXPORTVA c4_gzprintf (gzFile file, const char *format, /* args */ ...);
++int ZEXPORT c4_gzputc(gzFile file, int c);
++int ZEXPORT c4_gzputs(gzFile file, const char* s);
++int ZEXPORT c4_gzflush (gzFile file, int flush);
++z_off_t ZEXPORT c4_gzseek (gzFile file, z_off_t offset, int whence);
++int ZEXPORT c4_gzrewind (gzFile file);
++z_off_t ZEXPORT c4_gztell (gzFile file);
++int ZEXPORT c4_gzeof (gzFile file);
++int ZEXPORT c4_gzdirect (gzFile file);
++int ZEXPORT c4_gzclose (gzFile file);
++void ZEXPORT c4_gzclearerr (gzFile file);
++
++}
++
++#endif // C4_GZIO_H
+--- src/zlib/gzio.c
++++ src/zlib/gzio.c
+@@ -208,20 +208,13 @@
+ s->start = ftell(s->file) - s->stream.avail_in;
+ }
+
+- /* Reject uncompressed files */
+- if (s->transparent)
+- {
+- gzclose( (gzFile)s );
+- return (gzFile)Z_NULL;
+- }
+-
+ return (gzFile)s;
+ }
+
+ /* ===========================================================================
+ Opens a gzip (.gz) file for reading or writing.
+ */
+-gzFile ZEXPORT gzopen (path, mode)
++gzFile ZEXPORT c4_gzopen (path, mode)
+ const char *path;
+ const char *mode;
+ {
+@@ -232,7 +225,7 @@
+ Associate a gzFile with the file descriptor fd. fd is not dup'ed here
+ to mimic the behavio(u)r of fdopen.
+ */
+-gzFile ZEXPORT gzdopen (fd, mode)
++gzFile ZEXPORT c4_gzdopen (fd, mode)
+ int fd;
+ const char *mode;
+ {
+@@ -247,7 +240,7 @@
+ /* ===========================================================================
+ * Update the compression level and strategy
+ */
+-int ZEXPORT gzsetparams (file, level, strategy)
++int ZEXPORT c4_gzsetparams (file, level, strategy)
+ gzFile file;
+ int level;
+ int strategy;
+@@ -409,7 +402,7 @@
+ Reads the given number of uncompressed bytes from the compressed file.
+ gzread returns the number of bytes actually read (0 for end of file).
+ */
+-int ZEXPORT gzread (file, buf, len)
++int ZEXPORT c4_gzread (file, buf, len)
+ gzFile file;
+ voidp buf;
+ unsigned len;
+@@ -518,7 +511,7 @@
+ Reads one byte from the compressed file. gzgetc returns this byte
+ or -1 in case of end of file or error.
+ */
+-int ZEXPORT gzgetc(file)
++int ZEXPORT c4_gzgetc(file)
+ gzFile file;
+ {
+ unsigned char c;
+@@ -530,7 +523,7 @@
+ /* ===========================================================================
+ Push one byte back onto the stream.
+ */
+-int ZEXPORT gzungetc(c, file)
++int ZEXPORT c4_gzungetc(c, file)
+ int c;
+ gzFile file;
+ {
+@@ -555,7 +548,7 @@
+
+ The current implementation is not optimized at all.
+ */
+-char * ZEXPORT gzgets(file, buf, len)
++char * ZEXPORT c4_gzgets(file, buf, len)
+ gzFile file;
+ char *buf;
+ int len;
+@@ -574,7 +567,7 @@
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of bytes actually written (0 in case of error).
+ */
+-int ZEXPORT gzwrite (file, buf, len)
++int ZEXPORT c4_gzwrite (file, buf, len)
+ gzFile file;
+ voidpc buf;
+ unsigned len;
+@@ -618,7 +611,7 @@
+ #ifdef STDC
+ #include <stdarg.h>
+
+-int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
++int ZEXPORTVA c4_gzprintf (gzFile file, const char *format, /* args */ ...)
+ {
+ char buf[Z_PRINTF_BUFSIZE];
+ va_list va;
+@@ -652,7 +645,7 @@
+ }
+ #else /* not ANSI C */
+
+-int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
++int ZEXPORTVA c4_gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
+ a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
+ gzFile file;
+ const char *format;
+@@ -693,7 +686,7 @@
+ Writes c, converted to an unsigned char, into the compressed file.
+ gzputc returns the value that was written, or -1 in case of error.
+ */
+-int ZEXPORT gzputc(file, c)
++int ZEXPORT c4_gzputc(file, c)
+ gzFile file;
+ int c;
+ {
+@@ -708,7 +701,7 @@
+ the terminating null character.
+ gzputs returns the number of characters written, or -1 in case of error.
+ */
+-int ZEXPORT gzputs(file, s)
++int ZEXPORT c4_gzputs(file, s)
+ gzFile file;
+ const char *s;
+ {
+@@ -761,7 +754,7 @@
+ return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
+ }
+
+-int ZEXPORT gzflush (file, flush)
++int ZEXPORT c4_gzflush (file, flush)
+ gzFile file;
+ int flush;
+ {
+@@ -782,7 +775,7 @@
+ SEEK_END is not implemented, returns error.
+ In this version of the library, gzseek can be extremely slow.
+ */
+-z_off_t ZEXPORT gzseek (file, offset, whence)
++z_off_t ZEXPORT c4_gzseek (file, offset, whence)
+ gzFile file;
+ z_off_t offset;
+ int whence;
+@@ -872,7 +865,7 @@
+ /* ===========================================================================
+ Rewinds input file.
+ */
+-int ZEXPORT gzrewind (file)
++int ZEXPORT c4_gzrewind (file)
+ gzFile file;
+ {
+ gz_stream *s = (gz_stream*)file;
+@@ -896,7 +889,7 @@
+ given compressed file. This position represents a number of bytes in the
+ uncompressed data stream.
+ */
+-z_off_t ZEXPORT gztell (file)
++z_off_t ZEXPORT c4_gztell (file)
+ gzFile file;
+ {
+ return gzseek(file, 0L, SEEK_CUR);
+@@ -906,7 +899,7 @@
+ Returns 1 when EOF has previously been detected reading the given
+ input stream, otherwise zero.
+ */
+-int ZEXPORT gzeof (file)
++int ZEXPORT c4_gzeof (file)
+ gzFile file;
+ {
+ gz_stream *s = (gz_stream*)file;
+@@ -923,7 +916,7 @@
+ /* ===========================================================================
+ Returns 1 if reading and doing so transparently, otherwise zero.
+ */
+-int ZEXPORT gzdirect (file)
++int ZEXPORT c4_gzdirect (file)
+ gzFile file;
+ {
+ gz_stream *s = (gz_stream*)file;
+@@ -968,7 +961,7 @@
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state.
+ */
+-int ZEXPORT gzclose (file)
++int ZEXPORT c4_gzclose (file)
+ gzFile file;
+ {
+ gz_stream *s = (gz_stream*)file;
+@@ -1003,7 +996,7 @@
+ to get the exact error code.
+ */
+ #if 0
+-const char * ZEXPORT gzerror (file, errnum)
++const char * ZEXPORT c4_gzerror (file, errnum)
+ gzFile file;
+ int *errnum;
+ {
+@@ -1034,7 +1027,7 @@
+ /* ===========================================================================
+ Clear the error and end-of-file flags, and do the same for the real file.
+ */
+-void ZEXPORT gzclearerr (file)
++void ZEXPORT c4_gzclearerr (file)
+ gzFile file;
+ {
+ gz_stream *s = (gz_stream*)file;
diff --git a/games-action/openclonk/openclonk-5.2.2.ebuild b/games-action/openclonk/openclonk-5.2.2.ebuild
index a714f86612c6..cbc67fe9abf1 100644
--- a/games-action/openclonk/openclonk-5.2.2.ebuild
+++ b/games-action/openclonk/openclonk-5.2.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/openclonk/openclonk-5.2.2.ebuild,v 1.6 2012/07/10 13:42:06 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/openclonk/openclonk-5.2.2.ebuild,v 1.7 2012/07/29 12:00:46 hasufell Exp $
EAPI=4
@@ -72,6 +72,9 @@ src_prepare() {
-e "/AM_SILENT_RULES/d" \
-i configure.ac || die
+ # wrt #428496
+ epatch "${FILESDIR}"/${P}-zlib-1.2.6.patch
+
eautoreconf
}