aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-27 13:22:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-27 14:00:48 +0000
commitdf738e3f4fbdccc166d36581ea94375091e127ea (patch)
tree778125f87ea22e8209c30f5ebd25711f2184c50f /x11
parent31ee725d6273df8189ba96d55aa0e30d1a813398 (diff)
downloadaports-df738e3f4fbdccc166d36581ea94375091e127ea.tar.bz2
aports-df738e3f4fbdccc166d36581ea94375091e127ea.tar.xz
x11/mesa: build dri drivers and split to subpackages
Diffstat (limited to 'x11')
-rw-r--r--x11/mesa/APKBUILD48
-rw-r--r--x11/mesa/intel-revert-vbl.patch21
2 files changed, 63 insertions, 6 deletions
diff --git a/x11/mesa/APKBUILD b/x11/mesa/APKBUILD
index 110d141461..93bf51d81f 100644
--- a/x11/mesa/APKBUILD
+++ b/x11/mesa/APKBUILD
@@ -1,21 +1,31 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mesa
pkgver=7.5
-pkgrel=0
-pkgdesc="Mesa DRI OpenGL library and drivers"
+pkgrel=1
+pkgdesc="Mesa DRI OpenGL library"
url="http://www.mesa3d.org"
license="LGPL"
depends=
-subpackages="$pkgname-dev"
+subpackages="$pkgname-dev
+ $pkgname-dri-ati:ati $pkgname-dri-ffb:ffb $pkgname-dri-intel:intel
+ $pkgname-dri-trident:trident $pkgname-dri-mach64:mach64
+ $pkgname-dri-mga:mga $pkgname-dri-r128:r128 $pkgname-dri-s3v:s3v
+ $pkgname-dri-savage:savage $pkgname-dri-sis:sis
+ $pkgname-dri-tdfx:tdfx $pkgname-dri-unichrome:unichrome
+ "
+
makedepends="pkgconfig libdrm-dev libxxf86vm-dev libxdamage-dev expat-dev
dri2proto xextproto libx11-dev glproto"
source="http://downloads.sourceforge.net/mesa3d/MesaLib-$pkgver.tar.bz2
mesa-7.1-link-shared.patch
+ intel-revert-vbl.patch
mesa-7.4-parallel.patch"
depends_dev="libdrm-dev dri2proto libx11-dev libxext-dev libxxf86vm-dev
libxdamage-dev libxfixes-dev libxcb-dev"
+_dri_driverdir=/usr/lib/xorg/modules/dri
+
build ()
{
cd "$srcdir"/Mesa-$pkgver
@@ -26,12 +36,11 @@ build ()
${CC:-gcc} -dumpspecs | sed 's/%(link_now)//g' > "$srcdir"/gcc-specs
export GCC_SPECS="$srcdir"/gcc-specs
+# --with-dri-drivers=swrast \
./configure --prefix=/usr \
- --with-dri-driverdir=/usr/lib/xorg/modules/dri \
- --with-dri-drivers=swrast \
+ --with-dri-driverdir=$_dri_driverdir \
--disable-asm \
--disable-glx-tls \
- --disable-ttm-api \
--with-driver=dri \
--enable-xcb \
--enable-glu \
@@ -42,6 +51,33 @@ build ()
install -m755 -d "$pkgdir"/usr/lib/xorg/modules/extensions
ln -sf libglx.xorg "$pkgdir"/usr/lib/xorg/modules/extensions/libglx.so || return 1
}
+
+
+_mv_dri() {
+ pkgdesc="Mesa DRI driver for $@"
+ install -d "$subpkgdir"/$_dri_driverdir
+
+ while [ $# -gt 0 ]; do
+ mv "$pkgdir"/$_dri_driverdir/${1}.so \
+ "$subpkgdir"/$_dri_driverdir/ || return 1
+ shift
+ done
+}
+
+ati() { _mv_dri radeon_dri r200_dri r300_dri; }
+ffb() { _mv_dri ffb_dri; }
+intel() { _mv_dri i810_dri i915_dri i965_dri EGL_i915; }
+mach64() { _mv_dri mach64_dri; }
+mga() { _mv_dri mga_dri; }
+r128() { _mv_dri r128_dri; }
+s3v() { _mv_dri s3v_dri; }
+savage() { _mv_dri savage_dri; }
+sis() { _mv_dri sis_dri; }
+tdfx() { _mv_dri tdfx_dri; }
+trident() { _mv_dri trident_dri; }
+unichrome() { _mv_dri unichrome_dri; }
+
md5sums="459f332551f6ebb86f384d21dd15e1f0 MesaLib-7.5.tar.bz2
9eddc02e23ec08295822911e726ae89a mesa-7.1-link-shared.patch
+a111f4dc82e894f8801bc3fa129af7af intel-revert-vbl.patch
75e1bb69f384e9d60544fa03c15cc0ec mesa-7.4-parallel.patch"
diff --git a/x11/mesa/intel-revert-vbl.patch b/x11/mesa/intel-revert-vbl.patch
new file mode 100644
index 0000000000..0394414736
--- /dev/null
+++ b/x11/mesa/intel-revert-vbl.patch
@@ -0,0 +1,21 @@
+commit 532d2051245a1d8afe7ca236f1d966d555bb121a
+Author: Dave Airlie <airlied@linux.ie>
+Date: Fri Sep 12 17:21:25 2008 +1000
+
+ Revert "intel: sync to vblank by default"
+
+ This reverts commit e9bf3e4cc9a7e4bcd4c45bd707541d26ecdf0409.
+
+diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
+index c193830..f02192d 100644
+--- a/src/mesa/drivers/dri/intel/intel_screen.c
++++ b/src/mesa/drivers/dri/intel/intel_screen.c
+@@ -55,7 +55,7 @@ PUBLIC const char __driConfigOptions[] =
+ DRI_CONF_BEGIN
+ DRI_CONF_SECTION_PERFORMANCE
+ DRI_CONF_FTHROTTLE_MODE(DRI_CONF_FTHROTTLE_IRQS)
+- DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_ALWAYS_SYNC)
++ DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_0)
+ /* Options correspond to DRI_CONF_BO_REUSE_DISABLED,
+ * DRI_CONF_BO_REUSE_ALL
+ */