games-arcade/apricots: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 08:59:33 +0000 (10:59 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 09:11:23 +0000 (11:11 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

games-arcade/apricots/apricots-0.2.6-r2.ebuild [new file with mode: 0644]
games-arcade/apricots/files/apricots-0.2.6-freealut.patch
games-arcade/apricots/files/apricots-0.2.6-ldflags.patch

diff --git a/games-arcade/apricots/apricots-0.2.6-r2.ebuild b/games-arcade/apricots/apricots-0.2.6-r2.ebuild
new file mode 100644 (file)
index 0000000..b0a37bd
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools desktop
+
+DESCRIPTION="Fly a plane around bomb/shoot the enemy. Port of Planegame from Amiga"
+HOMEPAGE="http://www.fishies.org.uk/apricots.html"
+SRC_URI="http://www.fishies.org.uk/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="media-libs/libsdl[sound,video]
+       media-libs/openal
+       media-libs/freealut"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       default
+
+       eapply "${FILESDIR}"/${P}-freealut.patch \
+               "${FILESDIR}"/${P}-ldflags.patch
+
+       cp admin/acinclude.m4.in acinclude.m4
+
+       sed -i \
+               -e 's:-DAP_PATH=\\\\\\"$prefix.*":-DAP_PATH=\\\\\\"/usr/share/${PN}/\\\\\\"":' \
+               -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' \
+               configure.in || die
+       sed -i \
+               -e "s:filename(AP_PATH):filename(\"/etc/${PN}/\"):" \
+               ${PN}/init.cpp || die
+       sed -i \
+               -e "s:apricots.cfg:/etc/${PN}/apricots.cfg:" \
+               README apricots.html || die
+       sed -i \
+               -e 's/-Wmissing-prototypes//' \
+               acinclude.m4 || die
+
+       mv configure.in configure.ac || die
+       eautoreconf
+}
+
+src_compile() {
+       emake LIBTOOL="/usr/bin/libtool"
+}
+
+src_install() {
+       HTML_DOCS="apricots.html"
+       einstalldocs
+
+       cd ${PN}
+       dobin apricots
+       insinto /usr/share/${PN}
+       doins *.wav *.psf *.shapes
+       insinto /etc/${PN}
+       doins apricots.cfg
+
+       make_desktop_entry ${PN} Apricots
+}
index 4f663071340a93a4ea3029cf5e5c702526303303..d2e1b27f6f341e9d69eee9bb1774e9e5b8bb97a9 100644 (file)
@@ -1,5 +1,5 @@
---- apricots/apricots.cpp
-+++ apricots/apricots.cpp
+--- a/apricots/apricots.cpp
++++ b/apricots/apricots.cpp
 @@ -16,6 +16,7 @@
  int main(int, char**){\r
  #endif\r
@@ -9,8 +9,8 @@
    gamedata g;\r
    init_data(g);\r
 
---- apricots/sampleio.cpp
-+++ apricots/sampleio.cpp
+--- a/apricots/sampleio.cpp
++++ b/apricots/sampleio.cpp
 @@ -74,12 +74,9 @@
    alListenerfv(AL_ORIENTATION, front );\r
  \r
@@ -51,8 +51,8 @@
  }\r
  \r
 
---- configure.in
-+++ configure.in
+--- a/configure.in
++++ b/configure.in
 @@ -100,7 +100,8 @@
  
  dnl Check for OpenAL
index 5a2a34490b7e2b93cbdc5add424aaf772ce9c8a5..8a7b4a9f9a8c1d0e123abf6f0f32372ad982b330 100644 (file)
@@ -1,5 +1,5 @@
---- apricots/Makefile.am.old   2010-10-11 15:58:18.000000000 +0200
-+++ apricots/Makefile.am       2010-10-11 15:59:21.000000000 +0200
+--- a/apricots/Makefile.am.old 2010-10-11 15:58:18.000000000 +0200
++++ b/apricots/Makefile.am     2010-10-11 15:59:21.000000000 +0200
 @@ -4,7 +4,8 @@
  ## INCLUDES were found outside kdevelop specific part