unity8/mir: rebuild against protobuf 3.8.0 (!481)
Add two patches that make it build against Alpine's current versions of protobuf and libdrm. [ci:skip-build]: I've manually verified that this builds.
This commit is contained in:
parent
975640fc7b
commit
3bb5504643
@ -0,0 +1,66 @@
|
|||||||
|
From e038df1a9ef91aab176225de7bad6871dc3f2a29 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Smith <ollieparanoid@bitmessage.ch>
|
||||||
|
Date: Fri, 5 Jul 2019 22:43:16 +0200
|
||||||
|
Subject: [PATCH 1/2] Fix google::protobuf::closure related errors
|
||||||
|
|
||||||
|
Include google/protobuf/stubs/callback.h to get rid of build errors like
|
||||||
|
the following, when building against protobuf 3.8.0:
|
||||||
|
|
||||||
|
[ 20%] Building CXX object src/server/scene/CMakeFiles/mirscene.dir/broadcasting_session_event_sink.cpp.o
|
||||||
|
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.cpp:19:
|
||||||
|
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.h:22:
|
||||||
|
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/display_server.h:22:
|
||||||
|
/home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:37:27: error: no type named 'Closure' in namespace 'google::protobuf'
|
||||||
|
google::protobuf::Closure* done) = 0;
|
||||||
|
~~~~~~~~~~~~~~~~~~^
|
||||||
|
/home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:41:27: error: no type named 'Closure' in namespace 'google::protobuf'
|
||||||
|
google::protobuf::Closure* done) = 0;
|
||||||
|
~~~~~~~~~~~~~~~~~~^
|
||||||
|
|
||||||
|
Related: https://github.com/MirServer/mir/issues/913
|
||||||
|
---
|
||||||
|
src/client/rpc/mir_basic_rpc_channel.h | 2 ++
|
||||||
|
src/include/common/mir/protobuf/display_server.h | 1 +
|
||||||
|
src/include/common/mir/protobuf/display_server_debug.h | 1 +
|
||||||
|
3 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/client/rpc/mir_basic_rpc_channel.h b/src/client/rpc/mir_basic_rpc_channel.h
|
||||||
|
index e0af61a..f4a650d 100644
|
||||||
|
--- a/src/client/rpc/mir_basic_rpc_channel.h
|
||||||
|
+++ b/src/client/rpc/mir_basic_rpc_channel.h
|
||||||
|
@@ -27,6 +27,8 @@
|
||||||
|
#include <condition_variable>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
+#include <google/protobuf/stubs/callback.h>
|
||||||
|
+
|
||||||
|
namespace google
|
||||||
|
{
|
||||||
|
namespace protobuf
|
||||||
|
diff --git a/src/include/common/mir/protobuf/display_server.h b/src/include/common/mir/protobuf/display_server.h
|
||||||
|
index 481af5a..852230d 100644
|
||||||
|
--- a/src/include/common/mir/protobuf/display_server.h
|
||||||
|
+++ b/src/include/common/mir/protobuf/display_server.h
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
#ifndef MIR_PROTOBUF_DISPLAY_SERVER_H_
|
||||||
|
#define MIR_PROTOBUF_DISPLAY_SERVER_H_
|
||||||
|
|
||||||
|
+#include <google/protobuf/stubs/callback.h>
|
||||||
|
#include "mir_protobuf.pb.h"
|
||||||
|
|
||||||
|
namespace mir
|
||||||
|
diff --git a/src/include/common/mir/protobuf/display_server_debug.h b/src/include/common/mir/protobuf/display_server_debug.h
|
||||||
|
index c60436e..20f9583 100644
|
||||||
|
--- a/src/include/common/mir/protobuf/display_server_debug.h
|
||||||
|
+++ b/src/include/common/mir/protobuf/display_server_debug.h
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
#ifndef MIR_PROTOBUF_DISPLAY_SERVER_DEBUG_H_
|
||||||
|
#define MIR_PROTOBUF_DISPLAY_SERVER_DEBUG_H_
|
||||||
|
|
||||||
|
+#include <google/protobuf/stubs/callback.h>
|
||||||
|
#include "mir_protobuf.pb.h"
|
||||||
|
|
||||||
|
namespace mir
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,53 @@
|
|||||||
|
From bac975363a78ab2bea2bdc6a3a9e199e9beea1f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Smith <ollieparanoid@bitmessage.ch>
|
||||||
|
Date: Sat, 6 Jul 2019 00:13:36 +0200
|
||||||
|
Subject: [PATCH 2/2] Remove drmIsMaster to use libdrm version
|
||||||
|
|
||||||
|
Here is the proper version of this patch, but it does not apply cleanly
|
||||||
|
on mir-1.1.2, so I chose to simply remove the whole drmIsMaster().
|
||||||
|
|
||||||
|
https://github.com/MirServer/mir/pull/814
|
||||||
|
|
||||||
|
This patch can be removed once we update to a newer mir version, which
|
||||||
|
has the pull request above included.
|
||||||
|
---
|
||||||
|
.../console/minimal_console_services.cpp | 23 -------------------
|
||||||
|
1 file changed, 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/server/console/minimal_console_services.cpp b/src/server/console/minimal_console_services.cpp
|
||||||
|
index b6d7918..51df9f3 100644
|
||||||
|
--- a/src/server/console/minimal_console_services.cpp
|
||||||
|
+++ b/src/server/console/minimal_console_services.cpp
|
||||||
|
@@ -35,29 +35,6 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <drm.h>
|
||||||
|
|
||||||
|
-// TODO: once libdrm provides this symbol, we need a way to set MIR_LIBDRM_HAS_IS_MASTER
|
||||||
|
-#ifndef MIR_LIBDRM_HAS_IS_MASTER
|
||||||
|
-bool drmIsMaster(int fd)
|
||||||
|
-{
|
||||||
|
- struct drm_mode_mode_cmd cmd;
|
||||||
|
-
|
||||||
|
- ::memset(&cmd, 0, sizeof cmd);
|
||||||
|
- /* Set an invalid connector_id to ensure that ATTACHMODE errors with
|
||||||
|
- * EINVAL in the unlikely event someone feels like calling this on a
|
||||||
|
- * kernel prior to 3.9. */
|
||||||
|
- cmd.connector_id = -1;
|
||||||
|
-
|
||||||
|
- if (drmIoctl(fd, DRM_IOCTL_MODE_ATTACHMODE, &cmd) != -1)
|
||||||
|
- {
|
||||||
|
- /* On 3.9 ATTACHMODE was changed to drm_noop, and so will succeed
|
||||||
|
- * iff we've got a master fd */
|
||||||
|
- return true;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return errno == EINVAL;
|
||||||
|
-}
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
mir::MinimalConsoleDevice::MinimalConsoleDevice(std::unique_ptr<mir::Device::Observer> observer)
|
||||||
|
: observer{std::move(observer)}
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
|
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
|
||||||
pkgname=mir
|
pkgname=mir
|
||||||
pkgver=1.1.2
|
pkgver=1.1.2
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="Canonical's display server"
|
pkgdesc="Canonical's display server"
|
||||||
url="https://mir-server.io"
|
url="https://mir-server.io"
|
||||||
arch="x86_64"
|
arch="x86_64"
|
||||||
@ -11,7 +11,11 @@ depends="xkeyboard-config dmz-cursor-theme ttf-freefont"
|
|||||||
depends_dev="boost-dev mesa-dev glm-dev protobuf-dev glog-dev gflags-dev eudev-dev glib-dev wayland-dev libepoxy-dev nettle-dev libinput-dev
|
depends_dev="boost-dev mesa-dev glm-dev protobuf-dev glog-dev gflags-dev eudev-dev glib-dev wayland-dev libepoxy-dev nettle-dev libinput-dev
|
||||||
capnproto-dev libxml++-2.6-dev py3-pillow freetype-dev libevdev-dev umockdev-dev lttng-ust-dev yaml-cpp-dev libxcursor-dev"
|
capnproto-dev libxml++-2.6-dev py3-pillow freetype-dev libevdev-dev umockdev-dev lttng-ust-dev yaml-cpp-dev libxcursor-dev"
|
||||||
makedepends="$depends_dev cmake libxkbcommon-dev gtest-dev gmock clang-dev"
|
makedepends="$depends_dev cmake libxkbcommon-dev gtest-dev gmock clang-dev"
|
||||||
source="https://github.com/MirServer/mir/releases/download/v$pkgver/mir-$pkgver.tar.xz"
|
source="
|
||||||
|
https://github.com/MirServer/mir/releases/download/v$pkgver/mir-$pkgver.tar.xz
|
||||||
|
0001-Fix-google-protobuf-closure-related-errors.patch
|
||||||
|
0002-Remove-drmIsMaster-to-use-libdrm-version.patch
|
||||||
|
"
|
||||||
subpackages="$pkgname-dev"
|
subpackages="$pkgname-dev"
|
||||||
options="!check" # Some tests fail
|
options="!check" # Some tests fail
|
||||||
|
|
||||||
@ -37,4 +41,6 @@ package() {
|
|||||||
cd "$builddir"
|
cd "$builddir"
|
||||||
make DESTDIR="$pkgdir/" install
|
make DESTDIR="$pkgdir/" install
|
||||||
}
|
}
|
||||||
sha512sums="4431615d795b93239a83a197d61a5900f094a2108933be4e4da09220bd20e2b031e5232174805216a964279fcf8786672d5c40c3be83856d1903f128b7b814b7 mir-1.1.2.tar.xz"
|
sha512sums="4431615d795b93239a83a197d61a5900f094a2108933be4e4da09220bd20e2b031e5232174805216a964279fcf8786672d5c40c3be83856d1903f128b7b814b7 mir-1.1.2.tar.xz
|
||||||
|
6f0d22d2d0ec85793b5067f2dcb95ac57ef5118096028098f096b32781f49acfe28ab52523ac34f72035ec7518056c392a9fc46ea5c41332538fe7a0d0db303a 0001-Fix-google-protobuf-closure-related-errors.patch
|
||||||
|
279c009d8d54823bcfdfd564543ffa4cb1ad99cef211f82d5eefe3cc33fda80d5455dfaf8ba732f6cd1067bb442d732b364fdeee07018006def13b55887c6da8 0002-Remove-drmIsMaster-to-use-libdrm-version.patch"
|
||||||
|
Loading…
Reference in New Issue
Block a user