SUMMARY="A game similar to Settlers 2" DESCRIPTION="Widelands is a free, open source real-time strategy \ game with singleplayer campaigns and a multiplayer mode. The game \ was inspired by Settlers II™ (© Bluebyte) but has significantly \ more variety and depth to it. Still, it is easy to get started \ through playable tutorials." HOMEPAGE="https://www.widelands.org/" COPYRIGHT="2009-2023 By the Widelands Development Team" LICENSE="GNU GPL v2" REVISION="1" SOURCE_URI="https://github.com/widelands/widelands/archive/refs/tags/v$portVersion.tar.gz" CHECKSUM_SHA256="6853fcf3daec9b66005691e5bcb00326634baf0985ad89a7e6511502612f6412" SOURCE_DIR="widelands-$portVersion" PATCHES="widelands-$portVersion.patchset" ADDITIONAL_FILES="widelands.rdef.in" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" PROVIDES=" widelands$secondaryArchSuffix = $portVersion app:WideLands " REQUIRES=" haiku$secondaryArchSuffix lib:libboost_system$secondaryArchSuffix lib:libcurl$secondaryArchSuffix lib:libGL$secondaryArchSuffix lib:libglew$secondaryArchSuffix lib:libGLU$secondaryArchSuffix lib:libicuuc$secondaryArchSuffix lib:libicudata$secondaryArchSuffix lib:libintl$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libopenal$secondaryArchSuffix lib:libpng16$secondaryArchSuffix lib:libSDL2_2.0$secondaryArchSuffix lib:libSDL2_image_2.0$secondaryArchSuffix lib:libSDL2_ttf_2.0$secondaryArchSuffix lib:libSDL2_mixer_2.0$secondaryArchSuffix lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libasio$secondaryArchSuffix devel:libboost_system$secondaryArchSuffix >= 1.83.0 devel:libcurl$secondaryArchSuffix devel:libGL$secondaryArchSuffix devel:libglew$secondaryArchSuffix devel:libGLU$secondaryArchSuffix devel:libicuuc$secondaryArchSuffix >= 74 devel:libintl$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:libopenal$secondaryArchSuffix devel:libpng16$secondaryArchSuffix devel:libSDL2_2.0$secondaryArchSuffix devel:libSDL2_image_2.0$secondaryArchSuffix devel:libSDL2_ttf_2.0$secondaryArchSuffix devel:libSDL2_mixer_2.0$secondaryArchSuffix devel:libvorbis$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:cmake cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix cmd:python3 " BUILD() { mkdir -p $dataDir/WideLands LDFLAGS="-lbsd -lnetwork -lintl" \ cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$appsDir/WideLands \ -DWL_INSTALL_DATADIR=$dataDir/WideLands \ -DOPTION_BUILD_WEBSITE_TOOLS=OFF \ -DOPTION_BUILD_TESTS=OFF \ -DOPTION_BUILD_CODECHECK=OFF \ -DCMAKE_CXX_FLAGS="-D_BSD_SOURCE" \ -DCMAKE_C_FLAGS="-D_BSD_SOURCE" \ -DCMAKE_BUILD_TYPE=Release make -C build $jobArgs } INSTALL() { make -C build install mv $appsDir/WideLands/VERSION $appsDir/WideLands/ChangeLog \ $appsDir/WideLands/CREDITS $appsDir/WideLands/COPYING \ $dataDir/WideLands mv $appsDir/WideLands/games/widelands $appsDir/widelands rm -rf $appsDir/WideLands mv $appsDir/widelands $appsDir/WideLands local APP_SIGNATURE="application/x-vnd.widelands" local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" local LONG_INFO="$SUMMARY" sed \ -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ -e "s|@MAJOR@|$MAJOR|" \ -e "s|@MIDDLE@|$MIDDLE|" \ -e "s|@LONG_INFO@|$LONG_INFO|" \ $portDir/additional-files/widelands.rdef.in > $sourceDir/widelands.rdef addResourcesToBinaries $sourceDir/widelands.rdef \ $appsDir/WideLands addAppDeskbarSymlink $appsDir/WideLands }