[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 14/15: [font/devpdf]: Revise path component separation.
From: |
G. Branden Robinson |
Subject: |
[groff] 14/15: [font/devpdf]: Revise path component separation. |
Date: |
Fri, 3 Jun 2022 05:04:52 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit afa7128d7b939ca5c8cd082f2547f42e4e563674
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jun 3 03:02:52 2022 -0500
[font/devpdf]: Revise path component separation.
* font/devpdf/devpdf.am (font/devpdf/util/BuildFoundries): Generate
script using the `PATH_SEPARATOR` Automake macro.
* font/devpdf/util/BuildFoundries.pl: Add `pathsep` scalar to house the
build-time path separator.
(LocateFile): Use it.
(LoadFoundry, CheckFoundry): Stop using spaces as part of the path
separation delimiter. It is not idiomatic.
Also add editor aid comment and correct inconsistent indentation.
---
ChangeLog | 10 ++++++++++
font/devpdf/devpdf.am | 1 +
font/devpdf/util/BuildFoundries.pl | 26 +++++++++++++++++---------
3 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c1002196..a7a54133 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-06-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * font/devpdf/devpdf.am (font/devpdf/util/BuildFoundries):
+ Generate script using the `PATH_SEPARATOR` Automake macro.
+ * font/devpdf/util/BuildFoundries.pl: Add `pathsep` scalar to
+ house the build-time path separator.
+ (LocateFile): Use it.
+ (LoadFoundry, CheckFoundry): Stop using spaces as part of the
+ path separation delimiter. It is not idiomatic.
+
2022-06-02 G. Branden Robinson <g.branden.robinson@gmail.com>
* configure.ac: Explicitly identify poppler tools in report.
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 91a38426..fbc656fc 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -74,6 +74,7 @@ font/devpdf/util/BuildFoundries: \
sed -f $(SH_DEPS_SED_SCRIPT) \
-e "s|/usr/bin/perl|$(PERL)|" \
-e "s|[@]GROFF_GHOSTSCRIPT_INTERPRETERS[@]|$(GHOSTSCRIPT)|" \
+ -e "s|[@]PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|" \
-e "s|[@]VERSION[@]|$(VERSION)|" \
-e "s|[@]GROFF_FONT_DIR[@]|$(fontdir)|" \
$(devpdf_srcdir)/util/BuildFoundries.pl \
diff --git a/font/devpdf/util/BuildFoundries.pl
b/font/devpdf/util/BuildFoundries.pl
index d1df440b..33ec7add 100644
--- a/font/devpdf/util/BuildFoundries.pl
+++ b/font/devpdf/util/BuildFoundries.pl
@@ -24,6 +24,8 @@
use strict;
use Getopt::Long;
+my $pathsep='@PATH_SEPARATOR@';
+
my $check=0;
my $dirURW='';
@@ -85,10 +87,10 @@ sub LoadFoundry
{
Warn("\nThe path(s) used for searching:\n$foundrypath\n") if
$notFoundFont;
$foundry=uc($r[1]);
- $foundrypath='';
- $foundrypath.="$dirURW : " if $dirURW;
- $foundrypath.=$r[2].' : '.$devps;
- $foundrypath=~s/\(gs\)/$GSpath /;
+ $foundrypath='';
+ $foundrypath.="$dirURW:" if $dirURW;
+ $foundrypath.=$r[2].':'.$devps;
+ $foundrypath=~s/\(gs\)/$GSpath/;
$notFoundFont=0;
}
else
@@ -275,7 +277,7 @@ sub LocateFile
return($res);
}
- my (@paths)=split(/ (:|;)/,$path);
+ my (@paths)=split(/$pathsep/,$path);
foreach my $p (@paths)
{
@@ -493,10 +495,10 @@ sub CheckFoundry
if (lc($r[0]) eq 'foundry')
{
$foundry=uc($r[1]);
- $foundrypath='';
- $foundrypath.="$dirURW : " if $dirURW;
- $foundrypath.=$r[2].' : '.$devps;
- $foundrypath=~s/\(gs\)/$GSpath /;
+ $foundrypath='';
+ $foundrypath.="$dirURW:" if $dirURW;
+ $foundrypath.=$r[2].':'.$devps;
+ $foundrypath=~s/\(gs\)/$GSpath/;
}
else
{
@@ -536,3 +538,9 @@ sub CheckFoundry
close(F);
}
+
+# Local Variables:
+# fill-column: 72
+# mode: CPerl
+# End:
+# vim: set cindent noexpandtab shiftwidth=4 softtabstop=4 textwidth=72:
- [groff] 14/15: [font/devpdf]: Revise path component separation.,
G. Branden Robinson <=