From 51dd51190978f8609dc5807e756916619944c1d0 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Aug 16 2018 14:47:39 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..973d8eb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/kcov-35.tar.gz diff --git a/fa51b645.patch b/fa51b645.patch new file mode 100644 index 0000000..e7029a8 --- /dev/null +++ b/fa51b645.patch @@ -0,0 +1,12 @@ +diff --git i/src/engines/ptrace.cc w/src/engines/ptrace.cc +index 59b615f..8f17fec 100644 +--- i/src/engines/ptrace.cc ++++ w/src/engines/ptrace.cc +@@ -21,6 +21,7 @@ + + #if defined(__aarch64__) + # include ++# include + #endif + + #include diff --git a/kcov.spec b/kcov.spec new file mode 100644 index 0000000..6fe256e --- /dev/null +++ b/kcov.spec @@ -0,0 +1,82 @@ +Name: kcov +Version: 35 +Release: 1%{?dist} +Summary: Code coverage tool without special compilation options + +# Licenses of kcov itself and its bundled js libraries (see below) +License: GPLv2 and BSD and MIT +URL: https://simonkagstrom.github.io/%{name} +Source: https://github.com/SimonKagstrom/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch: https://github.com/SimonKagstrom/%{name}/commit/fa51b645.patch + +# https://github.com/SimonKagstrom/kcov/blob/v35/src/solib-parser/lib.c#L87-L97 +ExcludeArch: s390 s390x + +BuildRequires: binutils-devel +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libdw) +BuildRequires: pkgconfig(libelf) +BuildRequires: pkgconfig(zlib) +BuildRequires: python2 +BuildRequires: /usr/bin/python + +# NB: Last I tried to unbundle those dependencies I hit a first roadblock in +# the sense that all three were available in Fedora but packaged differently +# and none of the versions matched: +# +# - js-jquery.noarch (compat package js-jquery2.noarch too) +# - nodejs-handlebars.noarch +# - xstatic-jquery-tablesorter-common.noarch +# +# All three packages drop files in different locations, following different +# patterns. NodeJS modules in particular look a bit more involved. +# +# Since those dependencies are merely used to slightly improve static HTML +# reports, I'd rather not spend mindless efforts unbundling things that are +# not ultimately exposed by the package. They are embedded in the kcov(1) +# program and written by `html-writer.cc` as static strings. +# +# It would make more sense to unbundle those if they were used as libraries +# instead of just assets. Here it seems overkill. I'm registering them as +# bundled provides even though they don't appear as individual files to at +# least keep awareness of what I consider a non-issue. +# +# -- dridi +Provides: bundled(handlebars) = 2.2.0 +Provides: bundled(jquery) = 2.1.1 +Provides: bundled(jquery-tablesorter) = 2.17.1 + + +%description +Kcov is a code coverage tester for compiled programs, Python scripts and shell +scripts. It allows collecting code coverage information from executables +without special command-line arguments, and continuously produces output from +long-running applications. + + +%prep +%setup -q +%patch -p1 +rm -frv external/ # remove LLDB headers bundled for MacOS + + +%build +%cmake . +%make_build + + +%install +%make_install + + +%files +%license COPYING* +%{_bindir}/* +%{_mandir}/man1/* + + +%changelog +* Wed Aug 15 2018 Dridi Boukelmoune - 35-1 +- Initial spec diff --git a/sources b/sources new file mode 100644 index 0000000..7c3b60f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (kcov-35.tar.gz) = a9e04b782eb8444ee4d13be3ceed8a0edd68f0ec3b0e01535730b5d5590e43dbe3fd6485d03df9a57ec6ba9c0440b3208b47dc29e2175816bfe7112004df9fb3