summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configs/debian9
-rw-r--r--configs/debian-any7
-rw-r--r--configs/debian-arch13
-rw-r--r--configs/debian-default2
-rw-r--r--configs/debian-dri12
-rw-r--r--configs/debian-dri-any7
-rw-r--r--configs/debian-dri-arch13
-rw-r--r--configs/debian-dri-default7
-rw-r--r--configs/debian-i3864
-rw-r--r--configs/debian-osmesa3
-rw-r--r--configs/debian-osmesa162
-rw-r--r--configs/debian-osmesa16-static2
-rw-r--r--configs/debian-osmesa322
-rw-r--r--configs/debian-osmesa32-static2
-rw-r--r--configs/debian-static5
-rw-r--r--debian/libgl1-mesa-dri.install2
-rw-r--r--debian/libgl1-mesa-glx.install2
-rw-r--r--debian/patches/00_create-libdir.patch11
-rw-r--r--debian/patches/01_fix-makefile.patch7
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules9
21 files changed, 77 insertions, 45 deletions
diff --git a/configs/debian b/configs/debian
index d6b972795e0..68b7a613288 100644
--- a/configs/debian
+++ b/configs/debian
@@ -1,10 +1,7 @@
-# Select the correct configuration depending on the build architecture.
+# Configuration for building Mesa on the build architecture.
-ifneq ($(wildcard $(TOP)/configs/debian-$(DEB_BUILD_ARCH)),)
- include $(TOP)/configs/debian-$(DEB_BUILD_ARCH)
-else
- include $(TOP)/configs/debian-any
-endif
+include $(TOP)/configs/debian-default
+include $(TOP)/configs/linux
CONFIG_NAME = debian
diff --git a/configs/debian-any b/configs/debian-any
index d9c11575559..a2846015ba1 100644
--- a/configs/debian-any
+++ b/configs/debian-any
@@ -1,8 +1,5 @@
-# Fallback configuration for building Mesa on architectures for which no
-# architecture-specific configuration is provided.
-
-include $(TOP)/configs/debian-default
-include $(TOP)/configs/linux
+# Chicken-out configuration for architectures where optimized builds are not
+# supported.
CONFIG_NAME = debian-any
diff --git a/configs/debian-arch b/configs/debian-arch
new file mode 100644
index 00000000000..a39163d45d7
--- /dev/null
+++ b/configs/debian-arch
@@ -0,0 +1,13 @@
+# Configuration for building a version of Mesa optimized for the build
+# architecture.
+
+ifneq ($(wildcard $(TOP)/configs/debian-$(DEB_BUILD_ARCH)),)
+ include $(TOP)/configs/debian-$(DEB_BUILD_ARCH)
+else
+ include $(TOP)/configs/debian-any
+endif
+
+CONFIG_NAME = debian-arch
+
+# vim: ft=make
+
diff --git a/configs/debian-default b/configs/debian-default
index aae6ce3ed98..8ae6b10c681 100644
--- a/configs/debian-default
+++ b/configs/debian-default
@@ -11,5 +11,7 @@ CONFIG_NAME = debian-default
override SRC_DIRS = mesa glu
override PROGRAM_DIRS =
+override INSTALL_DIR = $(DESTDIR)/usr
+
# vim: ft=make
diff --git a/configs/debian-dri b/configs/debian-dri
index a26595f1ca6..48d1fc6a4fb 100644
--- a/configs/debian-dri
+++ b/configs/debian-dri
@@ -1,11 +1,7 @@
-# Select the correct configuration for building the DRI drivers depending on
-# the build architecture.
-
-ifneq ($(wildcard $(TOP)/configs/debian-dri-$(DEB_BUILD_ARCH)),)
- include $(TOP)/configs/debian-dri-$(DEB_BUILD_ARCH)
-else
- include $(TOP)/configs/debian-dri-any
-endif
+# Configuration for building the DRI drivers on the build architecture.
+
+include $(TOP)/configs/debian-dri-default
+include $(TOP)/configs/linux-dri
CONFIG_NAME = debian-dri
diff --git a/configs/debian-dri-any b/configs/debian-dri-any
index 03056bd8bb3..f6a33821bc1 100644
--- a/configs/debian-dri-any
+++ b/configs/debian-dri-any
@@ -1,8 +1,5 @@
-# Fallback configuration for building the DRI drivers on architectures for
-# which no architecture-specific configuration is provided.
-
-include $(TOP)/configs/debian-dri-default
-include $(TOP)/configs/linux-dri
+# Chicken-out configuration for architectures where optimized builds are not
+# supported.
CONFIG_NAME = debian-dri-any
diff --git a/configs/debian-dri-arch b/configs/debian-dri-arch
new file mode 100644
index 00000000000..b5785409359
--- /dev/null
+++ b/configs/debian-dri-arch
@@ -0,0 +1,13 @@
+# Configuration for building a version of the DRI drivers optimized for the
+# build architecture.
+
+ifneq ($(wildcard $(TOP)/configs/debian-dri-$(DEB_BUILD_ARCH)),)
+ include $(TOP)/configs/debian-dri-$(DEB_BUILD_ARCH)
+else
+ include $(TOP)/configs/debian-dri-any
+endif
+
+CONFIG_NAME = debian-dri-arch
+
+# vim: ft=make
+
diff --git a/configs/debian-dri-default b/configs/debian-dri-default
index ba4ffd92089..22f4b63e536 100644
--- a/configs/debian-dri-default
+++ b/configs/debian-dri-default
@@ -1,14 +1,13 @@
# Override defaults for the DRI drivers build.
-include $(TOP)/configs/debian-common
+include $(TOP)/configs/debian-default
CONFIG_NAME = debian-dri-default
-override LIB_DIR = libglx
+override LIB_DIR = lib/glx
override SRC_DIRS = glx/x11 mesa
-override PROGRAM_DIRS =
-override DRI_DRIVER_INSTALL_DIR = $(INSTALL_DIR)/$(LIB_DIR)/dri
+override DRI_DRIVER_INSTALL_DIR = $(INSTALL_DIR)/lib/dri
override DRI_DRIVER_SEARCH_DIR = /usr/lib/dri
# vim: ft=make
diff --git a/configs/debian-i386 b/configs/debian-i386
index 1706dabd786..9d56e4a4f4f 100644
--- a/configs/debian-i386
+++ b/configs/debian-i386
@@ -5,5 +5,9 @@ include $(TOP)/configs/linux-x86
CONFIG_NAME = debian-i386
+OPT_FLAGS += -march=i686
+
+override LIB_DIR = lib/i686/cmov
+
# vim: ft=make
diff --git a/configs/debian-osmesa b/configs/debian-osmesa
index a639d59895c..ebace88c7b1 100644
--- a/configs/debian-osmesa
+++ b/configs/debian-osmesa
@@ -1,12 +1,11 @@
# Configuration for building OSMesa on Debian.
-include $(TOP)/configs/debian-common
+include $(TOP)/configs/debian-default
include $(TOP)/configs/linux-osmesa
CONFIG_NAME = debian-osmesa
override SRC_DIRS = mesa
-override PROGRAM_DIRS =
# vim: ft=make
diff --git a/configs/debian-osmesa16 b/configs/debian-osmesa16
index 3019d49fa4e..bfe906ce160 100644
--- a/configs/debian-osmesa16
+++ b/configs/debian-osmesa16
@@ -1,7 +1,7 @@
# Configuration for building OSMesa with support for 16 bits per color
# channel.
-include $(TOP)/configs/debian-common
+include $(TOP)/configs/debian-default
include $(TOP)/configs/linux-osmesa16
CONFIG_NAME = debian-osmesa16
diff --git a/configs/debian-osmesa16-static b/configs/debian-osmesa16-static
index 74396404595..4d1cf89ce26 100644
--- a/configs/debian-osmesa16-static
+++ b/configs/debian-osmesa16-static
@@ -1,7 +1,7 @@
# Configuration for building a static version of OSMesa with support for 16
# bits per color channel.
-include $(TOP)/configs/debian-common
+include $(TOP)/configs/debian-default
include $(TOP)/configs/linux-osmesa16-static
CONFIG_NAME = debian-osmesa16-static
diff --git a/configs/debian-osmesa32 b/configs/debian-osmesa32
index 468045bd438..6ac31292c32 100644
--- a/configs/debian-osmesa32
+++ b/configs/debian-osmesa32
@@ -1,7 +1,7 @@
# Configuration for building OSMesa with support for 32 bits per color
# channel.
-include $(TOP)/configs/debian-common
+include $(TOP)/configs/debian-default
include $(TOP)/configs/linux-osmesa32
CONFIG_NAME = debian-osmesa32
diff --git a/configs/debian-osmesa32-static b/configs/debian-osmesa32-static
index 237a632b90d..46fd1e4194f 100644
--- a/configs/debian-osmesa32-static
+++ b/configs/debian-osmesa32-static
@@ -1,7 +1,7 @@
# Configuration for building a static version of OSMesa with support for 32
# bits per color channel.
-include $(TOP)/configs/debian-common
+include $(TOP)/configs/debian-default
include $(TOP)/configs/linux-osmesa32-static
CONFIG_NAME = debian-osmesa32-static
diff --git a/configs/debian-static b/configs/debian-static
index c3e7f05b030..71129869eb6 100644
--- a/configs/debian-static
+++ b/configs/debian-static
@@ -1,12 +1,9 @@
# Configuration for building static versions of the libraries.
-include $(TOP)/configs/debian-common
+include $(TOP)/configs/debian-default
include $(TOP)/configs/linux-static
CONFIG_NAME = debian-static
-override SRC_DIRS = mesa glu
-override PROGRAM_DIRS =
-
# vim: ft=make
diff --git a/debian/libgl1-mesa-dri.install b/debian/libgl1-mesa-dri.install
index f3e8ada53ac..55500c81209 100644
--- a/debian/libgl1-mesa-dri.install
+++ b/debian/libgl1-mesa-dri.install
@@ -1 +1 @@
-usr/libglx/dri/*.so usr/lib/dri
+usr/lib/dri/*.so
diff --git a/debian/libgl1-mesa-glx.install b/debian/libgl1-mesa-glx.install
index 270e569baa4..1a30ecd7cbd 100644
--- a/debian/libgl1-mesa-glx.install
+++ b/debian/libgl1-mesa-glx.install
@@ -1 +1 @@
-usr/libglx/libGL.so.* usr/lib
+usr/lib/glx/libGL.so.* usr/lib
diff --git a/debian/patches/00_create-libdir.patch b/debian/patches/00_create-libdir.patch
new file mode 100644
index 00000000000..99f02f7bdc1
--- /dev/null
+++ b/debian/patches/00_create-libdir.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -29,7 +29,7 @@
+ done
+
+ $(TOP)/$(LIB_DIR):
+- -mkdir $(TOP)/$(LIB_DIR)
++ mkdir -p $(TOP)/$(LIB_DIR)
+
+
+ clean:
diff --git a/debian/patches/01_fix-makefile.patch b/debian/patches/01_fix-makefile.patch
index f013c46e1c0..6f8ea18c658 100644
--- a/debian/patches/01_fix-makefile.patch
+++ b/debian/patches/01_fix-makefile.patch
@@ -1,13 +1,14 @@
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
-@@ -154,7 +154,11 @@
+@@ -154,7 +154,12 @@
$(INSTALL) -d $(INSTALL_DIR)/include/GL
$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
- $(COPY_LIBS) $(TOP)/$(LIB_DIR)/libGL.* $(INSTALL_DIR)/$(LIB_DIR)
-+ @if [ "${DRIVER_DIRS}" != "osmesa" ]; then \
++ @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
+ $(COPY_LIBS) $(TOP)/$(LIB_DIR)/lib$(GL_LIB).* $(INSTALL_DIR)/$(LIB_DIR); \
-+ else \
++ fi
++ @if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
+ $(COPY_LIBS) $(TOP)/$(LIB_DIR)/lib$(OSMESA_LIB).* $(INSTALL_DIR)/$(LIB_DIR); \
+ fi
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
diff --git a/debian/patches/series b/debian/patches/series
index 6840f95c944..9616a12dfdc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+00_create-libdir.patch
01_fix-makefile.patch
diff --git a/debian/rules b/debian/rules
index 966d25ed8b8..e2c8bbb941c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,14 +32,19 @@ STAMPDIR = debian/stamp
# build the following configurations
CONFIGS = debian \
+ debian-arch \
debian-dri \
- debian-osmesa \
debian-osmesa16 \
debian-osmesa16-static \
debian-osmesa32 \
debian-osmesa32-static \
debian-static
+# Don't build architecture-dependent DRI drivers (yet) because it's probably
+# not worth the effort. For benchmarking, include the following configuration
+# in the list above.
+#debian-dri-arch
+
STAMP = $(STAMPDIR)/$(DEB_BUILD_GNU_TYPE)
BUILD_STAMPS = $(addprefix $(STAMP)-build-, $(CONFIGS))
INSTALL_STAMPS = $(addprefix $(STAMP)-install-, $(CONFIGS))
@@ -68,7 +73,7 @@ install: build pre-install $(INSTALL_STAMPS)
$(STAMP)-install-%: $(STAMP)-build-%
# Add here commands to install the package into debian/tmp
- cd $(DEB_BUILD_DIR)/$* && $(MAKE) install INSTALL_DIR=$(CURDIR)/debian/tmp/usr
+ cd $(DEB_BUILD_DIR)/$* && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
touch $@
clean: unpatch