diff options
Diffstat (limited to 'extra/xorg-server')
-rw-r--r-- | extra/xorg-server/PKGBUILD | 55 | ||||
-rw-r--r-- | extra/xorg-server/loongson.patch | 49 |
2 files changed, 99 insertions, 5 deletions
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index 747eecaa7..b480c74ca 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -5,13 +5,14 @@ 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.12.3 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' 'udev>=183' 'libgcrypt') + 'xorg-font-util' 'glproto' 'udev>=183' 'libgcrypt') +[ "$CARCH" != "mips64el" ] && makedepends+=('dri2proto') options=('!libtool') source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 autoconfig-nvidia.patch @@ -20,13 +21,15 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 #git-fixes.patch xvfb-run xvfb-run.1 - 10-quirks.conf) + 10-quirks.conf + loongson.patch) sha256sums=('3654b613393734ce0c7c23e81ca4ceb6e8afefb5f0649233ffd105c1220544fe' '66e25f76a7496c429e0aff4b0670f168719bb0ceaeb88c6f2272f2bf3ed21162' 'd027776fac1f7675b0a9ee817502290b1c45f9c09b0f0a6bb058c35f92361e84' 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9' '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776' - '94612f5c0d34a3b7152915c2e285c7b462e9d8e38d3539bd551a339498eac166') + '94612f5c0d34a3b7152915c2e285c7b462e9d8e38d3539bd551a339498eac166' + '966b8c509006e3b7e6ac951c93a760ecbb2cb2ad7a5807fb919f0c4ee5e079a5') build() { cd "${srcdir}/${pkgbase}-${pkgver}" @@ -45,7 +48,38 @@ build() { # Add post-release patches from 1.12 branch # patch -Np1 -i ${srcdir}/git-fixes.patch + # Based on http://lists.freedesktop.org/archives/xorg-devel/2011-October/026249.html + patch -Np1 -i "${srcdir}/loongson.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 \ @@ -73,6 +107,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 @@ -117,9 +152,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" @@ -183,7 +220,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 @@ -198,3 +236,10 @@ package_xorg-server-devel() { install -m755 -d "${pkgdir}/usr/share/licenses/xorg-server-devel" ln -sf ../xorg-server-common/COPYING "${pkgdir}/usr/share/licenses/xorg-server-devel/COPYING" } +md5sums=('65a53b11bc01dcc97ee9b201dc620c32' + 'ea4852dedbb89550f6bc113ca66348a2' + '4f3bc572ad32e6ed22efc38d2a5e429a' + '52fd3effd80d7bc6c1660d4ecf23d31c' + '376c70308715cd2643f7bff936d9934b' + 'd4f7dfc6be4ef4e2c6dd7632a9d88abe' + 'd335870a88231cdbdd2919dd4ca76a1f') diff --git a/extra/xorg-server/loongson.patch b/extra/xorg-server/loongson.patch new file mode 100644 index 000000000..ba4811ccf --- /dev/null +++ b/extra/xorg-server/loongson.patch @@ -0,0 +1,49 @@ +diff -ru xorg-server-1.12.1.orig/hw/xfree86/dri/sarea.h xorg-server-1.12.1/hw/xfree86/dri/sarea.h +--- xorg-server-1.12.1.orig/hw/xfree86/dri/sarea.h 2012-05-17 20:42:38.676378113 +0200 ++++ xorg-server-1.12.1/hw/xfree86/dri/sarea.h 2012-05-17 20:45:49.936966941 +0200 +@@ -41,6 +41,8 @@ + /* SAREA area needs to be at least a page */ + #if defined(__alpha__) + #define SAREA_MAX 0x2000 ++#elif defined(__mips__) ++#define SAREA_MAX 0x4000 + #elif defined(__ia64__) + #define SAREA_MAX 0x10000 /* 64kB */ + #else +diff -ru xorg-server-1.12.1.orig/hw/xfree86/os-support/linux/lnx_video.c xorg-server-1.12.1/hw/xfree86/os-support/linux/lnx_video.c +--- xorg-server-1.12.1.orig/hw/xfree86/os-support/linux/lnx_video.c 2012-05-17 20:42:38.672349775 +0200 ++++ xorg-server-1.12.1/hw/xfree86/os-support/linux/lnx_video.c 2012-05-17 20:47:23.059649687 +0200 +@@ -484,9 +484,10 @@ + Bool + xf86EnableIO(void) + { +-#if defined(__powerpc__) ++#if defined(__powerpc__) || defined(__mips__) + int fd; + unsigned int ioBase_phys; ++ extern unsigned int IOPortBase; + #endif + + if (ExtendedEnabled) +@@ -511,6 +512,21 @@ + #endif + } + close(fd); ++#elif defined(__mips__) ++ fd = open("/dev/mem", O_RDWR); ++ IOPortBase = (volatile unsigned char *)mmap(0, 0x20000, ++ PROT_READ | PROT_WRITE, MAP_SHARED, fd, ++ 0x1fd00000); ++ if (IOPortBase == MAP_FAILED) { ++ xf86Msg(X_WARNING, ++ "xf86EnableIOPorts: Failed to map iobase (%s)\n", ++ strerror(errno)); ++ return FALSE; ++ } ++ close(fd); ++ xf86Msg(X_WARNING, ++ "xf86EnableIOPorts: map iobase (%x)\n", ++ IOPortBase); + #elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) && !defined(__nds32__) + if (ioperm(0, 1024, 1) || iopl(3)) { + if (errno == ENODEV) |