2016-02-27 17:00:10 +00:00
|
|
|
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
require cmake
|
|
|
|
|
|
|
|
MY_PN=opensnc
|
|
|
|
MY_PNV=${MY_PN}-src-${PV}
|
|
|
|
|
|
|
|
SUMMARY="A free open-source game based on the Sonic the Hedgehog universe"
|
|
|
|
HOMEPAGE="http://opensnc.sourceforge.net/"
|
|
|
|
DOWNLOADS="mirror://sourceforge/opensnc/Open%20Sonic/${PV}/${MY_PNV}.tar.gz"
|
|
|
|
|
|
|
|
LICENCES="GPL-2"
|
|
|
|
SLOT="0"
|
|
|
|
PLATFORMS="~amd64 ~x86"
|
|
|
|
MYOPTIONS="
|
|
|
|
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
|
|
|
|
"
|
|
|
|
|
|
|
|
DEPENDENCIES="
|
|
|
|
build+run:
|
|
|
|
media-libs/allegro:0[ogg]
|
|
|
|
media-libs/libogg
|
|
|
|
media-libs/libpng:=
|
|
|
|
media-libs/libvorbis
|
|
|
|
sys-libs/zlib
|
|
|
|
providers:ijg-jpeg? ( media-libs/jpeg:= )
|
|
|
|
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
|
|
|
|
"
|
|
|
|
|
|
|
|
WORK=${WORKBASE}/${MY_PNV}
|
|
|
|
|
|
|
|
DEFAULT_SRC_PREPARE_PATCHES=(
|
|
|
|
-p0 "${FILES}"/${PNV}-cmake.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
CMAKE_SRC_CONFIGURE_PARAMS=(
|
|
|
|
-DGAME_INSTALL_DIR=/usr/share/${PN}
|
|
|
|
-DGAME_FINAL_DIR="/usr/$(exhost --target)/bin"
|
|
|
|
-DGAME_LIBDIR="/usr/$(exhost --target)/libexec/${PN}"
|
|
|
|
)
|
|
|
|
|
|
|
|
src_install() {
|
2016-02-28 23:43:54 +00:00
|
|
|
cmake_src_install
|
2016-02-27 17:00:10 +00:00
|
|
|
local i
|
2016-02-28 23:43:54 +00:00
|
|
|
for i in "${IMAGE}"/usr/share/${PN}/* ; do
|
2016-02-27 17:00:10 +00:00
|
|
|
dosym "${i#${IMAGE}}" \
|
|
|
|
"/usr/$(exhost --target)/libexec/${PN}/${i#${IMAGE}/usr/share/${PN}/}"
|
2016-02-28 23:43:54 +00:00
|
|
|
done
|
2016-02-27 17:10:23 +00:00
|
|
|
|
|
|
|
insinto /usr/share/applications
|
|
|
|
hereins ${PN}.desktop << EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Type=Application
|
|
|
|
Name=OpenSonic
|
|
|
|
Exec=${PN}
|
|
|
|
Icon=${PN}
|
|
|
|
Comment=${SUMMARY}
|
|
|
|
Categories=Game;ArcadeGame;
|
|
|
|
EOF
|
2016-02-27 17:00:10 +00:00
|
|
|
}
|
|
|
|
|