summaryrefslogtreecommitdiffstats
path: root/main/mesa
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-25 16:43:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-25 16:43:57 +0000
commit9526ee659401dee7160f35cb62ded2779bcbbc99 (patch)
tree812ad73bde9c84dcc02a3acbc5db576369ca314a /main/mesa
parent05e09c1126a898b6d0af491fef0401bf53e297f8 (diff)
downloadaports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.bz2
aports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.xz
merged x11 repository into main
ref #255
Diffstat (limited to 'main/mesa')
-rw-r--r--main/mesa/APKBUILD92
-rw-r--r--main/mesa/intel-revert-vbl.patch21
-rw-r--r--main/mesa/mesa-7.4-parallel.patch12
-rw-r--r--main/mesa/mesa-7.6.1-ldflags.patch20
-rw-r--r--main/mesa/mesa-7.6.1-uclibc.patch13
-rw-r--r--main/mesa/mesa-7.7-link-shared.patch101
6 files changed, 259 insertions, 0 deletions
diff --git a/main/mesa/APKBUILD b/main/mesa/APKBUILD
new file mode 100644
index 000000000..19c4d4c7a
--- /dev/null
+++ b/main/mesa/APKBUILD
@@ -0,0 +1,92 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mesa
+pkgver=7.7
+pkgrel=0
+pkgdesc="Mesa DRI OpenGL library"
+url="http://www.mesa3d.org"
+license="LGPL"
+depends=
+subpackages="$pkgname-dev
+ $pkgname-dri-ati:ati $pkgname-dri-ffb:ffb $pkgname-dri-intel:intel
+ $pkgname-dri-mach64:mach64 $pkgname-dri-mga:mga $pkgname-dri-r128:r128
+ $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 python"
+source="ftp://ftp.freedesktop.org/pub/mesa/$pkgver/MesaLib-$pkgver.tar.bz2
+ mesa-7.7-link-shared.patch
+ intel-revert-vbl.patch
+ mesa-7.4-parallel.patch
+ mesa-7.6.1-ldflags.patch
+ mesa-7.6.1-uclibc.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
+
+prepare() {
+ cd "$srcdir"/Mesa-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 -i $i || return 1
+ done
+}
+
+build() {
+ cd "$srcdir"/Mesa-$pkgver
+ export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
+ ./configure --prefix=/usr \
+ --with-dri-driverdir=$_dri_driverdir \
+ --disable-asm \
+ --disable-glx-tls \
+ --with-driver=dri \
+ --with-state-trackers=dri,egl \
+ --enable-xcb \
+ --disable-glut \
+ --disable-glw || return 1
+
+ make || return 1
+ # check so we dont have any bind NOW
+ scanelf -Rb . | grep NOW && return 1
+ return 0
+}
+
+package() {
+ cd "$srcdir"/Mesa-$pkgver
+ make -j1 DESTDIR="$pkgdir" install || 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 r600_dri; }
+ffb() { _mv_dri ffb_dri; }
+intel() { _mv_dri i810_dri i915_dri i965_dri; }
+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="e3fa64a1508bc23dd9de9dd2cea7cfb1 MesaLib-7.7.tar.bz2
+a966f459b6430dbe87a57c5f28f19816 mesa-7.7-link-shared.patch
+a111f4dc82e894f8801bc3fa129af7af intel-revert-vbl.patch
+75e1bb69f384e9d60544fa03c15cc0ec mesa-7.4-parallel.patch
+eb6bb53bb1643782aa572edc40d28629 mesa-7.6.1-ldflags.patch
+8d98e15310e0f2e1520beb9e6cb6ab41 mesa-7.6.1-uclibc.patch"
diff --git a/main/mesa/intel-revert-vbl.patch b/main/mesa/intel-revert-vbl.patch
new file mode 100644
index 000000000..039441473
--- /dev/null
+++ b/main/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
+ */
diff --git a/main/mesa/mesa-7.4-parallel.patch b/main/mesa/mesa-7.4-parallel.patch
new file mode 100644
index 000000000..b4e37049d
--- /dev/null
+++ b/main/mesa/mesa-7.4-parallel.patch
@@ -0,0 +1,12 @@
+diff -ru Mesa-7.4.orig/src/mesa/drivers/dri/Makefile Mesa-7.4/src/mesa/drivers/dri/Makefile
+--- Mesa-7.4.orig/src/mesa/drivers/dri/Makefile 2009-04-11 18:08:41.000000000 +0000
++++ Mesa-7.4/src/mesa/drivers/dri/Makefile 2009-04-11 18:10:09.000000000 +0000
+@@ -18,7 +18,7 @@
+ $(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
+ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
+
+-subdirs:
++subdirs: $(TOP)/$(LIB_DIR)/libdricore.so
+ @for dir in $(DRI_DIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
diff --git a/main/mesa/mesa-7.6.1-ldflags.patch b/main/mesa/mesa-7.6.1-ldflags.patch
new file mode 100644
index 000000000..56914b711
--- /dev/null
+++ b/main/mesa/mesa-7.6.1-ldflags.patch
@@ -0,0 +1,20 @@
+diff --git a/src/gallium/winsys/drm/Makefile.template b/src/gallium/winsys/drm/Makefile.template
+index 9635c3c..88e02c0 100644
+--- a/src/gallium/winsys/drm/Makefile.template
++++ b/src/gallium/winsys/drm/Makefile.template
+@@ -83,6 +83,7 @@ default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
+
+ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
+ $(MKLIB) -noprefix -o $@ \
++ -ldflags "$(LDFLAGS)" \
+ $(OBJECTS) $(PIPE_DRIVERS) \
+ -Wl,--start-group $(MESA_MODULES) -Wl,--end-group \
+ $(WINOBJ) $(DRI_LIB_DEPS) $(DRIVER_EXTRAS)
+@@ -90,6 +91,7 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)
+ $(LIBNAME_EGL): $(WINSYS_OBJECTS) $(LIBS)
+ $(MKLIB) -o $(LIBNAME_EGL) \
+ -linker "$(CC)" \
++ -ldflags "$(LDFLAGS)" \
+ -noprefix \
+ $(OBJECTS) $(MKLIB_OPTIONS) $(WINSYS_OBJECTS) $(PIPE_DRIVERS) $(WINOBJ) $(DRI_LIB_DEPS) \
+ --whole-archive $(LIBS) $(GALLIUM_AUXILIARIES) --no-whole-archive $(DRIVER_EXTRAS)
diff --git a/main/mesa/mesa-7.6.1-uclibc.patch b/main/mesa/mesa-7.6.1-uclibc.patch
new file mode 100644
index 000000000..4a4354d89
--- /dev/null
+++ b/main/mesa/mesa-7.6.1-uclibc.patch
@@ -0,0 +1,13 @@
+diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
+index 46ffb92..6192fe6 100644
+--- a/src/mesa/main/imports.c
++++ b/src/mesa/main/imports.c
+@@ -915,7 +915,7 @@ _mesa_atoi(const char *s)
+ double
+ _mesa_strtod( const char *s, char **end )
+ {
+-#ifdef _GNU_SOURCE
++#if defined(_GNU_SOURCE) && ! defined(__UCLIBC__)
+ static locale_t loc = NULL;
+ if (!loc) {
+ loc = newlocale(LC_CTYPE_MASK, "C", NULL);
diff --git a/main/mesa/mesa-7.7-link-shared.patch b/main/mesa/mesa-7.7-link-shared.patch
new file mode 100644
index 000000000..8c6b562d7
--- /dev/null
+++ b/main/mesa/mesa-7.7-link-shared.patch
@@ -0,0 +1,101 @@
+diff -up mesa-20091221/src/mesa/drivers/dri/Makefile.da mesa-20091221/src/mesa/drivers/dri/Makefile
+--- mesa-20091221/src/mesa/drivers/dri/Makefile.da 2009-12-21 08:09:11.000000000 +1000
++++ mesa-20091221/src/mesa/drivers/dri/Makefile 2009-12-21 08:43:03.000000000 +1000
+@@ -6,12 +6,17 @@ include $(TOP)/configs/current
+
+
+
+-default: $(TOP)/$(LIB_DIR) subdirs dri.pc
++default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/libdricore.so subdirs dri.pc
+
+
+ $(TOP)/$(LIB_DIR):
+ -mkdir $(TOP)/$(LIB_DIR)
+
++libdricore.so:
++ gcc -shared -o libdricore.so -Wl,--whole-archive ../../libmesa.a -Wl,--no-whole-archive $(LDFLAGS) -lm -lpthread -lc
++
++$(TOP)/$(LIB_DIR)/libdricore.so: $(TOP)/$(LIB_DIR) libdricore.so
++ $(INSTALL) libdricore.so $(TOP)/$(LIB_DIR)
+
+ subdirs:
+ @for dir in $(DRI_DIRS) ; do \
+@@ -32,12 +37,14 @@ dri.pc: dri.pc.in
+ $(pcedit) $< > $@
+
+
+-install: dri.pc
++install: dri.pc $(TOP)/$(LIB_DIR)/libdricore.so
+ @for dir in $(DRI_DIRS) ; do \
+ if [ -d $$dir ] ; then \
+ (cd $$dir && $(MAKE) install) || exit 1 ; \
+ fi \
+ done
++ $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
++ $(INSTALL) -m 755 $(TOP)/$(LIB_DIR)/libdricore.so $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
+ $(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
+ $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
+@@ -51,5 +58,6 @@ clean:
+ (cd $$dir && $(MAKE) clean) ; \
+ fi \
+ done
++ -rm -f libdricore.so $(TOP)/$(LIB_DIR)/libdricore.so
+ -rm -f common/*.o
+ -rm -f *.pc
+diff -up mesa-20091221/src/mesa/drivers/dri/Makefile.template.da mesa-20091221/src/mesa/drivers/dri/Makefile.template
+--- mesa-20091221/src/mesa/drivers/dri/Makefile.template.da 2009-12-21 08:09:11.000000000 +1000
++++ mesa-20091221/src/mesa/drivers/dri/Makefile.template 2009-12-21 08:43:40.000000000 +1000
+@@ -1,6 +1,6 @@
+ # -*-makefile-*-
+
+-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
++MESA_MODULES = $(TOP)/$(LIB_DIR)/libdricore.so
+
+ COMMON_GALLIUM_SOURCES = \
+ ../common/utils.c \
+@@ -70,7 +70,8 @@ lib: symlinks subdirs depend
+ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) Makefile \
+ $(TOP)/src/mesa/drivers/dri/Makefile.template
+ $(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+- $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) \
++ -L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore \
++ $(OBJECTS) $(EXTRA_MODULES) $(WINOBJ) \
+ $(DRI_LIB_DEPS)
+
+
+diff -up mesa-20091221/src/mesa/x86/read_rgba_span_x86.S.da mesa-20091221/src/mesa/x86/read_rgba_span_x86.S
+--- mesa-20091221/src/mesa/x86/read_rgba_span_x86.S.da 2009-12-21 08:09:11.000000000 +1000
++++ mesa-20091221/src/mesa/x86/read_rgba_span_x86.S 2009-12-21 08:43:03.000000000 +1000
+@@ -77,7 +77,6 @@
+ */
+
+ .globl _generic_read_RGBA_span_BGRA8888_REV_MMX
+-.hidden _generic_read_RGBA_span_BGRA8888_REV_MMX
+ .type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function
+ _generic_read_RGBA_span_BGRA8888_REV_MMX:
+ pushl %ebx
+@@ -172,7 +171,6 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX
+ */
+
+ .globl _generic_read_RGBA_span_BGRA8888_REV_SSE
+-.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE
+ .type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function
+ _generic_read_RGBA_span_BGRA8888_REV_SSE:
+ pushl %esi
+@@ -335,7 +333,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
+
+ .text
+ .globl _generic_read_RGBA_span_BGRA8888_REV_SSE2
+-.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE2
+ .type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function
+ _generic_read_RGBA_span_BGRA8888_REV_SSE2:
+ pushl %esi
+@@ -494,7 +491,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
+
+ .text
+ .globl _generic_read_RGBA_span_RGB565_MMX
+- .hidden _generic_read_RGBA_span_RGB565_MMX
+ .type _generic_read_RGBA_span_RGB565_MMX, @function
+
+ _generic_read_RGBA_span_RGB565_MMX: