#!/bin/sh
# This is a shell archive
echo x games/aquaria
mkdir -p games/aquaria > /dev/null 2>&1
echo x games/aquaria/pkg-descr
sed 's/^X//' > games/aquaria/pkg-descr << 'SHAR_END'
XThe game follows Naija, a mermaid-like woman, as she explores the
Xunderwater world of Aquaria. Along her journey, she learns about both
Xthe history of the world and her own past. The gameplay focuses on a
Xcombination of swimming, singing and combat, through which Naija can
Xinteract with the world. Naija's songs can move items, affect plants
Xand animals, and change her physical appearance into other
Xforms. These forms have different abilities, such as firing
Xprojectiles at hostile creatures or passing through barriers
Xinaccessible to her in her natural form. -- Wikipedia
X
XThis package provides only game engine. Acquire proprietary game data
Xfiles separately.
X
XWWW: https://github.com/AquariaOSE/Aquaria
XWWW: http://www.bit-blot.com/aquaria/
SHAR_END
echo x games/aquaria/files
mkdir -p games/aquaria/files > /dev/null 2>&1
echo x games/aquaria/Makefile
sed 's/^X//' > games/aquaria/Makefile << 'SHAR_END'
X# $FreeBSD$
X
XPORTNAME=	aquaria
XPORTVERSION=	1.001
XCATEGORIES=	games
X
XMAINTAINER=	jbeich@vfemail.net
XCOMMENT=	Underwater 2D fantasy action-adventure
X
XLICENSE=	GPLv2 # or any later version
X
XLIB_DEPENDS=	libvorbis.so:${PORTSDIR}/audio/libvorbis \
X		libpng.so:${PORTSDIR}/graphics/png \
X		libfreetype.so:${PORTSDIR}/print/freetype2
X
XUSE_GITHUB=	yes
XGH_ACCOUNT=	AquariaOSE
XGH_PROJECT=	Aquaria
XGH_TAGNAME=	OSE-v${PORTVERSION}
XGH_COMMIT=	18034bc
X
XUSES=		cmake lua:51 ninja openal
XCMAKE_ARGS+=	-DAQUARIA_DEFAULT_DATA_DIR="${DATADIR}" \
X		-DAQUARIA_INTERNAL_ZLIB=off \
X		-DAQUARIA_INTERNAL_PNG=off \
X		-DAQUARIA_INTERNAL_FREETYPE=off \
X		-DAQUARIA_INTERNAL_LUA=off \
X		-DAQUARIA_INTERNAL_OGGVORBIS=off
XSUB_FILES=	pkg-message
XPORTDATA=	*
XPLIST_FILES=	bin/aquaria
X
XDESKTOP_ENTRIES="${GH_PROJECT}" \
X		"" \
X		"${DATADIR}/${PORTNAME}.png" \
X		"${PORTNAME}" \
X		"Game;ArcadeGame;" \
X		""
X
XOPTIONS_DEFINE=	SDL2
XOPTIONS_DEFAULT=SDL2
X
XSDL2_DESC=	${SDL_DESC} version 2
XSDL2_CMAKE_ON=	-DAQUARIA_USE_SDL2=on
XSDL2_USE=	SDL=sdl2
XSDL2_LIB_DEPENDS_OFF=libSDL.so:${PORTSDIR}/devel/sdl12
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
X	${MKDIR} ${STAGEDIR}${DATADIR}/override
X.for d in game_scripts files
X	${TAR} cf - -C${WRKSRC}/${d} . \
X		| ${TAR} xof - -C${STAGEDIR}${DATADIR}/override
X.endfor
X
X.include <bsd.port.mk>
SHAR_END
echo x games/aquaria/distinfo
sed 's/^X//' > games/aquaria/distinfo << 'SHAR_END'
XSHA256 (aquaria-1.001.tar.gz) = aa309226084b61b2aa9274ba9baaa6aeaeba20967dd49d92e9367326c328bd91
XSIZE (aquaria-1.001.tar.gz) = 5627886
SHAR_END
echo x games/aquaria/files/pkg-message.in
sed 's/^X//' > games/aquaria/files/pkg-message.in << 'SHAR_END'
XAquaria requires game data files from Humble Indie Bundle release.
XCopy the files under %%DATADIR%% or specify via environment variable.
X
X   $ unzip aquaria-lnx-humble-bundle.mojo.run
X   $ tar cf - -Cdata . | tar xof - -C%%DATADIR%%
X
Xor
X
X   $ cp -R %%DATADIR%%/override /path/to/aquaria/data/
X   $ AQUARIA_DATA_PATH=/path/to/aquaria/data aquaria
SHAR_END
echo x games/aquaria/files/patch-ExternalLibs_minihttp.cpp
sed 's/^X//' > games/aquaria/files/patch-ExternalLibs_minihttp.cpp << 'SHAR_END'
X--- ExternalLibs/minihttp.cpp~
X+++ ExternalLibs/minihttp.cpp
X@@ -32,6 +32,7 @@
X #  include <sys/types.h>
X #  include <unistd.h>
X #  include <fcntl.h>
X+#  include <netinet/in.h>
X #  include <sys/socket.h>
X #  include <netdb.h>
X #  define SOCKET_ERROR (-1)
SHAR_END
exit