diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index 7dba650226..73137346fe 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -1,579 +1,610 @@
#!/usr/bin/perl -T
#
# Copyright (c) 1996-2023 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 . " Last database update: @{[ &last_update ]}
The FreeBSD Ports and Packages Collection offers a simple way for users and administrators to install applications.
-FAQ
"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 qq{
-
-© 1996-2023 by Wolfram Schneider. All rights reserved.
-};
+print <
+ © 1996-2023 by Wolfram Schneider. All rights reserved.
+
+ General questions about FreeBSD ports should be sent to
+ $mailtoList
- print qq{General questions about FreeBSD ports should be sent to }
- . qq{}
- . qq{$mailtoList
\n};
- print &last_update_message;
- print qq{
\n\n};
+ @{[ &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);
}
else {
return;
}
}
}
sub faq {
- print qq{FreeBSD Ports Search FAQ
+ print <FreeBSD Ports Search Help
Keywords
-
-Misc
+Documentation
+Updates
-You may also search the -ports manual pages.
- +@{[ &footer_links ]}