summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2011-01-26 02:03:01 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2011-01-26 02:03:01 +0000
commita746f16d5b86c989033e5c82cb8c9cdc019ccb92 (patch)
tree88c4aa9a95e38449b15971e2984a01acec390cf3 /media-libs/libsdl
parentBug #269123: fix quota overflow security vulns. (diff)
downloadhistorical-a746f16d5b86c989033e5c82cb8c9cdc019ccb92.tar.gz
historical-a746f16d5b86c989033e5c82cb8c9cdc019ccb92.tar.bz2
historical-a746f16d5b86c989033e5c82cb8c9cdc019ccb92.zip
add patch to handle joystick info correctly - patch from Gabriel Marcano via bug #332761
Package-Manager: portage-2.1.9.25/cvs/Linux i686
Diffstat (limited to 'media-libs/libsdl')
-rw-r--r--media-libs/libsdl/ChangeLog11
-rw-r--r--media-libs/libsdl/Manifest4
-rw-r--r--media-libs/libsdl/files/libsdl-1.2.14-joystick.patch37
-rw-r--r--media-libs/libsdl/libsdl-1.2.14-r5.ebuild154
4 files changed, 203 insertions, 3 deletions
diff --git a/media-libs/libsdl/ChangeLog b/media-libs/libsdl/ChangeLog
index ce07dd9a9cd8..e4af28c9e225 100644
--- a/media-libs/libsdl/ChangeLog
+++ b/media-libs/libsdl/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-libs/libsdl
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.170 2010/10/26 16:03:26 mr_bones_ Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.171 2011/01/26 02:03:00 mr_bones_ Exp $
+
+*libsdl-1.2.14-r5 (26 Jan 2011)
+
+ 26 Jan 2011; Michael Sterrett <mr_bones_@gentoo.org>
+ +libsdl-1.2.14-r5.ebuild, +files/libsdl-1.2.14-joystick.patch:
+ add patch to handle joystick info correctly - patch from Gabriel Marcano
+ via bug #332761
*libsdl-1.2.14-r4 (26 Oct 2010)
diff --git a/media-libs/libsdl/Manifest b/media-libs/libsdl/Manifest
index 49d4e3a0d276..af363f6f8318 100644
--- a/media-libs/libsdl/Manifest
+++ b/media-libs/libsdl/Manifest
@@ -4,6 +4,7 @@ AUX libsdl-1.2.13-pulseaudio.patch 1882 RMD160 85216ee5b297606d2cd7785294e818527
AUX libsdl-1.2.13-sdl-config.patch 780 RMD160 63a3f86cd25011d0d1e983d89910d4bceb965e86 SHA1 01c8d54cb8a22ea2a1e898b3ca39f9baca07dc98 SHA256 1c73cc815ae4f6fdaee3dc899a9f38e9f29f88e3997070c9fba226b36dbed015
AUX libsdl-1.2.13-xinerama-head-0.patch 882 RMD160 41cd75c0eaeff10484c363c829a7f022c3dcc261 SHA1 ff63d7c1e8e4876a15a0b13e3b3f99fb7c14accb SHA256 612b6e5aeb0b155fa516124dce73a62a57ee5ab46b39c2ab67ae77de69ec0b8d
AUX libsdl-1.2.14-click.patch 697 RMD160 73c58adbe5a17f26785c3c9d47a2794b53b40cdd SHA1 277a919b624e906bbf61caf8bb24e8987952cbbe SHA256 27e98cf71a7b4a6ade11cdefeaed0593f87c12609e908d6c941b3ee9fbfad8cc
+AUX libsdl-1.2.14-joystick.patch 1549 RMD160 bca682b320047021d3a6518fc2b0188fa997f047 SHA1 5e739931574fe384b35b2272dc86c4d669c409cd SHA256 1e7c83bc2ff155d15b44f582cce110bfed4477003f523d8e1d2a121bbf609ea5
DIST SDL-1.2.13.tar.gz 3373673 RMD160 ed8825fc98f4b3759cf9e5cf8357d71c50df9925 SHA1 51fcaa3e1d5c01fd813ea08688780f86b19cf539 SHA256 94f99df1d60f296b57f4740650a71b6425da654044ca30f8f0ce34934429e132
DIST SDL-1.2.14.tar.gz 4014154 RMD160 a3a9a691f5510eb5327ca159a034f55a70cb5801 SHA1 ba625b4b404589b97e92d7acd165992debe576dd SHA256 5d927e287034cb6bb0ebccfa382cb1d185cb113c8ab5115a0759798642eed9b6
EBUILD libsdl-1.2.13-r1.ebuild 4408 RMD160 366a3f3f96baca55bc308eed5c5a7bb5b0234a33 SHA1 d87306a3c618de1499dc53eae95f131c58ab76f2 SHA256 f9f729e942b19ecae67c3a497bcc6387b297e0bdf10efa4b4fec607690e8b4be
@@ -11,6 +12,7 @@ EBUILD libsdl-1.2.14-r1.ebuild 4408 RMD160 acab2efeef1bf4dfb68010ba959504256b702
EBUILD libsdl-1.2.14-r2.ebuild 4564 RMD160 d4db0b64500538d1766b2526504c3451ffe0de77 SHA1 b692d3548e7ac2cb1117c50252921f2b5473d1e8 SHA256 ccd9274858772a198ddbd388b438a0cbb93749bb0b18d149dc5ed80c1740c5ce
EBUILD libsdl-1.2.14-r3.ebuild 4539 RMD160 4285c807df444a241b3cd1a981b4082af24b3cbc SHA1 c8bb5bf9fd94c2b96f92ac7049cd0ee8aa451f3e SHA256 21501a1a7f1b209cabc183c7b9a0f4e801394728c04d60353d28b200aaa60646
EBUILD libsdl-1.2.14-r4.ebuild 4539 RMD160 7b05bdfc81e02537a660ccbfa21847cd3c876e1d SHA1 208684e35fb845761434b7eb0316f87a83e97310 SHA256 1fec5daa486db169086400a00b47e6be39401e09378c881427492e94f4f4ef74
+EBUILD libsdl-1.2.14-r5.ebuild 4577 RMD160 0cebba07c7a038531c378f95eb0cfca51593e2e7 SHA1 f86eb3f74714c5e3b57e16c85fa3195dfb94397d SHA256 a618c3c7742bd77fc9e77a1d442926bf9f2a97eae581bbfd6f044b2009c7579e
EBUILD libsdl-1.2.14.ebuild 4218 RMD160 cf217f2af01d585f4f4ca0afcd5f0a01e9bc89c0 SHA1 a1ba08c8d034e5ac1eb591721c0144b65a3c9396 SHA256 e7ca5921e4625d7a73d0383b89014a5eb41866f9391857327590a58d5cf684fd
-MISC ChangeLog 26546 RMD160 85c3e1e175029fe0a02eec42e3e0e5f5ff80f9f8 SHA1 a6dca7ef0f657e8ef72e1539b9794d9f83075a84 SHA256 91da316b345359830c9a74b0d079b602ff71b1e190a2e1c503415c2e13a7d6dd
+MISC ChangeLog 26793 RMD160 e6e0a1b16388e37bd7556d936ad0870230b4cd19 SHA1 5bea92e9d0c384a63f41c8b8d89e9b45fb6817ed SHA256 95d948863ce75dfed973a6eb071075c282c61c5280444b22ed8689390ddfcb21
MISC metadata.xml 1357 RMD160 f76f0ef20941fc2c320b8a13f497dcb43f124cc9 SHA1 e5c05312f46bc682fc7fed1c7cec23bbdb59cd07 SHA256 a19b0d85c597bbe4d3dffa744d2ed9365660f8082145ab6b6f0813e36e174827
diff --git a/media-libs/libsdl/files/libsdl-1.2.14-joystick.patch b/media-libs/libsdl/files/libsdl-1.2.14-joystick.patch
new file mode 100644
index 000000000000..7f7e7a2e3940
--- /dev/null
+++ b/media-libs/libsdl/files/libsdl-1.2.14-joystick.patch
@@ -0,0 +1,37 @@
+--- SDL-1.2.14/src/joystick/linux/SDL_sysjoystick.c 2009-10-18 13:54:40.000000000 -0400
++++ SDL-1.2.14-mod/src/joystick/linux/SDL_sysjoystick.c 2010-08-15 22:28:19.000000000 -0400
+@@ -700,26 +700,26 @@
+ continue;
+ }
+ if ( test_bit(i, absbit) ) {
+- int values[5];
++ struct input_absinfo values;
+
+- if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
++ if ( ioctl(fd, EVIOCGABS(i), &values) < 0 )
+ continue;
+ #ifdef DEBUG_INPUT_EVENTS
+ printf("Joystick has absolute axis: %x\n", i);
+ printf("Values = { %d, %d, %d, %d, %d }\n",
+- values[0], values[1],
+- values[2], values[3], values[4]);
++ values.value, values.minimum,
++ values.maximum, values.fuzz, values.flat);
+ #endif /* DEBUG_INPUT_EVENTS */
+ joystick->hwdata->abs_map[i] = joystick->naxes;
+- if ( values[1] == values[2] ) {
++ if ( values.minimum == values.maximum ) {
+ joystick->hwdata->abs_correct[i].used = 0;
+ } else {
+ joystick->hwdata->abs_correct[i].used = 1;
+ joystick->hwdata->abs_correct[i].coef[0] =
+- (values[2] + values[1]) / 2 - values[4];
++ (values.maximum + values.minimum) / 2 - values.flat;
+ joystick->hwdata->abs_correct[i].coef[1] =
+- (values[2] + values[1]) / 2 + values[4];
+- t = ((values[2] - values[1]) / 2 - 2 * values[4]);
++ (values.maximum + values.minimum) / 2 + values.flat;
++ t = ((values.maximum - values.minimum) / 2 - 2 * values.flat);
+ if ( t != 0 ) {
+ joystick->hwdata->abs_correct[i].coef[2] = (1 << 29) / t;
+ } else {
diff --git a/media-libs/libsdl/libsdl-1.2.14-r5.ebuild b/media-libs/libsdl/libsdl-1.2.14-r5.ebuild
new file mode 100644
index 000000000000..467d1016bb11
--- /dev/null
+++ b/media-libs/libsdl/libsdl-1.2.14-r5.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.14-r5.ebuild,v 1.1 2011/01/26 02:03:00 mr_bones_ Exp $
+
+EAPI=2
+inherit flag-o-matic multilib toolchain-funcs eutils libtool
+
+DESCRIPTION="Simple Direct Media Layer"
+HOMEPAGE="http://www.libsdl.org/"
+SRC_URI="http://www.libsdl.org/release/SDL-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+# WARNING:
+# if you disable the audio, video, joystick use flags or turn on the custom-cflags use flag
+# in USE and something breaks, you pick up the pieces. Be prepared for
+# bug reports to be marked INVALID.
+IUSE="oss alsa nas X dga xv xinerama fbcon directfb ggi svga tslib aalib opengl libcaca +audio +video +joystick custom-cflags pulseaudio ps3 static-libs"
+
+RDEPEND="audio? ( >=media-libs/audiofile-0.1.9 )
+ alsa? ( media-libs/alsa-lib )
+ nas? (
+ media-libs/nas
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libX11
+ )
+ X? (
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXrandr
+ )
+ directfb? ( >=dev-libs/DirectFB-0.9.19 )
+ ggi? ( >=media-libs/libggi-2.0_beta3 )
+ svga? ( >=media-libs/svgalib-1.4.2 )
+ aalib? ( media-libs/aalib )
+ libcaca? ( >=media-libs/libcaca-0.9-r1 )
+ opengl? ( virtual/opengl virtual/glu )
+ ppc64? ( ps3? ( sys-libs/libspe2 ) )
+ tslib? ( x11-libs/tslib )
+ pulseaudio? ( media-sound/pulseaudio )"
+DEPEND="${RDEPEND}
+ nas? (
+ x11-proto/xextproto
+ x11-proto/xproto
+ )
+ X? (
+ x11-proto/xextproto
+ x11-proto/xproto
+ )
+ x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
+
+S=${WORKDIR}/SDL-${PV}
+
+pkg_setup() {
+ if use !audio || use !video || use !joystick ; then
+ ewarn "Since you've chosen to turn off some of libsdl's functionality,"
+ ewarn "don't bother filing libsdl-related bugs until trying to remerge"
+ ewarn "libsdl with the audio, video, and joystick flags in USE."
+ ewarn "You need to know what you're doing to selectively turn off parts of libsdl."
+ epause 30
+ fi
+ if use custom-cflags ; then
+ ewarn "Since you've chosen to use possibly unsafe CFLAGS,"
+ ewarn "don't bother filing libsdl-related bugs until trying to remerge"
+ ewarn "libsdl without the custom-cflags use flag in USE."
+ epause 10
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.2.13-sdl-config.patch \
+ "${FILESDIR}"/${P}-click.patch \
+ "${FILESDIR}"/${P}-joystick.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ local myconf=
+ if [[ $(tc-arch) != "x86" ]] ; then
+ myconf="${myconf} --disable-nasm"
+ else
+ myconf="${myconf} --enable-nasm"
+ fi
+ use custom-cflags || strip-flags
+ use audio || myconf="${myconf} --disable-audio"
+ use video \
+ && myconf="${myconf} --enable-video-dummy" \
+ || myconf="${myconf} --disable-video"
+ use joystick || myconf="${myconf} --disable-joystick"
+
+ local directfbconf="--disable-video-directfb"
+ if use directfb ; then
+ # since DirectFB can link against SDL and trigger a
+ # dependency loop, only link against DirectFB if it
+ # isn't broken #61592
+ echo 'int main(){}' > directfb-test.c
+ $(tc-getCC) directfb-test.c -ldirectfb 2>/dev/null \
+ && directfbconf="--enable-video-directfb" \
+ || ewarn "Disabling DirectFB since libdirectfb.so is broken"
+ fi
+
+ myconf="${myconf} ${directfbconf}"
+
+ econf \
+ --disable-rpath \
+ --disable-arts \
+ --disable-esd \
+ --enable-events \
+ --enable-cdrom \
+ --enable-threads \
+ --enable-timers \
+ --enable-file \
+ --enable-cpuinfo \
+ --disable-alsa-shared \
+ --disable-esd-shared \
+ --disable-pulseaudio-shared \
+ --disable-arts-shared \
+ --disable-nas-shared \
+ --disable-osmesa-shared \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable pulseaudio) \
+ $(use_enable nas) \
+ $(use_enable X video-x11) \
+ $(use_enable dga) \
+ $(use_enable xv video-x11-xv) \
+ $(use_enable xinerama video-x11-xinerama) \
+ $(use_enable X video-x11-xrandr) \
+ $(use_enable dga video-dga) \
+ $(use_enable fbcon video-fbcon) \
+ $(use_enable ggi video-ggi) \
+ $(use_enable svga video-svga) \
+ $(use_enable aalib video-aalib) \
+ $(use_enable libcaca video-caca) \
+ $(use_enable opengl video-opengl) \
+ $(use_enable ps3 video-ps3) \
+ $(use_enable tslib input-tslib) \
+ $(use_with X x) \
+ $(use_enable static-libs static) \
+ --disable-video-x11-xme \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ use static-libs || rm -f "${D}"/usr/$(get_libdir)/lib*.la
+ dodoc BUGS CREDITS README README-SDL.txt README.CVS TODO WhatsNew
+ dohtml -r ./
+}