diff options
author | Norbert Preining <preining@logic.at> | 2006-12-14 15:10:01 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2006-12-14 15:10:01 +0000 |
commit | c67e39a1aa144392a0ecd740e90b5b5dc8ad5681 (patch) | |
tree | 4b693349f0114c500b25b793decc83f220bbbe15 | |
parent | 4c4ecbb33c3e33f0f79eec67f67acadb7b8b5153 (diff) |
changes to Tpm.pm to
- deal with different names of the tpm file and the catalogue entry
- update the license information in the tpm file from the catalogue
git-svn-id: svn://tug.org/texlive/trunk@2738 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/tools/Tpm.pm | 66 |
1 files changed, 61 insertions, 5 deletions
diff --git a/Build/tools/Tpm.pm b/Build/tools/Tpm.pm index 9f9f38c9ecf..7d0c879ab96 100644 --- a/Build/tools/Tpm.pm +++ b/Build/tools/Tpm.pm @@ -160,6 +160,53 @@ my %dotfiles = ( my $CatalogueDir = "${MasterDir}/texmf-doc/doc/english/catalogue"; my $Catalogue; +# +# %Tpm2Catalogue gives a mapping from tpm names to Catalogue entries +# +# missing entries +# ? bengali:pandey +# ? grotesq:urwvf +# ? helvetic:urwvf +# ? knuthotherfonts:halftone +# makedtx:makedtx not working! +# ? oberdiek:twoopt, tabularht, tabularkv, settobox, refcount, alphalph, chemar +r, classlist, dvipscol, engord, hypbmsec, hypcap, ifdraft, ifpdf, ifvtexm pagese +l, pdfcolmk pdfcrypt, pdflscape (somehing missing???) +my %Tpm2Catalogue = ( + "ctib" => "ctib4tex", + "CJK" => "cjk", + "bayer" => "universa", + "bigfoot" => "suffix", + "cb" => "cbgreek", + "cd-cover" => "cdcover", + "cmex" => "cmextra", + "cs" => "csfonts", + "cyrplain" => "t2", + "devanagr" => "devanagari", + "eCards" => "ecards", + "ESIEEcv" => "esieecv", + "euclide" => "pst-eucl", + "GuIT" => "guit", + "HA-prosper" => "prosper", + "ibycus" => "ibycus4", + "ibygrk" => "ibycus4", + "IEEEconf" => "ieeeconf", + "IEEEtran" => "ieeetran", + "iso" => "isostds", + "iso10303" => "isostds", + "jknapltx" => "jknappen", + "kastrup" => "binhex", + "le" => "frenchle", + "mathtime" => "mathtime-ltx", + "omega-devanagari" => "devanagari-omega", + "pdftexdef" => "pdftex-def", + "procIAGssymp" => "prociagssymp", + "resume" => "res", + "SIstyle" => "sistyle", + "SIunits" => "siunits", + "syntax" => "syntax2", + "Tabbing" => "tabbing" ); + my $Verbose = 0; sub reverse_hash { @@ -427,7 +474,7 @@ sub toRDF { } for my $tag ("Name", "Type", "Date", "Version", "Creator", "Title", - "Description", "Author", "Size") { + "Description", "Author", "Size", "License") { my $attribute = $self->getAttribute("$tag"); # None of these are optional $node = $doc->createElement("TPM:$tag"); @@ -1152,11 +1199,15 @@ sub completeUsingCatalogue { my $pkgname = $self->getAttribute("Name"); $pkgname =~ s/^(bin-|lib-|tex-)//; - # FIXME : we should handle several cases where the Catalogue name + # handle several cases where the Catalogue name # is not the package name... - print STDERR "Looking for $pkgname in the Catalogue.\n" if $Verbose; - my $fletter = substr($pkgname, 0, 1); - my $catname = "${CatalogueDir}/entries/$fletter/${pkgname}.xml"; + if (defined($Tpm2Catalogue{$pkgname})) { + $pkgcat = $Tpm2Catalogue{$pkgname}; + } else { + $pkgcat = $pkgname; + }print STDERR "Looking for $pkgname (as $pkgcat) in the Catalogue.\n" if $Verbose; + my $fletter = substr($pkgcat, 0, 1); + my $catname = "${CatalogueDir}/entries/$fletter/${pkgcat}.xml"; return if (! -f $catname); # print "catname = $catname\n"; my $parser = new XML::DOM::Parser; @@ -1200,6 +1251,7 @@ sub completeUsingCatalogue { my $old_version = &trim($self->getAttribute("Version")); my $old_title = &trim($self->getAttribute("Title")); my $old_description = &trim($self->getAttribute("Description")); + my $old_license = &trim($self->getAttribute("License")); if ($author && $author ne $old_author) { $self->setAttribute("Author", $author); @@ -1217,6 +1269,10 @@ sub completeUsingCatalogue { $self->setAttribute("Description", $description); print "Replacing $old_description by $description\n"; } + if ($license && ($license ne $old_license)) { + $self->setAttribute("License", $license); + print "Replacing $old_license by $license\n"; + } } sub buildPatternsPackage { |