From 2047f690740c126aa65c762f184a146c9c336ad9 Mon Sep 17 00:00:00 2001 From: Dmitry Sivachenko Date: Wed, 7 Mar 2001 11:35:58 +0000 Subject: [PATCH] New port: Heroes of Might and Magic III (Linux version). PR: 25457 Submitted by: Holger Lamm --- games/HeroesOfMightAndMagic/Makefile | 34 ++++++ .../files/pkg-plist.base | 11 ++ .../files/pkg-plist.music | 49 ++++++++ .../files/pkg-plist.scenario | 50 ++++++++ .../files/pkg-plist.tail | 2 + .../files/pkg-plist.video | 56 +++++++++ games/HeroesOfMightAndMagic/pkg-comment | 1 + games/HeroesOfMightAndMagic/pkg-descr | 7 ++ games/HeroesOfMightAndMagic/scripts/configure | 56 +++++++++ .../HeroesOfMightAndMagic/scripts/do-install | 109 ++++++++++++++++++ games/Makefile | 1 + 11 files changed, 376 insertions(+) create mode 100644 games/HeroesOfMightAndMagic/Makefile create mode 100644 games/HeroesOfMightAndMagic/files/pkg-plist.base create mode 100644 games/HeroesOfMightAndMagic/files/pkg-plist.music create mode 100644 games/HeroesOfMightAndMagic/files/pkg-plist.scenario create mode 100644 games/HeroesOfMightAndMagic/files/pkg-plist.tail create mode 100644 games/HeroesOfMightAndMagic/files/pkg-plist.video create mode 100644 games/HeroesOfMightAndMagic/pkg-comment create mode 100644 games/HeroesOfMightAndMagic/pkg-descr create mode 100644 games/HeroesOfMightAndMagic/scripts/configure create mode 100644 games/HeroesOfMightAndMagic/scripts/do-install diff --git a/games/HeroesOfMightAndMagic/Makefile b/games/HeroesOfMightAndMagic/Makefile new file mode 100644 index 000000000000..8f2062165d2c --- /dev/null +++ b/games/HeroesOfMightAndMagic/Makefile @@ -0,0 +1,34 @@ +# New ports collection makefile for: HeroesOfMightAndMagic3 +# Date created: 24 Feb 2001 +# Whom: Holger Lamm +# +# $FreeBSD$ +# + +PORTNAME= HeroesOfMightAndMagic +PORTVERSION= 3 +CATEGORIES= games +MASTER_SITES= +DISTFILES= + +MAINTAINER= holger@eit.uni-kl.de + +RUN_DEPENDS= ${LINUXBASE}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base \ + ${LINUXBASE}/usr/lib/libgtk-1.2.so.0:${PORTSDIR}/x11-toolkits/linux-gtk + +PLIST= ${WRKDIR}/PLIST +IS_INTERACTIVE= yes +ONLY_FOR_ARCHS= i386 +NO_BUILD= yes +NO_WRKSUBDIR= yes +NO_CDROM= Software is commercial +NO_PACKAGE= Software is commercial + +GAMESUBDIR= games/Heroes3 +GAMEDIR= ${PREFIX}/${GAMESUBDIR} +SCRIPTS_ENV+= INSTALL_DATA="${INSTALL_DATA}" PLIST=${PLIST} PKGDIR=${PKGDIR} + +do-install: + @cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/do-install + +.include diff --git a/games/HeroesOfMightAndMagic/files/pkg-plist.base b/games/HeroesOfMightAndMagic/files/pkg-plist.base new file mode 100644 index 000000000000..eeb5714b348b --- /dev/null +++ b/games/HeroesOfMightAndMagic/files/pkg-plist.base @@ -0,0 +1,11 @@ +bin/heroes3 +games/Heroes3/Heroes_III_Tutorial.pdf +games/Heroes3/README +games/Heroes3/heroes3 +games/Heroes3/icon.bmp +games/Heroes3/icon.xpm +games/Heroes3/data/hiscore.dat +games/Heroes3/data/h3bitmap.lod +games/Heroes3/data/h3sprite.lod +games/Heroes3/data/heroes3.snd +games/Heroes3/data/heroes3cd.snd diff --git a/games/HeroesOfMightAndMagic/files/pkg-plist.music b/games/HeroesOfMightAndMagic/files/pkg-plist.music new file mode 100644 index 000000000000..566dbb54040a --- /dev/null +++ b/games/HeroesOfMightAndMagic/files/pkg-plist.music @@ -0,0 +1,49 @@ +games/Heroes3/mp3/aitheme0.mp3 +games/Heroes3/mp3/aitheme1.mp3 +games/Heroes3/mp3/aitheme2.mp3 +games/Heroes3/mp3/campainmusic01.mp3 +games/Heroes3/mp3/campainmusic02.mp3 +games/Heroes3/mp3/campainmusic03.mp3 +games/Heroes3/mp3/campainmusic04.mp3 +games/Heroes3/mp3/campainmusic05.mp3 +games/Heroes3/mp3/campainmusic06.mp3 +games/Heroes3/mp3/campainmusic07.mp3 +games/Heroes3/mp3/campainmusic08.mp3 +games/Heroes3/mp3/campainmusic09.mp3 +games/Heroes3/mp3/combat01.mp3 +games/Heroes3/mp3/combat02.mp3 +games/Heroes3/mp3/combat03.mp3 +games/Heroes3/mp3/combat04.mp3 +games/Heroes3/mp3/cstletown.mp3 +games/Heroes3/mp3/defend castle.mp3 +games/Heroes3/mp3/dirt.mp3 +games/Heroes3/mp3/dungeon.mp3 +games/Heroes3/mp3/eviltheme.mp3 +games/Heroes3/mp3/fortresstown.mp3 +games/Heroes3/mp3/goodtheme.mp3 +games/Heroes3/mp3/grass.mp3 +games/Heroes3/mp3/infernotown.mp3 +games/Heroes3/mp3/lava.mp3 +games/Heroes3/mp3/looplepr.mp3 +games/Heroes3/mp3/lose campain.mp3 +games/Heroes3/mp3/losecastle.mp3 +games/Heroes3/mp3/losecombat.mp3 +games/Heroes3/mp3/mainmenu.mp3 +games/Heroes3/mp3/necrotown.mp3 +games/Heroes3/mp3/neutraltheme.mp3 +games/Heroes3/mp3/rampart.mp3 +games/Heroes3/mp3/retreat battle.mp3 +games/Heroes3/mp3/rough.mp3 +games/Heroes3/mp3/sand.mp3 +games/Heroes3/mp3/secrettheme.mp3 +games/Heroes3/mp3/snow.mp3 +games/Heroes3/mp3/stronghold.mp3 +games/Heroes3/mp3/surrender battle.mp3 +games/Heroes3/mp3/swamp.mp3 +games/Heroes3/mp3/towertown.mp3 +games/Heroes3/mp3/ultimatelose.mp3 +games/Heroes3/mp3/underground.mp3 +games/Heroes3/mp3/water.mp3 +games/Heroes3/mp3/win battle.mp3 +games/Heroes3/mp3/win scenario.mp3 +@dirrm games/Heroes3/mp3 diff --git a/games/HeroesOfMightAndMagic/files/pkg-plist.scenario b/games/HeroesOfMightAndMagic/files/pkg-plist.scenario new file mode 100644 index 000000000000..22506bcbe22f --- /dev/null +++ b/games/HeroesOfMightAndMagic/files/pkg-plist.scenario @@ -0,0 +1,50 @@ +games/Heroes3/maps/all for one.h3m +games/Heroes3/maps/ascension.h3m +games/Heroes3/maps/barbarian breakout.h3m +games/Heroes3/maps/barbarian breakouta.h3m +games/Heroes3/maps/buried treasure.h3m +games/Heroes3/maps/crimson and clover.h3m +games/Heroes3/maps/crimson and clovera.h3m +games/Heroes3/maps/dead and buried.h3m +games/Heroes3/maps/divided loyalties.h3m +games/Heroes3/maps/divided loyaltiesa.h3m +games/Heroes3/maps/dragon orb.h3m +games/Heroes3/maps/emerald isles.h3m +games/Heroes3/maps/emerald islesa.h3m +games/Heroes3/maps/free for all.h3m +games/Heroes3/maps/good to go.h3m +games/Heroes3/maps/island of fire.h3m +games/Heroes3/maps/islands and caves.h3m +games/Heroes3/maps/judgement day.h3m +games/Heroes3/maps/key to victory.h3m +games/Heroes3/maps/knee deep in the dead.h3m +games/Heroes3/maps/knight of darkness.h3m +games/Heroes3/maps/manifest destiny.h3m +games/Heroes3/maps/middletown.h3m +games/Heroes3/maps/myth and legend.h3m +games/Heroes3/maps/noahs ark.h3m +games/Heroes3/maps/overthrow thy neighbors.h3m +games/Heroes3/maps/peacemaker.h3m +games/Heroes3/maps/pirates.h3m +games/Heroes3/maps/race for ardintinny.h3m +games/Heroes3/maps/realm of chaos.h3m +games/Heroes3/maps/realm of chaosa.h3m +games/Heroes3/maps/rebellion.h3m +games/Heroes3/maps/rumble in the bogs.h3m +games/Heroes3/maps/rumble in the bogsa.h3m +games/Heroes3/maps/tutorial.tut +games/Heroes3/maps/search for the grail.h3m +games/Heroes3/maps/serpents treasure.h3m +games/Heroes3/maps/southern cross.h3m +games/Heroes3/maps/the five rings.h3m +games/Heroes3/maps/the mandate of heaven.h3m +games/Heroes3/maps/titans winter.h3m +games/Heroes3/maps/unholy quest.h3m +games/Heroes3/maps/vial of life.h3m +games/Heroes3/maps/warlords.h3m +games/Heroes3/maps/warlordsa.h3m +games/Heroes3/maps/warmongers.h3m +games/Heroes3/maps/when dragons clash.h3m +games/Heroes3/maps/wings of war.h3m +games/Heroes3/maps/xathras prize.h3m +@dirrm games/Heroes3/maps diff --git a/games/HeroesOfMightAndMagic/files/pkg-plist.tail b/games/HeroesOfMightAndMagic/files/pkg-plist.tail new file mode 100644 index 000000000000..e6e9813433a9 --- /dev/null +++ b/games/HeroesOfMightAndMagic/files/pkg-plist.tail @@ -0,0 +1,2 @@ +@dirrm games/Heroes3/data +@dirrm games/Heroes3 diff --git a/games/HeroesOfMightAndMagic/files/pkg-plist.video b/games/HeroesOfMightAndMagic/files/pkg-plist.video new file mode 100644 index 000000000000..3e40a69cfe36 --- /dev/null +++ b/games/HeroesOfMightAndMagic/files/pkg-plist.video @@ -0,0 +1,56 @@ +games/Heroes3/data/video/cevil1.mjpg +games/Heroes3/data/video/cevil2.mjpg +games/Heroes3/data/video/cgood1.mjpg +games/Heroes3/data/video/cgood2.mjpg +games/Heroes3/data/video/cgood3.mjpg +games/Heroes3/data/video/cneutral.mjpg +games/Heroes3/data/video/credits.mjpg +games/Heroes3/data/video/credits.pcx +games/Heroes3/data/video/csecret.mjpg +games/Heroes3/data/video/defendall.mjpg +games/Heroes3/data/video/defendloop.mjpg +games/Heroes3/data/video/lbloop.mjpg +games/Heroes3/data/video/lbstart.mjpg +games/Heroes3/data/video/losecslp.mjpg +games/Heroes3/data/video/losecstl.mjpg +games/Heroes3/data/video/pgtrnlft.mjpg +games/Heroes3/data/video/pgtrnrgh.mjpg +games/Heroes3/data/video/progressbar.mjpg +games/Heroes3/data/video/rtloop.mjpg +games/Heroes3/data/video/rtstart.mjpg +games/Heroes3/data/video/surrender.mjpg +games/Heroes3/data/video/tavern.mjpg +games/Heroes3/data/video/win3.mjpg +games/Heroes3/data/video/3dologo.mpg +games/Heroes3/data/video/endgame.mpg +games/Heroes3/data/video/evil1a.mpg +games/Heroes3/data/video/evil1b.mpg +games/Heroes3/data/video/evil1c.mpg +games/Heroes3/data/video/evil2a.mpg +games/Heroes3/data/video/evil2ap1.mpg +games/Heroes3/data/video/evil2ap2.mpg +games/Heroes3/data/video/evil2b.mpg +games/Heroes3/data/video/evil2c.mpg +games/Heroes3/data/video/evil2d.mpg +games/Heroes3/data/video/good1a.mpg +games/Heroes3/data/video/good1b.mpg +games/Heroes3/data/video/good1c.mpg +games/Heroes3/data/video/good2a.mpg +games/Heroes3/data/video/good2b.mpg +games/Heroes3/data/video/good2c.mpg +games/Heroes3/data/video/good2d.mpg +games/Heroes3/data/video/good3a.mpg +games/Heroes3/data/video/good3b.mpg +games/Heroes3/data/video/good3c.mpg +games/Heroes3/data/video/h3intro.mpg +games/Heroes3/data/video/hsanim.mpg +games/Heroes3/data/video/hsloop.mpg +games/Heroes3/data/video/losegame.mpg +games/Heroes3/data/video/neutrala.mpg +games/Heroes3/data/video/neutralb.mpg +games/Heroes3/data/video/neutralc.mpg +games/Heroes3/data/video/nwclogo.mpg +games/Heroes3/data/video/secreta.mpg +games/Heroes3/data/video/secretb.mpg +games/Heroes3/data/video/secretc.mpg +@dirrm games/Heroes3/data/video diff --git a/games/HeroesOfMightAndMagic/pkg-comment b/games/HeroesOfMightAndMagic/pkg-comment new file mode 100644 index 000000000000..ce7bb427b3dd --- /dev/null +++ b/games/HeroesOfMightAndMagic/pkg-comment @@ -0,0 +1 @@ +BSD Installation of the Linux game "Heroes of Might and Magic III" diff --git a/games/HeroesOfMightAndMagic/pkg-descr b/games/HeroesOfMightAndMagic/pkg-descr new file mode 100644 index 000000000000..8e042ecd75cf --- /dev/null +++ b/games/HeroesOfMightAndMagic/pkg-descr @@ -0,0 +1,7 @@ +"Heroes of Might and Magic III" is a Roleplay Linux game by Loki games +commercially available on CD. It seems to run only under x86. + +You will need the CD, this port only helps you install and deinstall +the game and get it to run under FreeBSD. + +WWW: http://www.lokigames.com/products/heroes3/ diff --git a/games/HeroesOfMightAndMagic/scripts/configure b/games/HeroesOfMightAndMagic/scripts/configure new file mode 100644 index 000000000000..b23b90c2e439 --- /dev/null +++ b/games/HeroesOfMightAndMagic/scripts/configure @@ -0,0 +1,56 @@ +#!/bin/sh +# Gently borrowed code from x11/XFree86-4 + +yesno () { + answ=X + while [ $answ = X ]; do + echo -n "$2 [$1] " + read answ + if [ X$answ = X ]; then answ=$1; fi + case $answ in + y|yes|Y|YES) answ=YES;; + n|no|N|NO) answ=NO;; + *) echo invalid answer + answ=X + ;; + esac + done +} + +question() { + echo -n "$2 [$1] " + read answ + if [ X$answ = X ]; then answ=$1; fi +} + +F=$WRKDIR/.config +rm -f $F + +cat <> $F +echo "Do you want to install the Basis game packet?" +yesno YES "Without this you can't play without CD. (112 MB) " +echo BASIC=$answ >> $F +echo "Do you want to install the Graphic packet?" +yesno YES "Without this you can't play without CD. (14 MB) " +echo GRAPHIC=$answ >> $F +yesno YES "Do you want to install the Scenarios (1 MB) " +echo SCENARIO=$answ >> $F +yesno NO "Do you want to install Music (64 MB) " +echo MUSIC=$answ >> $F +yesno NO "Do you want to install Videos (137 MB) " +echo VIDEOS=$answ >> $F + +exit 0 diff --git a/games/HeroesOfMightAndMagic/scripts/do-install b/games/HeroesOfMightAndMagic/scripts/do-install new file mode 100644 index 000000000000..7b17e5a55ce3 --- /dev/null +++ b/games/HeroesOfMightAndMagic/scripts/do-install @@ -0,0 +1,109 @@ +#!/bin/sh + +F=$WRKDIR/.config + +. $F +GAMESUBDIR=games/Heroes3 +GAMEDIR=${LOCALBASE}/${GAMESUBDIR} + +if [ ! -f ${CD}/Heroes_III_Tutorial.pdf ] ; then + echo Might and Magic III CD not found in ${CD}. Please mount the CD + echo And retry. If you want to specify another CDROM mount point, + echo rerun the configure script. + exit 1 +fi + +# Base installation +echo Base installation +mkdir -p ${GAMEDIR}/data +${INSTALL_DATA} ${CD}/README ${CD}/Heroes_III_Tutorial.pdf ${GAMEDIR} +${INSTALL_DATA} ${CD}/icon.bmp ${CD}/icon.xpm ${GAMEDIR} + +# INSTALL_PROGRAM (its parameter -s) currupts the file. Using cp. +cp ${CD}/bin/x86/heroes3 ${GAMEDIR} +brandelf -t Linux ${GAMEDIR}/heroes3 +ln -sf ${GAMEDIR}/heroes3 ${LOCALBASE}/bin/heroes3 +touch ${GAMEDIR}/data/hiscore.dat +chmod 666 ${GAMEDIR}/data/hiscore.dat +cat ${PKGDIR}/files/pkg-plist.base > ${PLIST} + +# Basis packet +if [ $BASIC = YES ]; then + echo Installing Basic packet + mkdir -p ${GAMEDIR}/data + ${INSTALL_DATA} ${CD}/data/*.lod ${CD}/data/*.snd ${GAMEDIR}/data +else + for file in h3bitmap.lod h3sprite.lod heroes3.snd heroes3cd.snd; do + ln -sf ${CD}/data/${file} ${GAMEDIR}/data/${file} + done +fi + +# Scenario files +if [ $SCENARIO = YES ]; then + echo Installing Scenarios + mkdir -p ${GAMEDIR}/maps + ${INSTALL_DATA} ${CD}/maps/* ${GAMEDIR}/maps + cat ${PKGDIR}/files/pkg-plist.scenario >> ${PLIST} +else + ln -sf ${CD}/maps ${GAMEDIR}/maps + echo ${GAMESUBDIR}/maps >> ${PLIST} +fi + +# Neither sound nor Music, make the whole data tree a link +if [ $GRAPHIC = NO -a $MUSIC = NO ]; then + ln -sf ${CD}/data/video ${GAMEDIR}/data/video + echo ${GAMESUBDIR}/data/video >> ${PLIST} +else + cat ${PKGDIR}/files/pkg-plist.video >> ${PLIST} +fi + +# Graphics (recommended) +if [ $GRAPHIC = YES ]; then + echo Installing Graphics + mkdir -p ${GAMEDIR}/data/video + ${INSTALL_DATA} ${CD}/data/video/credits.pcx ${GAMEDIR}/data/video + ${INSTALL_DATA} ${CD}/data/video/*.mjpg ${GAMEDIR}/data/video +elif [ $VIDEOS = YES ]; then +# Videos are installed, so create links + cd $CD/data/video + for file in *.mjpg credits.pcx; do + ln -sf $CD/data/video/${file} ${GAMEDIR}/data/video/${file} + done + cd - +fi + +# Videos +if [ $VIDEOS = YES ]; then + echo Installing Videos + mkdir -p ${GAMEDIR}/data/video + ${INSTALL_DATA} ${CD}/data/video/*.mpg ${GAMEDIR}/data/video + cat ${PKGDIR}/files/pkg-plist.video >> ${PLIST} +elif [ $GRAPHIC = YES ]; then +# Music is installed, so create links + cd $CD/data/video + for file in *.mpg; do + ln -sf $CD/data/video/${file} ${GAMEDIR}/data/video/${file} + done + cd - +fi + +# Music +if [ $MUSIC = YES ]; then + echo Installing Music + mkdir -p ${GAMEDIR}/mp3 + ${INSTALL_DATA} ${CD}/mp3/* ${GAMEDIR}/mp3 + cat ${PKGDIR}/files/pkg-plist.music >> ${PLIST} +else + ln -sf ${CD}/mp3 ${GAMEDIR}/mp3 + echo ${GAMESUBDIR}/mp3 >> ${PLIST} +fi + + echo @dirrm ${GAMESUBDIR}/data >> ${PLIST} + echo @dirrm ${GAMESUBDIR} >> ${PLIST} + +# Goodbye message +if [ $BASIC = YES -a $GRAPHIC = YES ]; then + echo + echo Congratulation. Remember, with your installation you can also play without CD! +fi +exit 0 diff --git a/games/Makefile b/games/Makefile index 73cac5b2e269..4ab238f1ce22 100644 --- a/games/Makefile +++ b/games/Makefile @@ -3,6 +3,7 @@ SUBDIR += 3dc SUBDIR += 3dpong + SUBDIR += HeroesOfMightAndMagic SUBDIR += KnightCap SUBDIR += acm SUBDIR += actx