diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-07-10 12:55:06 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-08-07 10:08:23 -0500 |
commit | 05c00040eb6b0ff6c73d268d0a67e83b1a6bc228 (patch) | |
tree | c854d376c07336e6992782d5cd39afeaff347d01 /user | |
parent | 5e2729b8bbe4ef800a44c0a7f10312fda7451ecb (diff) | |
download | packages-05c00040eb6b0ff6c73d268d0a67e83b1a6bc228.tar.gz packages-05c00040eb6b0ff6c73d268d0a67e83b1a6bc228.tar.bz2 packages-05c00040eb6b0ff6c73d268d0a67e83b1a6bc228.tar.xz packages-05c00040eb6b0ff6c73d268d0a67e83b1a6bc228.zip |
user/perl-extutils-cppguess: Fix tests
Closes: #1174
Diffstat (limited to 'user')
-rw-r--r-- | user/perl-extutils-cppguess/APKBUILD | 9 | ||||
-rw-r--r-- | user/perl-extutils-cppguess/fix.patch | 60 |
2 files changed, 66 insertions, 3 deletions
diff --git a/user/perl-extutils-cppguess/APKBUILD b/user/perl-extutils-cppguess/APKBUILD index e2fdf5e55..653135d60 100644 --- a/user/perl-extutils-cppguess/APKBUILD +++ b/user/perl-extutils-cppguess/APKBUILD @@ -6,7 +6,7 @@ _author=ETJ _au=${_author%%"${_author#??}"} _a=${_author%%"${_author#?}"} pkgver=0.27 -pkgrel=0 +pkgrel=1 pkgdesc="Perl module for checking C++ compiler and flags" url="https://metacpan.org/pod/ExtUtils::CppGuess" arch="noarch" @@ -14,7 +14,9 @@ license="Artistic-1.0-Perl OR GPL-1.0+" depends="perl perl-capture-tiny perl-extutils-parsexs" makedepends="perl-dev perl-module-build perl-extutils-cbuilder" subpackages="$pkgname-doc" -source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz" +source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz + fix.patch + " builddir="$srcdir/ExtUtils-CppGuess-$pkgver" build() { @@ -31,4 +33,5 @@ package() { find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } -sha512sums="289e38f3033b3072ff40dffdea8cb60bc9f91e426ff927de2e8499724cecb03f76c4740b2f868d6c55bf019c9e6eb1a5de20111591c7292e60765f65a249e60c ExtUtils-CppGuess-0.27.tar.gz" +sha512sums="289e38f3033b3072ff40dffdea8cb60bc9f91e426ff927de2e8499724cecb03f76c4740b2f868d6c55bf019c9e6eb1a5de20111591c7292e60765f65a249e60c ExtUtils-CppGuess-0.27.tar.gz +d58f11f617021ff0783f615d5d777890ec379de6a9cb05ed271cae37529e63a7158be7aa83392d8882216971039941441f4d6d14e3155c7a51dd5e764f6c2976 fix.patch" diff --git a/user/perl-extutils-cppguess/fix.patch b/user/perl-extutils-cppguess/fix.patch new file mode 100644 index 000000000..13ddb2203 --- /dev/null +++ b/user/perl-extutils-cppguess/fix.patch @@ -0,0 +1,60 @@ +Fix MSVC detection. I don't know why I did this, either. + +Ref: #1174 + +--- ExtUtils-CppGuess-0.27/lib/ExtUtils/CppGuess.pm.old 2023-11-19 13:19:51.000000000 -0600 ++++ ExtUtils-CppGuess-0.27/lib/ExtUtils/CppGuess.pm 2024-07-10 11:26:59.221777726 -0500 +@@ -257,6 +257,12 @@ + compiler_command => 'clang++', + extra_lflags => '-lc++', + ); ++ } elsif ( $self->_cc_is_msvc( $c_compiler ) ) { ++ %guess = ( ++ compiler_command => 'cl', ++ extra_cflags => '-TP -EHsc', ++ extra_lflags => 'msvcprt.lib', ++ ); + } elsif( $self->_cc_is_sunstudio( $c_compiler ) ) { + %guess = ( + compiler_command => 'CC', +@@ -277,12 +283,6 @@ + # Don't use -lstdc++ if Perl was linked with -static-libstdc++ (ActivePerl 5.18+ on Windows) + $guess{extra_lflags} = '-lstdc++' + unless ($self->_config->{ldflags} || '') =~ /static-libstdc\+\+/; +- } elsif ( $self->_cc_is_msvc( $c_compiler ) ) { +- %guess = ( +- compiler_command => 'cl', +- extra_cflags => '-TP -EHsc', +- extra_lflags => 'msvcprt.lib', +- ); + } + $guess{$ENV2VAL{$_}} = $ENV{$_} for grep defined $ENV{$_}, keys %ENV2VAL; + if (!%guess) { +@@ -383,8 +383,12 @@ + + sub _cc_is_msvc { + my( $self, $cc ) = @_; +- $self->{is_msvc} +- = ($self->_os =~ /MSWin32/ and File::Basename::basename($cc) =~ /^cl/i); ++ $self->{is_msvc} = undef; ++ if ( ++ ($self->_os =~ /MSWin32/ and File::Basename::basename($cc) =~ /^cl/i) ++ ) { ++ $self->{is_msvc} = 1; ++ } + return $self->{is_msvc}; + } + +--- ExtUtils-CppGuess-0.27/t/002_icpp.t.old 2023-11-19 13:11:06.000000000 -0600 ++++ ExtUtils-CppGuess-0.27/t/002_icpp.t 2024-07-10 11:27:48.506428703 -0500 +@@ -9,8 +9,8 @@ + [ + { os => 'MSWin32', cc => 'cl', config => {ccflags => ''} }, + { +- is_sunstudio => 0, +- is_msvc => 1, is_gcc => 0, is_clang => 0, ++ is_sunstudio => undef, ++ is_msvc => 1, is_gcc => undef, is_clang => undef, + compiler_command => 'cl -TP -EHsc', + linker_flags => 'msvcprt.lib', + }, |