commit:     1851f1dc035a0797acabc37c3684c3e5fa3756ed
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 12:04:00 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 12:36:51 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1851f1dc

games-arcade/opensonic: Update to EAPI 6

* Remove games.eclass

Closes: https://bugs.gentoo.org/638094
Package-Manager: Portage-2.3.14, Repoman-2.3.6

 .../opensonic/files/opensonic-0.1.4-r1-cmake.patch |  4 +-
 games-arcade/opensonic/opensonic-0.1.4-r2.ebuild   | 50 ++++++++++++++++++++++
 2 files changed, 52 insertions(+), 2 deletions(-)

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
index b4db7644bc9..53d76faafae 100644
--- a/games-arcade/opensonic/files/opensonic-0.1.4-r1-cmake.patch
+++ b/games-arcade/opensonic/files/opensonic-0.1.4-r1-cmake.patch
@@ -8,8 +8,8 @@ make paths modifiable
 add rules for icon, desktop-file and game-wrapper
 fix compilation for as-needed
 
---- CMakeLists.txt
-+++ CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -35,16 +35,14 @@
  MESSAGE("Using CFLAGS='${CFLAGS}'")
  

diff --git a/games-arcade/opensonic/opensonic-0.1.4-r2.ebuild 
b/games-arcade/opensonic/opensonic-0.1.4-r2.ebuild
new file mode 100644
index 00000000000..3e0e1b0c35a
--- /dev/null
+++ b/games-arcade/opensonic/opensonic-0.1.4-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+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}
+PATCHES=( "${FILESDIR}"/${PN}-0.1.4-r1-cmake.patch )
+
+src_configure() {
+       local mycmakeargs=(
+               -DGAME_INSTALL_DIR="${EPREFIX}"/usr/share/${PN}
+               -DGAME_FINAL_DIR="${EPREFIX}"/usr/bin
+               -DGAME_LIBDIR="${EPREFIX}"/usr/$(get_libdir)/${PN}
+       )
+       cmake-utils_src_configure
+}
+
+src_install() {
+       cmake-utils_src_install
+
+       local f
+       while IFS="" read -d $'\0' -r f; do
+               dosym ../../share/${PN}/${f##*/} \
+                       /usr/$(get_libdir)/${PN}/${f##*/}
+       done < <(find "${ED%/}"/usr/share/${PN}/ -mindepth 1 -maxdepth 1 -type 
d -print0)
+}

Reply via email to