diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index 2947416350..4c40d33a52 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -1,924 +1,924 @@
#!/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.
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.
Maintainer searches for the email address of the port maintainer.
Requires searches for ports which depends on this port.
@{[ &last_update_message ]} - refreshed automatically every two hours from
$ports_database.
For other FreeBSD release indexes, see the full index listing.
General questions about FreeBSD ports should be sent to
the $mailtoList mailing list.
}
. 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[: Changes\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{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[$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
External Links
Further Reading
Questions
Copyright
Copyright (c) 1996-2026 Wolfram Schneider <wosch\@FreeBSD.org>
@{[ &footer_links ]}
EOF
}
sub footer_links {
return <
\n";
} else {
print &html_header( "FreeBSD Ports Search", 1 );
}
# get all categories
@sec = &readcoll;
# mailing list aliases
%lists = map { $_ => 1 }
qw/apache chromium desktop elastic emulation enlightenment erlang fortran
gecko gnome go haskell java multimedia office perl pkg ports python ruby
tcltk tex uboot x11 xfce zope/;
$query = &check_query( $query, $sourceid );
# no search menu for packages links
if ( $enable_packages_link && $stype eq 'pkg' ) {
}
else {
&forms;
}
if ( $query_string eq "" || !$query ) {
print &html_footer;
&exit(0);
}
&check_input;
$counter = 0;
# no prefix search for requires supported yet
$query =~ s/^\^// if $stype eq 'requires';
# quote non characters
my $query2 = $query;
$query =~ s/([^\w\^])/\\$1/g;
# search
if ($query) {
my $q = "";
if ( $query2 =~ m,^([A-Za-z0-9\-]+)/([A-Za-z0-9\-_\+\.\\]+)$, ) {
$q = "$1/$2";
}
if ( $q ne "" && $enable_packages_link && $stype eq 'pkg' ) {
$counter = &package_links( $q, $pkg_filter );
}
else {
&readindex( *today, *msec );
&search_ports;
}
}
if ( !$counter ) {
print <
Number of results: $counter_message\n
\n"; print &footer_links; } print &input_autofocus_at_end; print qq{