diff options
Diffstat (limited to 'extra/xorg-server')
-rw-r--r-- | extra/xorg-server/PKGBUILD | 39 | ||||
-rw-r--r-- | extra/xorg-server/vbe-fix-malloc-size-bug.patch | 39 |
2 files changed, 75 insertions, 3 deletions
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index 48f500bb4..af6d14caa 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -5,10 +5,11 @@ pkgbase=xorg-server pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel') pkgver=1.11.1.902 pkgrel=1 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') license=('custom') url="http://xorg.freedesktop.org" -makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'glproto' 'dri2proto') +makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util' 'glproto') +[ "$CARCH" = "mips64el" ] || makedepends+=('xf86driproto' 'dri2proto') options=('!libtool') source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 autoconfig-nvidia.patch @@ -43,6 +44,34 @@ build() { #patch -Np1 -i "${srcdir}/git-fixes.patch" autoreconf -fi + if [ "$CARCH" = "mips64el" ]; then + ./configure --prefix=/usr \ + --enable-ipv6 \ + --disable-dri \ + --disable-dri2 \ + --enable-dmx \ + --enable-xvfb \ + --enable-xnest \ + --enable-composite \ + --enable-xcsecurity \ + --enable-xorg \ + --enable-xephyr \ + --disable-glx \ + --disable-glx-tls \ + --enable-kdrive \ + --enable-install-setuid \ + --enable-config-udev \ + --disable-config-dbus \ + --enable-record \ + --disable-xfbdev \ + --disable-xfake \ + --disable-static \ + --sysconfdir=/etc/X11 \ + --localstatedir=/var \ + --with-xkb-path=/usr/share/X11/xkb \ + --with-xkb-output=/var/lib/xkb \ + --with-fontrootdir=/usr/share/fonts + else ./configure --prefix=/usr \ --enable-ipv6 \ --enable-dri \ @@ -67,6 +96,7 @@ build() { --with-xkb-path=/usr/share/X11/xkb \ --with-xkb-output=/var/lib/xkb \ --with-fontrootdir=/usr/share/fonts + fi make # Disable subdirs for make install rule to make splitting easier @@ -110,9 +140,11 @@ package_xorg-server() { rmdir "${pkgdir}/usr/share/X11" + if [ "$CARCH" != "mips64el" ]; then # Needed for non-mesa drivers, libgl will restore it mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \ "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg" + fi rm -rf "${pkgdir}/var" @@ -176,7 +208,8 @@ package_xorg-server-xdmx() { package_xorg-server-devel() { pkgdesc="Development files for the X.Org X server" - depends=(xproto randrproto renderproto xextproto inputproto kbproto fontsproto videoproto dri2proto xineramaproto xorg-util-macros pixman libpciaccess) + depends=(xproto randrproto renderproto xextproto inputproto kbproto fontsproto videoproto xineramaproto xorg-util-macros pixman libpciaccess) +[ "$CARCH" = "mips64el" ] || depends+=('dri2proto') cd "${srcdir}/${pkgbase}-${pkgver}" make DESTDIR="${pkgdir}" install diff --git a/extra/xorg-server/vbe-fix-malloc-size-bug.patch b/extra/xorg-server/vbe-fix-malloc-size-bug.patch new file mode 100644 index 000000000..01ed040d4 --- /dev/null +++ b/extra/xorg-server/vbe-fix-malloc-size-bug.patch @@ -0,0 +1,39 @@ +From 8ffaef2ebd2611e2eed4ef97350c3a34508f5252 Mon Sep 17 00:00:00 2001 +From: Adam Jackson <ajax@redhat.com> +Date: Thu, 24 Feb 2011 21:06:34 +0000 +Subject: vbe: Fix malloc size bug + +v2: Slightly more obvious sizing math. + +==14882== Invalid write of size 2 +==14882== at 0x6750267: VBEGetVBEInfo (vbe.c:400) +==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) +==14882== by 0x471895: InitOutput (xf86Init.c:519) +==14882== by 0x422778: main (main.c:205) +==14882== Address 0x4f32fa8 is 72 bytes inside a block of size 73 alloc'd +==14882== at 0x4A0640D: malloc (vg_replace_malloc.c:236) +==14882== by 0x675024B: VBEGetVBEInfo (vbe.c:398) +==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) +==14882== by 0x471895: InitOutput (xf86Init.c:519) +==14882== by 0x422778: main (main.c:205) + +Reviewed-by: Mark Kettenis <kettenis@openbsd.org> +Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> +Signed-off-by: Adam Jackson <ajax@redhat.com> +(cherry picked from commit d8caa782009abf4dc17b945e325e83fda299a534) +--- +diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c +index 7a64a4a..1d3775b 100644 +--- a/hw/xfree86/vbe/vbe.c ++++ b/hw/xfree86/vbe/vbe.c +@@ -395,7 +395,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe) + i = 0; + while (modes[i] != 0xffff) + i++; +- block->VideoModePtr = malloc(sizeof(CARD16) * i + 1); ++ block->VideoModePtr = malloc(sizeof(CARD16) * (i + 1)); + memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i); + block->VideoModePtr[i] = 0xffff; + +-- +cgit v0.8.3-6-g21f6 |