diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-arcade/opensonic |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-arcade/opensonic')
-rw-r--r-- | games-arcade/opensonic/Manifest | 6 | ||||
-rw-r--r-- | games-arcade/opensonic/files/opensonic-0.1.4-r1-cmake.patch | 107 | ||||
-rw-r--r-- | games-arcade/opensonic/metadata.xml | 11 | ||||
-rw-r--r-- | games-arcade/opensonic/opensonic-0.1.4-r1.ebuild | 56 |
4 files changed, 180 insertions, 0 deletions
diff --git a/games-arcade/opensonic/Manifest b/games-arcade/opensonic/Manifest new file mode 100644 index 000000000000..020c1a2e74e9 --- /dev/null +++ b/games-arcade/opensonic/Manifest @@ -0,0 +1,6 @@ +AUX opensonic-0.1.4-r1-cmake.patch 4654 SHA256 b327a5f4d34aab12b9eb42b8baf675b9434a0890786ce5e5a97c038a3c3181d4 SHA512 092c2dce7d0251bd44ac58b8a49339d3046cebde8ea8434b1cd61dcd5ca8c61ec45b4bef52b91235741c4a56253b0bee36cc6513ccaf430826ebab7c073653be WHIRLPOOL de522d68983e1b54ea123970289283fac50c98cdcfa8be17278a5f1b3e140df11c577daa43db8c843afe6f7e4016f1071f9df648c88bf63457fea6d195f2d85b +DIST opensnc-src-0.1.4.tar.gz 10525059 SHA256 3a4c3fa9538ee27c04b5ea848c9ad0a83f335471936d4617a18d3648c42588e9 SHA512 239c7b4c7f9663e4d46c54d8bdaefed8d12274b71feaf9c637feb04f3567465f265c50bf3419f4c881ae3fa48a62ab339fe8a0b005c2b080b53d54ebf1e2f29d WHIRLPOOL dd65be3d6403936cf4defe30360b2b86fd77f49de88b118ac873201917f263d3494797f964b295ee6370e0959784af77b8ff3b777559856009abfc0f80ebc598 +EBUILD opensonic-0.1.4-r1.ebuild 1206 SHA256 d50f40c6bdcbbc49f0fcafe8f3d1b9ca1bb44e6f97784040ec2cd3736e56923e SHA512 ee2579897038a33d3033ccec2cb33660ce4071fe6184f6a174f94e7bc898d94dcef2ce241fb145ef20251bd206bd587004a76a58e86309e803b425d8a6fc7160 WHIRLPOOL 9bb9d139741f72c855b640b842ac3e7ba1ac3125719c83ec6d9e632678990883d77db274820f1217e3d07cbb13accd14ce97b65ef28c8c432139b9478c154c7f +MISC ChangeLog 3174 SHA256 3777f0875120f64d5612beb82a5b85f958eb3c07e3fe57db4c2598c17104c100 SHA512 f50161a5f8a4cb06b1cbe3b089323370e8fa72c51d8b40b0246b6bb128d5f91295491b97bdc21fd06d8103e22315f98872ad75f9dcf081d985e0e1d715286f25 WHIRLPOOL aa0ba1d2e95bb94d601bc55dae631362be544703f8351a558372c46b3a9820daf66f5ce5be4c3fef88496b7102c854023bc43e6a7cc56dd2b2cd57c6ab4da124 +MISC ChangeLog-2015 1431 SHA256 cc899dba7d3c9de97646c77e1988901bb68d2741bfc98abb86af9381c5858b7f SHA512 b849a45f50e0973ac5e5e68a4e2b7964e76fd0aedcf7f716fb9e02ca44d6c526e6063dc1af29bed0d302c2c3487489201cc62af1ab1b961b72a751855a032995 WHIRLPOOL 96bb288fd28404084fd7e1e519f7dcbbc8dad9f49177b5b849858287f6d907697c86795db9ee8db5865e5de41393ed49d83a1dbcb7e6091caacfeff3743f3f2d +MISC metadata.xml 330 SHA256 7c99b8bde42724a10e58e76229efd0ba521dda8e1f73a1f78411f1b1ba9efa2e SHA512 5ac408fe48351e3db869e0cf5af951fd441690505d16d826c4010d2d575fde0b7de6f9f9ef2594cd2006692e0682b2e62f8cb5726db5c80bc7974f942b7cd79c WHIRLPOOL ff4add7133d3a64f2ffd0a309a768acaa78821620d8abd3128aec0304a411befcafd6e831a47fb81483ee7ee6129df2ff4b0bde499bf0113c7e1962559c15214 diff --git a/games-arcade/opensonic/files/opensonic-0.1.4-r1-cmake.patch b/games-arcade/opensonic/files/opensonic-0.1.4-r1-cmake.patch new file mode 100644 index 000000000000..b4db7644bc9d --- /dev/null +++ b/games-arcade/opensonic/files/opensonic-0.1.4-r1-cmake.patch @@ -0,0 +1,107 @@ +From: hasufell <julian.ospald@googlemail.com> +Date: Sat Apr 28 16:38:56 UTC 2012 +Subject: build system + +use allegro-config +remove "-O2" from pre-defined CFLAGS +make paths modifiable +add rules for icon, desktop-file and game-wrapper +fix compilation for as-needed + +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -35,16 +35,14 @@ + MESSAGE("Using CFLAGS='${CFLAGS}'") + + IF(UNIX) +- SET(ALLEGRO_UNIX_LIBS "$ENV{_ALLEGRO_LIBS}") ++ exec_program(allegro-config ARGS --libs OUTPUT_VARIABLE ALLEGRO_LIBRARY) ++ SET(ALLEGRO_UNIX_LIBS "${ALLEGRO_LIBRARY}") + IF(NOT ALLEGRO_UNIX_LIBS) +- MESSAGE(FATAL_ERROR "Please do not invoke CMake directly. Run ./configure instead.") ++ MESSAGE(FATAL_ERROR "Allegro libs not found!") + ENDIF(NOT ALLEGRO_UNIX_LIBS) + ENDIF(UNIX) + + +- +- +- + # Finding the required libraries: + + # Allegro: liballeg +@@ -53,7 +51,8 @@ + MESSAGE(FATAL_ERROR "Fatal error: couldn't find the Allegro game programming library (liballeg)! ${RTFM}") + ELSE(NOT LALLEG) + IF(UNIX) +- SET(ALLEGRO_UNIX_VERSION "$ENV{_ALLEGRO_VERSION}") ++ exec_program(allegro-config ARGS --version OUTPUT_VARIABLE ALLEGRO_VERSION) ++ SET(ALLEGRO_UNIX_VERSION "${ALLEGRO_VERSION}") + IF(NOT ALLEGRO_UNIX_VERSION STREQUAL ALLEGRO_RECOMMENDED_VERSION) + MESSAGE("\nWARNING: your Allegro version is ${ALLEGRO_UNIX_VERSION}. The recommended version is ${ALLEGRO_RECOMMENDED_VERSION}.\n ${GAME_NAME} may not compile properly!.\n") + ENDIF(NOT ALLEGRO_UNIX_VERSION STREQUAL ALLEGRO_RECOMMENDED_VERSION) +@@ -249,9 +248,8 @@ + IF(UNIX) + SET(GAME_SRCS ${GAME_SRCS} src/misc/iconlin.c) + ADD_EXECUTABLE(${GAME_UNIXNAME} ${GAME_SRCS}) +- SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES LINK_FLAGS ${ALLEGRO_UNIX_LIBS}) +- TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m logg vorbisfile vorbis ogg jpgalleg z png loadpng) +- SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES COMPILE_FLAGS "-Wall -O2 ${CFLAGS} ${CFLAGS_EXTRA}") ++ TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m logg vorbisfile vorbis ogg jpgalleg z png loadpng ${ALLEGRO_UNIX_LIBS}) ++ SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES COMPILE_FLAGS "-Wall") + ENDIF(UNIX) + + +@@ -407,19 +405,43 @@ + SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES PROJECT_NAME "${GAME_NAME}") + + +- + # Installing on *nix + IF(UNIX) +- SET(GAME_INSTALL_DIR "/usr/share/${GAME_UNIXNAME}") +- SET(GAME_FINAL_DIR "/usr/bin") ++ SET(GAME_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/${GAME_UNIXNAME}" CACHE PATH "") ++ SET(GAME_FINAL_DIR "bin" CACHE PATH "") ++ SET(GAME_LIBDIR "games/lib" CACHE PATH "") ++ SET(GAME_DOCDIR "share/doc/${GAME_UNIXNAME}-${GAME_VERSION}" CACHE PATH "") ++ SET(GAME_HTMLDIR "share/doc/${GAME_UNIXNAME}-${GAME_VERSION}/html" CACHE PATH "") ++ SET(GAME_ICONDIR "share/pixmaps" CACHE PATH "") ++ SET(GAME_DESKTOPDIR "share/applications" CACHE PATH "") ++ ++ FILE(WRITE ${GAME_UNIXNAME}.sh ++"#!/bin/sh ++cd ${GAME_LIBDIR} ++exec ./${GAME_UNIXNAME} \"$@\" ++" ++) + +- INSTALL(CODE "MESSAGE(\"Installing ${GAME_NAME} ${GAME_VERSION}... Make sure you have root privileges.\")") +- INSTALL(TARGETS ${GAME_UNIXNAME} RUNTIME DESTINATION ${GAME_INSTALL_DIR}) +- INSTALL(FILES license.txt readme.html DESTINATION ${GAME_INSTALL_DIR}) +- INSTALL(DIRECTORY objects sprites config images levels licenses musics quests samples screenshots themes languages DESTINATION ${GAME_INSTALL_DIR} PATTERN ".svn" EXCLUDE) ++ FILE(WRITE ${GAME_UNIXNAME}.desktop ++"[Desktop Entry] ++Name=${GAME_NAME} ++Type=Application ++Comment=A free open-source clone of the Sonic the Hedgehog universe ++Exec=${GAME_UNIXNAME} ++TryExec=${GAME_UNIXNAME} ++Icon=${GAME_UNIXNAME} ++Categories=Game;ArcadeGame; ++" ++) + +- INSTALL(CODE "MESSAGE(\"Creating files at ${GAME_FINAL_DIR}...\")") +- INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"cmake\" \"-E\" \"copy\" \"${GAME_INSTALL_DIR}/${GAME_UNIXNAME}\" \"${GAME_FINAL_DIR}/${GAME_UNIXNAME}\")") ++ INSTALL(CODE "MESSAGE(\"Installing ${GAME_NAME} ${GAME_VERSION}... Make sure you have root privileges.\")") ++ INSTALL(TARGETS ${GAME_UNIXNAME} RUNTIME DESTINATION ${GAME_LIBDIR}) ++# INSTALL(FILES license.txt DESTINATION ${GAME_DOCDIR}) ++ INSTALL(FILES readme.html DESTINATION ${GAME_HTMLDIR}) ++ INSTALL(FILES icon.png DESTINATION ${GAME_ICONDIR} RENAME ${GAME_UNIXNAME}.png) ++ INSTALL(FILES ${GAME_UNIXNAME}.desktop DESTINATION ${GAME_DESKTOPDIR}) ++ INSTALL(DIRECTORY objects sprites config images levels musics quests samples themes languages DESTINATION ${GAME_INSTALL_DIR} PATTERN ".svn" EXCLUDE) ++ INSTALL(PROGRAMS ${GAME_UNIXNAME}.sh DESTINATION ${GAME_FINAL_DIR} RENAME ${GAME_UNIXNAME}) + + INSTALL(CODE "MESSAGE(\"Done! Please run ${GAME_UNIXNAME} to start ${GAME_NAME}.\")") + ENDIF(UNIX) diff --git a/games-arcade/opensonic/metadata.xml b/games-arcade/opensonic/metadata.xml new file mode 100644 index 000000000000..f62cdf642eee --- /dev/null +++ b/games-arcade/opensonic/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">opensnc</remote-id> + </upstream> +</pkgmetadata> diff --git a/games-arcade/opensonic/opensonic-0.1.4-r1.ebuild b/games-arcade/opensonic/opensonic-0.1.4-r1.ebuild new file mode 100644 index 000000000000..c280414e4a59 --- /dev/null +++ b/games-arcade/opensonic/opensonic-0.1.4-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit cmake-utils eutils games + +MY_PN=opensnc +MY_P=${MY_PN}-src-${PV} + +DESCRIPTION="A free open-source game based on the Sonic the Hedgehog universe" +HOMEPAGE="http://opensnc.sourceforge.net/" +SRC_URI="https://sourceforge.net/projects/opensnc/files/Open%20Sonic/${PV}/opensnc-src-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" +RESTRICT="mirror" # unsure about legality of graphics + +DEPEND="media-libs/allegro:0[X,jpeg,png,vorbis] + media-libs/libogg + media-libs/libpng:0 + media-libs/libvorbis + sys-libs/zlib + virtual/jpeg:0" +RDEPEND=${DEPEND} + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${PF}-cmake.patch +} + +src_configure() { + local mycmakeargs=( + -DGAME_INSTALL_DIR="${GAMES_DATADIR}"/${PN} + -DGAME_FINAL_DIR="${GAMES_BINDIR}" + -DGAME_LIBDIR="$(games_get_libdir)/${PN}" + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + local i + for i in $(ls "${D}${GAMES_DATADIR}/${PN}") ; do + dosym "${GAMES_DATADIR}/${PN}/${i}" \ + "$(games_get_libdir)/${PN}/${i}" + done + prepgamesdirs +} |