games-engines/OpenJK: initial import of scm version

This commit is contained in:
Julian Ospald 2016-04-23 14:22:45 +02:00
parent c9320e3521
commit bee1ceacc9
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 83 additions and 1 deletions

View File

@ -1,8 +1,9 @@
( (
games-strategy/freesynd[~scm]
games-emulation/gambatte[~scm] games-emulation/gambatte[~scm]
games-engines/OpenJK[~scm]
games-fps/eduke32[~scm] games-fps/eduke32[~scm]
games-rpg/valyriatear[~scm] games-rpg/valyriatear[~scm]
games-strategy/freesynd[~scm]
x11-apps/terminator[~scm] x11-apps/terminator[~scm]
x11-wm/i3[~scm] x11-wm/i3[~scm]
) [[ ) [[

View File

@ -0,0 +1,81 @@
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
require desktop-utils github [ user=JACoders ] cmake [ api=2 ]
SUMMARY="Open Source Jedi Academy and Jedi Outcast games engine"
LICENCES="GPL-2"
SLOT="0"
PLATFORMS="-* ~amd64 ~x86"
MYOPTIONS="
( platform: amd64 x86 )
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
"
DEPENDENCIES="
build+run:
media-libs/SDL:2[X]
media-libs/libpng:=
sys-libs/zlib
x11-dri/mesa
providers:ijg-jpeg? ( media-libs/jpeg )
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
"
CMAKE_SRC_CONFIGURE_PARAMS=(
# cmake.exlib wrongly overrides the build type with a random "None",
# breaking the build system
-DCMAKE_BUILD_TYPE=RELEASE
-DCMAKE_INSTALL_PREFIX="/usr/$(exhost --target)/lib"
-DBuildMPEngine=YES
-DBuildMPRdVanilla=YES
-DBuildSPEngine=YES
-DBuildSPGame=YES
-DBuildSPRdVanilla=YES
)
src_install() {
local i
local mylibdir="/usr/$(exhost --target)/lib"
# silly, but common for games crap
local myext=$(option platform:amd64 "x86_64" "i386")
cmake_src_install
for i in openjk openjk_sp openjkded ; do
herebin ${i} <<EOF
#!/bin/sh
cd "${mylibdir}/JediAcademy/"
if [ "\${LD_LIBRARY_PATH+set}" = "set" ] ; then
export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${mylibdir}/JediAcademy/base:${mylibdir}/JediAcademy/OpenJK"
else
export LD_LIBRARY_PATH="${mylibdir}/JediAcademy/base:${mylibdir}/JediAcademy/OpenJK"
fi
exec ./${i}.${myext} "\$@"
EOF
done
install_desktop_entry \
"Name=Jedi Academy Multi Player" \
"Comment=Open Source Jedi Academy and Jedi Outcast games engine" \
"Exec=openjk" \
"TryExec=openjk" \
"Icon=OpenJK"
install_desktop_entry \
"Name=Jedi Academy Single Player" \
"Comment=Open Source Jedi Academy and Jedi Outcast games engine" \
"Exec=openjk_sp" \
"TryExec=openjk_sp" \
"Icon=OpenJK"
}
pkg_postinst() {
elog "You need to copy GameData/base/*.{pk3,cfg} from either your"
elog "installation media or your hard drive to"
elog "~/.local/share/openjk/base before running the game."
}