description Real time strategy game with fleets of spaceships.
long_description ${description}
homepage http://rrgbis.sourceforge.net/
master_sites sourceforge:project/${name}/${name}/${version}:source \
sourceforge:project/${name}/${name}/${data_version}:data
set source rrgbis-${version}-src${extract.suffix}
set data rrgbis-${data_version}-data${extract.suffix}
distfiles ${source}:source \
md5 14396c77f2b68cf2e5104174c135f4e4 \
sha1 aa48440907f82fdb99f564fba69084146b9fae59 \
rmd160 ec7d2f15086125d437179a53e552fd03f16c4539 \
md5 abd55dc67686ac99e96f9db2e59b5981 \
sha1 bbfb809982f3c1a9d39d1685f23bd2e6b9b5599e \
rmd160 65d9eca5be7c67d3e3c48bf90fb4a5a17f2bada4
depends_lib port:freetype \
patchfiles patch-src_GLSDL.cpp.diff \
# Convert files from DOS to UNIX linefeeds before patching.
reinplace "s/\r$//g" ${worksrcpath}/Makefile
# Set the correct path to the installed rrgbis data in the settings file.
reinplace "s|pwd|${prefix}/share/rrgbis/|g" ${worksrcpath}/settings.dat
configure.dir ${worksrcpath}/src/FTGL
# Install the helper script which automatically sets the correct
# LD_LIBRARY_PATH variable and set the right ${prefix} path.
xinstall ${filespath}/rrgbis ${destroot}${prefix}/bin
reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/rrgbis
# Install the helper setup script which creates ~/.rrgbis and the
# settings.dat file in it.
xinstall ${filespath}/rrgbis-setup ${destroot}${prefix}/bin
reinplace "s|__PREFIX__|${prefix}|g" ${destroot}${prefix}/bin/rrgbis-setup
# Install the real binary and rename it to rrgbis-bin.
copy ${worksrcpath}/rrgbis ${destroot}${prefix}/bin/rrgbis-bin
# Create the directory for the rrgbis data.
xinstall -d ${destroot}${prefix}/share/rrgbis
# Copy all data files and directories to ${destroot}.
set files {aiscripts fonts images missions music settings.dat sound \
squirrelscripts unitdata unitpictures}
move ${worksrcpath}/${file} ${destroot}${prefix}/share/rrgbis/${file}
ui_msg "****************************************************************"
ui_msg "* Before you run rrgbis for the first time, you must run *"
ui_msg "* rrgbis-setup to set up the default configuration. *"
ui_msg "* This script is provided by MacPorts and not part of the *"
ui_msg "* official distribution! If there are any problems with it *"
ui_msg "* contact the port maintainer. *"
ui_msg "****************************************************************"