diff --git a/en/ports/Makefile b/en/ports/Makefile index d3f5aaf102..ace0407b65 100644 --- a/en/ports/Makefile +++ b/en/ports/Makefile @@ -1,91 +1,111 @@ -# $FreeBSD: www/en/ports/Makefile,v 1.44 2005/11/30 22:43:47 pav Exp $ +# $FreeBSD: www/en/ports/Makefile,v 1.45 2005/11/30 22:46:33 pav Exp $ .if exists(../Makefile.conf) .include "../Makefile.conf" .endif .if exists(../Makefile.inc) .include "../Makefile.inc" .endif .if exists(Makefile.inc) .include "Makefile.inc" .endif FETCH_OPT?= -am # # Force NO_TIDY for the ports web pages, since it takes a long time to # run tidy on these huge HTML files, and the files are valid HTML when # generated by portindex, even without tidy. # NO_TIDY= YES .if defined(PINDEX_OVERRIDE) ${INDEX}: ${PINDEX_OVERRIDE} ${CP} ${PINDEX_OVERRIDE} ${INDEX} .elif defined(NOPORTSNET) ${INDEX}: $${PORTSBASE}/${PINDEX} ${CP} ${PORTSBASE}/${PINDEX} ${INDEX} .else ${INDEX}: ${FETCH} ${FETCH_OPT} -o ${INDEX}.bz2 ${INDEXURI}.bz2 ${BUNZIP2} ${INDEX}.bz2 .endif HOSTNAME!= hostname .if ${HOSTNAME} == "hub.freebsd.org" || ${HOSTNAME} == "freefall.freebsd.org" || ${HOSTNAME} == "www.freebsd.org" CLUSTER_MACHINE= YES .endif # Build the list of available packages, but only on the main FreeBSD machines. # Don't build the list if NO_PACKAGES_LINK is set and not empty. # packages.exists: .if defined(CLUSTER_MACHINE) && (!defined(NO_PACKAGES_LINK) || empty(NO_PACKAGES_LINK)) @if ${SH} ${.CURDIR}/packages > ${.TARGET}.temp; then \ ${MV} ${.TARGET}.temp ${.TARGET}; \ else \ ${RM} ${.TARGET}.temp; ${TOUCH} ${.TARGET}; \ fi; .else ${TOUCH} ${.TARGET} .endif -Makefile.gen: index.sgml .NOTMAIN +Makefile.gen: categories-alpha.sgml categories-grouped.sgml index.sgml \ + installing.sgml master-index.sgml references.sgml searching.sgml \ + statistics.ent updating.sgml .NOTMAIN ${ECHO_CMD} DOCS= *.sgml > Makefile.gen + ${ECHO_CMD} -n "DYNAMIC_DOCS= " >> Makefile.gen + ${ECHO_CMD} -n " categories-alpha.sgml" >> Makefile.gen + ${ECHO_CMD} -n " categories-grouped.sgml" >> Makefile.gen + ${ECHO_CMD} -n " master-index.sgml" >> Makefile.gen + ${ECHO_CMD} -n " statistics.ent" >> Makefile.gen + for categoryfile in ${CATEGORYLIST}; do \ + ${ECHO_CMD} -n " $$categoryfile.sgml" >> Makefile.gen; \ + done + ${ECHO_CMD} >> Makefile.gen .if defined(NO_TIDY) ${ECHO_CMD} NO_TIDY=${NO_TIDY} >> Makefile.gen .endif .if defined(CLUSTER_MACHINE) PORTS_TARGZ_URL?= ftp://ftp-master.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz .else PORTS_TARGZ_URL?= ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz .endif ports.size: .if defined (NOPORTSNET) touch ${.TARGET} .else ${RM} -f ${.TARGET} ${FETCH} -s ${PORTS_TARGZ_URL} > ${.TARGET} .endif -index.sgml: ${INDEX} categories categories.descriptions packages.exists portindex ports.inc ports.size .NOTMAIN - ${RM} -f *.sgml +# this builds: categories-alpha.sgml, categories-grouped.sgml, +# master-index.sgml, statistics.ent, .sgml +CATEGORYLIST=`grep "^[a-z]" categories | sed -e s"/,.*//"` +categories-alpha.sgml: ${INDEX} categories categories.descriptions \ + packages.exists portindex ports.ent ports.size .NOTMAIN + ${RM} -f categories-alpha.sgml categories-grouped.sgml \ + master-index.sgml statistics.ent + for categoryfile in ${CATEGORYLIST}; do \ + rm -f "$$categoryfile.sgml"; \ + done ${PORTINDEX} ${INDEX} ${.CURDIR} install: all beforeinstall all install clean: cd ${.CURDIR}; \ ${MAKE} ${MAKEFLAGS} -f ${.CURDIR}/Makefile.inc0 ${.TARGET} .if defined(WITH_PORTS_GROWTH) cd growth; \ ${MAKE} ${MAKEFLAGS} ${.TARGET} beforeinstall: .else beforeinstall: ${SED} -i "" -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,' references.html .endif .include "${WEB_PREFIX}/share/mk/web.site.mk" diff --git a/en/ports/Makefile.inc b/en/ports/Makefile.inc index 60143809dd..ac45e0e1d1 100644 --- a/en/ports/Makefile.inc +++ b/en/ports/Makefile.inc @@ -1,16 +1,16 @@ -# $FreeBSD: www/en/ports/Makefile.inc,v 1.7 2005/11/15 10:09:26 osa Exp $ +# $FreeBSD: www/en/ports/Makefile.inc,v 1.8 2005/11/30 22:43:47 pav Exp $ PORTINDEX= ${PERL} ${.CURDIR}/portindex INDEX= INDEX PINDEX= ports/${INDEX} COOKIE= ${INDEX} Makefile.gen CLEANFILES+= ${INDEX} ${INDEX}.bz2 CLEANFILES+= packages.exists.temp packages.exists -CLEANFILES+= ${DOCS} +CLEANFILES+= ${DYNAMIC_DOCS} CLEANFILES+= Makefile.gen -CLEANFILES+= ports.size +CLEANFILES+= ports.count ports.size _ALLINSTALL= packages.exists ${INDEX} categories diff --git a/en/ports/index.sgml b/en/ports/index.sgml new file mode 100644 index 0000000000..8e52d72029 --- /dev/null +++ b/en/ports/index.sgml @@ -0,0 +1,71 @@ + + + + %navincludes; + + + +%includes; +%ports.ent; +%statistics.ent; +]> +&header; + +&searchform; + +
+ +

The FreeBSD Ports and Packages Collection offers a simple way for +users and administrators to install applications. There are currently +&ports.count; ports available. +

+ +

The Ports Collection supports the latest release on the + +FreeBSD-CURRENT and + +FreeBSD-STABLE branches. Older releases are not +supported and may or may not work correctly with an up-to-date ports +collection. Over time, changes to the ports collection may rely on +features that are not present in older releases. Wherever convenient, +we try not to gratuitously break support for recent releases, but it +is sometimes unavoidable. When this occurs, patches contributed by +the user community to maintain support for older releases will usually +be committed. +

+ +

Each ``port'' listed here +contains any patches necessary to make the original application source +code compile and run on FreeBSD. Installing an application is as +simple as downloading the port, unpacking it and typing +make +in the port directory. However, the most convenient (and common) method +is to download the framework for the entire list of ports by installing the + + +entire ports hierarchy at FreeBSD installation time, and then have +thousands of applications right at your fingertips. +

+ +

+Each port's Makefile automatically fetches the +application source code, either from a local disk, CDROM or via +ftp, +unpacks it on your system, applies the patches, and compiles. If +all went well, a simple make install will install the +application and register it with the package system.

+ +

For most ports, a precompiled package also exists, saving +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 +download that file and then run the +pkg_add +command +on it or you can simply grab the link location and hand it straight +to pkg_add since it is capable of accepting FTP URLs as +well as filenames.

+ +&footer; + + diff --git a/en/ports/installing.sgml b/en/ports/installing.sgml new file mode 100644 index 0000000000..5839f38e9f --- /dev/null +++ b/en/ports/installing.sgml @@ -0,0 +1,30 @@ + + + + %navincludes; + + + +%includes; +%ports.ent; +%statistics.ent; +]> +&header; + +&searchform; + +
+ +

If you are installing FreeBSD from CDROM or an ftp site, the + sysinstall + application will allow you to install the Ports Collection directly.

+ +

However, if you are not installing using that method, you may + + download the gzipped tarball for the entire ports hierarchy. The + size of the file is &ports.size;.

+ +&footer; + + diff --git a/en/ports/portindex b/en/ports/portindex index f9a94b5cb8..e55107b937 100755 --- a/en/ports/portindex +++ b/en/ports/portindex @@ -1,353 +1,389 @@ #!/usr/bin/perl -w -# convert a ports INDEX file to HTML +# convert a ports INDEX file to SGML files # # by John Fieber # Mon May 13 10:31:58 EST 1996 -# $FreeBSD: www/en/ports/portindex,v 1.54 2005/11/15 10:09:26 osa Exp $ +# $FreeBSD: www/en/ports/portindex,v 1.55 2005/11/29 18:11:47 pav 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 # the variables for the default web and the ftp server. This # make it easy to maintain a local web mirror and let the # URL point to yourself and not to the standard FreeBSD FTP server. my $config = $0 . '.' . 'conf'; do $config if -f $config; # This is the base of where we ftp stuff from my $ftpserver; if ($ENV{'MASTER_FTP_SERVER'}) { $ftpserver = $ENV{'MASTER_FTP_SERVER'}; } else { $ftpserver = 'ftp://ftp.FreeBSD.org' if !$ftpserver; } $baseHTTP = $base if !$baseHTTP; my $baseFTP = "$ftpserver/pub/FreeBSD/ports/ports"; my $baseCVSWEB = 'http://www.FreeBSD.org/cgi/cvsweb.cgi/'; $urlcgi = 'http://www.FreeBSD.org/cgi/url.cgi' if !$urlcgi; $packagesURL = "$ftpserver/pub/FreeBSD/ports/i386/packages-stable/All/" if !$packagesURL; # support tar on the fly or gzip'ed tar on the fly my $ftparchive = ''; $ftparchive = 'tar' if !defined $ftparchive; # ports download sources script my $pds = 'http://www.FreeBSD.org/cgi/pds.cgi'; # better layout and link to the sources if ($urlcgi) { $baseHTTP = $urlcgi . '?' . $baseHTTP; } my %packages = (); my %category_description = (); my @category_groups = (); my %category_groups = (); packages_exist('packages.exists'); category_description(($ARGV[1] || '.') . '/categories' ); category_groups(($ARGV[1] || '.') . '/categories.descriptions' ); main(); sub getdate { return POSIX::strftime("Last modified: %d-%B-%Y",localtime); } sub header { my $fh = shift; my $htext = shift; #local($fh, $htext) = @_; print $fh < $today"> - - %navincludes; + %navincludes; + %includes; +%ports.ent; +%statistics.ent; ]> &header; + +&searchform; + +
+ EOF } sub footer { my $fh = shift; my $ftext = shift; #local ($fh, $ftext) = @_; print $fh < EOF } sub packages_exist { my $file=shift; my %p; #local($file, *p) = @_; open(P, $file) || do { warn "open $file: $!\n"; warn "Cannot create packages links\n"; return 1; }; while(

) { chop; $packages{$_} = 1; } close P; } sub category_description { my $file = shift; open(P, $file) || do { warn "open $file: $!\n"; warn "Cannot find category description\n"; return 1; }; while(

) { # ignore comments next if /^\s*#/; if (/^\s*([^,]+),\s*"([^"]+)",\s*([A-Z]+)/) { $category_description{$1}{desc}=$2; $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(

) { # ignore comments next if /^\s*#/; if (/^\s*([^,]+),\s*(.+)/) { $category_groups{$1}=$2; push(@category_groups,$1); } } close P; } sub main { my @master=(); my %stats; my %catkey; my %data; my $portnumber = 0; my $sep = ":"; my $moutf = new IO::File; my $outf = new IO::File; my $mindex = new IO::File; + my $statistics = new IO::File; open(INDEX, $ARGV[0]); $portnumber = "0"; while () { chop; s/&/&/g; s//>/g; # Read a record my ($name, $loc, $prefix, $desc, $ldesc, $owner, $cats, $bdep, $rdep, $www) = split('\|'); # Check for double hyphens in the name (--). $name =~ s/--/-/g; # Split the categories into an array my @cat = split("[ \t]+", $cats); $catkey{$name} = $cat[0]; my $sourcepath = $loc; $sourcepath =~ s%/usr/%%; foreach my $i (sort(@cat)) { $stats{$i}++; # figure out the FTP url $loc =~ s/\/usr\//$baseCVSWEB/; $ldesc =~ s/\/usr\//$baseHTTP/; # The name description and maintainer $data{$i} .= "

$name "; $data{$i} .= "
$desc
Long description"; if ($packages{"$name.tbz"}) { $data{$i} .= qq{ | Package}; } elsif ($packages{"$name.tgz"}) { $data{$i} .= qq{ | Package}; } $data{$i} .= qq{ | Sources}; if ($www ne "") { $data{$i} .= qq{ | Main Web Site}; } my $ownerurl = $owner; $ownerurl =~ s/<//g; $data{$i} .= "
Maintained by: $owner"; # If there are any dependencies, list them if ($bdep ne "" || $rdep ne "") { $data{$i} .= "
Requires: "; my @dep = split(/ /, "$bdep $rdep"); my $last = ''; foreach my $j (sort @dep) { next if $j eq $last; $last = $j; $data{$i} .= " $j,"; } # remove the trailing comma chop $data{$i}; } # If the port is listed in more than one category, throw # in some cross references if ($#cat > 0) { $data{$i} .= "
Also listed in: "; foreach my $j (@cat) { if ($j ne $i) { if ($j eq $cat[0]) { $data{$i} .= " \u$j,"; } else { $data{$i} .= " \u$j,"; } } } # remove the trailing comma chop($data{$i}); } $data{$i} .= "

\n" } # Add an entry to the master index # workaround for SGML bug, `--' is not allowed in comments my $sname = $name; $sname =~ s/--/-=/g; $master[$portnumber] = "$name " . " -- $desc
\n"; $portnumber++; } - my $ptgzsize = `cat ports.size 2>/dev/null` || ""; - if ($ptgzsize =~ /^\d+$/) { - $ptgzsize = sprintf("%.0f", $ptgzsize/(1024*1024)); - } else { - warn "Unknown size for ports.tar.gz\n"; - } + # create categories-grouped.sgml and .sgml - $moutf->open(">index.sgml"); + $moutf->open(">categories-grouped.sgml"); + header($moutf, "FreeBSD Ports Categories Listed By Groups"); - header($moutf, "FreeBSD Ports"); -# print $moutf "\n"; - print $moutf "&blurb;"; print $moutf < -

Current status

-

There are currently $portnumber ports in the FreeBSD Ports Collection.
-You may -download a gzip'd tar file of all ports -EOF - print $moutf "(about $ptgzsize megabytes)" if ($ptgzsize =~ /^\d+$/); - print $moutf <alphabetical list of all ports, -or browse the ports in the following categories: - -

+ EOF if ($portnumber eq '0') { print $moutf "

none found

\n"; } else { foreach my $cg (@category_groups) { print $moutf "

",$category_groups{$cg},"

\n"; print $moutf "
    \n"; foreach my $key (sort(keys(%stats))) { next if ($category_description{$key}{group} ne $cg); # For the master file... print $moutf "
  • \u$key ($stats{$key})"; if ($category_description{$key}{desc}) { print $moutf " -- " . $category_description{$key}{desc}; } # 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 "
  • \n"; # Create the category file $outf->open(">$key.sgml"); header($outf, "FreeBSD Ports: \u$key"); if ($category_description{$key}{desc}) { print $outf "

    ", $category_description{$key}{desc}, "

    \n"; } print $outf "
    \n"; my $d = join("\n", sort(split(/\n/, $data{$key}))); $d =~ s/##([^#]*)##/$catkey{$1}/g; print $outf $d; print $outf "
    \n"; - footer($outf, "

    Port Categories" . + footer($outf, "

    top" . " -- Index"); $outf->close; } print $moutf "
\n"; } } footer($moutf, ""); $moutf->close; - # Create the master index file + # create categories-alpha.sgml + + $moutf->open(">categories-alpha.sgml"); + header($moutf, "FreeBSD Ports Categories Listed Alphabetically"); + + print $moutf < +EOF + + if ($portnumber eq '0') { + print $moutf "

none found

\n"; + } else { + print $moutf "
    \n"; + foreach my $key (sort(keys(%stats))) { + print $moutf + "
  • \u$key ($stats{$key})"; + if ($category_description{$key}{desc}) { + print $moutf " -- " . $category_description{$key}{desc}; + print $moutf "
  • \n"; + } + } + print $moutf "
\n"; + } + + footer($moutf, ""); + $moutf->close; + + # Create master-index.sgml + $mindex->open(">master-index.sgml"); header($mindex, "FreeBSD Ports Collection Index"); print $mindex "

\n"; print $mindex sort @master; print $mindex "

"; - footer($mindex, "Port Categories"); + footer($mindex, "top"); $mindex->close; + + # Create statistics.ent + + $statistics->open(">statistics.ent"); + + # doesn't seem to work: + # print $statistics "$today'>\n"; + + my $ptgzsize = `cat ports.size 2>/dev/null` || ""; + if ($ptgzsize =~ /^\d+$/) { + $ptgzsize = sprintf("%.0f", $ptgzsize/(1024*1024)); + print $statistics "\n"; + } else { + warn "Unknown size for ports.tar.gz\n"; + print $statistics "\n"; + } + print $statistics "\n"; + + $statistics->close; close(INDEX); } diff --git a/en/ports/ports.ent b/en/ports/ports.ent new file mode 100644 index 0000000000..c717127a66 --- /dev/null +++ b/en/ports/ports.ent @@ -0,0 +1,26 @@ + + + +Search ports for: + + + +'> + + + + diff --git a/en/ports/references.sgml b/en/ports/references.sgml new file mode 100644 index 0000000000..ba9cb5f519 --- /dev/null +++ b/en/ports/references.sgml @@ -0,0 +1,90 @@ + + + + %navincludes; + + + +%includes; +%ports.ent; +%statistics.ent; +]> +&header; + +&searchform; + +
+ +

To start learning more about ports and packages, see + + Installing Applications: Packages and Ports, a section of the + + FreeBSD Handbook. +

+ +

The + + Porter's Handbook is the master reference for both creating new + ports and maintaining existing ports, including a section on + + Keeping Up. It also contains more detail about the topics below, as + well as more references for further study. +

+ +

You may also find the following to be useful:

+ + + +&footer; + + diff --git a/en/ports/searching.sgml b/en/ports/searching.sgml new file mode 100644 index 0000000000..e2cbd41065 --- /dev/null +++ b/en/ports/searching.sgml @@ -0,0 +1,40 @@ + + + + %navincludes; + + + +%includes; +%ports.ent; +%statistics.ent; +]> +&header; + +&searchform; + +
+ +

+The form above will allow you to search for ports on this site. +A completed search will take you to a +more complete search page. +

+ +

However, if you already have the Ports Collection installed on +your machine, you may also search by changing to the /usr/ports +directory and performing make search name=string. +See +bsd.port.subdir.mk for all the options. +

+ +

+Another option is to visit +FreshPorts.org +and either browse the site or subscribe to the lists hosted there. +

+ +&footer; + + diff --git a/en/ports/updating.sgml b/en/ports/updating.sgml new file mode 100644 index 0000000000..6275049d1b --- /dev/null +++ b/en/ports/updating.sgml @@ -0,0 +1,52 @@ + + + + %navincludes; + + + +%includes; +%ports.ent; +%statistics.ent; +]> +&header; + +&searchform; + +
+ +

+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. japanese/.) +

+ +

Changes that affect the entire port system are now documented in the +CHANGES file. +Changes that affect individual ports are now documented in the +UPDATING file. +

+ +

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 +available as a port/package, you may use the form above; alternatively, +you may wish to visit +FreshPorts.org +and either browse the site or subscribe to the lists hosted there. +

+ +

To learn more about installing and maintaining ports, see + +Installing Applications: Packages and Ports, a section of the + +FreeBSD Handbook; the section of the Porter's Handbook called + +Keeping Up; and the +ports manual page. +

+ +&footer; + +