From 46dee2b7c9853952780c7e8b4ab9ed66d819002a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 16 Jun 2015 21:21:39 +0000 Subject: ctanify (16jun15) git-svn-id: svn://tug.org/texlive/trunk@37571 c570f23f-e606-0410-a88d-b1316a301751 --- .../texk/texlive/linked_scripts/ctanify/ctanify | 24 ++++++++++++++++++--- Master/texmf-dist/doc/latex/ctanify/README | 7 +++--- Master/texmf-dist/doc/latex/ctanify/ctanify.pdf | Bin 175732 -> 15878 bytes Master/texmf-dist/doc/man/man1/ctanify.1 | 12 +++++++++-- Master/texmf-dist/doc/man/man1/ctanify.man1.pdf | Bin 15543 -> 15840 bytes Master/texmf-dist/scripts/ctanify/ctanify | 24 ++++++++++++++++++--- 6 files changed, 56 insertions(+), 11 deletions(-) diff --git a/Build/source/texk/texlive/linked_scripts/ctanify/ctanify b/Build/source/texk/texlive/linked_scripts/ctanify/ctanify index aa731ea4532..8702f4ecb76 100755 --- a/Build/source/texk/texlive/linked_scripts/ctanify/ctanify +++ b/Build/source/texk/texlive/linked_scripts/ctanify/ctanify @@ -19,7 +19,7 @@ use warnings; use strict; # Define some global variables. -our $VERSION = "1.5"; # ctanify version number +our $VERSION = "1.6"; # ctanify version number my $progname = basename $0; # Name of this program my $pkgname; # Base name of the package to create my $miscify = 0; # 1=replace singletons with misc; 0=don't @@ -36,6 +36,7 @@ my $pkgdir = ""; # Absolute directory of the package directory my $zipname; # Name of the TDS zip file my $tarname; # Name of the package tar file my $tdsoutdir; # Directory name where to output TDS tree +my $texmacros = "latex"; # TeX macro package # Associate file extensions with TDS directories. "%s" is replaced # with the package name. @@ -143,6 +144,7 @@ GetOptions("p|pkgname=s" => \$pkgname, "t|tdsonly=s" => \@tdsonly, "a|auto!" => \$autoinclude, "d|tdsdir=s" => \$tdsoutdir, + "T|tex=s" => \$texmacros, "V|version" => \$wantversion, "h|help" => \$wanthelp) || pod2usage(-verbose => 0, @@ -170,6 +172,13 @@ foreach my $fname (@ARGV) { } @tdsonly = map {File::Spec->abs2rel($_)} map {glob} @tdsonly; +# Replace "latex" with something else if --tex was specified. +if ($texmacros ne "latex") { + foreach my $ext (keys %ext2tds) { + $ext2tds{$ext} =~ s,\blatex\b,$texmacros,g; + } +} + # Determine the package name if not explicitly specified. if (!defined $pkgname) { my @mainfiles = (grep(/\.ins$/, @manifest), grep(/\.sty$/, @manifest)); @@ -293,7 +302,7 @@ if ($unixify) { my @bad_docs; find(sub { return if !-f; - push @bad_docs, $_ if $File::Find::name =~ m,\bdoc/latex/$pkgname/.*\.(ps|dvi)$,; + push @bad_docs, $_ if $File::Find::name =~ m,\bdoc/[^/]+/$pkgname/.*\.(ps|dvi)$,; }, $tdsdir); if (@bad_docs) { my $bad_docs = join ", ", @bad_docs; @@ -390,6 +399,9 @@ ctanify [B<--tdsonly>=I ...] [B<-->[B]B] [B<-->[B]B] +[B<--tdsdir>=I ...] +[B<--tex>=I] +[B<-->[B]B] I[=I] ... ctanify @@ -465,6 +477,12 @@ They are provided for special circumstances that may arise. Instead of creating a tarball for CTAN, merely create the package TDS tree rooted in directory I. +=item B<-T> I, B<--tex>=I + +Assert that the files being packaged for CTAN target a TeX macro +package other than LaTeX. Some common examples of I are +C, C, and C. + =item B<-nou>, B<--no-unixify> Store text files unmodified instead of converting their end-of-line @@ -666,7 +684,7 @@ Scott Pakin, I =head1 COPYRIGHT AND LICENSE -Copyright 2014 Scott Pakin +Copyright 2015 Scott Pakin This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either S of this diff --git a/Master/texmf-dist/doc/latex/ctanify/README b/Master/texmf-dist/doc/latex/ctanify/README index e09ebb434a3..f885a3f6399 100644 --- a/Master/texmf-dist/doc/latex/ctanify/README +++ b/Master/texmf-dist/doc/latex/ctanify/README @@ -19,8 +19,9 @@ files laid out in the standard TeX Directory Structure (TDS), which facilitates inclusion of the package in the TeX Live distribution of TeX. -So far, ctanify has been tested only on Linux. Volunteers willing to -help port ctanify to other platforms are especially welcome. +ctanify has been tested primarily on Linux but with reports from users +that it also works on OS X. Volunteers willing to help port ctanify +to other platforms are especially welcome. File manifest @@ -35,7 +36,7 @@ ctanify.pdf ctanify documentation (PDF format) Copyright and License ===================== -Copyright 2014 Scott Pakin +Copyright (C) 2015 Scott Pakin This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license diff --git a/Master/texmf-dist/doc/latex/ctanify/ctanify.pdf b/Master/texmf-dist/doc/latex/ctanify/ctanify.pdf index 12e196f9cef..7b4cdf862ed 100644 Binary files a/Master/texmf-dist/doc/latex/ctanify/ctanify.pdf and b/Master/texmf-dist/doc/latex/ctanify/ctanify.pdf differ diff --git a/Master/texmf-dist/doc/man/man1/ctanify.1 b/Master/texmf-dist/doc/man/man1/ctanify.1 index 7cd33a886eb..1a16d54d180 100644 --- a/Master/texmf-dist/doc/man/man1/ctanify.1 +++ b/Master/texmf-dist/doc/man/man1/ctanify.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CTANIFY 1" -.TH CTANIFY 1 "2014-12-22" "v1.5" "" +.TH CTANIFY 1 "2015-05-25" "v1.6" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -148,6 +148,9 @@ ctanify [\fB\-\-tdsonly\fR=\fIfilespec\fR ...] [\fB\-\-\fR[\fBno\fR]\fBunixify\fR] [\fB\-\-\fR[\fBno\fR]\fBskip\fR] +[\fB\-\-tdsdir\fR=\fIdirname\fR ...] +[\fB\-\-tex\fR=\fImacro_pkg\fR] +[\fB\-\-\fR[\fBno\fR]\fBmiscify\fR] \&\fIfilespec\fR[=\fIdirname\fR] ... .PP ctanify @@ -204,6 +207,11 @@ They are provided for special circumstances that may arise. .IX Item "-d dirname, --tdsdir=dirname" Instead of creating a tarball for \s-1CTAN,\s0 merely create the package \s-1TDS\s0 tree rooted in directory \fIdirname\fR. +.IP "\fB\-T\fR \fImacro_pkg\fR, \fB\-\-tex\fR=\fImacro_pkg\fR" 5 +.IX Item "-T macro_pkg, --tex=macro_pkg" +Assert that the files being packaged for \s-1CTAN\s0 target a TeX macro +package other than LaTeX. Some common examples of \fImacro_pkg\fR are +\&\f(CW\*(C`generic\*(C'\fR, \f(CW\*(C`plain\*(C'\fR, and \f(CW\*(C`context\*(C'\fR. .IP "\fB\-nou\fR, \fB\-\-no\-unixify\fR" 5 .IX Item "-nou, --no-unixify" Store text files unmodified instead of converting their end-of-line @@ -370,7 +378,7 @@ A Directory Structure for TeX Files (), Scott Pakin, \fIscott+ctify@pakin.org\fR .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" -Copyright 2014 Scott Pakin +Copyright 2015 Scott Pakin .PP This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version\ 1.3c of this diff --git a/Master/texmf-dist/doc/man/man1/ctanify.man1.pdf b/Master/texmf-dist/doc/man/man1/ctanify.man1.pdf index e625b56bb00..58bca04a03a 100644 Binary files a/Master/texmf-dist/doc/man/man1/ctanify.man1.pdf and b/Master/texmf-dist/doc/man/man1/ctanify.man1.pdf differ diff --git a/Master/texmf-dist/scripts/ctanify/ctanify b/Master/texmf-dist/scripts/ctanify/ctanify index aa731ea4532..8702f4ecb76 100755 --- a/Master/texmf-dist/scripts/ctanify/ctanify +++ b/Master/texmf-dist/scripts/ctanify/ctanify @@ -19,7 +19,7 @@ use warnings; use strict; # Define some global variables. -our $VERSION = "1.5"; # ctanify version number +our $VERSION = "1.6"; # ctanify version number my $progname = basename $0; # Name of this program my $pkgname; # Base name of the package to create my $miscify = 0; # 1=replace singletons with misc; 0=don't @@ -36,6 +36,7 @@ my $pkgdir = ""; # Absolute directory of the package directory my $zipname; # Name of the TDS zip file my $tarname; # Name of the package tar file my $tdsoutdir; # Directory name where to output TDS tree +my $texmacros = "latex"; # TeX macro package # Associate file extensions with TDS directories. "%s" is replaced # with the package name. @@ -143,6 +144,7 @@ GetOptions("p|pkgname=s" => \$pkgname, "t|tdsonly=s" => \@tdsonly, "a|auto!" => \$autoinclude, "d|tdsdir=s" => \$tdsoutdir, + "T|tex=s" => \$texmacros, "V|version" => \$wantversion, "h|help" => \$wanthelp) || pod2usage(-verbose => 0, @@ -170,6 +172,13 @@ foreach my $fname (@ARGV) { } @tdsonly = map {File::Spec->abs2rel($_)} map {glob} @tdsonly; +# Replace "latex" with something else if --tex was specified. +if ($texmacros ne "latex") { + foreach my $ext (keys %ext2tds) { + $ext2tds{$ext} =~ s,\blatex\b,$texmacros,g; + } +} + # Determine the package name if not explicitly specified. if (!defined $pkgname) { my @mainfiles = (grep(/\.ins$/, @manifest), grep(/\.sty$/, @manifest)); @@ -293,7 +302,7 @@ if ($unixify) { my @bad_docs; find(sub { return if !-f; - push @bad_docs, $_ if $File::Find::name =~ m,\bdoc/latex/$pkgname/.*\.(ps|dvi)$,; + push @bad_docs, $_ if $File::Find::name =~ m,\bdoc/[^/]+/$pkgname/.*\.(ps|dvi)$,; }, $tdsdir); if (@bad_docs) { my $bad_docs = join ", ", @bad_docs; @@ -390,6 +399,9 @@ ctanify [B<--tdsonly>=I ...] [B<-->[B]B] [B<-->[B]B] +[B<--tdsdir>=I ...] +[B<--tex>=I] +[B<-->[B]B] I[=I] ... ctanify @@ -465,6 +477,12 @@ They are provided for special circumstances that may arise. Instead of creating a tarball for CTAN, merely create the package TDS tree rooted in directory I. +=item B<-T> I, B<--tex>=I + +Assert that the files being packaged for CTAN target a TeX macro +package other than LaTeX. Some common examples of I are +C, C, and C. + =item B<-nou>, B<--no-unixify> Store text files unmodified instead of converting their end-of-line @@ -666,7 +684,7 @@ Scott Pakin, I =head1 COPYRIGHT AND LICENSE -Copyright 2014 Scott Pakin +Copyright 2015 Scott Pakin This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either S of this -- cgit v1.2.3