Skip to content
Permalink
Browse files

Intoduce additional datfiles as variants. This brings up a large number

of possible problems involving distfiles, master sites, and targets all
involving variants. It's also ugly. However, it works for the time being.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@2401 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Eric Melville
Eric Melville committed Apr 3, 2003
1 parent f166fdf commit 7915d06feb518f23df103136a40d51dc40b1d7f3
Showing with 130 additions and 2 deletions.
  1. +130 −2 games/fortune/Portfile
@@ -1,4 +1,4 @@
# $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
name fortune
@@ -8,7 +8,21 @@ maintainers eric@opendarwin.org
description Infamous electronic fortune-cookie generator
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
worksrcdir ${portname}
@@ -31,6 +45,120 @@ set datfiles "fortunes fortunes.dat fortunes-o fortunes-o.dat fortunes2 \
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}
system "install -o root -m 755 -d ${destroot}${prefix}/bin"
system "install -o root -m 755 -d ${destroot}${prefix}/man/man6"

0 comments on commit 7915d06

Please sign in to comment.
You can’t perform that action at this time.