* fix(lcov)

* wip

* wip

* wip

* wip

* sigh
This commit is contained in:
Jacob Heider 2023-05-25 18:01:02 -04:00 committed by GitHub
parent 96062d4d3f
commit 3bc7b027e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ distributable:
strip-components: 1 strip-components: 1
versions: versions:
github: linux-test-project/lcov/releases/tags github: linux-test-project/lcov
strip: /^v/ strip: /^v/
provides: provides:
@ -13,6 +13,8 @@ provides:
- bin/gendesc - bin/gendesc
- bin/genpng - bin/genpng
platforms: linux
dependencies: dependencies:
perl.org: ">=5" perl.org: ">=5"
@ -25,11 +27,49 @@ build:
tea.xyz/gx/cc: c99 tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*' tea.xyz/gx/make: '*'
cpanmin.us: ^1 cpanmin.us: ^1
script: | script:
cpanm -l {{prefix}} File::Find - cpanm -l {{prefix}} $PKGS
make --jobs {{ hw.concurrency }} $ARGS install - make --jobs {{ hw.concurrency }} $ARGS install
fix-shebangs.ts {{prefix}}/bin/* - 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
env: env:
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
ARGS: ARGS:
- PREFIX="{{prefix}}" - PREFIX="{{prefix}}"
- BIN_DR="{{prefix}}/bin" - BIN_DR="{{prefix}}/bin"