From 01374ccc29782da24a334ee5303b8c4cc8cbb5b4 Mon Sep 17 00:00:00 2001
From: "Andrey A. Chernov" <ache@FreeBSD.org>
Date: Sat, 27 Nov 1999 04:57:46 +0000
Subject: add iconbase option

---
 www/WebMagick/files/patch-aa | 107 +++++++++++++++++++++++++++++++++++--------
 www/WebMagick/files/patch-ab |  17 +++++--
 2 files changed, 101 insertions(+), 23 deletions(-)

(limited to 'www')

diff --git a/www/WebMagick/files/patch-aa b/www/WebMagick/files/patch-aa
index 5d559aa3ced8..c853c8bf7545 100644
--- a/www/WebMagick/files/patch-aa
+++ b/www/WebMagick/files/patch-aa
@@ -1,5 +1,5 @@
 --- webmagick.in.orig	Sun Oct 17 23:55:14 1999
-+++ webmagick.in	Thu Nov 25 23:44:06 1999
++++ webmagick.in	Sat Nov 27 07:28:05 1999
 @@ -127,6 +127,7 @@
      $opt_dircolorlink,
      $opt_dircolorvlink,
@@ -8,7 +8,14 @@
      $opt_dirindexname,
      $opt_forcecache,
      $opt_forcegif,
-@@ -156,6 +157,7 @@
+@@ -150,12 +151,14 @@
+     $opt_footer,
+     $opt_help,
+     $opt_htimage,
++    $opt_iconbase,
+     $opt_iconpath,
+     %opt_icons,
+     $opt_ignore,
      $opt_imgindexname,
      $opt_indexname,
      $opt_javascript,
@@ -16,7 +23,7 @@
      $opt_mapnetscape,
      $opt_maptype,
      $opt_maxgif,
-@@ -164,6 +166,7 @@
+@@ -164,6 +167,7 @@
      $opt_metadescription,
      $opt_metaexpires,
      $opt_metakeywords,
@@ -24,7 +31,17 @@
      $opt_pageindexname,
      $opt_prefixpath,
      $opt_prune,
-@@ -267,6 +270,7 @@
+@@ -239,7 +243,8 @@
+ 				# Not used if local relative paths used
+ $opt_iconpath	= '@ICONPATH@';
+ 				# Relative path under rootpath / prefixpath
+-
++$opt_iconbase   = '';
++				# Global icons base URL, if not empty
+ #
+ # Server-side imagemap settings
+ # !!!MAY NEED TO EDIT OR OVERRIDE!!!
+@@ -267,6 +272,7 @@
  $opt_pageindexname	= '.index';	# Base name of secondary index files
  $opt_dirindexname	= '.dirindex';	# Subdirectory Title cross-reference
  					#  dirname   Directory Title
@@ -32,7 +49,7 @@
  $opt_imgindexname	= '.imgindex';	# Image name to label cross-reference file
  
  #
-@@ -309,6 +313,7 @@
+@@ -309,6 +315,7 @@
  $opt_forcemontage	= 0;	# Force montage (default off)
  $opt_forcegif		= 0;	# Force GIF imagemaps (default off)
  $opt_forcejpeg          = 0;    # Force JPEG imagemaps (default off)
@@ -40,7 +57,7 @@
  $opt_help		= 0;	# Display usage message
  $opt_version		= 0;	# Display version info
  $opt_htmlext            = '.html'; # Use .shtml for SSI
-@@ -319,6 +324,7 @@
+@@ -319,6 +326,7 @@
  $opt_title		= '';	# Page title (blank provides default title)
  $opt_address		= '';	# Additonal address info for bottom of
                                  #    imagemap page
@@ -48,7 +65,7 @@
  $opt_pichtml            = 0;    # Write separate HTML for each picture
  $opt_pichtmlext         = '.html'; # Use .shtml for SSI
  $opt_pichtmltarget      = '';
-@@ -658,6 +664,7 @@
+@@ -658,6 +666,7 @@
  		'dircolorfore=s'	=> \$opt_dircolorfore,
  		'dircolorlink=s'	=> \$opt_dircolorlink,
  		'dircolorvlink=s'	=> \$opt_dircolorvlink,
@@ -56,7 +73,12 @@
  		'dirindexname=s'	=> \$opt_dirindexname,
  		'footer=s'              => \$opt_footer,
  		'forcecache!'		=> \$opt_forcecache,
-@@ -678,9 +685,11 @@
+@@ -674,13 +683,16 @@
+ 		'help!'			=> \$opt_help,
+ 		'htimage=s'		=> \$opt_htimage,
+ 		'htmlext=s'             => \$opt_htmlext,
++		'iconbase=s'            => \$opt_iconbase,
+ 		'iconpath=s'		=> \$opt_iconpath,
  		'imgindexname=s'	=> \$opt_imgindexname,
  		'indexname=s'		=> \$opt_indexname,
  		'javascript!'		=> \$opt_javascript,
@@ -68,7 +90,7 @@
  		'pageindexname=s'	=> \$opt_pageindexname,
  		'pichtml!'              => \$opt_pichtml,
  		'pichtmlbottom=s'       => \$opt_pichtmlbottom,
-@@ -870,7 +879,7 @@
+@@ -870,7 +882,7 @@
      # for each directory ignoring hidden directories
      use File::Find;
      print( "Processing directory tree $opt_srcdir ...\n" ) if $opt_debug;
@@ -77,7 +99,7 @@
  } else {
      print( "Processing directory $opt_srcdir ...\n" ) if $opt_debug;
      $sourceDirectory = $opt_srcdir;
-@@ -934,7 +943,7 @@
+@@ -934,7 +946,7 @@
  sub wanted {
      my($dev,$ino,$mode,$nlink,$uid,$gid);
      ($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_);
@@ -86,7 +108,38 @@
          if( $_ ne '.' && get_rc_var('.', 'opt_prune', 0) ) {
              $File::Find::prune=1;
  	    # following funny logic is to avoid warnings about $prune
-@@ -1425,6 +1434,7 @@
+@@ -1137,14 +1149,22 @@
+     # 
+     $opt_maptype = "\L${opt_maptype}";
+ 
+-    #
+-    # Compute URL to top of icon directory
+-    #
+-    # Attempt to convert to relative URL
+-    $icon_base_url = relative( $currentDirectory, $icon_dir_path);
+-    if ( $icon_base_url =~ m|^/| ) {
+-        # If did not convert to relative URL then convert to absolute URL
+-        $icon_base_url = escapeurl( abs_path_to_url($icon_dir_path));
++    if ($opt_iconbase) {
++	if ($opt_iconbase =~ !/^\//) {
++	    die("$0: Iconbase must start with '/', use prefixpath to make it non-root related\n");
++	} else {
++	    $icon_base_url = "${opt_prefixpath}${opt_iconbase}";
++	}
++    } else {
++	#
++	# Compute URL to top of icon directory
++	#
++	# Attempt to convert to relative URL
++	$icon_base_url = relative( $currentDirectory, $icon_dir_path);
++	if ( $icon_base_url =~ m|^/| ) {
++	    # If did not convert to relative URL then convert to absolute URL
++	    $icon_base_url = escapeurl( abs_path_to_url($icon_dir_path));
++	}
+     }
+ 
+     #
+@@ -1425,6 +1445,7 @@
  	 'dircolorfore'		=> $opt_dircolorfore,
  	 'dircolorlink'		=> $opt_dircolorlink,
  	 'dircolorvlink'	=> $opt_dircolorvlink,
@@ -94,7 +147,15 @@
  	 'dirindexname'		=> $opt_dirindexname,
  	 'footer'               => $opt_footer,
  	 'framemarginwidth'	=> $opt_framemarginwidth,
-@@ -1450,7 +1460,7 @@
+@@ -1434,6 +1455,7 @@
+ 	 'framestyle'		=> $opt_framestyle,
+ 	 'header'		=> $opt_header,
+ 	 'htmlext'              => $opt_htmlext,
++	 'iconbase'             => $opt_iconbase,
+ 	 'imgindexname'		=> $opt_imgindexname,
+ 	 'indexname'		=> $opt_indexname,
+ 	 'jsdirindex'		=> $fileNames{'jsDirIndex'},
+@@ -1450,7 +1472,7 @@
  	 'readme'		=> $opt_readme,
  	 'readmepresent'	=> $haveReadme,
  	 'readmevisible'	=> $opt_readmevisible,
@@ -103,7 +164,7 @@
  	 'subdirectories'	=> join(' ',@dirNames),
  	 'title'		=> $pageTitle,
  	 'version'		=> $webmagickInfo{'version'},
-@@ -1694,7 +1704,7 @@
+@@ -1694,7 +1716,7 @@
  sub writeTopIndexes {
  
      print( STDERR "Writing Index Files ${opt_indexname} & ",
@@ -112,7 +173,7 @@
                  if $opt_debug;
  
      #---- Generate the Variables for Format Options ----
-@@ -1805,7 +1815,7 @@
+@@ -1805,7 +1827,7 @@
      # Pull README into thumbnail frame if it exists, and is
      # either marked always visible or there are no images.
      #
@@ -121,7 +182,7 @@
  
      if( $opt_framefmt_frames{$opt_framestyle} <= 2 ) {
  	if( $haveReadme && ( $opt_readmevisible || ! $haveImages ) ) {
-@@ -1923,8 +1933,8 @@
+@@ -1923,8 +1945,8 @@
  
      # ----- Output Frame Directory File (usally ".indexdir.html") ------
      #
@@ -132,7 +193,7 @@
                  " for output\n$@\n");
      print( INDEX "<HTML>\n<HEAD>\n" );
      print( INDEX "  <TITLE>${pageTitle}</TITLE>\n" );
-@@ -2143,6 +2153,7 @@
+@@ -2143,6 +2165,7 @@
  		 ">WebMagick</A>" );
  	   print( INDEX " $webmagickInfo{version}</NOBR>, <NOBR>Copyright &copy;</NOBR> <NOBR>Bob Friesenhahn</NOBR>\n" );
         }
@@ -140,7 +201,7 @@
         print( INDEX "</ADDRESS>\n" );
      }
  
-@@ -2762,7 +2773,7 @@
+@@ -2762,7 +2785,7 @@
  		$status = $montage->Write(
  					  filename=>"JPEG:$fileNames{'montageJPEG'}",
  					  interlace=>'Plane',
@@ -149,7 +210,15 @@
  					  );
  		handleMagickError( __FILE__, __LINE__, $fileNames{'montageJPEG'}, $status) if "$status";
  		last MONTAGE if "$status";
-@@ -3369,6 +3380,8 @@
+@@ -3346,6 +3369,7 @@
+ 
+ Paths:
+   --iconpath	     Relative path under rootdir to webmagick icons
++  --iconbase         Global base URL for webmagick icons
+   --prefixpath       Path to prepend to generated URLs (e.g. /~username)
+   --rootpath	     Absolute path to server root (NCSA DocumentRoot)
+ 
+@@ -3369,6 +3393,8 @@
  
  Montage:
    --forcegif         Force imagemap to be in GIF format
@@ -158,7 +227,7 @@
    --maxgif           Maximum size of GIF imagemap before trying JPEG
    --columns	     Montage columns
    --rows	     Montage rows (max)
-@@ -3408,9 +3421,11 @@
+@@ -3408,9 +3434,11 @@
    --dircolorfore     Foreground color (directory frame)
    --dircolorlink     Link (unvisited) color (directory frame)
    --dircolorvlink    Link (visited) color (directory frame)
diff --git a/www/WebMagick/files/patch-ab b/www/WebMagick/files/patch-ab
index 24fcdac3afb7..a98a486948ed 100644
--- a/www/WebMagick/files/patch-ab
+++ b/www/WebMagick/files/patch-ab
@@ -1,6 +1,15 @@
 --- webmagickrc.in.orig	Sun Oct 17 18:43:44 1999
-+++ webmagickrc.in	Thu Nov 25 23:48:03 1999
-@@ -41,6 +41,7 @@
++++ webmagickrc.in	Sat Nov 27 07:29:56 1999
+@@ -13,6 +13,8 @@
+ 				# Not used if local relative paths used
+ # $opt_iconpath	= '@ICONPATH@';
+ 				# Relative path under rootpath / prefixpath
++# $opt_iconbase = '';
++				# Global icons base URL, if not empty
+ 
+ #
+ # Server-side imagemap settings
+@@ -41,6 +43,7 @@
  # $opt_pageindexname	= '.index';	# Base name of secondary index files
  # $opt_dirindexname	= '.dirindex';	# Subdirectory Title cross-reference
  					#  dirname   Directory Title
@@ -8,7 +17,7 @@
  # $opt_imgindexname	= '.imgindex';	# Image name to label cross-reference file
  
  #
-@@ -83,6 +84,7 @@
+@@ -83,6 +86,7 @@
  # $opt_forcemontage	= 0;	# Force montage (default off)
  # $opt_forcegif		= 0;	# Force GIF imagemaps (default off)
  # $opt_forcejpeg          = 0;    # Force JPEG imagemaps (default off)
@@ -16,7 +25,7 @@
  # $opt_help		= 0;	# Display usage message
  # $opt_version		= 0;	# Display version info
  # $opt_htmlext            = '.html'; # Use .shtml for SSI
-@@ -93,6 +95,7 @@
+@@ -93,6 +97,7 @@
  # $opt_title		= '';	# Page title (blank provides default title)
  # $opt_address		= '';	# Additonal address info for bottom of
                                  #    imagemap page
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0