Package: wml
Version: 2.0.8-10
Severity: important
Tags: patch

I use a pre and a postprocessing script for my wml setup. I want to specify
the location of these scripts relative to the location of the wml tree.
I want to be able to use the following .wmlrc

-DROOT~.
-E $(ROOT)/bin/htmlfix.sh 
-P $(ROOT)/bin/headfix.pl

see the attached patch

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-rc1-vaiou3
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages wml depends on:
ii  eperl                       2.2.14-11    Embedded Perl 5 Language
ii  iselect                     1.2.0-11     An interactive line selection tool
ii  libbit-vector-perl          6.4-4        Perl and C library for bit vectors
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libimage-size-perl          2.992-1      determine the size of images in se
ii  libterm-readkey-perl        2.21-1.3     A perl module for simple terminal 
ii  m4                          1.4.2-2      a macro processing language
ii  mp4h                        1.3.1-2      Macro processor for HTML documents
ii  perl                        5.8.4-5      Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.8.4]   5.8.4-5      The Pathologically Eclectic Rubbis
ii  slice                       1.3.8-6      Extract out pre-defined slices of 

-- no debconf information
--- wml.orig    Tue Nov  6 17:07:42 2001
+++ wml Tue Nov  6 17:10:38 2001
@@ -84,6 +84,17 @@
     return $str;
 }
 
+# replace $(xxx) with -Dxxx
+sub var_repl {
+    my $string = shift;
+    my $vars = shift;
+    foreach my $v (@$vars){
+        my ($key,$value) = split /=/, $v, 2;
+        $string =~ s/\$\($key\)/$value/g;
+    }
+    return $string;
+}
+
 sub usage {
     my ($progname) = @_;
 
@@ -1064,6 +1075,7 @@
 }
 
 #   determine prologs
+map {$_=var_repl($_, [EMAIL PROTECTED])} @opt_P; # replace $(xxx) with -Dxxx
 $prolog = '';
 foreach $p (@opt_P) {
     $prolog .= ' -P "'.&quotearg($p).'"';
@@ -1349,6 +1361,7 @@
     }
 
     #   run epilog filters
+    map {$_=var_repl($_, [EMAIL PROTECTED])} @opt_E; # replace $(xxx) with 
-Dxxx
     foreach $o (@outfiles) {
         foreach $e (@opt_E) {
             if ($e =~ m|^htmlinfo(.*)|) {

Reply via email to