Rework this page to be a little more readable. Group the ports categories

into logical groups to make them easier to browse.  Change some of the
wording near the Search block to make it clearer.  Cleanup portindex to be
"use strict" and "-w" safe.

PRs:		www/87500 (edwin, most of the work), www/45169 (linimon)
Approved by:	silence on www
This commit is contained in:
Mark Linimon 2005-10-18 03:45:12 +00:00
parent b0357f0c47
commit 1f0c07c205
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=26056
4 changed files with 327 additions and 244 deletions

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/en/ports/Makefile,v 1.38 2004/11/05 12:47:07 simon Exp $ # $FreeBSD: www/en/ports/Makefile,v 1.39 2004/11/13 12:23:18 ceri Exp $
.if exists(../Makefile.conf) .if exists(../Makefile.conf)
.include "../Makefile.conf" .include "../Makefile.conf"
@ -77,7 +77,7 @@ all install clean:
beforeinstall: beforeinstall:
.else .else
beforeinstall: beforeinstall:
${PERL} -pi -e 's/href=\"growth/href=\"http:\/\/www.FreeBSD.org\/ports\/growth/' index.html ${SED} -i "" -e 's,HREF="growth,href="http://www.FreeBSD.org/ports/growth,' index.html
.endif .endif
.include "${WEB_PREFIX}/share/mk/web.site.mk" .include "${WEB_PREFIX}/share/mk/web.site.mk"

View file

@ -1,92 +1,95 @@
# Originally from src/release/sysinstall/index.c,v 1.57 1998/10/15 #Originally from src/release/sysinstall/index.c,v 1.57 1998/10/15
# $FreeBSD: www/en/ports/categories,v 1.26 2004/02/04 07:39:04 marcus Exp $ #$FreeBSD: www/en/ports/categories,v 1.27 2004/12/19 02:39:16 linimon Exp $
"accessibility", "Ports to help disabled users.", # See categories.descriptions for the meaning of the abbrevations at the
"afterstep", "Ports to support the AfterStep window manager.", # end of each category.
"arabic", "Ported software for the Arabic market.",
"archivers", "Utilities for archiving and unarchiving data.", accessibility,"Ports to help disabled users.",EU
"astro", "Applications related to astronomy.", afterstep,"Ports to support the AfterStep window manager.",VC
"audio", "Audio utilities - most require a supported sound card.", arabic,"Ported software for the Arabic market.",HL
"benchmarks", "Utilities for measuring system performance.", archivers,"Utilities for archiving and unarchiving data.",SAAD
"biology", "Software related to biology.", astro,"Applications related to astronomy.",SAE
"cad", "Computer Aided Design utilities.", audio,"Audio utilities - most require a supported sound card.",EU
"chinese", "Ported software for the Chinese market.", benchmarks,"Utilities for measuring system performance.",AOP
"comms", "Communications utilities.", biology,"Software related to biology.",SAE
"converters", "Format conversion utilities.", cad,"Computer Aided Design utilities.",SAE
"databases", "Database software.", chinese,"Ported software for the Chinese market.",HL
"deskutils", "Various Desktop utilities.", comms,"Communications utilities.",CCATI
"devel", "Software development utilities and libraries.", converters,"Format conversion utilities.",AOP
"dns", "DNS client and server utilities.", databases,"Database software.",SAAD
"editors", "Common text editors.", deskutils,"Various Desktop utilities.",EU
"elisp", "Things related to Emacs Lisp.", devel,"Software development utilities and libraries.",SAAD
"emulators", "Utilities for emulating other OS types.", dns,"DNS client and server utilities.",CCATI
"finance", "Monetary, financial and related applications.", editors,"Common text editors.",EU
"french", "Ported software for French countries.", elisp,"Things related to Emacs Lisp.",VC
"ftp", "FTP client and server utilities.", emulators,"Utilities for emulating other OS types.",SAAD
"games", "Various and sundry amusements.", finance,"Monetary, financial and related applications.",EU
"german", "Ported software for Germanic countries.", french,"Ported software for French countries.",HL
"gnome", "Components of the Gnome Desktop environment.", ftp,"FTP client and server utilities.",CCATI
"graphics", "Graphics libraries and utilities.", games,"Various and sundry amusements.",EU
"haskell", "Software related to the Haskell language.", german,"Ported software for Germanic countries.",HL
"hebrew", "Ported software for Hebrew language.", gnome,"Components of the Gnome Desktop environment.",VC
"hungarian", "Ported software for the Hungarian market.", graphics,"Graphics libraries and utilities.",EU
"ipv6", "IPv6 related software.", haskell,"Software related to the Haskell language.",VC
"irc", "Internet Relay Chat utilities.", hebrew,"Ported software for Hebrew language.",HL
"japanese", "Ported software for the Japanese market.", hungarian,"Ported software for the Hungarian market.",HL
"java", "Java language support.", ipv6,"IPv6 related software.",VC
"kde", "Software for the K Desktop Environment.", irc,"Internet Relay Chat utilities.",CCATI
"korean", "Ported software for the Korean market.", japanese,"Ported software for the Japanese market.",HL
"lang", "Computer languages.", java,"Java language support.",SAAD
"linux", "Linux programs that can be run under binary compatibility.", kde,"Software for the K Desktop Environment.",VC
"lisp", "Things related to pure lisp.", korean,"Ported software for the Korean market.",HL
"mail", "Electronic mail packages and utilities.", lang,"Computer languages.",SAAD
"math", "Mathematical computation software.", linux,"Linux programs that can be run under binary compatibility.",VC
"mbone", "Applications and utilities for the MBONE.", lisp,"Things related to pure lisp.",VC
"misc", "Miscellaneous utilities.", mail,"Electronic mail packages and utilities.",CCATI
"multimedia", "Multimedia software.", math,"Mathematical computation software.",SAE
"net", "Networking utilities.", mbone,"Applications and utilities for the MBONE.",CCATI
"net-mgmt", "Network management utilities.", misc,"Miscellaneous utilities.",AOP
"news", "USENET News support software.", multimedia,"Multimedia software.",EU
"offix", "An office automation suite of sorts.", net,"Networking utilities.",CCATI
"palm", "Software support for the Palm(tm) series.", net-mgmt,"Network management utilities.",CCATI
"parallel", "Applications dealing with parallelism in computing.", news,"USENET News support software.",CCATI
"pear", "Utilities/modules that fall into the PEAR system.", offix,"An office automation suite of sorts.",VC
"perl5", "Utilities/modules for the PERL5 language.", palm,"Software support for the Palm(tm) series.",AOP
"plan9", "Software from the Plan9 operating system.", parallel,"Applications dealing with parallelism in computing.",VC
"polish", "Ported software for the Polish market.", pear,"Utilities/modules that fall into the PEAR system.",VC
"portuguese", "Ported software for the Portuguese market.", perl5,"Utilities/modules for the PERL5 language.",VC
"print", "Utilities for dealing with printing.", plan9,"Software from the Plan9 operating system.",VC
"python", "Software related to the Python language.", polish,"Ported software for the Polish market.",HL
"ruby", "Software related to the Ruby language.", portuguese,"Ported software for the Portuguese market.",HL
"russian", "Ported software for the Russian market.", print,"Utilities for dealing with printing.",EU
"scheme", "Software related to the Scheme language.", python,"Software related to the Python language.",VC
"science", "Scientific software.", ruby,"Software related to the Ruby language.",VC
"security", "System security software.", russian,"Ported software for the Russian market.",HL
"shells", "Various shells (tcsh, bash, etc).", scheme,"Software related to the Scheme language.",VC
"sysutils", "Various system utilities.", science,"Scientific software.",SAE
"tcl80", "TCL v8.0 and packages which depend on it.", security,"System security software.",SAAD
"tcl81", "TCL v8.1 and packages which depend on it.", shells,"Various shells (tcsh, bash, etc).",EU
"tcl82", "TCL v8.2 and packages which depend on it.", sysutils,"Various system utilities.",SAAD
"tcl83", "TCL v8.3 and packages which depend on it.", tcl80,"TCL v8.0 and packages which depend on it.",VC
"tcl84", "TCL v8.4 and packages which depend on it.", tcl81,"TCL v8.1 and packages which depend on it.",VC
"textproc", "Text processing/search utilities.", tcl82,"TCL v8.2 and packages which depend on it.",VC
"tk42", "Tk4.2 and packages which depend on it.", tcl83,"TCL v8.3 and packages which depend on it.",VC
"tk80", "Tk8.0 and packages which depend on it.", tcl84,"TCL v8.4 and packages which depend on it.",VC
"tk82", "Tk8.2 and packages which depend on it.", textproc,"Text processing/search utilities.",EU
"tk83", "Tk8.3 and packages which depend on it.", tk42,"Tk4.2 and packages which depend on it.",VC
"tk84", "Tk8.4 and packages which depend on it.", tk80,"Tk8.0 and packages which depend on it.",VC
"tkstep80", "tkstep wm and packages which depend on it.", tk82,"Tk8.2 and packages which depend on it.",VC
"ukrainian", "Ported software for the Ukrainian market.", tk83,"Tk8.3 and packages which depend on it.",VC
"vietnamese", "Ported software for the Vietnamese market.", tk84,"Tk8.4 and packages which depend on it.",VC
"windowmaker", "Ports to support the WindowMaker window manager.", tkstep80,"tkstep wm and packages which depend on it.",VC
"www", "WEB utilities (browsers, HTTP servers, etc).", ukrainian,"Ported software for the Ukrainian market.",HL
"x11", "X Window System based utilities.", vietnamese,"Ported software for the Vietnamese market.",HL
"x11-clocks", "X Window System based clocks.", windowmaker,"Ports to support the WindowMaker window manager.",VC
"x11-fm", "X Window System based file managers.", www,"WEB utilities (browsers, HTTP servers, etc).",CCATI
"x11-fonts", "X Window System fonts and font utilities.", x11,"X Window System based utilities.",XWS
"x11-servers", "X Window System servers.", x11-clocks,"X Window System based clocks.",XWS
"x11-themes", "X Window System themes.", x11-fm,"X Window System based file managers.",XWS
"x11-toolkits", "X Window System based development toolkits.", x11-fonts,"X Window System fonts and font utilities.",XWS
"x11-wm", "X Window System window managers.", x11-servers,"X Window System servers.",XWS
"xfce", "Ports to support the Xfce desktop environment.", x11-themes,"X Window System themes.",XWS
"zope", "Software related to the Zope platform.", x11-toolkits,"X Window System based development toolkits.",XWS
x11-wm,"X Window System window managers.",XWS
xfce,"Ports to support the Xfce desktop environment.",VC
zope,"Software related to the Zope platform.",VC

View file

@ -1,84 +1,107 @@
#!/usr/bin/perl #!/usr/bin/perl -w
# convert a ports INDEX file to HTML # convert a ports INDEX file to HTML
# #
# by John Fieber <jfieber@FreeBSD.org> # by John Fieber <jfieber@FreeBSD.org>
# Mon May 13 10:31:58 EST 1996 # Mon May 13 10:31:58 EST 1996
# $FreeBSD: www/en/ports/portindex,v 1.51 2004/04/04 21:49:41 phantom Exp $ # $FreeBSD: www/en/ports/portindex,v 1.52 2005/10/04 19:43:49 hrs Exp $
############################################################ ############################################################
use strict;
use POSIX;
use IO::File;
my $base = "";
my $baseHTTP = "";
my $urlcgi = "";
my $packagesURL = "";
my $today = getdate();
my %p = ();
# Load local config file. You can override in portindex.conf # Load local config file. You can override in portindex.conf
# the variables for the default web and the ftp server. This # the variables for the default web and the ftp server. This
# make it easy to maintain a local web mirror and let the # make it easy to maintain a local web mirror and let the
# URL point to yourself and not to the standard FreeBSD FTP server. # URL point to yourself and not to the standard FreeBSD FTP server.
$config = $0 . '.' . 'conf';
my $config = $0 . '.' . 'conf';
do $config if -f $config; do $config if -f $config;
# This is the base of where we ftp stuff from # This is the base of where we ftp stuff from
my $ftpserver;
if ($ENV{'MASTER_FTP_SERVER'}) { if ($ENV{'MASTER_FTP_SERVER'}) {
$ftpserver = $ENV{'MASTER_FTP_SERVER'}; $ftpserver = $ENV{'MASTER_FTP_SERVER'};
} else { } else {
$ftpserver = 'ftp://ftp.FreeBSD.org' if !$ftpserver; $ftpserver = 'ftp://ftp.FreeBSD.org' if !$ftpserver;
} }
$base = "" if !$base;
$baseHTTP = $base if !$baseHTTP; $baseHTTP = $base if !$baseHTTP;
$baseFTP = "$ftpserver/pub/FreeBSD/ports/ports"; my $baseFTP = "$ftpserver/pub/FreeBSD/ports/ports";
$baseCVSWEB = 'http://www.FreeBSD.org/cgi/cvsweb.cgi/'; my $baseCVSWEB = 'http://www.FreeBSD.org/cgi/cvsweb.cgi/';
$urlcgi = 'http://www.FreeBSD.org/cgi/url.cgi' if !$urlcgi; $urlcgi = 'http://www.FreeBSD.org/cgi/url.cgi' if !$urlcgi;
$packagesURL = "$ftpserver/pub/FreeBSD/ports/i386/packages-stable/All/" $packagesURL = "$ftpserver/pub/FreeBSD/ports/i386/packages-stable/All/"
if !$packagesURL; if !$packagesURL;
# support tar on the fly or gzip'ed tar on the fly # support tar on the fly or gzip'ed tar on the fly
$ftparchive = ''; my $ftparchive = '';
$ftparchive = 'tar' if !defined $ftparchive; $ftparchive = 'tar' if !defined $ftparchive;
# ports download sources script # ports download sources script
$pds = 'http://www.FreeBSD.org/cgi/pds.cgi'; my $pds = 'http://www.FreeBSD.org/cgi/pds.cgi';
# better layout and link to the sources # better layout and link to the sources
if ($urlcgi) { if ($urlcgi) {
$baseHTTP = $urlcgi . '?' . $baseHTTP; $baseHTTP = $urlcgi . '?' . $baseHTTP;
} }
$today = &getdate; my %packages = ();
my %category_description = ();
&packages_exist('packages.exists', *packages); my @category_groups = ();
&category_description(($ARGV[1] || '.') . '/categories', *category_description); my %category_groups = ();
&main; packages_exist('packages.exists');
category_description(($ARGV[1] || '.') . '/categories' );
category_groups(($ARGV[1] || '.') . '/categories.descriptions' );
main();
sub getdate { sub getdate {
@months = ("January", "February", "March", "April", "May","June", return POSIX::strftime("Last modified: %d-%B-%Y",localtime);
"July", "August", "September", "October", "November", "December");
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
return "Last modified: $mday-$months[$mon]-$year";
} }
sub header { sub header {
local ($fh, $htext) = @_; my $fh = shift;
print $fh "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" [\n"; my $htext = shift;
print $fh "<!ENTITY base CDATA '..'>\n"; #local($fh, $htext) = @_;
print $fh "<!ENTITY date \"<em>$today</em>\">\n"; print $fh <<EOF;
print $fh "<!ENTITY title '$htext'>\n"; <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" [
print $fh "<!ENTITY blurb SYSTEM \"ports.inc\">\n"; <!ENTITY base CDATA '..'>
print $fh "<!ENTITY % navincludes SYSTEM \"../includes.navdownload.sgml\"> %navincludes;\n"; <!ENTITY date "<em>$today</em>">
print $fh "<!ENTITY % includes SYSTEM \"../includes.sgml\">\n"; <!ENTITY title '$htext'>
print $fh "<!ENTITY email 'ports'>\n"; <!ENTITY blurb SYSTEM "ports.inc">
print $fh "%includes;\n"; <!ENTITY % navincludes SYSTEM "../includes.navdownload.sgml"> %navincludes;
print $fh "]>\n"; <!ENTITY % includes SYSTEM "../includes.sgml">
print $fh "<html>&header;\n"; <!ENTITY email 'ports'>
%includes;
]>
<html>&header;
EOF
} }
sub footer { sub footer {
local ($fh, $ftext) = @_; my $fh = shift;
print $fh "\n$ftext\n"; my $ftext = shift;
print $fh "&footer;\n"; #local ($fh, $ftext) = @_;
print $fh "</BODY>\n</HTML>\n"; print $fh <<EOF;
$ftext
&footer;
</BODY>
</HTML>
EOF
} }
sub packages_exist { sub packages_exist {
local($file, *p) = @_; my $file=shift;
my %p;
#local($file, *p) = @_;
open(P, $file) || do { open(P, $file) || do {
warn "open $file: $!\n"; warn "open $file: $!\n";
@ -88,14 +111,13 @@ sub packages_exist {
while(<P>) { while(<P>) {
chop; chop;
$p{$_} = 1; $packages{$_} = 1;
} }
close P; close P;
return 0;
} }
sub category_description { sub category_description {
local($file, *p) = @_; my $file = shift;
open(P, $file) || do { open(P, $file) || do {
warn "open $file: $!\n"; warn "open $file: $!\n";
@ -103,23 +125,52 @@ sub category_description {
return 1; return 1;
}; };
local($category, $description);
while(<P>) { while(<P>) {
# ignore comments # ignore comments
next if /^\s*#/; next if /^\s*#/;
if (/^\s*([^,]+),\s*"([^"]+)",([A-Z]+)/) {
($category, $description) = /^\s*"([^"]+)",\s*"([^"]+)/; $category_description{$1}{desc}=$2;
$p{$category} = $description; $category_description{$1}{group}=$3;
}
}
close P;
}
sub category_groups {
my $file = shift;
open(P, $file) || do {
warn "open $file: $!\n";
warn "Cannot find category groups\n";
return 1;
};
while(<P>) {
# ignore comments
next if /^\s*#/;
if (/^\s*([^,]+),\s*(.+)/) {
$category_groups{$1}=$2 if (/^\s*([^,]+),\s*(.+)/);
push(@category_groups,$1);
}
} }
close P; close P;
return 0;
} }
sub main { sub main {
my @master=();
my %stats;
my %catkey;
my %data;
my $portnumber = 0;
$sep = "<B>:</B>"; my $sep = "<B>:</B>";
my $moutf = new IO::File;
my $outf = new IO::File;
my $mindex = new IO::File;
open(INDEX, $ARGV[0]); open(INDEX, $ARGV[0]);
$portnumber = "0";
while (<INDEX>) { while (<INDEX>) {
chop; chop;
s/&/&amp;/g; s/&/&amp;/g;
@ -127,29 +178,28 @@ sub main {
s/>/&gt;/g; s/>/&gt;/g;
# Read a record # Read a record
($name, $loc, $prefix, $desc, $ldesc, $owner, $cats, my ($name, $loc, $prefix, $desc, $ldesc, $owner, $cats,
$bdep, $rdep, $www) = split('\|'); $bdep, $rdep, $www) = split('\|');
# Check for double hyphens in the name (--). # Check for double hyphens in the name (--).
$name =~ s/--/-/g; $name =~ s/--/-/g;
# Split the categories into an array # Split the categories into an array
@cat = split("[ \t]+", $cats); my @cat = split("[ \t]+", $cats);
$catkey{$name} = $cat[0]; $catkey{$name} = $cat[0];
local($sourcepath) = $loc; my $sourcepath = $loc;
$sourcepath =~ s%/usr/%%; $sourcepath =~ s%/usr/%%;
foreach $i (@cat) { foreach my $i (sort(@cat)) {
$stats{$i}++; $stats{$i}++;
# figure out the FTP url # figure out the FTP url
$loc =~ s/\/usr\//$baseCVSWEB/; $loc =~ s/\/usr\//$baseCVSWEB/;
$ldesc =~ s/\/usr\//$baseHTTP/; $ldesc =~ s/\/usr\//$baseHTTP/;
# The name description and maintainer # The name description and maintainer
$data{$i} .= "<DT><B><A NAME=\"$name\"></A><A HREF=\"$loc$ftparchive\">$name</A></B> "; $data{$i} .= "<DT><B><A NAME=\"$name\"></A><A HREF=\"$loc$ftparchive\">$name</A></B> ";
@ -162,54 +212,54 @@ sub main {
$data{$i} .= qq{ | <A HREF="$pds?$sourcepath">Sources</A>}; $data{$i} .= qq{ | <A HREF="$pds?$sourcepath">Sources</A>};
if ($www ne "") { if ($www ne "") {
$data{$i} .= qq{ | <a href="$www">Main Web Site</a>}; $data{$i} .= qq{ | <a href="$www">Main Web Site</a>};
} }
$ownerurl = $owner; my $ownerurl = $owner;
$ownerurl =~ s/&lt;/</g; $ownerurl =~ s/&lt;/</g;
$owenrurl =~ s/&gt;/>/g; $ownerurl =~ s/&gt;/>/g;
$data{$i} .= $data{$i} .=
"<BR><I>Maintained by:</I> <A HREF=\"mailto:$ownerurl\">$owner</A>"; "<BR><I>Maintained by:</I> <A HREF=\"mailto:$ownerurl\">$owner</A>";
# If there are any dependencies, list them # If there are any dependencies, list them
if ($bdep ne "" || $rdep ne "") { if ($bdep ne "" || $rdep ne "") {
$data{$i} .= "<BR><I>Requires:</I> "; $data{$i} .= "<BR><I>Requires:</I> ";
@dep = split(/ /, "$bdep $rdep"); my @dep = split(/ /, "$bdep $rdep");
local($last) = ''; my $last = '';
foreach $j (sort @dep) { foreach my $j (sort @dep) {
next if $j eq $last; next if $j eq $last;
$last = $j; $last = $j;
$data{$i} .= " <A HREF=\"##$j##.html#$j\">$j</A>,"; $data{$i} .= " <A HREF=\"##$j##.html#$j\">$j</A>,";
} }
# remove the trailing comma # remove the trailing comma
chop $data{$i}; chop $data{$i};
} }
# If the port is listed in more than one category, throw # If the port is listed in more than one category, throw
# in some cross references # in some cross references
if ($#cat > 0) { if ($#cat > 0) {
$data{$i} .= "<BR><EM>Also listed in:</EM> "; $data{$i} .= "<BR><EM>Also listed in:</EM> ";
foreach $j (@cat) { foreach my $j (@cat) {
if ($j ne $i) { if ($j ne $i) {
if ($j eq $cat[0]) { if ($j eq $cat[0]) {
$data{$i} .= " <STRONG><A HREF=\"$j.html#$name\">\u$j</A></STRONG>,"; $data{$i} .= " <STRONG><A HREF=\"$j.html#$name\">\u$j</A></STRONG>,";
} }
else { else {
$data{$i} .= " <A HREF=\"$j.html#$name\">\u$j</A>,"; $data{$i} .= " <A HREF=\"$j.html#$name\">\u$j</A>,";
} }
} }
} }
# remove the trailing comma # remove the trailing comma
chop($data{$i}); chop($data{$i});
} }
$data{$i} .= "<P></P></DD>\n" $data{$i} .= "<P></P></DD>\n"
} }
# Add an entry to the master index # Add an entry to the master index
# workaround for SGML bug, `--' is not allowed in comments # workaround for SGML bug, `--' is not allowed in comments
local ($sname) = $name; my $sname = $name;
$sname =~ s/--/-=/g; $sname =~ s/--/-=/g;
$master[$portnumber] = $master[$portnumber] =
"<!-- $sname --><STRONG><A HREF=\"$cat[0].html#$name\">$name</A></STRONG> " . "<!-- $sname --><STRONG><A HREF=\"$cat[0].html#$name\">$name</A></STRONG> " .
@ -217,65 +267,77 @@ sub main {
$portnumber++; $portnumber++;
} }
open(MOUTF, ">index.sgml"); $moutf->open(">index.sgml");
&header(MOUTF, "FreeBSD Ports"); header($moutf, "FreeBSD Ports");
# print MOUTF "<!--#include virtual=\"./ports.inc\" -->\n"; # print $moutf "<!--#include virtual=\"./ports.inc\" -->\n";
print MOUTF "&blurb;"; print $moutf "&blurb;";
print MOUTF "<hr><P>There are currently $portnumber ports in the print $moutf <<EOF;
FreeBSD Ports Collection.<br> <A HREF=\"$baseFTP/ports.tar.gz\">Download <HR>
a gzip'd tar file of all $portnumber ports</A> (about 25 megabytes) or <H3>Current status</H3>
browse the following categories:\n"; <P>There are currently $portnumber ports in the FreeBSD Ports Collection.<BR>
You may
<A HREF="$baseFTP/ports.tar.gz">download a gzip'd tar file of all ports</A>
(about 30 megabytes), view the
<A HREF=\"master-index.html\">alphabetical list of all ports</A>,
or browse the ports in the following categories:
<A NAME=\"categories\"></A>
</P>
EOF
print MOUTF "<UL>\n"; if ($portnumber eq '0') {
print $moutf "<P>none found</P>\n";
} else {
foreach my $cg (@category_groups) {
print $moutf "<H3>",$category_groups{$cg},"</H3>\n";
print $moutf "<UL>\n";
foreach my $key (sort(keys(%stats))) {
next if ($category_description{$key}{group} ne $cg);
# For the master file...
print $moutf
"<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>";
if ($category_description{$key}{desc}) {
print $moutf " -- " . $category_description{$key}{desc};
}
@foos = sort(keys %stats); # Someone forgot to add a category to the description file
foreach $key (@foos) { # or there is a typo in the category field.
# For the master file... else {
print MOUTF warn "No description found for category: ``$key''!\n";
"<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>"; warn "Please fix me or send an E-Mail to doc\@FreeBSD.org\a\n";
if ($category_description{$key}) { sleep(3);
print MOUTF " -- " . $category_description{$key}; }
print $moutf "</LI>\n";
# Create the category file
$outf->open(">$key.sgml");
header($outf, "FreeBSD Ports: \u$key");
if ($category_description{$key}{desc}) {
print $outf "<h3>", $category_description{$key}{desc}, "</h3>\n";
}
print $outf "<DL>\n";
my $d = join("\n", sort(split(/\n/, $data{$key})));
$d =~ s/##([^#]*)##/$catkey{$1}/g;
print $outf $d;
print $outf "</DL>\n";
footer($outf, "<p></p><A HREF=\"index.html#categories\">Port Categories</A>" .
" -- <A HREF=\"master-index.html\">Index</A>");
$outf->close;
} }
print $moutf "</UL>\n";
# Someone forgot to add a category to the description file
# or there is a typo in the category field.
else {
warn "No description found for category: ``$key''!\n";
warn "Please fix me or send an E-Mail to doc\@FreeBSD.org\a\n";
sleep(3);
}
print MOUTF "</LI>\n";
# Create the category file
open(OUTF, ">$key.sgml");
&header(OUTF, "FreeBSD Ports: \u$key");
if ($category_description{$key}) {
print OUTF "<h3>", $category_description{$key}, "</h3>\n";
}
print OUTF "<DL>\n";
$d = join("\n", sort(split(/\n/, $data{$key})));
$d =~ s/##([^#]*)##/$catkey{$1}/g;
print OUTF $d;
print OUTF "</DL>\n";
&footer(OUTF, "<p></p><A HREF=\"index.html\">Port Categories</A>" .
" -- <A HREF=\"master-index.html\">Index</A>");
close(OUTF);
} }
print MOUTF "</UL>\n"; }
print MOUTF
"<UL><LI><A HREF=\"master-index.html\">Alphabetical list of all $portnumber ports</A></LI></UL>\n"; footer($moutf, "");
&footer(MOUTF, ""); $moutf->close;
close(MOUTF);
# Create the master index file # Create the master index file
open(MINDEX, ">master-index.sgml"); $mindex->open(">master-index.sgml");
&header(MINDEX, "FreeBSD Ports Collection Index"); header($mindex, "FreeBSD Ports Collection Index");
print MINDEX "<P>\n"; print $mindex "<P>\n";
print MINDEX sort @master; print $mindex sort @master;
print MINDEX "</P>"; print $mindex "</P>";
&footer(MINDEX, "<A HREF=\"index.html\">Port Categories</A>"); footer($mindex, "<A HREF=\"index.html#categories\">Port Categories</A>");
close(MINDEX); $mindex->close;
close(INDEX); close(INDEX);
} }

View file

@ -1,4 +1,4 @@
<!-- $FreeBSD: www/en/ports/ports.inc,v 1.66 2003/07/12 23:00:19 kris Exp $ --> <!-- $FreeBSD: www/en/ports/ports.inc,v 1.67 2003/08/03 12:08:38 kuriyama Exp $ -->
<p>The FreeBSD Ports and Packages Collection offers a simple way for <p>The FreeBSD Ports and Packages Collection offers a simple way for
users and administrators to install applications. The ports users and administrators to install applications. The ports
collection has been <a collection has been <a
@ -20,16 +20,20 @@ be committed.
<p>Each ``port'' listed here <p>Each ``port'' listed here
contains any patches necessary to make the original application source contains any patches necessary to make the original application source
code compile and run on FreeBSD. Installing an application is as code compile and run on FreeBSD. Installing an application is as
simple as downloading the port, unpacking it and typing <tt>make</tt> simple as downloading the port, unpacking it and typing
in the port directory. For even greater convenience, you can simply <a href="http://www.freebsd.org/cgi/man.cgi?query=make"><tt>make</tt></a>
install the <a href="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz"> in the port directory. However, the most convenient (and common) method
entire ports hierarchy</a> at installation time (or use is to download the framework for the entire list of ports by
<a href="../doc/en_US.ISO8859-1/books/handbook/synching.html#CVSUP">CVSup</a> to track it on installing the <a href="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz">
an ongoing basis) and have thousands of applications right at your entire ports hierarchy</a> at FreeBSD installation time,
and then have thousands of applications right at your
fingertips. fingertips.
</p>
<p>
Each port's <tt>Makefile</tt> automatically fetches the Each port's <tt>Makefile</tt> automatically fetches the
application source code, either from a local disk, CDROM or via ftp, application source code, either from a local disk, CDROM or via
<a href="http://www.freebsd.org/cgi/man.cgi?query=ftp"><tt>ftp</tt></a>,
unpacks it on your system, applies the patches, and compiles. If unpacks it on your system, applies the patches, and compiles. If
all went well, a simple <tt>make install</tt> will install the all went well, a simple <tt>make install</tt> will install the
application and register it with the package system.</p> application and register it with the package system.</p>
@ -37,16 +41,36 @@ application and register it with the package system.</p>
<p>For most ports, a precompiled <tt>package</tt> also exists, saving <p>For most ports, a precompiled <tt>package</tt> also exists, saving
the user the work of having to compile anything at all. Each port the user the work of having to compile anything at all. Each port
contains a link to its corresponding package and you may either simply contains a link to its corresponding package and you may either simply
download that file and then run the <strong>pkg_add</strong> command download that file and then run the
<a href="http://www.freebsd.org/cgi/man.cgi?query=pkg_add"><tt>pkg_add</tt></a>
command
on it or you can simply grab the link location and hand it straight on it or you can simply grab the link location and hand it straight
to <strong>pkg_add</strong> since it's capable of accepting FTP URLs as to <tt>pkg_add</tt> since it's capable of accepting FTP URLs as
well as filenames.</p> well as filenames.</p>
<p>For more information, see <a
href="../doc/en_US.ISO8859-1/books/handbook/ports.html">Installing Applications: Packages and Ports</a>, a
section of the <a href="../doc/en_US.ISO8859-1/books/handbook/index.html">FreeBSD Handbook</a>. For
information about creating new ports, see the <a
href="../doc/en_US.ISO8859-1/books/porters-handbook/index.html">Porter's Handbook</a>.</p>
<hr>
<h3>Keeping up-to-date</h3>
<p>
The ports listed on these web pages are continually being updated.
It is strongly recommended that you refresh the entire collection
together, as many ports depend on other parts of the tree, even
where that might seem counterintuitive (e.g. <tt>japanese/</tt>.)
</p>
<p>For more information about new, changed or removed ports/packages, <p>For more information about new, changed or removed ports/packages,
or if you wish to search for a specific application to see if it's or if you wish to search for a specific application to see if it's
available as a port/package, please see the available as a port/package, you may browse the
<a href="http://www.FreeBSD.org/cgi/ports.cgi">FreeBSD Ports Changes</a> <a href="http://www.FreeBSD.org/cgi/ports.cgi">FreeBSD Ports Changes</a>
page.</p> on this site; alternatively, you may wish to visit
<a href="http://www.FreshPorts.org">FreshPorts.org</a>
and either browse the site or subscribe to the lists hosted there.</p>
<FORM METHOD="GET" ACTION="http://www.FreeBSD.org/cgi/ports.cgi"> <FORM METHOD="GET" ACTION="http://www.FreeBSD.org/cgi/ports.cgi">
Search for: Search for:
@ -59,9 +83,3 @@ Search for:
<INPUT TYPE="submit" VALUE="Submit"> <INPUT TYPE="submit" VALUE="Submit">
</FORM> </FORM>
<p>For more information about using ports, see <a
href="../doc/en_US.ISO8859-1/books/handbook/ports.html">Installing Applications: Packages and Ports</a>, a
section of the <a href="../doc/en_US.ISO8859-1/books/handbook/index.html">FreeBSD Handbook</a>. For
information about creating new ports, see the <a
href="../doc/en_US.ISO8859-1/books/porters-handbook/index.html">Porter's Handbook</a>.</p>