From c67e39a1aa144392a0ecd740e90b5b5dc8ad5681 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 14 Dec 2006 15:10:01 +0000 Subject: 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 --- Build/tools/Tpm.pm | 66 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 5 deletions(-) (limited to 'Build/tools/Tpm.pm') 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 { -- cgit v1.2.3