[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#672546: xserver-xorg-video-openchrome: FTBFS on hurd-i386: unconditional libdrm requirement



On Sat, Feb 08, 2014 at 10:00:51PM +0100, Samuel Thibault wrote:
> Well, in the meanwhile the source code has changed, and would need
> to be fixed to be buildable without libdrm, see via_memmgr.c having
> a lot of unconditional uses of DRM_*.  Perhaps we should rather give
> up with porting openchrome without libdrm, and remove it from hurd's
> video-all, as proposed in bug 706889?  I'll probably make a binNMU in
> that direction sooner or later.

Attached debdiff integrates Pino's patch and some ifdef'ed DRM code.


--
G..e
diff -u xserver-xorg-video-openchrome-0.3.3/debian/changelog xserver-xorg-video-openchrome-0.3.3/debian/changelog
--- xserver-xorg-video-openchrome-0.3.3/debian/changelog
+++ xserver-xorg-video-openchrome-0.3.3/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-openchrome (1:0.3.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+
+ -- Gabriele Giacone <1o5g4r8o@gmail.com>  Mon, 05 May 2014 16:02:22 +0200
+
 xserver-xorg-video-openchrome (1:0.3.3-1) unstable; urgency=low
 
   [ Maarten Lankhorst ]
diff -u xserver-xorg-video-openchrome-0.3.3/debian/control xserver-xorg-video-openchrome-0.3.3/debian/control
--- xserver-xorg-video-openchrome-0.3.3/debian/control
+++ xserver-xorg-video-openchrome-0.3.3/debian/control
@@ -18,7 +18,7 @@
  x11proto-xf86dri-dev,
  x11proto-video-dev,
  x11proto-gl-dev,
- libdrm-dev (>> 2.0),
+ libdrm-dev (>> 2.0) [!hurd-any],
  libx11-dev,
  libgl1-mesa-dev | libgl1-dev,
  libxvmc-dev,
diff -u xserver-xorg-video-openchrome-0.3.3/debian/patches/series xserver-xorg-video-openchrome-0.3.3/debian/patches/series
--- xserver-xorg-video-openchrome-0.3.3/debian/patches/series
+++ xserver-xorg-video-openchrome-0.3.3/debian/patches/series
@@ -1,0 +2 @@
+hurd.patch
only in patch2:
unchanged:
--- xserver-xorg-video-openchrome-0.3.3.orig/configure.ac
+++ xserver-xorg-video-openchrome-0.3.3/configure.ac
@@ -80,7 +80,7 @@
 XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto libdrm glproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto glproto $REQUIRED_MODULES])
 PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
  HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
  HAVE_XEXTPROTO_71="no")
only in patch2:
unchanged:
--- xserver-xorg-video-openchrome-0.3.3.orig/debian/patches/hurd.patch
+++ xserver-xorg-video-openchrome-0.3.3/debian/patches/hurd.patch
@@ -0,0 +1,40 @@
+diff --git a/src/via_driver.c b/src/via_driver.c
+index 139a0c3..4238f89 100644
+--- a/src/via_driver.c
++++ b/src/via_driver.c
+@@ -775,6 +775,7 @@ VIAGetRec(ScrnInfoPtr pScrn)
+ static int
+ map_legacy_formats(int bpp, int depth)
+ {
++#ifdef HAVE_DRI
+ 	int fmt = DRM_FORMAT_XRGB8888;
+ 
+ 	switch (bpp) {
+@@ -799,6 +800,7 @@ map_legacy_formats(int bpp, int depth)
+ 		break;
+ 	}
+ 	return fmt;
++#endif
+ }
+ 
+ static Bool
+diff --git a/src/via_memmgr.c b/src/via_memmgr.c
+index 5d4cc3f..e174771 100644
+--- a/src/via_memmgr.c
++++ b/src/via_memmgr.c
+@@ -74,6 +74,7 @@ drm_bo_alloc_surface(ScrnInfoPtr pScrn, unsigned int width, unsigned int height,
+     struct buffer_object *obj = NULL;
+     int pitch;
+ 
++#ifdef HAVE_DRI
+     switch (format) {
+     case DRM_FORMAT_C8:
+         pitch = width;
+@@ -93,6 +94,7 @@ drm_bo_alloc_surface(ScrnInfoPtr pScrn, unsigned int width, unsigned int height,
+         pitch = width * 4;
+         break;
+     }
++#endif
+ 
+     pitch = ALIGN_TO(pitch, alignment);
+     obj = drm_bo_alloc(pScrn, pitch * height, alignment, domain);

Reply to: