BuildRequires: pkgconfig(tzsh-launcher-service)
BuildRequires: pkgconfig(libtbm)
+%if 0%{?gcov:1}
+BuildRequires: lcov
+BuildRequires: zip
+%endif
+
%description
API for creating a new instance of the widget and managing its life-cycle.
%description devel
Header and package configuration files for the widget viewer development
+%if 0%{?gcov:1}
+%package gcov
+Summary: Screen Connector(gcov)
+Group: Application Framework/Libraries
+
+%description gcov
+gcov objects of a screen-connector library
+%endif
+
%prep
%setup -q
cp %{SOURCE1001} .
cp %{SOURCE1008} .
%build
-
-export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
-export CXXFLAGS+=" -DEFL_BETA_API_SUPPORT "
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT"
+export CXXFLAGS+=" -DEFL_BETA_API_SUPPORT"
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DTZ_SYS_SHARE=/usr/share -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
make %{?jobs:-j%jobs}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
%install
rm -rf %{buildroot}
%make_install
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
+
+%check
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}/usr/lib/
+ctest -V
+
+%if 0%{?gcov:1}
+lcov -c --ignore-errors graph --no-external -q -d . -o screen-connector.info
+genhtml screen-connector.info -o screen-connector.out
+zip -r screen-connector.zip screen-connector.out
+install -m 0644 screen-connector.zip %{buildroot}%{_datadir}/gcov/
+%endif
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/*
+%endif
#################################################
# libscreen_connector_watcher
RemoteSurfaceEvas& RemoteSurfaceEvas::operator=(
RemoteSurfaceEvas&&) noexcept = default;
+RemoteSurfaceEvas::Impl::~Impl() = default;
RemoteSurfaceEvas::Impl::Impl(RemoteSurfaceEvas* parent,
std::shared_ptr<EvasObject> viewerWin, bool mock)
: ImageEventListener((RemoteSurface*)parent),