forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/plib: add patches from Debian (bug #395553 and bug #440762)
Package-Manager: portage-2.2.26
- Loading branch information
Michael Sterrett
committed
Jan 23, 2016
1 parent
ebedd15
commit c2c3350
Showing
4 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- plib-1.8.5/src/ssg/ssgParser.cxx~ | ||
+++ plib-1.8.5/src/ssg/ssgParser.cxx | ||
@@ -57,18 +57,16 @@ void _ssgParser::error( const char *form | ||
char msgbuff[ 255 ]; | ||
va_list argp; | ||
|
||
- char* msgptr = msgbuff; | ||
- if (linenum) | ||
- { | ||
- msgptr += sprintf ( msgptr,"%s, line %d: ", | ||
- path, linenum ); | ||
- } | ||
- | ||
va_start( argp, format ); | ||
- vsprintf( msgptr, format, argp ); | ||
+ vsnprintf( msgbuff, sizeof(msgbuff), format, argp ); | ||
va_end( argp ); | ||
|
||
- ulSetError ( UL_WARNING, "%s", msgbuff ) ; | ||
+ if (linenum) | ||
+ { | ||
+ ulSetError ( UL_WARNING, "%s, line %d: %s", path, linenum, msgbuff ) ; | ||
+ } else { | ||
+ ulSetError ( UL_WARNING, "%s", msgbuff ) ; | ||
+ } | ||
} | ||
|
||
|
||
@@ -78,18 +76,16 @@ void _ssgParser::message( const char *fo | ||
char msgbuff[ 255 ]; | ||
va_list argp; | ||
|
||
- char* msgptr = msgbuff; | ||
- if (linenum) | ||
- { | ||
- msgptr += sprintf ( msgptr,"%s, line %d: ", | ||
- path, linenum ); | ||
- } | ||
- | ||
va_start( argp, format ); | ||
- vsprintf( msgptr, format, argp ); | ||
+ vsnprintf( msgbuff, sizeof(msgbuff), format, argp ); | ||
va_end( argp ); | ||
|
||
- ulSetError ( UL_DEBUG, "%s", msgbuff ) ; | ||
+ if (linenum) | ||
+ { | ||
+ ulSetError ( UL_DEBUG, "%s, line %d: %s", path, linenum, msgbuff ) ; | ||
+ } else { | ||
+ ulSetError ( UL_DEBUG, "%s", msgbuff ) ; | ||
+ } | ||
} | ||
|
||
// Opens the file and does a few internal calculations based on the spec. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- plib-1.8.5/src/util/ulError.cxx~ 2008-03-11 03:06:23.000000000 +0100 | ||
+++ plib-1.8.5/src/util/ulError.cxx 2011-12-27 15:38:25.305676650 +0100 | ||
@@ -39,7 +39,7 @@ void ulSetError ( enum ulSeverity severi | ||
{ | ||
va_list argp; | ||
va_start ( argp, fmt ) ; | ||
- vsprintf ( _ulErrorBuffer, fmt, argp ) ; | ||
+ vsnprintf ( _ulErrorBuffer, sizeof(_ulErrorBuffer), fmt, argp ) ; | ||
va_end ( argp ) ; | ||
|
||
if ( _ulErrorCB ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 1999-2014 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=5 | ||
inherit flag-o-matic eutils autotools | ||
|
||
DESCRIPTION="multimedia library used by many games" | ||
HOMEPAGE="http://plib.sourceforge.net/" | ||
SRC_URI="http://plib.sourceforge.net/dist/${P}.tar.gz" | ||
|
||
LICENSE="LGPL-2" | ||
SLOT="0" | ||
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" | ||
|
||
DEPEND="virtual/opengl" | ||
RDEPEND=${DEPEND} | ||
|
||
src_prepare() { | ||
epatch \ | ||
"${FILESDIR}"/${P}-X11.patch \ | ||
"${FILESDIR}"/${P}-CVE-2011-4552.patch \ | ||
"${FILESDIR}"/${P}-CVE-2011-4620.patch | ||
|
||
eautoreconf | ||
# Since plib only provides static libraries, force | ||
# building as PIC or plib is useless to amd64/etc... | ||
append-flags -fPIC | ||
} | ||
|
||
src_install() { | ||
default | ||
dodoc AUTHORS ChangeLog KNOWN_BUGS NOTICE README* TODO* | ||
} |