SUMMARY="Turn-based tactical strategy game with a high fantasy theme" DESCRIPTION="Build up a great army, gradually turning raw recruits into \ hardened veterans. In later games, recall your toughest warriors and form a \ deadly host whom none can stand against! Choose units from a large pool of \ specialists, and hand-pick a force with the right strengths to fight well on \ different terrains against all manner of opposition. Wesnoth has many different sagas waiting to be played. Fight to regain the \ throne of Wesnoth, of which you are the legitimate heir... step into the \ boots of a young officer sent to guard a not-so-sleepy frontier outpost... \ lead a brutal quest to unite the orcish tribes... vanquish a horde of undead \ warriors unleashed by a foul necromancer, who also happens to have taken your \ brother hostage... guide a band of elvish survivors in an epic quest to find \ a new home... get revenge on the orcs by using the foul art of necromancy... There are at least two hundred unit types, sixteen races, six major factions, \ and hundreds of years of history. The world of Wesnoth is absolutely huge and \ only limited by your creativity — make your own custom units, create your own \ maps, and write your own scenarios or even full-blown campaigns. You can also \ challenge up to eight friends—or strangers—and fight in epic multiplayer \ fantasy battles." HOMEPAGE="http://wesnoth.org/" COPYRIGHT="2003-2026 The Battle for Wesnoth Project" LICENSE="GNU GPL v2" REVISION="1" branch="`echo "$portVersion" | cut -b1-4`" SOURCE_URI="https://sourceforge.net/projects/wesnoth/files/wesnoth-$branch/wesnoth-$portVersion/wesnoth-$portVersion.tar.bz2" CHECKSUM_SHA256="6bb8b17854c974bc66cb7a2574a53fe9efb4d2c138bb1373032e57788204985e" PATCHES="wesnoth-$portVersion.patchset" ADDITIONAL_FILES=" wesnoth.rdef.in wesnoth-postinstall.sh " POST_INSTALL_SCRIPTS="$relativePostInstallDir/wesnoth-postinstall.sh" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" boostVersion="1.88.0" PROVIDES=" wesnoth$secondaryArchSuffix = $portVersion cmd:wesnoth = $portVersion cmd:wesnothd = $portVersion cmd:wesnoth_campaignd = $portVersion " REQUIRES=" haiku$secondaryArchSuffix lib:libboost_coroutine$secondaryArchSuffix lib:libboost_filesystem$secondaryArchSuffix lib:libboost_graph$secondaryArchSuffix lib:libboost_iostreams$secondaryArchSuffix lib:libboost_locale$secondaryArchSuffix lib:libboost_program_options$secondaryArchSuffix lib:libboost_regex$secondaryArchSuffix lib:libboost_system$secondaryArchSuffix lib:libcairo$secondaryArchSuffix lib:libcrypto$secondaryArchSuffix lib:libcurl$secondaryArchSuffix lib:libdbus_1$secondaryArchSuffix # Optional, for notification support lib:libfontconfig$secondaryArchSuffix lib:libglib_2.0$secondaryArchSuffix lib:libgobject_2.0$secondaryArchSuffix lib:libharfbuzz$secondaryArchSuffix lib:libhistory$secondaryArchSuffix # Optional, for Lua console support lib:libicudata$secondaryArchSuffix lib:libicui18n$secondaryArchSuffix lib:libintl$secondaryArchSuffix lib:libpangocairo_1.0$secondaryArchSuffix lib:libSDL2_2.0$secondaryArchSuffix lib:libSDL2_image_2.0$secondaryArchSuffix lib:libSDL2_mixer_2.0$secondaryArchSuffix lib:libssl$secondaryArchSuffix lib:libvorbisfile$secondaryArchSuffix wesnoth_data == $portVersion base " SUMMARY_data="Battle for Wesnoth - Data files" DESCRIPTION_data="Data files for the Battle for Wesnoth game." ARCHITECTURES_data="any" PROVIDES_data=" wesnoth_data = $portVersion " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel cairo${secondaryArchSuffix}_devel # do not use xcairo gcc${secondaryArchSuffix}_syslibs_devel devel:libboost_coroutine$secondaryArchSuffix >= $boostVersion devel:libboost_filesystem$secondaryArchSuffix >= $boostVersion devel:libboost_graph$secondaryArchSuffix >= $boostVersion devel:libboost_iostreams$secondaryArchSuffix >= $boostVersion devel:libboost_locale$secondaryArchSuffix >= $boostVersion devel:libboost_program_options$secondaryArchSuffix >= $boostVersion devel:libboost_regex$secondaryArchSuffix >= $boostVersion devel:libboost_system$secondaryArchSuffix >= $boostVersion devel:libcurl$secondaryArchSuffix devel:libdbus_1$secondaryArchSuffix # Optional, for notification support devel:libfontconfig$secondaryArchSuffix devel:libhistory$secondaryArchSuffix # Optional, for Lua console support devel:libicuuc$secondaryArchSuffix >= 74 devel:libncurses$secondaryArchSuffix # Optional, for Lua console support devel:libpangocairo_1.0$secondaryArchSuffix devel:libSDL2_2.0$secondaryArchSuffix devel:libSDL2_image_2.0$secondaryArchSuffix devel:libSDL2_mixer_2.0$secondaryArchSuffix devel:libssl$secondaryArchSuffix >= 3 devel:libvorbisfile$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:cmake cmd:gcc$secondaryArchSuffix cmd:make cmd:msgfmt cmd:msgmerge cmd:pkg_config$secondaryArchSuffix " BUILD() { vardir=$(finddir B_USER_VAR_DIRECTORY)/wesnothd prefsdir=$(finddir B_USER_SETTINGS_DIRECTORY)/wesnoth-${branch} export CXXFLAGS="-D_DEFAULT_SOURCE" LDFLAGS="-lbsd -lnetwork" cmake -Bbuild -S. \ $cmakeDirArgs \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_BINDIR=$prefix/bin \ -DFIFO_DIR=$vardir \ -DPREFERENCES_DIR=$prefsdir \ -DHARDEN=OFF \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_CAMPAIGN_SERVER=ON \ -DENABLE_DESKTOP_ENTRY=OFF \ -Wno-dev make -C build $jobArgs } INSTALL() { make -C build install # Rename campaignd to something more unique mv -T $prefix/bin/campaignd $prefix/bin/wesnoth_campaignd # Generate the rdef local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" local MINOR="`echo "$portVersion" | cut -d. -f3`" sed \ -e "s|@MAJOR@|$MAJOR|" \ -e "s|@MIDDLE@|$MIDDLE|" \ -e "s|@MINOR@|$MINOR|" \ $portDir/additional-files/wesnoth.rdef.in > wesnoth.rdef packageEntries data $dataDir/wesnoth # Setup post-install script (to prevent issues with wesnothd's var path) mkdir -p $postInstallDir cp $portDir/additional-files/wesnoth-postinstall.sh $postInstallDir chmod +x $postInstallDir/wesnoth-postinstall.sh addResourcesToBinaries wesnoth.rdef $prefix/bin/wesnoth # Make the app name uppercase then link it back in lowercase for cmd mkdir -p $appsDir && mv $prefix/bin/wesnoth $appsDir/Wesnoth ln -s $appsDir/Wesnoth $prefix/bin/wesnoth addAppDeskbarSymlink $appsDir/Wesnoth "Battle for Wesnoth" }