2023-03-24 02:17:13 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/linux-test-project/lcov/releases/download/v{{ version.raw }}/lcov-{{ version.raw }}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
2023-05-26 01:01:02 +03:00
|
|
|
github: linux-test-project/lcov
|
2023-03-24 02:17:13 +03:00
|
|
|
strip: /^v/
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/lcov
|
|
|
|
- bin/geninfo
|
|
|
|
- bin/genhtml
|
|
|
|
- bin/gendesc
|
|
|
|
- bin/genpng
|
|
|
|
|
2023-05-26 01:01:02 +03:00
|
|
|
platforms: linux
|
|
|
|
|
2023-03-24 02:17:13 +03:00
|
|
|
dependencies:
|
|
|
|
perl.org: ">=5"
|
|
|
|
|
|
|
|
runtime:
|
|
|
|
env:
|
|
|
|
PERL5LIB: ${{prefix}}/lib/perl5
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
tea.xyz/gx/cc: c99
|
|
|
|
tea.xyz/gx/make: '*'
|
|
|
|
cpanmin.us: ^1
|
2023-05-26 01:01:02 +03:00
|
|
|
script:
|
|
|
|
- cpanm -l {{prefix}} $PKGS
|
|
|
|
- make --jobs {{ hw.concurrency }} $ARGS install
|
|
|
|
- fix-shebangs.ts {{prefix}}/bin/*
|
|
|
|
|
|
|
|
# v2 installs to lib/lcov
|
|
|
|
- |
|
|
|
|
if test -d "{{prefix}}/lib/lcov"; then
|
|
|
|
cd "{{prefix}}/lib"
|
|
|
|
test -d perl5 || mkdir perl5
|
|
|
|
mv lcov/* perl5
|
|
|
|
rmdir lcov
|
|
|
|
ln -s perl5 lcov
|
|
|
|
fi
|
|
|
|
|
|
|
|
# cpanm installs without write perms
|
|
|
|
- chmod -R +w "{{prefix}}/lib/perl5"
|
|
|
|
|
|
|
|
# need to clean up paths in the scripts
|
|
|
|
- |
|
|
|
|
cd "{{prefix}}/bin"
|
|
|
|
|
|
|
|
sed -i.bak \
|
|
|
|
-e '2i use File::Basename qw(dirname);' \
|
|
|
|
-e 's|"{{prefix}}|dirname($0) . "/..|g' \
|
|
|
|
* ../lib/perl5/lcovutil.pm
|
|
|
|
rm *.bak ../lib/perl5/lcovutil.pm.bak
|
2023-03-24 02:17:13 +03:00
|
|
|
env:
|
2023-05-26 01:01:02 +03:00
|
|
|
PKGS:
|
|
|
|
- Capture::Tiny
|
|
|
|
- DateTime
|
|
|
|
- DateTime::Locale
|
|
|
|
- Devel::Cover
|
|
|
|
- Digest::MD5
|
|
|
|
- ExtUtils::Helpers
|
|
|
|
- File::Find
|
|
|
|
- File::Spec
|
|
|
|
- IPC::System::Simple
|
|
|
|
- JSON::XS
|
|
|
|
- Memory::Process
|
|
|
|
- Module::Build::Tiny
|
|
|
|
- Readonly
|
|
|
|
- Time::HiRes
|
2023-03-24 02:17:13 +03:00
|
|
|
ARGS:
|
|
|
|
- PREFIX="{{prefix}}"
|
|
|
|
- BIN_DR="{{prefix}}/bin"
|
|
|
|
|
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
gnu.org/gcc: '*'
|
|
|
|
script: |
|
|
|
|
mv $FIXTURE hello_world.c
|
|
|
|
gcc -g -O2 --coverage -o hello_world hello_world.c
|
|
|
|
./hello_world
|
|
|
|
lcov --gcov-tool gcov --directory . --capture --output-file all_coverage.info
|
|
|
|
test -f all_coverage.info
|
|
|
|
grep hello_world.c all_coverage.info
|
|
|
|
fixture: |
|
|
|
|
#include <stdio.h>
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
puts("hello world");
|
|
|
|
return 0;
|
|
|
|
}
|