From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- games-action/supermariowar/Manifest | 5 + games-action/supermariowar/files/smwd.initd | 39 ++++++++ .../supermariowar-2.0_beta1-yaml-cpp-config.cmake | 21 ++++ games-action/supermariowar/metadata.xml | 14 +++ .../supermariowar-2.0_beta1-r1.ebuild | 110 +++++++++++++++++++++ 5 files changed, 189 insertions(+) create mode 100644 games-action/supermariowar/Manifest create mode 100644 games-action/supermariowar/files/smwd.initd create mode 100644 games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake create mode 100644 games-action/supermariowar/metadata.xml create mode 100644 games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild (limited to 'games-action/supermariowar') diff --git a/games-action/supermariowar/Manifest b/games-action/supermariowar/Manifest new file mode 100644 index 000000000000..5842c1973769 --- /dev/null +++ b/games-action/supermariowar/Manifest @@ -0,0 +1,5 @@ +AUX smwd.initd 902 BLAKE2B 51705ecd466e19f809d9a31dd33a20290fd0aa27832fe52514f1eaffb2ddd89787ff41420614773767c85ade56cccf8bcfb7241d07db47fddbea77c3d94d8b02 SHA512 0c3c9efaa9d239899abf754dee6af71b59f4706e057484502e76abbc0b8ae3a620581c0b3eb7a7ef2f2d050676de46854b033c34d87596b18f195fb7d19495a0 +AUX supermariowar-2.0_beta1-yaml-cpp-config.cmake 655 BLAKE2B 036aef4603f0cb91de6ece5c5de86fa8fa0e440398e022e4f560764a38030b9fead1ed127b9aebf6a97948660b2c999b20da3791b08691883b7c6e2c80166191 SHA512 a43d28d12962f23a0689533315415597e046bcb09c28a1457d2320da00e376e39939b89839b60e73f368c044ced42b5ccdb909dcdc40a1a345b70fa313ba0bfa +DIST supermariowar-2.0_beta1.tar.gz 13545366 BLAKE2B 497f8d4a8b6e7073c07f2da56e1ace71354fc898660ff866f19ff1d8737e56358eb500d0994dfeeea640dc3ac5aa509be7f31daa75305afc72df8f1497cd5211 SHA512 0849d23ea613d69f32c184dd5f470815a4c68b15836e46e40c30c5a3a6ea2216d4d3305f356e8fdd5b42f4008d9b07f0b9fac84b9f801a4b9f888ba188c56e0b +EBUILD supermariowar-2.0_beta1-r1.ebuild 2490 BLAKE2B 26c7d8c60e8be50f9f88347e785e7f5cd979ca6ef2eadb993e29bec57edcc0ec11a4121d81f4421d3a997a19fea3abf30dead33f0edc2b07a6556f7738e85185 SHA512 0ced196e8f2af31e5ce3d3e4661ff4fcd468d9f3af7d5c2b9fce148fc9d5249d41cd6b5cc45b1f1973fdc341cbc59fc717a04114d4a9eb073c062454f6032a3a +MISC metadata.xml 430 BLAKE2B 020d88a651b04c55427bd67c3ab8efae38575b634ac31ac8b4be8b1527b4f61dd7adb3eb171457fffc83fec10f1a432e280ebce5b25a8a1e32f86a13db3f83fe SHA512 7f7e6599a60ee829ecc2a7db5d956c6ac23b8e213d2e56d8c414a30e1dc7ea5577c080bb79430287ae6df8cae863c99a268fabc0ca2cc06c7d301cc7d9668df1 diff --git a/games-action/supermariowar/files/smwd.initd b/games-action/supermariowar/files/smwd.initd new file mode 100644 index 000000000000..da4fa9a87ee4 --- /dev/null +++ b/games-action/supermariowar/files/smwd.initd @@ -0,0 +1,39 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/smw-server" +command_background="true" +pidfile="/var/run/${RC_SVCNAME}.pid" +name="Super Mario War server" +description="The Super Mario War server process is in charge of hosting Super Mario War games" +smw_serverdir="@SMW_SERVERDIR@" + +depend() { + use net + before logger +} + +start() { + if [[ ! -d "${smw_serverdir}" ]]; then + eerror "Cannot cd into ${smw_serverdir}" + return 1 + fi + cd "${smw_serverdir}" || return 1 + ebegin "Starting ${name}" + start-stop-daemon \ + --start \ + --background \ + --pidfile ${pidfile} \ + --make-pidfile \ + --exec ${command} + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon \ + --stop \ + --pidfile ${pidfile} + eend $? +} diff --git a/games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake b/games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake new file mode 100644 index 000000000000..03fb190aad65 --- /dev/null +++ b/games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake @@ -0,0 +1,21 @@ +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML-CPP REQUIRED yaml-cpp) +find_path(YAML-CPP_INCLUDE_DIRECTORY + NAMES yaml.h + PATHS ${YAML-CPP_INCLUDE_DIRS} /usr/include/yaml-cpp +) +find_library(YAML-CPP_LIBRARY + NAMES yaml-cpp + PATHS ${YAML-CPP_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(yaml-cpp + FOUND_VAR yaml-cpp_FOUND + REQUIRED_VARS YAML-CPP_LIBRARY YAML-CPP_INCLUDE_DIRECTORY +) + +if (yaml-cpp_FOUND) + set(yaml-cpp_INCLUDE_DIRS ${YAML-CPP_INCLUDE_DIRECTORY}) + set(yaml-cpp_LIBRARIES ${YAML-CPP_LIBRARY}) +endif () +mark_as_advanced(YAML-CPP_INCLUDE_DIRECTORY YAML-CPP_LIBRARY) diff --git a/games-action/supermariowar/metadata.xml b/games-action/supermariowar/metadata.xml new file mode 100644 index 000000000000..bd948f685035 --- /dev/null +++ b/games-action/supermariowar/metadata.xml @@ -0,0 +1,14 @@ + + + + + monsieurp@gentoo.org + Patrice Clement + + + Compile and install Super Mario War server files + + + mmatyas/supermariowar + + diff --git a/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild b/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild new file mode 100644 index 000000000000..d78992bbd8aa --- /dev/null +++ b/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils cmake-utils versionator + +MY_PV=$(replace_version_separator 2 '-') +MY_PV="${MY_PV/beta1/beta.1}" +MY_PN="smw" + +DESCRIPTION="Fan-made multiplayer Super Mario Bros. style deathmatch game" +HOMEPAGE="https://github.com/mmatyas/supermariowar" +SRC_URI="https://github.com/mmatyas/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="server" + +RDEPEND=" + sys-libs/zlib:= + dev-cpp/yaml-cpp + net-libs/enet:1.3= + media-libs/sdl-mixer[vorbis] + media-libs/sdl-image[png,jpeg]" + +DEPEND=" + ${RDEPEND} + app-arch/unzip + virtual/pkgconfig" + +S="${WORKDIR}/${PN}-${MY_PV}" + +src_unpack() { + unpack ${A} + cd "${S}" || die + unpack ./data.zip +} + +src_prepare() { + cmake-utils_src_prepare + + einfo "Copying Findyaml-cpp.cmake" + cp "${FILESDIR}/${P}-yaml-cpp-config.cmake" cmake/Findyaml-cpp.cmake || die + eend $? +} + +src_configure() { + local mycmakeargs=( + -DBUILD_STATIC_LIBS=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DSMW_BINDIR="${EPREFIX}/usr/bin" + -DSMW_DATADIR="${EPREFIX}/usr/share/${PF}" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + local bin + for bin in "${ED}/usr/bin"/*; do + chmod 0755 "${bin}" || die + done + + local smw_datadir="usr/share/${PF}" + local smw_bindir="${smw_datadir}/bin" + mkdir -p "${ED}/${smw_bindir}" || die + + einfo "Moving ${PN} binary files to /${smw_bindir}" + mv "${ED}/usr/bin"/* "${ED}/${smw_bindir}" || die + eend $? + + local base_bin + for bin in "${ED}/${smw_bindir}"/*; do + base_bin=$(basename "${bin}") + einfo "Creating ${base_bin} launcher in /usr/bin" + cat << EOF > "${base_bin}" || die +#!/usr/bin/env bash +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# ${PF} launcher: ${base_bin} +exec /${smw_bindir}/${base_bin} /${smw_datadir} +EOF + dobin "${base_bin}" + eend $? + done + + if use server; then + local smw_server="${BUILD_DIR}/Binaries/Release/${MY_PN}-server" + local smw_serverdir="/${smw_datadir}/server" + + einfo "Installing ${MY_PN}-server files" + dosbin "${smw_server}" + + dodir "${smw_serverdir}" + insinto "${smw_serverdir}" + doins "${S}/src/server/serverconfig" + + dosym "${smw_serverdir}/serverconfig" "/etc/${MY_PN}d.conf" + + newinitd "${FILESDIR}/smwd.initd" "${MY_PN}d" + sed -i -e \ + "s#@SMW_SERVERDIR@#${smw_serverdir}#g;" \ + "${ED}/etc/init.d/${MY_PN}d" || die + eend $? + fi +} -- cgit v1.2.3