From a3075c664d921d1750688d5f0ab325c65e4ddf79 Mon Sep 17 00:00:00 2001 From: Artur Jamro Date: Sat, 4 Jan 2014 18:59:59 +0000 Subject: [PATCH 1/2] Added recipe for Free Heroes II engine --- games-rpg/fheroes2/fheroes2-r3182.recipe | 79 +++++++++++++++++++ .../fheroes2/patches/fheroes2-r3182.patch | 23 ++++++ 2 files changed, 102 insertions(+) create mode 100644 games-rpg/fheroes2/fheroes2-r3182.recipe create mode 100644 games-rpg/fheroes2/patches/fheroes2-r3182.patch diff --git a/games-rpg/fheroes2/fheroes2-r3182.recipe b/games-rpg/fheroes2/fheroes2-r3182.recipe new file mode 100644 index 000000000..a9b098e4e --- /dev/null +++ b/games-rpg/fheroes2/fheroes2-r3182.recipe @@ -0,0 +1,79 @@ +DESCRIPTION=" +Free implementation of Heroes of the Might and Magic II engine. \ +SDL is used. Free Heroes 2 is a turn based strategy video game. \ +The original game was voted the sixth best PC game of all time \ +by PC Gamer magazine in May 1997. +" +SUMMARY="Free implementation of Heroes of the Might and Magic II engine." +HOMEPAGE="http://sourceforge.net/projects/fheroes2/" +LICENSE="GNU GPL v2" # todo... +COPYRIGHT="2006-2013 Andrey Afletdinov" +SRC_URI="https://sourceforge.net/projects/fheroes2/files/fheroes2/fheroes2-src-r3182.tgz/download" +CHECKSUM_MD5="bb6cad25a9a83c603d00f7d4a4cb5c92" +REVISION="1" +SOURCE_DIR="fheroes-src" + +ARCHITECTURES="x86 ?x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +else + ARCHITECTURES="$ARCHITECTURES !x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86 ?x86_64" + +PATCHES="fheroes2-r3182.patch" + +PROVIDES=" + fheroes2$secondaryArchSuffix = $portVersion + app:fheroes2$secondaryArchSuffix = $portVersion + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libsdl$secondaryArchSuffix + lib:libogg$secondaryArchSuffix + lib:libsdl_image$secondaryArchSuffix + lib:libsdl_mixer$secondaryArchSuffix + lib:libsdl_net$secondaryArchSuffix + lib:libsdl_ttf$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libpng$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libsdl$secondaryArchSuffix + devel:libogg$secondaryArchSuffix + devel:libsdl_image$secondaryArchSuffix + devel:libsdl_mixer$secondaryArchSuffix + devel:libsdl_net$secondaryArchSuffix + devel:libsdl_ttf$secondaryArchSuffix + devel:libgettextlib$secondaryArchSuffix + devel:libpng$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:libpng_config$secondaryArchSuffix + " + +BUILD() +{ + make +} + +INSTALL() +{ + fhDir=$appsDir/fheroes2/ + mkdir -p $fhDir + cp -rf data files image maps README fheroes2* $fhDir + addAppDeskbarSymlink $fhDir/fheroes2 "Free Heroes 2" +} diff --git a/games-rpg/fheroes2/patches/fheroes2-r3182.patch b/games-rpg/fheroes2/patches/fheroes2-r3182.patch new file mode 100644 index 000000000..f359cdd3a --- /dev/null +++ b/games-rpg/fheroes2/patches/fheroes2-r3182.patch @@ -0,0 +1,23 @@ +diff --git a/src/Makefile b/src/Makefile +index 430c5ab..979b3ba 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -8,7 +8,7 @@ SDL_FLAGS := $(shell sdl-config --cflags) + + CFLAGS := $(CFLAGS) -Wall -fsigned-char + LDFLAGS := $(LDFLAGS) +-LIBS := ++LIBS := -lintl -liconv + + ifdef DEBUG + CFLAGS := $(CFLAGS) -O0 -g -pedantic -DWITH_DEBUG +@@ -70,6 +70,9 @@ endif + ifeq ($(OS),Linux) + PLATFORM := all + endif ++ifeq ($(OS),Haiku) ++PLATFORM := all ++endif + endif + + include Makefile.$(PLATFORM) From 730b43569d67decb90e37962da556b6332c911aa Mon Sep 17 00:00:00 2001 From: Artur Jamro Date: Sat, 4 Jan 2014 19:19:53 +0000 Subject: [PATCH 2/2] FHeroes2 recipe: little fixes --- games-rpg/fheroes2/fheroes2-r3182.recipe | 2 +- games-rpg/fheroes2/patches/fheroes2-r3182.patch | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/games-rpg/fheroes2/fheroes2-r3182.recipe b/games-rpg/fheroes2/fheroes2-r3182.recipe index a9b098e4e..9e38cc47b 100644 --- a/games-rpg/fheroes2/fheroes2-r3182.recipe +++ b/games-rpg/fheroes2/fheroes2-r3182.recipe @@ -6,7 +6,7 @@ by PC Gamer magazine in May 1997. " SUMMARY="Free implementation of Heroes of the Might and Magic II engine." HOMEPAGE="http://sourceforge.net/projects/fheroes2/" -LICENSE="GNU GPL v2" # todo... +LICENSE="GNU GPL v2" COPYRIGHT="2006-2013 Andrey Afletdinov" SRC_URI="https://sourceforge.net/projects/fheroes2/files/fheroes2/fheroes2-src-r3182.tgz/download" CHECKSUM_MD5="bb6cad25a9a83c603d00f7d4a4cb5c92" diff --git a/games-rpg/fheroes2/patches/fheroes2-r3182.patch b/games-rpg/fheroes2/patches/fheroes2-r3182.patch index f359cdd3a..411e3f032 100644 --- a/games-rpg/fheroes2/patches/fheroes2-r3182.patch +++ b/games-rpg/fheroes2/patches/fheroes2-r3182.patch @@ -1,22 +1,14 @@ diff --git a/src/Makefile b/src/Makefile -index 430c5ab..979b3ba 100644 +index 430c5ab..481eecf 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -8,7 +8,7 @@ SDL_FLAGS := $(shell sdl-config --cflags) - - CFLAGS := $(CFLAGS) -Wall -fsigned-char - LDFLAGS := $(LDFLAGS) --LIBS := -+LIBS := -lintl -liconv - - ifdef DEBUG - CFLAGS := $(CFLAGS) -O0 -g -pedantic -DWITH_DEBUG -@@ -70,6 +70,9 @@ endif +@@ -70,6 +70,10 @@ endif ifeq ($(OS),Linux) PLATFORM := all endif +ifeq ($(OS),Haiku) +PLATFORM := all ++LIBS := -lintl -liconv +endif endif