summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2012-06-12 13:11:44 +0000
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2012-06-12 13:11:44 +0000
commit5def31badbf8a9e1b2408a3029583ae419de34a7 (patch)
treecbcd22cb7df9bba06c3e2d50dd97898661eee197 /x11-libs/libXxf86dga
parentSet + on desired default cpuopts to behave same way like before the split. Sp... (diff)
downloadgentoo-2-5def31badbf8a9e1b2408a3029583ae419de34a7.tar.gz
gentoo-2-5def31badbf8a9e1b2408a3029583ae419de34a7.tar.bz2
gentoo-2-5def31badbf8a9e1b2408a3029583ae419de34a7.zip
Fix building on x32, bug #420629.
(Portage version: 2.2.0_alpha109/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/libXxf86dga')
-rw-r--r--x11-libs/libXxf86dga/ChangeLog7
-rw-r--r--x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-off_t-cast.patch24
-rw-r--r--x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-stdint-include.patch23
-rw-r--r--x11-libs/libXxf86dga/libXxf86dga-1.1.3.ebuild7
4 files changed, 59 insertions, 2 deletions
diff --git a/x11-libs/libXxf86dga/ChangeLog b/x11-libs/libXxf86dga/ChangeLog
index 60a4719b028c..9d1fdbdd3c38 100644
--- a/x11-libs/libXxf86dga/ChangeLog
+++ b/x11-libs/libXxf86dga/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for x11-libs/libXxf86dga
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXxf86dga/ChangeLog,v 1.64 2012/05/09 13:21:38 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXxf86dga/ChangeLog,v 1.65 2012/06/12 13:11:44 chithanh Exp $
+
+ 12 Jun 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+ +files/libXxf86dga-1.1.3-x32-off_t-cast.patch,
+ +files/libXxf86dga-1.1.3-x32-stdint-include.patch, libXxf86dga-1.1.3.ebuild:
+ Fix building on x32, bug #420629.
09 May 2012; Alexis Ballier <aballier@gentoo.org> libXxf86dga-1.1.3.ebuild:
keyword ~amd64-fbsd
diff --git a/x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-off_t-cast.patch b/x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-off_t-cast.patch
new file mode 100644
index 000000000000..1e53985ed740
--- /dev/null
+++ b/x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-off_t-cast.patch
@@ -0,0 +1,24 @@
+From 56b5a5887349e9d0e1d28da157fe6441ca691f56 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Thu, 08 Mar 2012 19:49:36 +0000
+Subject: Build fix when sizeof(off_t) > sizeof(void *)
+
+https://trac.macports.org/ticket/33532
+
+Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+diff --git a/src/XF86DGA2.c b/src/XF86DGA2.c
+index e81b486..32f455b 100644
+--- a/src/XF86DGA2.c
++++ b/src/XF86DGA2.c
+@@ -928,7 +928,7 @@ DGAMapPhysical(
+ if ((pMap->fd = open(name, O_RDWR)) < 0)
+ return False;
+ pMap->virtual = mmap(NULL, size, PROT_READ | PROT_WRITE,
+- MAP_FILE | MAP_SHARED, pMap->fd, (off_t)base);
++ MAP_FILE | MAP_SHARED, pMap->fd, (off_t)(uintptr_t)base);
+ if (pMap->virtual == (void *)-1)
+ return False;
+ mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-stdint-include.patch b/x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-stdint-include.patch
new file mode 100644
index 000000000000..bcc0db595eb7
--- /dev/null
+++ b/x11-libs/libXxf86dga/files/libXxf86dga-1.1.3-x32-stdint-include.patch
@@ -0,0 +1,23 @@
+From d4f89f7f42484963575b4c7d2fa694051e111e76 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Fri, 09 Mar 2012 10:48:14 +0000
+Subject: Include <stdint.h> for uintptr_t
+
+Found-by: Tinderbox
+
+Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+---
+diff --git a/src/XF86DGA2.c b/src/XF86DGA2.c
+index 32f455b..964de18 100644
+--- a/src/XF86DGA2.c
++++ b/src/XF86DGA2.c
+@@ -21,6 +21,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc
+ #include <X11/extensions/extutil.h>
+ #include <stdio.h>
+
++#include <stdint.h>
+
+ /* If you change this, change the Bases[] array below as well */
+ #define MAX_HEADS 16
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/x11-libs/libXxf86dga/libXxf86dga-1.1.3.ebuild b/x11-libs/libXxf86dga/libXxf86dga-1.1.3.ebuild
index cc98024c7af2..0ca1e3933646 100644
--- a/x11-libs/libXxf86dga/libXxf86dga-1.1.3.ebuild
+++ b/x11-libs/libXxf86dga/libXxf86dga-1.1.3.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/x11-libs/libXxf86dga/libXxf86dga-1.1.3.ebuild,v 1.2 2012/05/09 13:21:38 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXxf86dga/libXxf86dga-1.1.3.ebuild,v 1.3 2012/06/12 13:11:44 chithanh Exp $
EAPI=4
inherit xorg-2
@@ -16,3 +16,8 @@ RDEPEND="x11-libs/libX11
x11-proto/xproto
>=x11-proto/xf86dgaproto-2.0.99.2"
DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/libXxf86dga-1.1.3-x32-off_t-cast.patch
+ "${FILESDIR}"/libXxf86dga-1.1.3-x32-stdint-include.patch
+)