[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff ChangeLog Makefile.in doc/groff.texinfo f...
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff ChangeLog Makefile.in doc/groff.texinfo f... |
Date: |
Wed, 10 Aug 2011 18:23:08 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 11/08/10 18:23:06
Modified files:
. : ChangeLog Makefile.in
doc : groff.texinfo
font/devpdf : Makefile.sub
font/devpdf/util: BuildFoundries.pl
src/devices/gropdf: gropdf.man gropdf.pl
Log message:
[gropdf] Minor updates and fixes.
* src/devices/gropdf/gropdf.pl: Change command line option `-fy' to
`-y' for consistency.
Better support for Windows platform.
(do_x): Handle keywords `pagename' and `switchtopage'.
* doc/groff.texinfo, src/devices/gropdf/gropdf.man: Updated.
* font/devpdf/Foundry: Renamed to...
* font/devpdf/Foundry.in: This.
Add default alias font names.
* font/devpdf/util/BuildFoundries.pl: This is now an installation
helper script and gets not longer installed.
Support alternative font file names (separated with `!').
* font/devpdf/Makefile.sub: Fixes to work with a separate build
directory.
Font files are now build at `make' time; this makes `test-groff'
work with -Tpdf.
* font/devpdf/util/Makefile.sub: Removed.
* Makefile.in (DEVDIRS, OTHERDIRS, EXTRADIRS): Handle devpdf
specially.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1305&r2=1.1306
http://cvs.savannah.gnu.org/viewcvs/groff/Makefile.in?cvsroot=groff&r1=1.117&r2=1.118
http://cvs.savannah.gnu.org/viewcvs/groff/doc/groff.texinfo?cvsroot=groff&r1=1.305&r2=1.306
http://cvs.savannah.gnu.org/viewcvs/groff/font/devpdf/Makefile.sub?cvsroot=groff&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/groff/font/devpdf/util/BuildFoundries.pl?cvsroot=groff&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/gropdf.man?cvsroot=groff&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/gropdf.pl?cvsroot=groff&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1305
retrieving revision 1.1306
diff -u -b -r1.1305 -r1.1306
--- ChangeLog 29 Jul 2011 20:16:42 -0000 1.1305
+++ ChangeLog 10 Aug 2011 18:22:58 -0000 1.1306
@@ -1,3 +1,32 @@
+2011-08-10 Deri James <address@hidden>
+
+ [gropdf] Minor updates and fixes.
+
+ * src/devices/gropdf/gropdf.pl: Change command line option `-fy' to
+ `-y' for consistency.
+ Better support for Windows platform.
+ (do_x): Handle keywords `pagename' and `switchtopage'.
+
+ * doc/groff.texinfo, src/devices/gropdf/gropdf.man: Updated.
+
+ * font/devpdf/Foundry: Renamed to...
+ * font/devpdf/Foundry.in: This.
+ Add default alias font names.
+
+ * font/devpdf/util/BuildFoundries.pl: This is now an installation
+ helper script and gets not longer installed.
+ Support alternative font file names (separated with `!').
+
+ * font/devpdf/Makefile.sub: Fixes to work with a separate build
+ directory.
+ Font files are now build at `make' time; this makes `test-groff'
+ work with -Tpdf.
+
+ * font/devpdf/util/Makefile.sub: Removed.
+
+ * Makefile.in (DEVDIRS, OTHERDIRS, EXTRADIRS): Handle devpdf
+ specially.
+
2011-07-29 Daiki Ueno <address@hidden>
Fix cross building.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/groff/groff/Makefile.in,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- Makefile.in 29 Jul 2011 20:16:42 -0000 1.117
+++ Makefile.in 10 Aug 2011 18:22:59 -0000 1.118
@@ -589,7 +589,6 @@
$(XPROGDIRS)
DEVDIRS=\
font/devps \
- font/devpdf \
font/devdvi \
font/devhtml
ALLTTYDEVDIRS=\
@@ -615,6 +614,7 @@
contrib/hdtbl \
contrib/pdfmark \
src/devices/gropdf \
+ font/devpdf \
contrib/gdiffmk
ALLDIRS=\
@@ -630,7 +630,6 @@
font/devps/generate \
font/devdvi/generate \
font/devlj4/generate \
- font/devpdf/util \
doc
NOMAKEDIRS=\
m4 \
Index: doc/groff.texinfo
===================================================================
RCS file: /cvsroot/groff/groff/doc/groff.texinfo,v
retrieving revision 1.305
retrieving revision 1.306
diff -u -b -r1.305 -r1.306
--- doc/groff.texinfo 26 Jul 2011 17:11:09 -0000 1.305
+++ doc/groff.texinfo 10 Aug 2011 18:22:59 -0000 1.306
@@ -15164,7 +15164,7 @@
search path for the font, prologue and device description files,
given the target device @var{name}, usually @strong{pdf}.
address@hidden address@hidden
address@hidden address@hidden
This forces the use of a different font foundry.
@item -l
Index: font/devpdf/Makefile.sub
===================================================================
RCS file: /cvsroot/groff/groff/font/devpdf/Makefile.sub,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- font/devpdf/Makefile.sub 26 Jul 2011 17:11:10 -0000 1.1
+++ font/devpdf/Makefile.sub 10 Aug 2011 18:23:00 -0000 1.2
@@ -17,10 +17,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
DEV=pdf
-GROFF_FONT_FILES=`cd $(DESTDIR)$(fontsubdir); \
- grep -l internalname * | grep -v Makefile.sub`
-ENC_FILES=`cd $(DESTDIR)$(fontsubdir); ls enc`
-MAP_FILES=`cd $(DESTDIR)$(fontsubdir); ls map`
+GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
+ && find * -maxdepth 0 -type f ! -name Makefile.sub \
+ -exec grep -l internalname {} \;`
+ENC_FILES=`cd $(top_builddir)/font/devpdf; ls enc/*`
+MAP_FILES=`cd $(top_builddir)/font/devpdf; ls map/*`
UTILFILES=\
BuildFoundries
@@ -28,14 +29,17 @@
MOSTLYCLEANADD=\
download \
DESC \
+ Foundry \
util/BuildFoundries \
$(GROFF_FONT_FILES) \
$(ENC_FILES) \
$(MAP_FILES)
-#MOSTLYCLEANDIRADD=enc map
+
+MOSTLYCLEANDIRADD=enc map
DEVFILES=\
Foundry
+
#DEVSCRIPTS=util/BuildFoundries
DISTFILES=\
@@ -51,21 +55,53 @@
DESC: DESC.in
-rm -f DESC
- cat $(srcdir)/DESC.in >DESC
+ cat $(srcdir)/DESC.in >$(top_builddir)/font/devpdf/DESC
if test "$(PAGE)" = A4; then \
- echo "papersize a4" >>DESC; \
+ echo "papersize a4" >>$(top_builddir)/font/devpdf/DESC; \
else \
- echo "papersize letter" >>DESC; \
+ echo "papersize letter" >>$(top_builddir)/font/devpdf/DESC; \
fi
+ -rm -f Foundry
+ cat $(srcdir)/Foundry.in >$(top_builddir)/font/devpdf/Foundry
BuildFoundries: util/BuildFoundries.pl $(SH_DEPS_SED_SCRIPT)
+ -test -d $(top_builddir)/font/devpdf/enc \
+ || $(mkinstalldirs) $(top_builddir)/font/devpdf/enc
+ -test -d $(top_builddir)/font/devpdf/map \
+ || $(mkinstalldirs) $(top_builddir)/font/devpdf/map
+ cp -f $(top_srcdir)/font/devps/text.enc \
+ $(top_builddir)/font/devpdf/enc
+ cp -f $(top_srcdir)/font/devps/symbolmap \
+ $(top_builddir)/font/devpdf/map
+ cp -f $(top_srcdir)/font/devps/generate/dingbats.map \
+ $(top_builddir)/font/devpdf/map
+ cp -f $(top_srcdir)/font/devps/generate/textmap \
+ $(top_builddir)/font/devpdf/map
+ cp -f $(top_srcdir)/font/devps/generate/symbolchars \
+ $(top_builddir)/font/devpdf/map
-test -d util || $(mkinstalldirs) util
$(RM) util/$@
+ if test -n "$(PERLPATH)"; then \
+ sed -f $(SH_DEPS_SED_SCRIPT) \
+ -e "s|/usr/bin/perl|$(PERLPATH)|" \
+ -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(GHOSTSCRIPT)|" \
+ -e "s|@VERSION@|$(version)$(revision)|" \
+ -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \
+ $(srcdir)/util/BuildFoundries.pl \
+ >$(top_builddir)/font/devpdf/util/$@ ;\
+ else \
sed -f $(SH_DEPS_SED_SCRIPT) \
-e "s|@VERSION@|$(version)$(revision)|" \
- -e "s|@PERLPATH@|$(PERLPATH)|" \
- -e "s|@GROFF_FONT_DIR@|$(fontdir)|"
$(srcdir)/util/BuildFoundries.pl > util/$@
+ -e "s|@GROFF_FONT_DIR@|$(fontdir)|" \
+ $(srcdir)/util/BuildFoundries.pl \
+ >$(top_builddir)/font/devpdf/util/$@ ;\
+ fi
chmod +x util/$@
+ echo "# foundry ps name psfile" > $(top_builddir)/font/devpdf/download
+
PATH="$(top_builddir)/src/utils/afmtodit:${GROFF_PATH_SEPARATOR}${PATH}" \
+ util/BuildFoundries $(top_builddir)/font/devpdf \
+ '$(top_srcdir)/font/devps : $(top_builddir)/font/devps' \
+ >> $(top_builddir)/font/devpdf/download
install_data:
-test -d $(DESTDIR)$(fontsubdir) \
@@ -83,25 +119,16 @@
fi; \
done
$(RM) $@
- cp -f $(DESTDIR)$(fontdir)/devps/text.enc \
- $(DESTDIR)$(fontsubdir)/enc
- cp -f $(srcdir)/../devps/symbolmap \
- $(DESTDIR)$(fontsubdir)/map
- cp -f $(DESTDIR)$(fontdir)/devps/generate/dingbats.map \
- $(DESTDIR)$(fontsubdir)/map
- cp -f $(DESTDIR)$(fontdir)/devps/generate/textmap \
- $(DESTDIR)$(fontsubdir)/map
- cp -f $(DESTDIR)$(fontdir)/devps/generate/symbolchars \
- $(DESTDIR)$(fontsubdir)/map
- echo "# foundry ps name psfile" > $(DESTDIR)$(fontsubdir)/download
- util/BuildFoundries $(DESTDIR)$(fontsubdir) \
- > $(DESTDIR)$(fontsubdir)/download
uninstall_sub:
for f in $(MOSTLYCLEANADD); do \
$(RM) $(DESTDIR)$(fontsubdir)/$$f; \
done
- rmdir $(DESTDIR)$(fontsubdir)/enc
- rmdir $(DESTDIR)$(fontsubdir)/map
- rmdir $(DESTDIR)$(fontsubdir)/util
- rmdir $(DESTDIR)$(fontsubdir)
+ -test -d $(DESTDIR)$(fontsubdir)/enc \
+ && rmdir $(DESTDIR)$(fontsubdir)/enc
+ -test -d $(DESTDIR)$(fontsubdir)/map \
+ && rmdir $(DESTDIR)$(fontsubdir)/map
+ -test -d $(DESTDIR)$(fontsubdir)/util \
+ && rmdir $(DESTDIR)$(fontsubdir)/util
+ -test -d $(DESTDIR)$(fontsubdir) \
+ && rmdir $(DESTDIR)$(fontsubdir)
Index: font/devpdf/util/BuildFoundries.pl
===================================================================
RCS file: /cvsroot/groff/groff/font/devpdf/util/BuildFoundries.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- font/devpdf/util/BuildFoundries.pl 26 Jul 2011 17:11:10 -0000 1.1
+++ font/devpdf/util/BuildFoundries.pl 10 Aug 2011 18:23:00 -0000 1.2
@@ -1,7 +1,7 @@
address@hidden@ -w
+#!/usr/bin/perl -w
#
-# BuildFoundries: Given a Foundry file generate groff and download files
-# Deri James: Monday 07 Feb 2011
+# BuildFoundries : Given a Foundry file generate groff and download files
+# Deri James : Monday 07 Feb 2011
# Copyright (C) 2011 Free Software Foundation, Inc.
# Written by Deri James <address@hidden>
@@ -24,6 +24,7 @@
use strict;
my $where=shift||'';
+my $devps=shift||'../devps';
chdir $where if $where ne '';
my (%foundry,%flg,@downloadpreamble,%download);
my $GSpath=FindGSpath();
@@ -38,6 +39,7 @@
exit $warn;
+
sub LoadFoundry
{
my $fn=shift;
@@ -67,7 +69,8 @@
if (lc($r[0]) eq 'foundry')
{
$foundry=uc($r[1]);
- $foundrypath=$r[2];
+ $foundrypath=$r[2].' : '.$devps;
+ $foundrypath=~s/\(gs\)/$GSpath /;
}
else
{
@@ -92,10 +95,11 @@
# Don't run afmtodit, just copy the grops font file
my $gotf=1;
+ my $gropsfnt=LocateFile($devps,$r[0],0);
- if (-r "../devps/$r[0]")
+ if ($gropsfnt ne '' and -r "$gropsfnt")
{
- my $psfont=UseGropsVersion($r[0]);
+ my $psfont=UseGropsVersion($gropsfnt);
if
(!PutDownload($psfont,LocatePF($foundrypath,$r[5]),uc($r[1])))
{
if (uc($r[1]) ne 'Y')
@@ -106,6 +110,7 @@
}
}
print STDERR "Copied grops font $gfont...\n" if $gotf;
+
}
else
{
@@ -211,9 +216,11 @@
sub LocateFile
{
my $path=shift;
- my $file=shift;
+ my $files=shift;
my $tryafm=shift;
+ foreach my $file (split('!',$files))
+ {
if ($file=~m'/')
{
# path given with file name so no need to search the paths
@@ -234,11 +241,7 @@
return('');
}
- if ($path eq '(gs)')
- {
- $path=$GSpath;
- }
- elsif ($path eq '(tex)')
+ if ($path eq '(tex)')
{
my $res=`kpsewhich $file`;
return '' if $?;
@@ -246,10 +249,11 @@
return($res);
}
- my (@paths)=split(':',$path);
+ my (@paths)=split(/ (:|;)/,$path);
foreach my $p (@paths)
{
+ next if !defined($p) or $p eq ';' or $p eq ':';
$p=~s/^\s+//;
$p=~s/\s+$//;
@@ -268,13 +272,14 @@
}
}
}
+ }
return('');
}
sub FindGSpath
{
- my (@res)=`gs -h 2>/dev/null`;
+ my (@res)address@hidden@ -h 2>/dev/null`;
return '' if $?;
my $buildpath='';
my $stg=1;
@@ -308,8 +313,10 @@
{
my $gfont=shift;
my $psfont='';
+ my (@gfa)=split('/',$gfont);
+ my $gfontbase=pop(@gfa);
- if (open(GF,"<../devps/$gfont"))
+ if (open(GF,"<$gfont"))
{
my (@gf)=(<GF>);
my @ps=grep(/^internalname /,@gf);
@@ -327,7 +334,7 @@
if ($psfont)
{
- if (open(GF,">$gfont"))
+ if (open(GF,">$gfontbase"))
{
local $"='';
print GF "@gf";
Index: src/devices/gropdf/gropdf.man
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/gropdf.man,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/devices/gropdf/gropdf.man 26 Jul 2011 17:11:11 -0000 1.1
+++ src/devices/gropdf/gropdf.man 10 Aug 2011 18:23:01 -0000 1.2
@@ -25,11 +25,6 @@
. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
. el .TP "\\$1"
..
-.de TQ
-. br
-. ns
-. TP \$1
-..
.
.de FT
. if '\\*(.T'ps' .ft \\$1
@@ -53,7 +48,7 @@
\#.OP \-I dir
.OP \-p papersize
\#.OP \-w n
-.OP \-fy foundry
+.OP \-y foundry
.RI [ files
.IR .\|.\|. ]
.YS
@@ -84,7 +79,7 @@
A filename of
.B \-
also causes
-.B grops
+.B gropdf
to read the standard input.
.
PDF output is written to the standard output.
@@ -188,7 +183,7 @@
Print the version number.
.
.TP
-.BI \-fy foundry
+.BI \-y foundry
Set the foundry to use for selecting fonts of the same name.
.
.TP
Index: src/devices/gropdf/gropdf.pl
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/gropdf.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/devices/gropdf/gropdf.pl 4 Aug 2011 06:53:32 -0000 1.2
+++ src/devices/gropdf/gropdf.pl 10 Aug 2011 18:23:01 -0000 1.3
@@ -91,6 +91,8 @@
my $mark=undef;
my $suspendmark=undef;
my $n_flg=1;
+my $pginsert=-1; # Growth point for kids array
+my %pgnames; # 'names' of pages for switchtopage
my %ppsz=( 'ledger'=>[1224,792],
'legal'=>[612,1008],
@@ -131,9 +133,13 @@
#Load_Config();
-GetOptions("F=s" => \$fd, 'l' => \$frot, 'p=s' => \$fpsz, 'd!' => \$debug, 'v'
=> \$version, 'e' => \$embedall, 'fy=s' => \$Foundry);
+GetOptions("F=s" => \$fd, 'l' => \$frot, 'p=s' => \$fpsz, 'd!' => \$debug, 'v'
=> \$version, 'e' => \$embedall, 'y=s' => \$Foundry);
-print "GNU gropdf (groff) version $cfg{GROFF_VERSION}\n", exit if $version;
+if ($version)
+{
+ print "GNU gropdf (groff) version $cfg{GROFF_VERSION}\n";
+ exit;
+}
# Search for 'font directory': paths in -f opt, shell var GROFF_FONT_PATH,
default paths
@@ -191,6 +197,7 @@
while (<>)
{
chomp;
+ s/\r$//;
$lct++;
do # The ahead buffer behaves like 'ungetc'
@@ -470,7 +477,7 @@
my $dirs=shift;
my $fnm=shift;
- if (substr($fnm,0,1) eq '/')
+ if (substr($fnm,0,1) eq '/' or substr($fnm,1,1) eq ':') # dos
{
return if -r "$fnm" and open($$f,"<$fnm");
}
@@ -557,7 +564,7 @@
$cat=$obj[$objct]->{DATA};
$objct++;
$pages=$obj[2]->{DATA};
- Put("%PDF-1.4\n%âãÏÓ\n");
+ Put("%PDF-1.4\n\x25\xe2\xe3\xcf\xd3\n");
}
elsif ($xcmd eq 'X')
{
@@ -866,6 +873,85 @@
$mark=$suspendmark;
$suspendmark=undef;
}
+ elsif (lc($xprm[1]) eq 'pagename')
+ {
+ if ($pginsert > -1)
+ {
+ $pgnames{$xprm[2]}=$pages->{Kids}->[$pginsert];
+ }
+ else
+ {
+ $pgnames{$xprm[2]}='top';
+ }
+ }
+ elsif (lc($xprm[1]) eq 'switchtopage')
+ {
+ my $ba=$xprm[2];
+ my $want=$xprm[3];
+
+ if ($pginsert > -1)
+ {
+ if (!defined($want) or $want eq '')
+ {
+ # no before/after
+ $want=$ba;
+ $ba='before';
+ }
+
+ if (!defined($ba) or $ba eq '' or $ba eq 'bottom')
+ {
+ $pginsert=$#{$pages->{Kids}};
+ }
+ elsif ($ba eq 'top')
+ {
+ $pginsert=-1;
+ }
+ else
+ {
+ if (exists($pgnames{$want}))
+ {
+ my $ref=$pgnames{$want};
+
+ if ($ref eq 'top')
+ {
+ $pginsert=-1;
+ }
+ else
+ {
+
+ foreach my $j (0..$#{$pages->{Kids}})
+ {
+ if ($ref eq $pages->{Kids}->[$j])
+ {
+ if ($ba eq 'before')
+ {
+ $pginsert=$j-1;
+ return;
+ }
+ elsif ($ba eq 'after')
+ {
+ $pginsert=$j;
+ return;
+ }
+ else
+ {
+ Msg(0,"Parameter must be
top|bottom|before|after not '$ba'");
+ return;
+ }
+ }
+ }
+
+ Msg(0,"Can't find page ref '$ref'");
+ }
+ }
+ else
+ {
+ Msg(0,"Can't find page named '$want'");
+ }
+ }
+
+ }
+ }
}
elsif (lc(substr($xprm[0],0,9)) eq 'papersize')
{
@@ -2056,7 +2142,7 @@
$cpageno=++$objct;
- push(@{$pages->{Kids}},BuildObj($objct,
+ my $thispg=BuildObj($objct,
{'Type' => '/Page',
'Group' => {'CS' => '/DeviceRGB', 'S' => '/Transparency'},
'Parent' => '2 0 R',
@@ -2064,8 +2150,10 @@
{'Length' => 0}
) ],
}
- )
);
+
+ splice(@{$pages->{Kids}},++$pginsert,0,$thispg);
+
$objct+=1;
$cpage=$obj[$cpageno]->{DATA};
$pages->{'Count'}++;
@@ -2693,6 +2781,7 @@
{
my $lin=<>;
chomp($lin);
+ $lin=~s/\r$//;
$lct++;
push(@ahead,$lin);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff ChangeLog Makefile.in doc/groff.texinfo f...,
Werner LEMBERG <=