Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-andreyev/392bb7dc461fc8040c169568a591e3fd to your computer and use it in GitHub Desktop.
Save a-andreyev/392bb7dc461fc8040c169568a591e3fd to your computer and use it in GitHub Desktop.
From 436c2092cea8a503229be9dba37c618cd19784f9 Mon Sep 17 00:00:00 2001
From: Alexey Andreyev <aa13q@ya.ru>
Date: Thu, 15 Mar 2018 22:22:27 +0300
Subject: [PATCH] boost asio 1-66 build issue patch
---
PKGBUILD | 10 ++++++++--
boost-asio-1-66.patch | 16 ++++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
create mode 100644 boost-asio-1-66.patch
diff --git a/PKGBUILD b/PKGBUILD
index b6bc9b5..8e829df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,14 +10,20 @@ url="https://code.launchpad.net/dbus-cpp"
license=('LGPL3')
depends=('process-cpp' 'dbus' 'libxml2')
makedepends=('cmake' 'gmock' 'properties-cpp' 'boost')
-source=("https://launchpad.net/ubuntu/+archive/primary/+files/dbus-cpp_${_pkgver}.orig.tar.gz")
-md5sums=('61e9568f3c799214c5bc8b5e3a498496')
+source=("https://launchpad.net/ubuntu/+archive/primary/+files/dbus-cpp_${_pkgver}.orig.tar.gz"
+ "boost-asio-1-66.patch")
+md5sums=('61e9568f3c799214c5bc8b5e3a498496'
+ '127dde628ffb8296516090228975cfc2')
prepare() {
cd "$srcdir"
# Don't build tests
truncate -s 0 tests/CMakeLists.txt
+
+ # Fix boost asio 1.66 API changes
+ # https://github.com/anbox/anbox/issues/637#issuecomment-373361974
+ patch -Np1 -i boost-asio-1-66.patch
}
build() {
diff --git a/boost-asio-1-66.patch b/boost-asio-1-66.patch
new file mode 100644
index 0000000..181fb1d
--- /dev/null
+++ b/boost-asio-1-66.patch
@@ -0,0 +1,16 @@
+diff --git a/include/core/dbus/asio/executor.h b/include/core/dbus/asio/executor.h
+index d1f043e..7cbece2 100644
+--- a/include/core/dbus/asio/executor.h
++++ b/include/core/dbus/asio/executor.h
+@@ -26,7 +26,11 @@ namespace boost
+ {
+ namespace asio
+ {
++#if BOOST_VERSION >= 106600
++class io_context;
++#else
+ class io_service;
++#endif
+ }
+ }
+
--
2.16.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment