summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasufell <julian.ospald@googlemail.com>2012-04-28 23:52:48 +0200
committerhasufell <julian.ospald@googlemail.com>2012-04-28 23:52:48 +0200
commit6329ecbfd515cd9457a32d687e72612c05b07eee (patch)
treed96759abe39d7d8d7b54c622d17f7167e6642616 /games-arcade
parentmedia-gfx/pinta: add live-ebuild (diff)
downloadsunrise-6329ecbfd515cd9457a32d687e72612c05b07eee.tar.gz
sunrise-6329ecbfd515cd9457a32d687e72612c05b07eee.tar.bz2
sunrise-6329ecbfd515cd9457a32d687e72612c05b07eee.zip
games-arcade/opensonic: New Ebuild for bug 413907 thanks to floppym
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/opensonic/ChangeLog10
-rw-r--r--games-arcade/opensonic/Manifest5
-rw-r--r--games-arcade/opensonic/files/opensonic-0.1.4-cmake.patch97
-rw-r--r--games-arcade/opensonic/metadata.xml7
-rw-r--r--games-arcade/opensonic/opensonic-0.1.4.ebuild50
5 files changed, 169 insertions, 0 deletions
diff --git a/games-arcade/opensonic/ChangeLog b/games-arcade/opensonic/ChangeLog
new file mode 100644
index 000000000..98542667e
--- /dev/null
+++ b/games-arcade/opensonic/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for games-arcade/opensonic
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*opensonic-0.1.4 (28 Apr 2012)
+
+ 28 Apr 2012; hasufell <julian.ospald@googlemail.com> +opensonic-0.1.4.ebuild,
+ +files/opensonic-0.1.4-cmake.patch, +metadata.xml:
+ New Ebuild for bug 413907 thanks to floppym
+
diff --git a/games-arcade/opensonic/Manifest b/games-arcade/opensonic/Manifest
new file mode 100644
index 000000000..035bcf1d6
--- /dev/null
+++ b/games-arcade/opensonic/Manifest
@@ -0,0 +1,5 @@
+AUX opensonic-0.1.4-cmake.patch 4021 RMD160 ab6b1662684bf3acb338b8c8e564ba54c0751d29 SHA1 107c879d1768d219abaf59c73691aa886a4c2203 SHA256 1faab3805156ab2929bdde71ad54644415b6eb983bb74a554cb7fdd03070490d
+DIST opensnc-src-0.1.4.tar.gz 10525059 RMD160 4cbcdfa3ef4ed054ea113b1e2456c46c678fd017 SHA1 7c8bda81d22640e2eddeba74aa425783317e17d3 SHA256 3a4c3fa9538ee27c04b5ea848c9ad0a83f335471936d4617a18d3648c42588e9
+EBUILD opensonic-0.1.4.ebuild 925 RMD160 5f5a669d1ec94cd5971c3900fe4039de95535afb SHA1 530c39bcba933163d8fd4490bd7e60b1fbab63c5 SHA256 e3e9ac841e27a2ce184a7017b5515f935a0e6061f55c33b33b84c2e34efccefd
+MISC ChangeLog 335 RMD160 ded4d421e28e40eb66da079844a19172dc3eb7ad SHA1 f9187640fdf25617e0193011f414ab7cf9090cc6 SHA256 233ea5dd9eb903ed66bb40596c0c123d52e9a8bb285d22cd7d9a96f7bc6acb66
+MISC metadata.xml 214 RMD160 efd8175069efb91061298ff4584218b633e44678 SHA1 d372fdbfcb7fd07a4082961d3f3527be4fca1d60 SHA256 c1f09dc7d5313cd2da7b82259c7846ed23144d62b15e59680ada90e2b6b4d154
diff --git a/games-arcade/opensonic/files/opensonic-0.1.4-cmake.patch b/games-arcade/opensonic/files/opensonic-0.1.4-cmake.patch
new file mode 100644
index 000000000..7038ecb43
--- /dev/null
+++ b/games-arcade/opensonic/files/opensonic-0.1.4-cmake.patch
@@ -0,0 +1,97 @@
+From: hasufell <julian.ospald@googlemail.com>
+Date: Sat Apr 28 16:38:56 UTC 2012
+Subject: build system
+
+remove "-O2" from pre-defined CFLAGS
+make paths modifiable
+add rules for icon, desktop-file and game-wrapper
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -35,14 +35,12 @@
+ 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:
+@@ -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)
+@@ -251,7 +250,7 @@
+ 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}")
++ SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES COMPILE_FLAGS "-Wall")
+ ENDIF(UNIX)
+
+
+@@ -407,19 +406,42 @@
+ 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_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/bash
++cd ${GAME_INSTALL_DIR}
++./${GAME_UNIXNAME}
++"
++)
++
++ 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(\"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(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 licenses musics quests samples screenshots themes languages DESTINATION ${GAME_INSTALL_DIR} PATTERN ".svn" EXCLUDE)
+-
+- 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(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 000000000..cc3fe2494
--- /dev/null
+++ b/games-arcade/opensonic/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-wanted@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-arcade/opensonic/opensonic-0.1.4.ebuild b/games-arcade/opensonic/opensonic-0.1.4.ebuild
new file mode 100644
index 000000000..a778979cb
--- /dev/null
+++ b/games-arcade/opensonic/opensonic-0.1.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+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="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/allegro:0[X,jpeg,png,vorbis]
+ media-libs/libogg
+ media-libs/libpng:0
+ media-libs/libvorbis
+ sys-libs/glibc
+ sys-libs/zlib
+ virtual/jpeg"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+CMAKE_VERBOSE=1
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cmake.patch
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGAME_INSTALL_DIR="${GAMES_DATADIR}"/${PN}
+ -DGAME_FINAL_DIR="${GAMES_BINDIR}"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ prepgamesdirs
+}