diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index b3e58bb7ed..7c34a4b1df 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -1,970 +1,969 @@
#!/usr/local/bin/perl -T
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 1996-2026 Wolfram Schneider
The FreeBSD Ports and Packages Collection offers a simple way for
users and administrators to install applications.
Use the search types below to find a port.
@{[ &last_update_message ]} - refreshed automatically every two hours from
$ports_database.
For other FreeBSD release indexes, see the full index listing.
Note: search is substring-based; wildcards and regular expressions are not supported.
Each port listed in the search results includes three links to the
FreeBSD ports Git repository and package builder, described below.
General questions about FreeBSD ports should be sent to
the $mailtoList mailing list.
Copyright (c) 1996-2026 Wolfram Schneider <wosch\@FreeBSD.org>
-}
. qq{Category: $1}
. "
\n\n";
$out_sec = $1;
}
}
$rdepends //= "";
$counter++;
$pathB = $path;
my $port_path = $path;
$port_path =~ s,/usr/ports/,,;
$pathB =~ s/^$localPrefix/ports/o;
$path =~ s/^$localPrefix/$remotePrefixFtp/o;
$descfile =~ s/^$localPrefix/$remotePrefixFtp/o;
$version = &encode_url($version);
$email = &check_freebsd_mailing_list($email)
if $enable_check_freebsd_mailing_list;
#$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[: Commit Log\n];
print qq[: Packages\n]
if $enable_packages_link;
print qq[
\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{$perl->{"name"}: ], escapeHTML( $perl->{"comment"} ),
qq[
\n];
my $maintainer = $perl->{"maintainer"};
$maintainer = &check_freebsd_mailing_list($maintainer)
if $enable_check_freebsd_mailing_list;
print qq[Maintainer: $maintainer
\n];
print qq[Homepage ] . $perl->{"www"} . "
\n";
print qq[Git: ]
. $perl->{"origin"}
. qq[
\n];
print "", escapeHTML( $perl->{"desc"} ), "\n";
print qq[Download packages in *.pkg format
\n];
print $no_javascript_warning, $pkg_javascript;
print qq{\n};
print qq{\n};
print qq{
\n};
print
qq{ \n};
print qq{\n};
print qq{\n};
}
my $release = $perl->{"abi"} . " " . $snapshot;
my $time = $perl->{"annotations"}->{"build_timestamp"} // "";
my $version = $perl->{"version"};
my $repopath = $perl->{"repopath"};
my $flavor = $perl->{"annotations"}->{"flavor"} // "";
# show flavor
if ($flavor) {
$release = $release . " (" . $flavor . ")";
}
$time =~ s/\+\d{4}$//;
$time =~ s/T(\d\d):(\d\d):(\d\d)$/ $1:$2/;
my $pkg_opt = $repopath;
$pkg_opt =~ s,.*/,,;
$pkg_opt =~ s,\~.*,,;
if ($filter) {
next
if index( $release, $filter ) < 0
&& index( $pkg_opt, $filter ) < 0
&& index( $rel_minor, $filter ) < 0
&& index( $version, $filter ) < 0
&& index( $time, $filter ) < 0
&& index( $flavor, $filter ) < 0;
}
next if $counter >= $max;
$counter++;
my $info =
$time
? qq[pkg: $pkg_opt\n size: $perl->{"pkgsize"} bytes\n git_hash: $perl->{"annotations"}->{"port_git_hash"}\n ]
. qq[ports_top_git_hash: $perl->{"annotations"}->{"ports_top_git_hash"}\nchecksum: $perl->{"sum"}\n]
: "";
print "Release <> \n};
print
qq{ Version <> \n};
print
qq{ Build Time <> \n};
print qq{\n";
print " \n";
$hash->{'version'}->{$version}++;
$hash->{'arch'}->{$arch}++;
$hash->{'release_major'}->{$rel_major}++;
$hash->{'release_minor'}->{$rel_minor}++;
$hash->{'flavor'}->{$flavor}++ if $flavor ne "";
$hash->{'snapshot'}->{$snapshot}++
if $snapshot eq 'latest' || $snapshot eq 'quarterly';
}
if ( $counter || $. >= 1 ) {
print <", qq[$release \n];
print "", $version, " \n";
print qq[], $time, " \n";
print "
EOF
foreach my $key ( sort keys %$hash ) {
print "", escapeHTML($key), ": \n";
my $flag = 0;
foreach my $k ( sort keys %{ $hash->{$key} } ) {
print " - " if $flag++;
print qq[], escapeHTML($k),
"\n";
}
print "
\n";
}
if ( $filter ne "" ) {
print escapeHTML(">>>"), qq[ reset filter ], escapeHTML("<<<"), "\n";
}
}
return $counter;
}
# search and output
sub search_ports {
local (@a) = ();
local ( $key, $name, $text );
foreach $key ( sort keys %today ) {
next if $today{$key} !~ /$query/oi;
next if $counter >= $max;
@a = split( /\|/, $today{$key} );
$name = $a[0]; #$name =~ s/(\W)/\\$1/g;
$text = $a[3]; #$text =~ s/(\W)/\\$1/g;
if ( $section ne "all" ) {
next if $a[6] !~ /\b$section\b/;
}
#warn "$stype:$query: $name $text\n";
if ( $stype eq "name" && $name =~ /$query/o ) {
&out( $today{$key} );
}
elsif ( $stype eq "text" && $text =~ /$query/oi ) {
&out( $today{$key} );
}
elsif ( $stype eq "all"
&& ( $text =~ /$query/oi || $name =~ /$query/io ) )
{
&out( $today{$key} );
}
elsif ( $stype eq 'maintainer' && $a[5] =~ /$query/io ) {
&out( $today{$key} );
}
elsif (
$stype eq 'requires'
&& ( defined $a[7] && $a[7] =~ /$query/io
|| ( defined $a[8] && $a[8] =~ /$query/io ) )
)
{
&out( $today{$key} );
}
}
}
sub input_autofocus_at_end {
return <
@{[ &footer_links ]}
};
}
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"
|| $stype eq "pkg"
)
)
{
print
"unknown search type, use `all', `text', `name', 'requires', or `maintainer'\n";
warn "unknown search type ``", escapeHTML($stype),
"'', use `all', `text', `name', 'requires', or `maintainer'\n"
if $debug >= 1;
&exit(0);
}
}
$max = int($max);
if ( $max <= 0 || $max > $max_hits ) {
my $old_max = $max;
$max = $enable_packages_link
&& $stype eq 'pkg' ? $max_hits_pkg : $max_hits_default;
warn "reset max=$old_max to $max\n";
}
}
sub help {
print <FreeBSD Ports Search Help
Search Types
Type
What it searches
Example
All
Package name and description (case-insensitive)
netcat
Package Name
The name of a port or distribution
neovim
Description
The short one-line comment about a port (case-insensitive)
vim
Maintainer
The maintainer's email address
emacs\@FreeBSD.org
Dependencies
Ports that depend on the given port (not the other way around)
vim-tinyExternal Links
Further Reading
Questions
Copyright
-
+
-
+
You can start a new search or look for other FreeBSD Search Services.
\n$counter_message\n
\n"; print &footer_links; } print &input_autofocus_at_end; print qq{