games-arcade/sdl-sopwith: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 17:30:40 +0000 (19:30 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 19:25:56 +0000 (21:25 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-arcade/sdl-sopwith/Manifest
games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-nogtk.patch
games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch
games-arcade/sdl-sopwith/sdl-sopwith-1.7.5-r2.ebuild [new file with mode: 0644]

index 4c777e0636d77bc2832fbe173d59251b4f258b10..3d8727fea5881f37ba59d3ce2c3dc8856388f3b3 100644 (file)
@@ -1 +1,2 @@
 DIST sopwith-1.7.5.tar.gz 280883 BLAKE2B 57a2d6cf90d1bba1ac5dedbcebaa7b2f58004cee1ee7682d43be800184809e7949603490e93944d8aa1e4b9e6d33f24a9bdb386dadda945b9f9f3b9c4e8ed48c SHA512 ea78706d0190648be269142a29d10340c5181563959b0a329b802b9d9128a9dcb1e01760737269ec22883adf5b6c02c5049c8fc7b44e4eaa9f381b87abc7acae
+DIST sopwith.png 675 BLAKE2B a380311db8861a75d8cbb035616523d1a21a220be758bda931340f65d658af0e844b0247e478da746d654249cd7a28ab9b681fc82b9798f909b379f38242d03f SHA512 7bcfec11930a623ff9077203640b4415e222570d32ffecdb943f5c78ed8fb11db4fefa42298b895c4aa29b46f963a82cdb90492beaf89a04d119e6e756f5ec57
index e4fb1715d8d4690f3a6855113502d250f68b2054..a5dbc59f3c727b9ae84a8615a1a7feb720ea46a7 100644 (file)
@@ -1,5 +1,5 @@
---- configure.in.old
-+++ configure.in
+--- a/configure.in.old
++++ b/configure.in
 @@ -61,11 +61,6 @@
        SOPWITH_SUBDIRS="$SOPWITH_SUBDIRS sdl"
  ],)
@@ -21,8 +21,8 @@
  
  dnl generate Makefiles
  
---- src/Makefile.am.old
-+++ src/Makefile.am
+--- a/src/Makefile.am.old
++++ b/src/Makefile.am
 @@ -6,7 +6,7 @@
  bin_PROGRAMS = @SOPWITH_BINS@
  EXTRA_PROGRAMS = sopwith gtksopwith psopwith
@@ -32,8 +32,8 @@
  
  COMMON_SRC =       \
  video.h           swcollsn.c  swgames.h   swmain.h    swutil.h        \
---- src/sdl/Makefile.am.old
-+++ src/sdl/Makefile.am
+--- a/src/sdl/Makefile.am.old
++++ b/src/sdl/Makefile.am
 @@ -1,4 +1,4 @@
 -CFLAGS=@CFLAGS@ @SDL_CFLAGS@ -I..
 +AM_CFLAGS = @SDL_CFLAGS@ -I..
index feab635518f1825fca8030cebd715ea8c28e1906..e9da16c43905c6294d81d8f78deccaac428f75d3 100644 (file)
@@ -1,8 +1,8 @@
 Upstream patch: fix segfault while video device detection.
 Discovered here - https://bugs.gentoo.org/show_bug.cgi?id=458504
 
---- src/sdl/video.c.orig       2013-02-21 11:48:57.000000000 -0400
-+++ src/sdl/video.c    2013-02-21 11:49:35.000000000 -0400
+--- a/src/sdl/video.c.orig     2013-02-21 11:48:57.000000000 -0400
++++ b/src/sdl/video.c  2013-02-21 11:49:35.000000000 -0400
 @@ -364,11 +364,17 @@
        int n;
        int w, h;
diff --git a/games-arcade/sdl-sopwith/sdl-sopwith-1.7.5-r2.ebuild b/games-arcade/sdl-sopwith/sdl-sopwith-1.7.5-r2.ebuild
new file mode 100644 (file)
index 0000000..72ea6fb
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools desktop toolchain-funcs
+
+MY_P="${P/sdl-/}"
+DESCRIPTION="Port of the classic Sopwith game using LibSDL"
+HOMEPAGE="http://sdl-sopwith.sourceforge.net/"
+SRC_URI="
+       mirror://sourceforge/${PN}/${MY_P}.tar.gz
+       https://src.fedoraproject.org/rpms/sopwith/raw/master/f/sopwith.png
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=">=media-libs/libsdl-1.1.3[video]"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+       default
+       rm acconfig.h || die
+
+       eapply "${FILESDIR}"/${P}-nogtk.patch
+       # bug 458504
+       eapply "${FILESDIR}"/${P}-video-fix.patch
+
+       mv configure.in configure.ac || die
+       eautoreconf
+}
+
+src_compile() {
+       emake AR="$(tc-getAR)"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+       dodoc AUTHORS ChangeLog FAQ NEWS README TODO doc/*txt
+       rm -rf "${ED}/usr/share/doc/sopwith"
+
+       newicon "${DISTDIR}"/sopwith.png ${PN}.png
+       make_desktop_entry sopwith "Sopwith" ${PN}
+}