Index: trunk/dports/games/fortune/Portfile
===================================================================
--- trunk/dports/games/fortune/Portfile	(revision 2399)
+++ trunk/dports/games/fortune/Portfile	(revision 2401)
@@ -1,3 +1,3 @@
-# $Id: Portfile,v 1.11 2003/03/03 06:31:21 mij Exp $
+# $Id: Portfile,v 1.12 2003/04/03 23:08:35 eric Exp $
 
 PortSystem 1.0
@@ -9,5 +9,19 @@
 platforms	darwin
 use_bzip2	yes
-master_sites    http://distfiles.opendarwin.org/	
+
+# these sites should be listed in the actual variants, unfortunately the tags
+# do not work in the added master_sites - so just define them all right here
+# for the time being
+master_sites    http://distfiles.opendarwin.org/ \
+		http://www.splitbrain.org/Fortunes/starwars/:starwars \
+		http://dune.s31.pl/:dune \
+		http://www.splitbrain.org/Fortunes/hitchhiker/:hitchhiker \
+		http://www.splitbrain.org/Fortunes/fgump/:fgump \
+		http://eol.init1.nl/img/:southpark \
+		http://www.splitbrain.org/Fortunes/xfiles/:xfiles \
+		http://www.netmeister.org/apps/:netmeister \
+		http://www.cs.indiana.edu/~crcarter/homer/:homer \
+		http://www.splitbrain.org/Fortunes/simpsons/:chalkboard
+
 checksums	md5 99166e1c47d4b60c865a31d59d359b16
 depends_lib	lib:libcompat.1:libcompat
@@ -31,4 +45,118 @@
 		limerick.dat murphy murphy.dat murphy-o murphy-o.dat \
 		startrek startrek.dat zippy zippy.dat"
+
+# ugly hack to extract variant datfiles properly - default these variables to
+# zero, then set them in each variant, and then check them all in post-extract
+set plusstarwars 0
+set plusdune 0
+set plushitchhiker 0
+set plusfgump 0
+set plussouthpark 0
+set plusxfiles 0
+set plusfuturama 0
+set pluscalvin 0
+set plussimpsons 0
+
+variant starwars { distfiles-append fortune-starwars.tgz:starwars
+		  set datfiles "${datfiles} starwars starwars.dat"
+		  set plusstarwars 1 }
+
+variant dune	{ distfiles-append fortune-mod-dune-quotes.2.0.1.tar.gz:dune
+		  set datfiles "${datfiles} chapterhouse-dune \
+		  chapterhouse-dune.dat children-of-dune children-of-dune.dat \
+		  dune dune.dat dune-messiah dune-messiah.dat god-emperor \
+		  god-emperor.dat heretics-of-dune heretics-of-dune.dat \
+		  house-atreides house-atreides.dat house-harkonnen \
+		  house-harkonnen.dat"
+		  set plusdune 1 }
+
+variant hitchhiker { distfiles-append fortune-hitchhiker.tgz:hitchhiker
+		  set datfiles "${datfiles} hitchhiker hitchhiker.dat"
+		  set plushitchhiker 1 }
+
+variant fgump	{ distfiles-append fortune-fgump.tgz:fgump
+		  set datfiles "${datfiles} fgump fgump.dat"
+		  set plusfgump 1 }
+
+variant southpark { distfiles-append SP-0.1.tar.gz:southpark
+		  set datfiles "${datfiles} southpark southpark.dat"
+		  set plussouthpark 1 }
+
+variant xfiles	{ distfiles-append fortune-xfiles.tgz:xfiles
+		  set datfiles "${datfiles} xfiles xfiles.dat"
+		  set plusxfiles 1 }
+
+variant futurama { distfiles-append fortune-mod-futurama-0.2.tar.gz:netmeister
+		  set datfiles "${datfiles} futurama futurama.dat"
+		  set plusfuturama 1 }
+
+variant calvin	{ distfiles-append fortune-mod-calvin-0.1.1.tar.gz:netmeister
+		  set datfiles "${datfiles} calvin calvin.dat"
+		  set pluscalvin 1 }
+
+variant simpsons { distfiles-append homer-quotes.tar.gz:homer \
+		  ralph-quotes.tar.gz cbg-quotes.tar.gz \
+		  fortune-simpsons-chalkboard.tgz:chalkboard
+		  set datfiles "${datfiles} cbg cbg.dat homer homer.dat \
+		  ralph ralph.dat chalkboard chalkboard.dat"
+		  set plussimpsons 1 }
+
+post-extract	{ cd ${worksrcpath}
+		  if { ${plusstarwars} } {
+			system "cp ${distpath}/fortune-starwars.tgz ."
+			system "tar xfz fortune-starwars.tgz"
+			system "cp fortune-starwars/* datfiles"
+		  }
+		  if { ${plushitchhiker} } {
+			system "cp ${distpath}/fortune-hitchhiker.tgz ."
+			system "tar xfz fortune-hitchhiker.tgz"
+			system "cp fortune-hitchhiker/* datfiles"
+		  }
+		  if { ${plusfgump} } {
+			system "cp ${distpath}/fortune-fgump.tgz ."
+			system "tar xfz fortune-fgump.tgz"
+			system "cp fortune-fgump/* datfiles"
+		  }
+		  if { ${plusdune} } {
+			system "cp ${distpath}/fortune-mod-dune-quotes.2.0.1.tar.gz ."
+			system "tar xfz fortune-mod-dune-quotes.2.0.1.tar.gz"
+			system "cp fortune-mod-dune-quotes.2.0.1/* datfiles"
+		  }
+		  if { ${plussouthpark} } {
+			system "cp ${distpath}/SP-0.1.tar.gz ."
+			system "tar xfz SP-0.1.tar.gz"
+			system "cp SP/SP datfiles/southpark"
+			system "cp SP/SP.dat datfiles/southpark.dat"
+		  }
+		  if { ${plusxfiles} } {
+			system "cp ${distpath}/fortune-xfiles.tgz ."
+			system "tar xfz fortune-xfiles.tgz"
+			system "cp fortune-xfiles/* datfiles"
+		  }
+		  if { ${plusfuturama} } {
+			system "cp ${distpath}/fortune-mod-futurama-0.2.tar.gz ."
+			system "tar xfz fortune-mod-futurama-0.2.tar.gz"
+			system "cp fortune-mod-futurama-0.2/* datfiles"
+		  }
+		  if { ${pluscalvin} } {
+			system "cp ${distpath}/fortune-mod-calvin-0.1.1.tar.gz ."
+			system "tar xfz fortune-mod-calvin-0.1.1.tar.gz"
+			system "cp fortune-mod-calvin-0.1.1/calvin datfiles"
+			system "cp fortune-mod-calvin-0.1.1/calvin.dat datfiles"
+		  }
+		  if { ${plussimpsons} } {
+			system "cp ${distpath}/homer-quotes.tar.gz ."
+			system "tar xfz homer-quotes.tar.gz"
+			system "cp fortune-homer/* datfiles"
+			system "cp ${distpath}/ralph-quotes.tar.gz ."
+			system "tar xfz ralph-quotes.tar.gz"
+			system "cp ralph ralph.dat datfiles"
+			system "cp ${distpath}/cbg-quotes.tar.gz ."
+			system "tar xfz cbg-quotes.tar.gz"
+			system "cp cbg cbg.dat datfiles"
+			system "cp ${distpath}/fortune-simpsons-chalkboard.tgz ."
+			system "tar xfz fortune-simpsons-chalkboard.tgz"
+			system "cp fortune-simpsons-chalkboard/* datfiles"
+		  } }
 
 install		{ cd ${worksrcpath}
