summaryrefslogtreecommitdiff
path: root/games-arcade/sdl-sopwith
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-arcade/sdl-sopwith
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-arcade/sdl-sopwith')
-rw-r--r--games-arcade/sdl-sopwith/Manifest6
-rw-r--r--games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-nogtk.patch42
-rw-r--r--games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch24
-rw-r--r--games-arcade/sdl-sopwith/metadata.xml11
-rw-r--r--games-arcade/sdl-sopwith/sdl-sopwith-1.7.5-r2.ebuild48
5 files changed, 131 insertions, 0 deletions
diff --git a/games-arcade/sdl-sopwith/Manifest b/games-arcade/sdl-sopwith/Manifest
new file mode 100644
index 000000000000..4e5efd348f38
--- /dev/null
+++ b/games-arcade/sdl-sopwith/Manifest
@@ -0,0 +1,6 @@
+AUX sdl-sopwith-1.7.5-nogtk.patch 984 BLAKE2B 7478a4ef1b23322f9a89209223dca44c7e663e1530d2ae74eac7f7b72e7435ed28dbe6cf866aa0555c23b98d396f1e1b2c303a578dfe963b1d417bfbefcd6dc8 SHA512 10340a42b1da8e633505f9273976ab781e22529090f55932402fd3ff58c493c32cb66ebd5196f65a832cb6d0d98b941010670b74e2af202f2f6352e4fb6e1f18
+AUX sdl-sopwith-1.7.5-video-fix.patch 674 BLAKE2B d89107969ab7e8c97f460e49bd40cae2b9ba52d3c67905d83bbcf5c155ea68bcf0be0661617cedb79795be5247d780f890e9d92f645be360aa1b1f06c09bf0c3 SHA512 024958855d22d038fc9b00d1daa311360211b2b1f3510f0c2dbe43104a2aee8907a764bb2b11b0d367b248bafc7a4a4afebdf6fe116430733ba8ffb7ba6917ef
+DIST sopwith-1.7.5.tar.gz 280883 BLAKE2B 57a2d6cf90d1bba1ac5dedbcebaa7b2f58004cee1ee7682d43be800184809e7949603490e93944d8aa1e4b9e6d33f24a9bdb386dadda945b9f9f3b9c4e8ed48c SHA512 ea78706d0190648be269142a29d10340c5181563959b0a329b802b9d9128a9dcb1e01760737269ec22883adf5b6c02c5049c8fc7b44e4eaa9f381b87abc7acae
+DIST sopwith.png 675 BLAKE2B a380311db8861a75d8cbb035616523d1a21a220be758bda931340f65d658af0e844b0247e478da746d654249cd7a28ab9b681fc82b9798f909b379f38242d03f SHA512 7bcfec11930a623ff9077203640b4415e222570d32ffecdb943f5c78ed8fb11db4fefa42298b895c4aa29b46f963a82cdb90492beaf89a04d119e6e756f5ec57
+EBUILD sdl-sopwith-1.7.5-r2.ebuild 1033 BLAKE2B ec5a77ad3b6d2fb76c14ddc64d11672e278282a1d314a53079c5b2a52487defbad1d305ef84d8dd8176414c50a7ea77faac0c9d124e3db7f9903fe47d9edb544 SHA512 239d6a09d3eb99b044e51fc5c7bed5d7d9ae27a5dc879a38a48490da67cb65f893ee981c18552ed4de723ee752568618ef27adf84a78f38b6e8e759194986574
+MISC metadata.xml 334 BLAKE2B 42211acca53017e9d0c385214962d41899d10fdc4af43e7c016bb729d1576569bbd9ebb00ee1c41655283ffe0d8ae411fb121b51ab15f3ad32285bb7b310698f SHA512 3f9e062ee8d945112f164669980a7c8a8bf5982c6f0f889d100319b7959564752502b6a7b6cc30665829f6865e0f0a81a083cbf462182f5918e9386e6aafca39
diff --git a/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-nogtk.patch b/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-nogtk.patch
new file mode 100644
index 000000000000..a5dbc59f3c72
--- /dev/null
+++ b/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-nogtk.patch
@@ -0,0 +1,42 @@
+--- a/configure.in.old
++++ b/configure.in
+@@ -61,11 +61,6 @@
+ SOPWITH_SUBDIRS="$SOPWITH_SUBDIRS sdl"
+ ],)
+
+-PKG_CHECK_MODULES(GTK, glib-2.0 >= 2.0 gtk+-2.0 >= 2.0, [
+- SOPWITH_BINS="$SOPWITH_BINS" # gtksopwith"
+- SOPWITH_SUBDIRS="$SOPWITH_SUBDIRS" # gtk"
+-],)
+-
+ AC_SUBST(SOPWITH_BINS)
+ AC_SUBST(SOPWITH_SUBDIRS)
+
+@@ -71,7 +71,7 @@
+
+ dnl check for TCPIP support
+
+-AC_CHECK_HEADER(netinet/ip.h, AC_DEFINE(TCPIP),,)
++AC_CHECK_HEADER(netinet/ip.h, AC_DEFINE([TCPIP], [1], [TCP/IP support]),,)
+
+ dnl generate Makefiles
+
+--- a/src/Makefile.am.old
++++ b/src/Makefile.am
+@@ -6,7 +6,7 @@
+ bin_PROGRAMS = @SOPWITH_BINS@
+ EXTRA_PROGRAMS = sopwith gtksopwith psopwith
+
+-CFLAGS = @CFLAGS@ -I..
++AM_CFLAGS = @SDL_CFLAGS@ -I..
+
+ COMMON_SRC = \
+ video.h swcollsn.c swgames.h swmain.h swutil.h \
+--- 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..
+
+ noinst_LIBRARIES = libsdlsopwith.a
+
diff --git a/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch b/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch
new file mode 100644
index 000000000000..e9da16c43905
--- /dev/null
+++ b/games-arcade/sdl-sopwith/files/sdl-sopwith-1.7.5-video-fix.patch
@@ -0,0 +1,24 @@
+Upstream patch: fix segfault while video device detection.
+Discovered here - https://bugs.gentoo.org/show_bug.cgi?id=458504
+
+--- 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;
+ int flags = 0;
++ int status;
+
+ printf("CGA Screen Emulation\n");
+ printf("init screen: ");
+
+- SDL_Init(SDL_INIT_VIDEO);
++ status = SDL_Init(SDL_INIT_VIDEO);
++ if (status == -1)
++ {
++ fprintf(stderr, "Unable to locate video device. Exiting.\n");
++ exit(1);
++ }
+
+ srand(time(NULL));
+ set_icon(symbol_plane[rand() % 2][rand() % 16]);
diff --git a/games-arcade/sdl-sopwith/metadata.xml b/games-arcade/sdl-sopwith/metadata.xml
new file mode 100644
index 000000000000..a7ff32dedabd
--- /dev/null
+++ b/games-arcade/sdl-sopwith/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">sdl-sopwith</remote-id>
+ </upstream>
+</pkgmetadata>
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
index 000000000000..72ea6fb30eba
--- /dev/null
+++ b/games-arcade/sdl-sopwith/sdl-sopwith-1.7.5-r2.ebuild
@@ -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}
+}