FreeBSD Bugzilla – Attachment 203074 Details for
Bug 235650
ports-mgmt/portlint: Should complain when {opt}_CMAKE_xx is set without USES=cmake
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Add checks for {opt}_CMAKE without USES=cmake
portlint.diff (text/plain), 1.23 KB, created by
Adriaan de Groot
on 2019-03-23 20:54:52 UTC
(
hide
)
Description:
Add checks for {opt}_CMAKE without USES=cmake
Filename:
MIME Type:
Creator:
Adriaan de Groot
Created:
2019-03-23 20:54:52 UTC
Size:
1.23 KB
patch
obsolete
>Index: ports-mgmt/portlint/src/portlint.pl >=================================================================== >--- ports-mgmt/portlint/src/portlint.pl (revision 495207) >+++ ports-mgmt/portlint/src/portlint.pl (working copy) >@@ -1792,7 +1792,7 @@ > } > > # >- # while file: check that CMAKE_BOOL just has words >+ # whole file: check that CMAKE_BOOL just has words > # > print "OK: checking that *_CMAKE_BOOL only contains words.\n" if ($verbose); > if ($whole =~ /\n([\w\d]+)_CMAKE_BOOL[?+:]?=([^\n]+)\n/) { >@@ -1804,6 +1804,27 @@ > } > } > >+ print "OK: checking that *CMAKE* co-occurs with *USES+=cmake.\n" if ($verbose); >+ while ($whole =~ /\n([\w\d]+_)?CMAKE_(ARGS|BOOL|BOOL_ON|BOOL_OFF|OFF|ON)\b/g) { >+ my $lineno = &linenumber($`); >+ my $o = $1; >+ my $found_cmake = 0; >+ # Check in global USES and per-option USES >+ if ($makevar{USES} =~ /\b(cmake\b|cmake:)/) { >+ $found_cmake = 1; >+ } >+ elsif ($o) { >+ my $option_uses = "${o}USES"; >+ if ($makevar{$option_uses} && $makevar{$option_uses} =~ /\b(cmake\b|cmake:)/) { >+ $found_cmake = 1; >+ } >+ } >+ unless ($found_cmake) { >+ $o = "" unless ($o); >+ &perror("FATAL", $file, $lineno, "${o}CMAKE_$2 is set without USES+=cmake"); >+ } >+ } >+ > # > # whole file: NO_CHECKSUM > #
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
adridg
:
maintainer-approval?
(
marcus
)
Actions:
View
|
Diff
Attachments on
bug 235650
: 203074