From 568a6b00d88d87b2e5a5f39a8ac5f94bfd3cc393 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Nov 20 2017 22:28:21 +0000 Subject: Initial import into Fedora (RH#1513512) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36139e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/mir-0.28.1.tar.xz diff --git a/PR11-benchmarks-Use-standard-options-to-install-perf-fram.patch b/PR11-benchmarks-Use-standard-options-to-install-perf-fram.patch new file mode 100644 index 0000000..8c175c9 --- /dev/null +++ b/PR11-benchmarks-Use-standard-options-to-install-perf-fram.patch @@ -0,0 +1,34 @@ +From 40ce34ff7c21a5f5da22495620e4a23799d64283 Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Fri, 3 Nov 2017 15:38:02 -0400 +Subject: [PATCH] benchmarks: Use standard options to install perf framework on + non-Debian + +The usage of Debian-specific options broke the build for Fedora. + +Signed-off-by: Neal Gompa +--- + benchmarks/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt +index 2fe2c5aa55..c99d3a0ea5 100644 +--- a/benchmarks/CMakeLists.txt ++++ b/benchmarks/CMakeLists.txt +@@ -28,7 +28,12 @@ target_link_libraries(benchmark_multiplexing_dispatchable + # Note: We need to write \$ENV{DESTDIR} (note the \$) to make + # CMake replace the DESTDIR variable at installation time rather + # than configuration time +-install(CODE "execute_process(COMMAND python3 mir_perf_framework_setup.py install -f --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR} --install-layout=deb --no-compile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") ++if (EXISTS "/etc/debian_version") ++ # Debian requires special options, since they do a custom layout and things... ++ install(CODE "execute_process(COMMAND python3 mir_perf_framework_setup.py install -f --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR} --install-layout=deb --no-compile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") ++else() ++ install(CODE "execute_process(COMMAND python3 mir_perf_framework_setup.py install -O1 -f --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") ++endif() + + set(MIR_PERF_SCRIPTS + key_event_latency.py +-- +2.13.6 + diff --git a/PR20-Find-the-gmock-library-on-Fedora-28.patch b/PR20-Find-the-gmock-library-on-Fedora-28.patch new file mode 100644 index 0000000..afcbb5b --- /dev/null +++ b/PR20-Find-the-gmock-library-on-Fedora-28.patch @@ -0,0 +1,51 @@ +From b1ce9e090d52c5f540d62b8d02f0d74b1b452d20 Mon Sep 17 00:00:00 2001 +From: Alan Griffiths +Date: Wed, 8 Nov 2017 17:48:57 +0000 +Subject: [PATCH] Find the gmock library on Fedora 28 (Fixes #12) + +--- + cmake/FindGtestGmock.cmake | 27 ++++++++++++++++----------- + 1 file changed, 16 insertions(+), 11 deletions(-) + +diff --git a/cmake/FindGtestGmock.cmake b/cmake/FindGtestGmock.cmake +index df5937fec9..13a63eb8b9 100644 +--- a/cmake/FindGtestGmock.cmake ++++ b/cmake/FindGtestGmock.cmake +@@ -40,21 +40,26 @@ find_file(GMOCK_SOURCE + DOC "GMock source" + PATHS /usr/src/googletest/googlemock/src/ /usr/src/gmock/ /usr/src/gmock/src) + +-message(STATUS "GMOCK_SOURCE=${GMOCK_SOURCE}") ++if (EXISTS ${GMOCK_SOURCE}) ++ find_path(GMOCK_INCLUDE_DIR gmock/gmock.h) + +-find_path(GMOCK_INCLUDE_DIR gmock/gmock.h) ++ add_library(GMock STATIC ${GMOCK_SOURCE}) + +-add_library(GMock STATIC ${GMOCK_SOURCE}) ++ if (EXISTS /usr/src/googletest/googlemock/src) ++ set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/googletest/googlemock") ++ endif() + +-if (EXISTS /usr/src/googletest/googlemock/src) +- set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/googletest/googlemock") +-endif() ++ if (EXISTS /usr/src/gmock/src) ++ set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/gmock") ++ endif() + +-if (EXISTS /usr/src/gmock/src) +- set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/gmock") +-endif() ++ find_package_handle_standard_args(GMock DEFAULT_MSG GMOCK_INCLUDE_DIR) + +-find_package_handle_standard_args(GMock DEFAULT_MSG GMOCK_INCLUDE_DIR) ++ set(GMOCK_LIBRARY GMock) ++else() ++ # Assume gmock is no longer source, we'll find out soon enough if that's wrong ++ add_custom_target(GMock) ++ string(REPLACE gtest gmock GMOCK_LIBRARY ${GTEST_LIBRARY}) ++endif() + +-set(GMOCK_LIBRARY GMock) + set(GMOCK_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARY}) diff --git a/PR40-Export-InternalSwap-methods-from-libmirprotobuf.patch b/PR40-Export-InternalSwap-methods-from-libmirprotobuf.patch new file mode 100644 index 0000000..f0271f3 --- /dev/null +++ b/PR40-Export-InternalSwap-methods-from-libmirprotobuf.patch @@ -0,0 +1,20 @@ +From 62b9b280774245a53b7fba80cf5f60833b53309d Mon Sep 17 00:00:00 2001 +From: Alan Griffiths +Date: Fri, 17 Nov 2017 12:42:27 +0000 +Subject: [PATCH] Export InternalSwap methods from libmirprotobuf (Fixes #39) + +--- + src/protobuf/symbols.map | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/protobuf/symbols.map b/src/protobuf/symbols.map +index 4ce8abb6b2..7363a7e382 100644 +--- a/src/protobuf/symbols.map ++++ b/src/protobuf/symbols.map +@@ -1180,5 +1180,6 @@ MIR_PROTOBUF_FEDORA { + mir::protobuf::_SurfaceId_default_instance_; + mir::protobuf::_SurfaceSpecification_default_instance_; + mir::protobuf::_Rectangle_default_instance_; ++ mir::protobuf::*::InternalSwap*; + }; + } MIR_PROTOBUF_0.27; diff --git a/README.md b/README.md deleted file mode 100644 index efd49f6..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# mir - -The mir package \ No newline at end of file diff --git a/mir.spec b/mir.spec new file mode 100644 index 0000000..57cb3a2 --- /dev/null +++ b/mir.spec @@ -0,0 +1,364 @@ +%global vermajor 0.28 + +# Disable tests for Fedora < 27 (c.f. rhbz#304121) +# While I would ordinarily enable tests for Fedora 27+, +# there's a problem with gmock and gtest in Rawhide that +# breaks the unit tests. Once this is fixed, these will be +# enabled for Fedora 27 and newer +%bcond_with check + + +# Enable LTO +%bcond_without lto + +Name: mir +Version: %{vermajor}.1 +Release: 1%{?dist} +Summary: Next generation display server + +License: (GPLv2 or GPLv3) and (LGPLv2 or LGPLv3) and BSD +URL: https://mir-server.io/ +Source0: https://launchpad.net/%{name}/%{vermajor}/%{version}/+download/%{name}-%{version}.tar.xz + +# Fix build of python3-mir-perf-framework +# From: https://github.com/MirServer/mir/pull/11 +Patch0: PR11-benchmarks-Use-standard-options-to-install-perf-fram.patch + +# Fix detection of GMock in Fedora 28+ +# From: https://github.com/MirServer/mir/pull/20 +Patch1: PR20-Find-the-gmock-library-on-Fedora-28.patch + +# Fix linking with protobuf 3.4.1 +# From: https://github.com/MirServer/mir/pull/40 +Patch2: PR40-Export-InternalSwap-methods-from-libmirprotobuf.patch + +BuildRequires: cmake, make, doxygen, graphviz, lcov, gcovr +BuildRequires: /usr/bin/xsltproc +BuildRequires: boost-devel, protobuf-compiler, capnproto +BuildRequires: libdrm-devel, mesa-libEGL-devel, mesa-libGLES-devel +BuildRequires: python3-devel +BuildRequires: mesa-libgbm-devel, glm-devel, libepoxy-devel +BuildRequires: protobuf-devel, protobuf-lite-devel, capnproto-devel +BuildRequires: glog-devel, lttng-ust-devel +BuildRequires: libxkbcommon-devel, umockdev-devel +BuildRequires: systemd-devel, libevdev-devel +BuildRequires: libinput-devel +BuildRequires: libuuid-devel, nettle-devel +BuildRequires: glib2-devel, freetype-devel, gflags-devel +BuildRequires: wayland-devel, libxml++-devel, python3-pillow +# For some reason, this doesn't get pulled in automatically into the buildroot +BuildRequires: libatomic +%if %{with check} +BuildRequires: gtest-devel, gmock-devel +%endif + +# For detecting the font for CMake +BuildRequires: gnu-free-sans-fonts + +# For validating the desktop file for mir-demos +BuildRequires: %{_bindir}/desktop-file-validate + +BuildRequires: python3 + +# Add architectures as verified to work +%ifarch %{ix86} x86_64 %{arm} aarch64 +BuildRequires: valgrind +%endif + + +%description +Mir is a display server running on linux systems, +with a focus on efficiency, robust operation, +and a well-defined driver model. + +%package utils +Summary: Utilities for Mir +Requires: %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description utils +Utilities for Mir. + +%package devel +Summary: Development files for Mir +License: LGPLv2 or LGPLv3 +Requires: %{name}-common-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +%if %{with check} +Requires: %{name}-test-libs-static%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +%endif + +%description devel +This package provides the development files to create +applications that can run on Mir. + +%package common-libs +Summary: Common libraries for Mir +License: LGPLv2 or LGPLv3 + +%description common-libs +This package provides the libraries common to be used +by Mir clients or Mir servers. + +%package server-libs +Summary: Server libraries for Mir +License: LGPLv2 or LGPLv3 +Requires: %{name}-common-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description server-libs +This package provides the libraries for applications +that use the Mir server. + +%package client-libs +Summary: Client libraries for Mir +License: LGPLv2 or LGPLv3 +Requires: %{name}-common-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description client-libs +This package provides the libraries for applications +that connect to a Mir server. + +%package client-libs-debugext +Summary: Debug extension for Mir client libraries +License: LGPLv2 or LGPLv3 +Requires: %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description client-libs-debugext +This package provides a debug extension library for +Mir clients. + +%package test-tools +Summary: Testing tools for Mir +Requires: %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description test-tools +This package provides tools for testing Mir. + +%package demos +Summary: Demonstration applications using Mir +Requires: %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: hicolor-icon-theme +# For some of the demos +Requires: gnu-free-sans-fonts + +%description demos +This package provides applications for demonstrating +the capabilities of the Mir display server. + +%package doc +Summary: Documentation for developing Mir based applications +BuildArch: noarch + +%description doc +This package provides documentation for developing Mir based +applications. + +%if %{with check} +%package -n python3-mir-perf-framework +Summary: Performance benchmark framework for Mir +BuildArch: noarch + +%description -n python3-mir-perf-framework +This package provides a benchmark framework for Mir +and Mir based applications. + +%package test-libs-static +Summary: Testing framework library for Mir +License: LGPLv2 or LGPLv3 +Requires: %{name}-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description test-libs-static +This package provides the static library for building +Mir unit and integration tests. + +%endif + +%prep +%autosetup -p1 + + +%build + +mkdir -p %{_target_platform} +pushd %{_target_platform} +%cmake .. %{?with_lto:-DMIR_LINK_TIME_OPTIMIZATION=ON} \ + -DCMAKE_INSTALL_LIBEXECDIR="usr/libexec/mir" \ + %{?!with_check:-DMIR_ENABLE_TESTS=OFF -DMIR_RUN_ACCEPTANCE_TESTS=OFF -DRUN_INTEGRATION_TESTS=OFF} \ + -DMIR_PLATFORM="mesa-kms;mesa-x11;eglstream-kms" +%make_build +popd + +%install +pushd %{_target_platform} +%make_install + +# Build and install documentation +make doc +mkdir -p %{buildroot}%{_datadir}/doc/mir-doc +cp -a doc/html %{buildroot}%{_datadir}/doc/mir-doc +popd + +# Nothing outside Mir should link to libmirprotobuf directly. +rm -fv %{buildroot}%{_libdir}/libmirprotobuf.so + +%if ! %{with check} +rm -rf %{buildroot}%{_datadir}/mir-perf-framework +%endif + +%check +%if %{with check} +pushd %{_target_platform} +ctest -V .. +popd +%endif +desktop-file-validate %{buildroot}%{_datadir}/applications/miral-shell.desktop + + +%post common-libs -p /sbin/ldconfig + +%postun common-libs -p /sbin/ldconfig + +%post server-libs -p /sbin/ldconfig + +%postun server-libs -p /sbin/ldconfig + +%post client-libs -p /sbin/ldconfig + +%postun client-libs -p /sbin/ldconfig + +%post client-libs-debugext -p /sbin/ldconfig + +%postun client-libs-debugext -p /sbin/ldconfig + +# These really should be file triggers in hicolor-icon-theme... +%post demos +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun demos +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans demos +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%files utils +%license COPYING.* +%doc README.md +%{_bindir}/mirbacklight +%{_bindir}/mirin +%{_bindir}/mirout +%{_bindir}/mirrun +%{_bindir}/mirscreencast + +%files devel +%{_libdir}/libmir*.so +%exclude %{_libdir}/libmir_demo_server_loadable.so +%{_libdir}/pkgconfig/mir*.pc +%{_includedir}/mir* + +%files common-libs +%license COPYING.* +%doc README.md +%{_libdir}/libmircore.so.* +%{_libdir}/libmircommon.so.* +%{_libdir}/libmircookie.so.* +%{_libdir}/libmirplatform.so.* +%{_libdir}/libmirprotobuf.so.* +%dir %{_libdir}/mir + +%files server-libs +%license COPYING.* +%doc README.md +%{_libdir}/libmiral.so.* +%{_libdir}/libmirserver.so.* +%dir %{_libdir}/mir/server-platform +%{_libdir}/mir/server-platform/graphics-mesa-kms.so.* +%{_libdir}/mir/server-platform/input-evdev.so.* +%{_libdir}/mir/server-platform/server-mesa-x11.so.* +%{_libdir}/mir/server-platform/graphics-eglstream-kms.so.* + +%files client-libs +%license COPYING.* +%doc README.md +%{_libdir}/libmirclient.so.* +%dir %{_libdir}/mir/client-platform +%{_libdir}/mir/client-platform/mesa.so.* +%{_libdir}/mir/client-platform/eglstream.so.* + +%files client-libs-debugext +%{_libdir}/libmirclient-debug-extension.so.* + +%files test-tools +%if %{with check} +%{_bindir}/mir_*test* +%{_bindir}/mir_stress +%{_libdir}/mir/client-platform/dummy.so +%{_libdir}/mir/server-platform/graphics-dummy.so +%{_libdir}/mir/server-platform/graphics-throw.so +%{_libdir}/mir/server-platform/input-stub.so +%{_datadir}/mir-test-data/ +%endif +%dir %{_libdir}/mir/tools +%{_libdir}/mir/tools/libmirserverlttng.so +%{_libdir}/mir/tools/libmirclientlttng.so + +%files demos +%license COPYING.* +%doc README.md +%{_bindir}/mir_demo_* +%{_bindir}/miral-* +%{_libdir}/libmir_demo_server_loadable.so +%{_datadir}/applications/miral-shell.desktop +%{_datadir}/icons/hicolor/scalable/apps/ubuntu-logo.svg + +%files doc +%license COPYING.* +%doc README.md +%{_datadir}/doc/mir-doc/html + +%if %{with check} +%files -n python3-mir-perf-framework +%license COPYING.* +%doc README.md +%{python3_sitelib}/mir_perf_framework +%{python3_sitelib}/mir_perf_framework*.egg-info +%{_datadir}/mir-perf-framework + +%files test-libs-static +%license COPYING.* +%doc README.md +%{_libdir}/libmir-test-assist.a +%endif + +%changelog +* Mon Nov 20 2017 Neal Gompa - 0.28.1-1 +- Initial import into Fedora (RH#1513512) + +* Sat Nov 18 2017 Neal Gompa - 0.28.1-0.3 +- Add scriptlets for updating icon cache to mir-demos +- Add hicolor-icon-theme dependency to mir-demos +- Validate the desktop file shipped in mir-demos +- Declare which subpackages own Mir library subdirectories + +* Fri Nov 17 2017 Neal Gompa - 0.28.1-0.2 +- Add patch to fix building with libprotobuf 3.4.1 + +* Wed Nov 15 2017 Neal Gompa - 0.28.1-0.1 +- Rebase to 0.28.1 +- Add patch to fix installing the perf framework +- Add patch to fix locating Google Mock for building Mir + +* Sat Apr 15 2017 Neal Gompa - 0.26.2-0.1 +- Rebase to 0.26.2 + +* Wed Nov 9 2016 Neal Gompa - 0.24.1-0.2 +- Add patch to add missing xkbcommon Requires to mirclient.pc + +* Mon Oct 31 2016 Neal Gompa - 0.24.1-0.1 +- Initial packaging diff --git a/sources b/sources new file mode 100644 index 0000000..6dfeb97 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mir-0.28.1.tar.xz) = 5cd52389402d79453bbb8a0f9e6255305fcdd6a5f1037ca5adc9c905b4a1e77b0b456ce580a4d5a94b680762e1ac44209e7f920e9e1da57eaea207899c81f321