Merge lp:~brandontschaefer/libsdl/enable-mir-support-ffe into lp:ubuntu/trusty/libsdl2

Proposed by Brandon Schaefer
Status: Merged
Merged at revision: 10
Proposed branch: lp:~brandontschaefer/libsdl/enable-mir-support-ffe
Merge into: lp:ubuntu/trusty/libsdl2
Diff against target: 59 lines (+14/-1)
3 files modified
debian/changelog (+6/-0)
debian/control (+2/-0)
debian/rules (+6/-1)
To merge this branch: bzr merge lp:~brandontschaefer/libsdl/enable-mir-support-ffe
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+212072@code.launchpad.net

Commit message

Enable Mir support by default.

Description of the change

Enable Mir support by default.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

This is going to make libsdl2 not build on some architectures it
currently builds on, which will fail proposed-migration (and for good
reason). You need to restrict this change to only architectures where
libmirclient-dev is currently available, not just to linux-any.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

This is very true. libmirclient-dev is in trusty, which is what my target for this patch really is. How would I go about ensuring the restriction to just trusty?

Revision history for this message
Colin Watson (cjwatson) wrote :

trusty is not the relevant thing. libmirclient-dev is only available on
amd64, armhf, and i386 right now, so your changes need to be restricted
to those architectures.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

I see, that makes much more sense. Sorry! All pushed and tested as well! So now only mir depends will be added iff the correct archs are selected. As well as for the rules, will only enable mir with the correct archs.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Marking as Work in Progress as it "needs FFe approval first".

Revision history for this message
Colin Watson (cjwatson) wrote :

A clearer and more robust way to spell the debian/rules test would be:

  DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
(put this together with the other similar variable settings, if not already set; you want DEB_HOST_ARCH for this and not DEB_HOST_ARCH_CPU, because e.g. you've missed that DEB_HOST_ARCH_CPU is "arm" on the armhf architecture)

  ifneq (,$(filter $(MIR_SUPPORTED_ARCH),$(DEB_HOST_ARCH)))

(Needs Fixing because of the arm bit if nothing else.)

Also, why did you delete the --disable-altivec configuration for powerpc? That looks like a mistake.

review: Needs Fixing
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Very correct on all! Thanks for reviewing

Revision history for this message
tshirtman (gabriel-pettier) wrote :

Not sure this is the right place for this, i built with this patch on my ubuntu-touch nexus4, and tried to run a simple program (for example https://raw.githubusercontent.com/crust/sdl2-examples/master/createwindow.cpp), while this one runs without errors (though nothing gets displayed in ubuntu), if i add | SDL_WINDOW_OPENGL to the flags, i get:

Could not create window: Failed to created a window surface 0x1

when running.

Any input welcome.

Revision history for this message
Colin Watson (cjwatson) wrote :

@tshirtman: Probably best to file a separate bug for this - merge proposals tend not to be a good place for support / bug tracking.

My main concern here is to ensure that existing behaviour doesn't regress, as we can always fix up new behaviour later. To that end I've tested this on a desktop system, and mpv still seems to work sensibly (and may be my new favourite lightweight video player ...); and indeed Brandon's changes have addressed my earlier code-review concerns. So this looks good to me.

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

The good thing about this patch, is all it does is allow SDL to pick Mir as a video driver backend. X11 will still default if running on X11. The only time this patch will make a difference is if you try to run an SDL2 app directly on a Mir server. Otherwise, nothing changes :).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-03-19 20:22:29 +0000
3+++ debian/changelog 2014-03-25 19:14:23 +0000
4@@ -1,3 +1,9 @@
5+libsdl2 (2.0.2+dfsg1-3ubuntu1) trusty; urgency=medium
6+
7+ * Enable Mir video support.
8+
9+ -- Brandon Schaefer <brandon.schaefer@canonical.com> Thu, 20 Mar 2014 14:55:50 -0700
10+
11 libsdl2 (2.0.2+dfsg1-3) unstable; urgency=medium
12
13 * Actually change Build-Depends libegl1-mesa-dev to be conditionally
14
15=== modified file 'debian/control'
16--- debian/control 2014-03-19 20:22:29 +0000
17+++ debian/control 2014-03-25 19:14:23 +0000
18@@ -15,6 +15,7 @@
19 libgl1-mesa-dev,
20 libgles2-mesa-dev [!hurd-any],
21 libglu1-mesa-dev,
22+ libmirclient-dev [i386 amd64 armhf],
23 libpulse-dev,
24 libts-dev [linux-any],
25 libudev-dev [linux-any],
26@@ -62,6 +63,7 @@
27 libgl1-mesa-dev,
28 libgles2-mesa-dev [!hurd-any],
29 libglu1-mesa-dev,
30+ libmirclient-dev [i386 amd64 armhf],
31 libpulse-dev,
32 libts-dev [linux-any],
33 libudev-dev [linux-any],
34
35=== modified file 'debian/rules'
36--- debian/rules 2014-03-18 20:17:10 +0000
37+++ debian/rules 2014-03-25 19:14:23 +0000
38@@ -2,8 +2,10 @@
39
40 SHLIBVER = 2.0.0
41
42-DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
43+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
44+DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
45 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
46+MIR_SUPPORTED_ARCH := i386 amd64 armhf
47
48 confflags = --disable-rpath --enable-sdl-dlopen --disable-loadso \
49 --disable-nas --disable-esd --disable-arts \
50@@ -29,6 +31,9 @@
51 confflags += --disable--video-opengles
52 endif
53
54+ifneq (,$(filter $(MIR_SUPPORTED_ARCH),$(DEB_HOST_ARCH)))
55+ confflags += --enable-video-mir --enable-mir-shared
56+endif
57
58 %:
59 dh $@ --with autoreconf --parallel

Subscribers

People subscribed via source and target branches