Browse Source

Check for .desktop file installation.

PR:		265551
Joe Clarke 1 year ago
parent
commit
45f5b82880
1 changed files with 9 additions and 0 deletions
  1. 9 0
      portlint.pl

+ 9 - 0
portlint.pl

@@ -821,6 +821,11 @@ sub checkplist {
 				"for more details)");
 		}
 
+		if ($_ =~ m|\.desktop$| && $makevar{USES} !~ /\bdesktop-file-utils\b/) {
+			&perror("FATAL", $file, $., "this port installs .desktop files. ".
+				"Please add `desktop-file-utils` to USES.");
+		}
+
 		if ($_ =~ m|^(%%([^%]+)%%)?.*\.mo$| && $makevar{USES} !~ /\bgettext\b/) {
 			my $show_nls_warn = 1;
 			if ($2) {
@@ -1569,6 +1574,10 @@ sub checkmakefile {
 				&perror("FATAL", "", -1, "PLIST_FILES: files cannot contain ".
 					"%%FOO%% variables.  Use make variables and logic instead");
 			}
+			if ($plist_file =~ m|\.desktop$| && $makevar{USES} !~ /\bdesktop-file-utils\b/) {
+				&perror("FATAL", "", -1, "PLIST_FILES: this port installs .desktop files. ".
+					"please add `desktop-file-utils` to USES.");
+			}
 
 		}
 	}