aboutsummaryrefslogtreecommitdiff
path: root/de_DE.ISO8859-1/htdocs/ports
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2012-08-09 21:23:44 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2012-08-09 21:23:44 +0000
commit4e23586af488776aaabd5cc102f6a62c84d53264 (patch)
treef6537cf53976c6e47c53bfd7ff2c2aefe9ff1b8a /de_DE.ISO8859-1/htdocs/ports
parent74586f38c6aa3c369795f0478e0eee5e797f7050 (diff)
downloaddoc-4e23586af488776aaabd5cc102f6a62c84d53264.tar.gz
doc-4e23586af488776aaabd5cc102f6a62c84d53264.zip
- XMLify the ports/ section of the webpages. With this change the whole
set of webpages should be now buildable in XML, however the build mechanism of the multimedia/ and ports/ sections do not really fit our infrastructure so these should probably be redesigned later to use XSLT. Approved by: doceng (implicit)
Notes
Notes: svn path=/projects/sgml2xml/; revision=39346
Diffstat (limited to 'de_DE.ISO8859-1/htdocs/ports')
-rw-r--r--de_DE.ISO8859-1/htdocs/ports/Makefile2
-rw-r--r--de_DE.ISO8859-1/htdocs/ports/Makefile.inc2
-rwxr-xr-xde_DE.ISO8859-1/htdocs/ports/portindex396
3 files changed, 2 insertions, 398 deletions
diff --git a/de_DE.ISO8859-1/htdocs/ports/Makefile b/de_DE.ISO8859-1/htdocs/ports/Makefile
index 7c40b17f10..49c01977c6 100644
--- a/de_DE.ISO8859-1/htdocs/ports/Makefile
+++ b/de_DE.ISO8859-1/htdocs/ports/Makefile
@@ -78,7 +78,7 @@ ports.size:
# master-index.sgml, statistics.ent, <category>.sgml
CATEGORYLIST=`grep "^[a-z]" categories | sed -e s"/,.*//"`
categories-alpha.sgml: ${INDEX} categories categories.descriptions \
- packages.exists portindex ports.ent ports.size .NOTMAIN
+ packages.exists ports.ent ports.size .NOTMAIN
${RM} -f categories-alpha.sgml categories-grouped.sgml \
master-index.sgml statistics.ent
for categoryfile in ${CATEGORYLIST}; do \
diff --git a/de_DE.ISO8859-1/htdocs/ports/Makefile.inc b/de_DE.ISO8859-1/htdocs/ports/Makefile.inc
index de66d8e85e..9b9aa7b7c6 100644
--- a/de_DE.ISO8859-1/htdocs/ports/Makefile.inc
+++ b/de_DE.ISO8859-1/htdocs/ports/Makefile.inc
@@ -2,7 +2,7 @@
# $FreeBSDde: de-www/ports/Makefile.inc,v 1.1 2007/03/31 14:27:06 jkois Exp $
# basiert auf: 1.10
-PORTINDEX= ${PERL} ${.CURDIR}/portindex
+PORTINDEX= ${PERL} ${.CURDIR}/../../../en_US.ISO8859-1/htdocs/ports/portindex
INDEX= INDEX
PINDEX= ports/${INDEX}
diff --git a/de_DE.ISO8859-1/htdocs/ports/portindex b/de_DE.ISO8859-1/htdocs/ports/portindex
deleted file mode 100755
index 96749f77c2..0000000000
--- a/de_DE.ISO8859-1/htdocs/ports/portindex
+++ /dev/null
@@ -1,396 +0,0 @@
-#!/usr/bin/perl -w
-
-# convert a ports INDEX file to SGML files
-#
-# by John Fieber <jfieber@FreeBSD.org>
-# Mon May 13 10:31:58 EST 1996
-# $FreeBSD$
-# $FreeBSDde: de-www/ports/portindex,v 1.1 2007/03/31 14:27:06 jkois Exp $
-# basiert auf: 1.57
-
-############################################################
-
-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 <<EOF;
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//FreeBSD//DTD XHTML 1.0 Transitional-Based Extension//EN"
-"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
-<!ENTITY base '..'>
-<!ENTITY date "<em>$today</em>">
-<!ENTITY % navinclude.ports "INCLUDE">
-<!ENTITY % ports.ent SYSTEM "ports.ent">
-%ports.ent;
-<!ENTITY email 'ports'>
-%statistics.ent;
-]>
-<html>
- <head>
- <title>'$htext'</title>
- </head>
-
- <body class="navinclude.port">
-
-&searchform;
-
-<hr/>
-
-EOF
-}
-
-sub footer {
- my $fh = shift;
- my $ftext = shift;
- #local ($fh, $ftext) = @_;
-print $fh <<EOF;
-
-$ftext
-</body>
-</html>
-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(<P>) {
- 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(<P>) {
- # 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(<P>) {
- # 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 = "<B>:</B>";
-
- 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 (<INDEX>) {
- chop;
- s/&/&amp;/g;
- s/</&lt;/g;
- s/>/&gt;/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
- $name =~ s/,.*//g;
- $name =~ s/\++//g;
- $data{$i} .= "<dt><b><a name=\"$name\"></a><a href=\"$loc$ftparchive\">$name</a></b></dt>";
-
-
- $data{$i} .= "<dd>$desc<br/><a href=\"$ldesc\">Long description</a>";
- if ($packages{"$name.tbz"}) {
- $data{$i} .= qq{ | <a href="$packagesURL$name.tbz">Package</a>};
- } elsif ($packages{"$name.tgz"}) {
- $data{$i} .= qq{ | <a href="$packagesURL$name.tgz">Package</a>};
- }
-
- $data{$i} .= qq{ | <a href="$pds?$sourcepath">Sources</a>};
-
- if ($www ne "") {
- $data{$i} .= qq{ | <a href="$www">Main Web Site</a>};
- }
-
- my $ownerurl = $owner;
- $ownerurl =~ s/&lt;/</g;
- $ownerurl =~ s/&gt;/>/g;
- $data{$i} .=
- "<br/><i>Maintained by:</i> <a href=\"mailto:$ownerurl\">$owner</a>";
-
- # If there are any dependencies, list them
- if ($bdep ne "" || $rdep ne "") {
- $data{$i} .= "<br/><i>Requires:</i> ";
- my @dep = split(/ /, "$bdep $rdep");
- my $last = '';
- foreach my $j (sort @dep) {
- next if $j eq $last;
- $last = $j;
- $data{$i} .= " <a href=\"##$j##.html#$j\">$j</a>,";
- }
- # 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} .= "<br/><em>Also listed in:</em> ";
- foreach my $j (@cat) {
- if ($j ne $i) {
- if ($j eq $cat[0]) {
- $data{$i} .= " <strong><a href=\"$j.html#$name\">\u$j</a></strong>,";
- }
- else {
- $data{$i} .= " <a href=\"$j.html#$name\">\u$j</a>,";
- }
- }
- }
- # remove the trailing comma
- chop($data{$i});
- }
- $data{$i} .= "<p></p></dd>\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] =
- "<!-- $sname --><strong><a href=\"$cat[0].html#$name\">$name</a></strong> " .
- " -- <em>$desc</em><br/>\n";
- $portnumber++;
- }
-
- # create categories-grouped.sgml and <category>.sgml
-
- $moutf->open(">categories-grouped.sgml");
- header($moutf, "FreeBSD Ports Categories Listed By Groups");
-
- print $moutf <<EOF;
-<a name=\"top\"></a>
-EOF
-
- 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};
- }
-
- # 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
- $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=\"#top\">top</a>" .
- " -- <a href=\"master-index.html\">Index</a>");
- $outf->close;
- }
- print $moutf "</ul>\n";
- }
- }
-
- footer($moutf, "");
- $moutf->close;
-
- # create categories-alpha.sgml
-
- $moutf->open(">categories-alpha.sgml");
- header($moutf, "FreeBSD Ports Categories Listed Alphabetically");
-
- print $moutf <<EOF;
-<a name=\"top\"></a>
-EOF
-
- if ($portnumber eq '0') {
- print $moutf "<p>none found</p>\n";
- } else {
- print $moutf "<ul>\n";
- foreach my $key (sort(keys(%stats))) {
- 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};
- print $moutf "</li>\n";
- }
- }
- print $moutf "</ul>\n";
- }
-
- footer($moutf, "");
- $moutf->close;
-
- # Create master-index.sgml
-
- $mindex->open(">master-index.sgml");
- header($mindex, "FreeBSD Ports Collection Index");
- print $mindex "<p>\n";
- print $mindex sort @master;
- print $mindex "</p>";
- footer($mindex, "<a href=\"#top\">top</a>");
- $mindex->close;
-
- # Create statistics.ent
-
- $statistics->open(">statistics.ent");
-
- # doesn't seem to work:
- # print $statistics "<!ENTITY date '<em>$today</em>'>\n";
-
- my $ptgzsize = `cat ports.size 2>/dev/null` || "";
- if ($ptgzsize =~ /^\d+$/) {
- $ptgzsize = sprintf("%.0f", $ptgzsize/(1024*1024));
- print $statistics "<!ENTITY ports.size 'about $ptgzsize megabytes'>\n";
- } else {
- warn "Unknown size for ports.tar.gz\n";
- print $statistics "<!ENTITY ports.size 'several tens of megabytes'>\n";
- }
- print $statistics "<!ENTITY ports.count '$portnumber'>\n";
-
- $statistics->close;
- close(INDEX);
-}