Bug#358065: mesa: FTBFS on hurd-i386 because of dri/drm
Cyril Brulebois
cyril.brulebois at enst-bretagne.fr
Sat Aug 12 22:02:07 UTC 2006
On Sat, Jul 22, 2006 at 06:16:31PM +0200, Michel Daenzer wrote:
> That's probably just a bug. libgl1-mesa-glx could definitely be useful
> without DRI support, but there may also be upstream issues preventing
> that ATM. Nothing that can't be fixed though.
Hi,
here's my attempt to get mesa compiled on hurd-i386 without modifying
debian/rules. Quick summary:
- debian/control: B-D on libdirectfb-dev disactived for hurd-i386.
- debian/debian-directfb hacked for hurd-i386, a dummy .so is
`touch'-ed so that debian/rules hasn't to be modified.
- debian/debian-dri hacked for hurd-i386:
- -DGLX_DIRECT_RENDERING is added to DEBIAN_COMMON_CPPFLAGS
conditionally;
- some variables are changed too for hurd-i386.
- src/glx/x11/Makefile has been modified a bit so that XF86dri.c is not
added to SOURCES when disactivation of DRI & DRM has been asked. I
guess that this could be handled upstream, using
GLX_DIRECT_RENDERING.
I also tried a bit to play with configs/debian-*_hurd-i386 but TTBOML,
watching the last releases of mesa, with *_i386 files, that's only a way
to add files, libs, etc. to packages, not a way to replace a target
(e.g. debian-dri) with another (e.g. debian-dri_hurd-i386).
I also checked that this patch allows the build of latest mesa (6.5-cvs
in experimental) without changing much. The src/glx/x11/Makefile patch
has to be adapted a bit (the context changes a bit, and
SOURCES/C_SOURCES variable renaming occured).
I checked too that the build of mesa-6.4.2 on i386 still produces the
same files for each package, once that this patch is applied.
Cheers,
--
Cyril Brulebois
-------------- next part --------------
diff -urN mesa-6.4.2.old/configs/debian-directfb mesa-6.4.2/configs/debian-directfb
--- mesa-6.4.2.old/configs/debian-directfb 2006-08-12 16:59:25.000000000 +0000
+++ mesa-6.4.2/configs/debian-directfb 2006-08-12 17:00:02.000000000 +0000
@@ -5,3 +5,10 @@
GL_LIB_DEPS = -lm -lpthread
DRIVER_DIRS = directfb
+
+ifeq ($(DEB_HOST_ARCH),hurd-i386)
+gnudefault:
+ @echo "No directfb on hurd, disabling the build by default target diversion"
+ @echo "Creating an empty and invalid shared object so that the build runs OK"
+ touch mesa/drivers/directfb/libidirectfbgl_mesa.so
+endif
diff -urN mesa-6.4.2.old/configs/debian-dri mesa-6.4.2/configs/debian-dri
--- mesa-6.4.2.old/configs/debian-dri 2006-08-12 16:59:25.000000000 +0000
+++ mesa-6.4.2/configs/debian-dri 2006-08-12 17:00:02.000000000 +0000
@@ -2,7 +2,12 @@
CONFIG_NAME = debian-dri
-DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR=\"$(DEBIAN_DRIVERS_DIR)\"
+DEBIAN_COMMON_CPPFLAGS += -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR=\"$(DEBIAN_DRIVERS_DIR)\"
+
+ifneq ($(DEB_HOST_ARCH),hurd-i386)
+DEBIAN_COMMON_CPPFLAGS += -DGLX_DIRECT_RENDERING
+endif
+
LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
@@ -31,3 +36,10 @@
ifeq ($(DEB_HOST_ARCH),amd64)
DRI_DIRS += i915
endif
+
+ifeq ($(DEB_HOST_ARCH),hurd-i386)
+DEBIAN_DRIVER_DIRS =
+DRIVER_DIRS =
+DRI_DIRS =
+NO_DRI_NO_DRM = Yes_Please
+endif
diff -urN mesa-6.4.2.old/debian/control mesa-6.4.2/debian/control
--- mesa-6.4.2.old/debian/control 2006-08-12 16:59:25.000000000 +0000
+++ mesa-6.4.2/debian/control 2006-08-12 17:00:02.000000000 +0000
@@ -4,7 +4,7 @@
Maintainer: Mesa package maintainers <pkg-mesa-devel at lists.alioth.debian.org>
Uploaders: Marcelo E. Magallon <mmagallo at debian.org>
Standards-Version: 3.7.2
-Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev, xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev
+Build-Depends: lesstif2-dev, grep-dctrl, debhelper (>> 4), build-essential (>= 11), libdrm-dev (>> 2) [!hurd-i386], libdirectfb-dev [!hurd-i386], xutils, libexpat-dev, libxxf86vm-dev, libx11-dev, libxext-dev, pkg-config, x11proto-gl-dev
Package: libgl1-mesa-swx11
Section: libs
diff -urN mesa-6.4.2.old/src/glx/x11/Makefile mesa-6.4.2/src/glx/x11/Makefile
--- mesa-6.4.2.old/src/glx/x11/Makefile 2006-08-12 16:59:25.000000000 +0000
+++ mesa-6.4.2/src/glx/x11/Makefile 2006-08-12 17:00:02.000000000 +0000
@@ -33,7 +33,11 @@
glx_query.c \
glx_texture_compression.c \
dri_glx.c \
- XF86dri.c \
+
+ifndef NO_DRI_NO_DRM
+C_SOURCES += \
+ XF86dri.c
+endif
X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S
X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S
More information about the Pkg-mesa-devel
mailing list