portlint: Improving need of USES=desktop-file-utils

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Sun, 12 Mar 2023 08:19:15 UTC
Hello all,

portlint gives a fatal warning about need of desktop-file-utils when a
.desktop file is installed.
According to
this is true if MimeType entry is defined in .desktop file.

Is there a way to check presense of MimeType on .desktop file?
if ($_ =~ m|\.desktop$| && $makevar{USES} !~ /\bdesktop-file-utils\b/) {
                        &perror("FATAL", $file, $., "this port installs
.desktop files. ".
                                "Please add `desktop-file-utils` to
USES.");                }
Also, Q/A check warns about "maybe not needed" when MimeType not present.


Nuno Teixeira
FreeBSD Committer (ports)