diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index d2c32d24c2..0b2588d24a 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -1,640 +1,640 @@
#!/usr/bin/perl -T
#
# Copyright (c) 1996-2024 Wolfram Schneider ) {
chop;
$p{$_} = 1;
}
close P;
return 0;
}
# return the date of the last ports database update
sub last_update {
local ($file) = "$portsDatabaseHeadDir/$ports_database";
local ( $modtime, $modtimestr );
$modtime = ( stat($file) )[9];
if ( defined($modtime) && $modtime > 0 ) {
$modtimestr = strftime( "%Y-%m-%d %H:%M:%S UTC", gmtime($modtime) );
}
else {
$modtimestr = "Unknown";
}
return $modtimestr;
}
sub last_update_message {
return " Last database update: @{[ &last_update ]}
The FreeBSD Ports and Packages Collection offers a simple way for users and administrators to install applications.
"Package Name" searches for the name of a port or distribution.
"Description" searches case-insensitive in a short comment about the port.
"All" searches case-insensitive for the package name and in the
description about the port.
Handbook: Using the Ports Collection
You may also search the
ports manual pages.
The script ports.cgi use the file
$ports_database
as database for its operations. $ports_database is updated automatically every
two hours.
}
. qq{Category $1}
. "
\n\n";
$out_sec = $1;
}
}
$counter++;
$pathB = $path;
$pathB =~ s/^$localPrefix/ports/o;
$path =~ s/^$localPrefix/$remotePrefixFtp/o;
$descfile =~ s/^$localPrefix/$remotePrefixFtp/o;
$version = &encode_url($version);
#$version =~ s/[\+,]/X/g;
local ($l) = $path;
$l =~ s%^$remotePrefixFtp%$remotePrefixRepo/log%o;
local ($t) = $path;
$t =~ s%^$remotePrefixFtp%$remotePrefixRepo/tree%o;
$descfile =~ s%^$remotePrefixFtp%$remotePrefixRepo/plain%o;
print
qq{
\n};
print qq[Description :\n];
print qq[Changes
\n];
print qq{Maintained by: $email
\n};
local (@s) = split( /\s+/, $sections );
if ( $#s > 0 ) {
print qq{Also listed in: };
foreach (@s) {
print qq{$_ }
if $_ ne $out_sec;
}
print "
\n";
}
if ( $bdepends || $rdepends ) {
local ($flag) = 0;
local ($last) = '';
print qq{Requires: };
foreach ( sort split( /\s+/, "$bdepends $rdepends" ) ) {
# delete double entries
next if $_ eq $last;
$last = $_;
print ", " if $flag;
$flag++;
print qq{$_};
}
print "
\n";
}
print qq[
@{[ &footer_links ]}
};
}
sub footer {
print <
© 1996-2024 by Wolfram Schneider. All rights reserved.
General questions about FreeBSD ports should be sent to
$mailtoList
@{[ &last_update_message ]}
EOF
}
sub check_query {
my ($query, $sourceid) = @_;
$query =~ s/"/ /g;
$query =~ s/^\s+//;
$query =~ s/\s+$//;
# XXX: Firefox opensearch autocomplete workarounds
if ($sourceid eq 'opensearch') {
# remove space before a dot
$query =~ s/ \././g;
# remove space between double colon
$query =~ s/: :/::/g;
}
return $query;
}
sub check_input {
if ($query) {
$stype = "all" if !$stype;
if (
!(
$stype eq "name"
|| $stype eq "text"
|| $stype eq "maintainer"
|| $stype eq "requires"
|| $stype eq "all"
)
)
{
&warn(
"unknown search type ``$stype'', use `all', `text', `name', 'requires', or `maintainer'\n"
);
&exit(0);
}
}
$max = int($max);
if ($max <= 0 || $max > $max_hits) {
warn "reset max=$max to $max_hits_default\n";
$max = $max_hits_default;
}
}
sub faq {
print <FreeBSD Ports Search Help
Keywords
Documentation
Updates
EOF
}
sub footer_links {
return <
Number of hits: $counter_message\n
\n"; print &footer_links; } print qq{