summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Semkin2019-11-22 22:12:45 +0300
committerIvan Semkin2019-11-22 22:12:45 +0300
commit8b026981dd494f6b4b515d5ccc95bf07d71759b5 (patch)
treeb8e5e57a44dc4186ade0ed82251f7d647f877e9f
parent7660cb8892c0d2ebc6ad9f824c9cf62f3453a0f0 (diff)
downloadaur-8b026981dd494f6b4b515d5ccc95bf07d71759b5.tar.gz
Fix build
-rw-r--r--.SRCINFO8
-rw-r--r--1087.patch23
-rw-r--r--1088.patch23
-rw-r--r--FindCapnProto.cmake191
-rw-r--r--PKGBUILD11
5 files changed, 249 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8da8754416ec..9147f7a9ebf7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mir-git
pkgdesc = Canonical's display server
pkgver = 1.5.0+120+g5fdc44755a
- pkgrel = 1
+ pkgrel = 2
url = https://mir-server.io
arch = x86_64
arch = i686
@@ -51,9 +51,11 @@ pkgbase = mir-git
provides = mir
conflicts = mir
source = git+https://github.com/MirServer/mir.git
- source = https://raw.githubusercontent.com/capnproto/capnproto/04fd66e2992a3ed38d686642a3c479a7f3e131c9/c%2B%2B/cmake/FindCapnProto.cmake
+ source = https://patch-diff.githubusercontent.com/raw/MirServer/mir/pull/1087.patch
+ source = https://patch-diff.githubusercontent.com/raw/MirServer/mir/pull/1088.patch
sha256sums = SKIP
- sha256sums = 83153402ea0220a9ed3f9d2c2c157eb49fedf340f368cd8173f0966b3fbf2647
+ sha256sums = b86c2359309b951fdb574de9381d2fc879709a4be81d22b9f6cb10198c26b3a4
+ sha256sums = 1e1a1b188db2fa540c200bf66e15473230f91cdadffa3040985ec4b7503ce2bd
pkgname = mir-git
diff --git a/1087.patch b/1087.patch
new file mode 100644
index 000000000000..600203d8febd
--- /dev/null
+++ b/1087.patch
@@ -0,0 +1,23 @@
+From c13312017a061a31188510417885014e7778c7e7 Mon Sep 17 00:00:00 2001
+From: William Wold <wm@wmww.sh>
+Date: Fri, 22 Nov 2019 13:03:00 -0500
+Subject: [PATCH] Replace DMESA_EGL_NO_X11_HEADERS with DEGL_NO_X11 (fixes
+ 1086)
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 588b14c7f2..df102018ad 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -213,7 +213,7 @@ add_definitions(
+ )
+ endif(MIR_DISABLE_EPOLL_REACTOR)
+
+-add_definitions(-DMESA_EGL_NO_X11_HEADERS)
++add_definitions(-DEGL_NO_X11)
+
+ pkg_check_modules(WAYLAND_EGLSTREAM wayland-eglstream)
+
diff --git a/1088.patch b/1088.patch
new file mode 100644
index 000000000000..3a4cddada945
--- /dev/null
+++ b/1088.patch
@@ -0,0 +1,23 @@
+From e622516c1b4f1c54b53c55126ec5b231432500e7 Mon Sep 17 00:00:00 2001
+From: William Wold <wm@wmww.sh>
+Date: Fri, 22 Nov 2019 12:32:28 -0500
+Subject: [PATCH] Forward declare wl types to fix build on Arch
+
+---
+ include/test/mir/test/doubles/mock_egl.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/test/mir/test/doubles/mock_egl.h b/include/test/mir/test/doubles/mock_egl.h
+index 6aa5ca990a..8e942fd9d6 100644
+--- a/include/test/mir/test/doubles/mock_egl.h
++++ b/include/test/mir/test/doubles/mock_egl.h
+@@ -35,6 +35,9 @@
+ #include <GLES2/gl2.h>
+ #include <GLES2/gl2ext.h>
+
++struct wl_display;
++struct wl_resource;
++
+ namespace mir
+ {
+ namespace test
diff --git a/FindCapnProto.cmake b/FindCapnProto.cmake
new file mode 100644
index 000000000000..55f79c24a72a
--- /dev/null
+++ b/FindCapnProto.cmake
@@ -0,0 +1,191 @@
+#
+# Finds the Cap'n Proto libraries, and compiles schema files.
+#
+# Configuration variables (optional):
+# CAPNPC_OUTPUT_DIR
+# Directory to place compiled schema sources (default: the same directory as the schema file).
+# CAPNPC_IMPORT_DIRS
+# List of additional include directories for the schema compiler.
+# (CMAKE_CURRENT_SOURCE_DIR and CAPNP_INCLUDE_DIRS are always included.)
+# CAPNPC_SRC_PREFIX
+# Schema file source prefix (default: CMAKE_CURRENT_SOURCE_DIR).
+# CAPNPC_FLAGS
+# Additional flags to pass to the schema compiler.
+#
+# Variables that are discovered:
+# CAPNP_EXECUTABLE
+# Path to the `capnp` tool (can be set to override).
+# CAPNPC_CXX_EXECUTABLE
+# Path to the `capnpc-c++` tool (can be set to override).
+# CAPNP_INCLUDE_DIRS
+# Include directories for the library's headers (can be set to override).
+# CANP_LIBRARIES
+# The Cap'n Proto library paths.
+# CAPNP_LIBRARIES_LITE
+# Paths to only the 'lite' libraries.
+# CAPNP_DEFINITIONS
+# Compiler definitions required for building with the library.
+# CAPNP_FOUND
+# Set if the libraries have been located.
+#
+# Example usage:
+#
+# find_package(CapnProto REQUIRED)
+# include_directories(${CAPNP_INCLUDE_DIRS})
+# add_definitions(${CAPNP_DEFINITIONS})
+#
+# capnp_generate_cpp(CAPNP_SRCS CAPNP_HDRS schema.capnp)
+# add_executable(a a.cc ${CAPNP_SRCS} ${CAPNP_HDRS})
+# target_link_library(a ${CAPNP_LIBRARIES})
+#
+# For out-of-source builds:
+#
+# set(CAPNPC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
+# include_directories(${CAPNPC_OUTPUT_DIR})
+# capnp_generate_cpp(...)
+#
+
+# CAPNP_GENERATE_CPP ===========================================================
+
+function(CAPNP_GENERATE_CPP SOURCES HEADERS)
+ if(NOT ARGN)
+ message(SEND_ERROR "CAPNP_GENERATE_CPP() called without any source files.")
+ endif()
+ if(NOT CAPNP_EXECUTABLE)
+ message(SEND_ERROR "Could not locate capnp executable (CAPNP_EXECUTABLE).")
+ endif()
+ if(NOT CAPNPC_CXX_EXECUTABLE)
+ message(SEND_ERROR "Could not locate capnpc-c++ executable (CAPNPC_CXX_EXECUTABLE).")
+ endif()
+ if(NOT CAPNP_INCLUDE_DIRS)
+ message(SEND_ERROR "Could not locate capnp header files (CAPNP_INCLUDE_DIRS).")
+ endif()
+
+ # Default compiler includes
+ set(include_path -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CAPNP_INCLUDE_DIRS})
+
+ if(DEFINED CAPNPC_IMPORT_DIRS)
+ # Append each directory as a series of '-I' flags in ${include_path}
+ foreach(directory ${CAPNPC_IMPORT_DIRS})
+ get_filename_component(absolute_path "${directory}" ABSOLUTE)
+ list(APPEND include_path -I ${absolute_path})
+ endforeach()
+ endif()
+
+ if(DEFINED CAPNPC_OUTPUT_DIR)
+ # Prepend a ':' to get the format for the '-o' flag right
+ set(output_dir ":${CAPNPC_OUTPUT_DIR}")
+ else()
+ set(output_dir ":.")
+ endif()
+
+ if(NOT DEFINED CAPNPC_SRC_PREFIX)
+ set(CAPNPC_SRC_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}")
+ endif()
+ get_filename_component(CAPNPC_SRC_PREFIX "${CAPNPC_SRC_PREFIX}" ABSOLUTE)
+
+ set(${SOURCES})
+ set(${HEADERS})
+ foreach(schema_file ${ARGN})
+ get_filename_component(file_path "${schema_file}" ABSOLUTE)
+ get_filename_component(file_dir "${file_path}" PATH)
+
+ # Figure out where the output files will go
+ if (NOT DEFINED CAPNPC_OUTPUT_DIR)
+ set(output_base "${file_path}")
+ else()
+ # Output files are placed in CAPNPC_OUTPUT_DIR, at a location as if they were
+ # relative to CAPNPC_SRC_PREFIX.
+ string(LENGTH "${CAPNPC_SRC_PREFIX}" prefix_len)
+ string(SUBSTRING "${file_path}" 0 ${prefix_len} output_prefix)
+ if(NOT "${CAPNPC_SRC_PREFIX}" STREQUAL "${output_prefix}")
+ message(SEND_ERROR "Could not determine output path for '${schema_file}' ('${file_path}') with source prefix '${CAPNPC_SRC_PREFIX}' into '${CAPNPC_OUTPUT_DIR}'.")
+ endif()
+
+ string(SUBSTRING "${file_path}" ${prefix_len} -1 output_path)
+ set(output_base "${CAPNPC_OUTPUT_DIR}${output_path}")
+ endif()
+
+ add_custom_command(
+ OUTPUT "${output_base}.c++" "${output_base}.h"
+ COMMAND "${CAPNP_EXECUTABLE}"
+ ARGS compile
+ -o ${CAPNPC_CXX_EXECUTABLE}${output_dir}
+ --src-prefix ${CAPNPC_SRC_PREFIX}
+ ${include_path}
+ ${CAPNPC_FLAGS}
+ ${file_path}
+ DEPENDS "${schema_file}"
+ COMMENT "Compiling Cap'n Proto schema ${schema_file}"
+ VERBATIM
+ )
+ list(APPEND ${SOURCES} "${output_base}.c++")
+ list(APPEND ${HEADERS} "${output_base}.h")
+ endforeach()
+
+ set_source_files_properties(${${SOURCES}} ${${HEADERS}} PROPERTIES GENERATED TRUE)
+ set(${SOURCES} ${${SOURCES}} PARENT_SCOPE)
+ set(${HEADERS} ${${HEADERS}} PARENT_SCOPE)
+endfunction()
+
+# Find Libraries/Paths =========================================================
+
+# Use pkg-config to get path hints and definitions
+find_package(PkgConfig QUIET)
+pkg_check_modules(PKGCONFIG_CAPNP capnp)
+pkg_check_modules(PKGCONFIG_CAPNP_RPC capnp-rpc QUIET)
+
+find_library(CAPNP_LIB_KJ kj
+ HINTS "${PKGCONFIG_CAPNP_LIBDIR}" ${PKGCONFIG_CAPNP_LIBRARY_DIRS}
+)
+find_library(CAPNP_LIB_KJ-ASYNC kj-async
+ HINTS "${PKGCONFIG_CAPNP_RPC_LIBDIR}" ${PKGCONFIG_CAPNP_RPC_LIBRARY_DIRS}
+)
+find_library(CAPNP_LIB_CAPNP capnp
+ HINTS "${PKGCONFIG_CAPNP_LIBDIR}" ${PKGCONFIG_CAPNP_LIBRARY_DIRS}
+)
+find_library(CAPNP_LIB_CAPNP-RPC capnp-rpc
+ HINTS "${PKGCONFIG_CAPNP_RPC_LIBDIR}" ${PKGCONFIG_CAPNP_RPC_LIBRARY_DIRS}
+)
+mark_as_advanced(CAPNP_LIB_KJ CAPNP_LIB_KJ-ASYNC CAPNP_LIB_CAPNP CAPNP_LIB_CAPNP-RPC)
+set(CAPNP_LIBRARIES_LITE
+ ${CAPNP_LIB_KJ}
+ ${CAPNP_LIB_CAPNP}
+)
+set(CAPNP_LIBRARIES
+ ${CAPNP_LIBRARIES_LITE}
+ ${CAPNP_LIB_KJ-ASYNC}
+ ${CAPNP_LIB_CAPNP-RPC}
+)
+
+# Was only the 'lite' library found?
+if(CAPNP_LIB_CAPNP AND NOT CAPNP_LIB_CAPNP-RPC)
+ set(CAPNP_DEFINITIONS -DCAPNP_LITE)
+else()
+ set(CAPNP_DEFINITIONS)
+endif()
+
+find_path(CAPNP_INCLUDE_DIRS capnp/generated-header-support.h
+ HINTS "${PKGCONFIG_CAPNP_INCLUDEDIR}" ${PKGCONFIG_CAPNP_INCLUDE_DIRS}
+)
+
+find_program(CAPNP_EXECUTABLE
+ NAMES capnp
+ DOC "Cap'n Proto Command-line Tool"
+ HINTS "${PKGCONFIG_CAPNP_PREFIX}/bin"
+)
+
+find_program(CAPNPC_CXX_EXECUTABLE
+ NAMES capnpc-c++
+ DOC "Capn'n Proto C++ Compiler"
+ HINTS "${PKGCONFIG_CAPNP_PREFIX}/bin"
+)
+
+# Only *require* the include directory, libkj, and libcapnp. If compiling with
+# CAPNP_LITE, nothing else will be found.
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CAPNP DEFAULT_MSG
+ CAPNP_INCLUDE_DIRS
+ CAPNP_LIB_KJ
+ CAPNP_LIB_CAPNP
+)
diff --git a/PKGBUILD b/PKGBUILD
index f5f368e5ec40..72d7a3b27c7c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=mir-git
_pkgname=mir
pkgver=1.5.0+120+g5fdc44755a
-pkgrel=1
+pkgrel=2
pkgdesc="Canonical's display server"
url='https://mir-server.io'
arch=(x86_64 i686 armv7h aarch64)
@@ -19,9 +19,11 @@ optdepends=('qterminal: required for miral demos'
'xcursor-dmz: opt requirement for miral demos'
'qtubuntu: opt requirement for miral demos')
source=('git+https://github.com/MirServer/mir.git'
- 'https://raw.githubusercontent.com/capnproto/capnproto/04fd66e2992a3ed38d686642a3c479a7f3e131c9/c%2B%2B/cmake/FindCapnProto.cmake')
+ 'https://patch-diff.githubusercontent.com/raw/MirServer/mir/pull/1087.patch'
+ 'https://patch-diff.githubusercontent.com/raw/MirServer/mir/pull/1088.patch')
sha256sums=('SKIP'
- '83153402ea0220a9ed3f9d2c2c157eb49fedf340f368cd8173f0966b3fbf2647')
+ 'b86c2359309b951fdb574de9381d2fc879709a4be81d22b9f6cb10198c26b3a4'
+ '1e1a1b188db2fa540c200bf66e15473230f91cdadffa3040985ec4b7503ce2bd')
BUILD_DIR=build
@@ -29,7 +31,8 @@ prepare() {
cd ${_pkgname}
git submodule init
git submodule update
- cp ../FindCapnProto.cmake cmake/
+ patch -Np1 -i "${srcdir}/1087.patch"
+ patch -Np1 -i "${srcdir}/1088.patch"
}
pkgver() {