forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-arcade/criticalmass: EAPI6->8, misc changes
* use https for homepage * depend on libsdl[opengl,sound,video] (doesn't launch without opengl) * depend on zlib * make dependency for music unconditional (generally feel audio/music being a broken-if-missing optfeature is questionable for games, there is an option to disable correctly in-game) * tidy patches and add some bugrefs * fix direct AR call (combined with -flags.patch) Signed-off-by: Ionen Wolkens <[email protected]>
- Loading branch information
Showing
9 changed files
with
136 additions
and
229 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit autotools desktop flag-o-matic | ||
|
||
MY_P="CriticalMass-${PV}" | ||
|
||
DESCRIPTION="SDL/OpenGL space shoot'em up game" | ||
HOMEPAGE="https://criticalmass.sourceforge.io/" | ||
SRC_URI="mirror://sourceforge/criticalmass/${MY_P}.tar.bz2" | ||
S="${WORKDIR}/${MY_P}" | ||
|
||
LICENSE="GPL-2+ ZLIB" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
|
||
RDEPEND=" | ||
media-libs/libglvnd[X] | ||
media-libs/libpng:= | ||
media-libs/libsdl[opengl,sound,video] | ||
media-libs/sdl-image[png] | ||
media-libs/sdl-mixer[mod] | ||
net-misc/curl | ||
sys-libs/zlib:=" | ||
DEPEND="${RDEPEND}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-gcc43.patch | ||
"${FILESDIR}"/${P}-system-curl.patch | ||
"${FILESDIR}"/${P}-libpng.patch | ||
"${FILESDIR}"/${P}-flags.patch | ||
) | ||
|
||
src_prepare() { | ||
default | ||
|
||
rm -r curl || die | ||
eautoreconf | ||
|
||
append-cxxflags -std=gnu++98 #612758 | ||
} | ||
|
||
src_install() { | ||
local HTML_DOCS="Readme.html" | ||
default | ||
|
||
rm "${ED}"/usr/bin/Packer || die #247449 | ||
|
||
newicon critter.png ${PN}.png | ||
make_desktop_entry critter "Critical Mass" | ||
} |
27 changes: 0 additions & 27 deletions
27
games-arcade/criticalmass/files/criticalmass-1.0.2-cflags.patch
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
games-arcade/criticalmass/files/criticalmass-1.0.2-flags.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
https://bugs.gentoo.org/375739 | ||
--- a/configure.in | ||
+++ b/configure.in | ||
@@ -24,2 +24,3 @@ | ||
AC_PROG_RANLIB | ||
+AM_PROG_AR | ||
|
||
@@ -37,5 +38,2 @@ | ||
|
||
-CFLAGS="" | ||
-CXXFLAGS="" | ||
- | ||
if test "x$GCC" = xyes; then | ||
@@ -52,10 +50,2 @@ | ||
fi | ||
- | ||
-AC_ARG_ENABLE(optimize, | ||
-[ --enable-optimize=level Enable optimization [default=2]], | ||
- enable_optmize=$enableval, enable_optimize=2) | ||
-if test "x$enable_optimize" != "xno" ; then | ||
- CFLAGS="$CFLAGS -O$enable_optimize" | ||
- CXXFLAGS="$CXXFLAGS -O$enable_optimize" | ||
-fi | ||
|
99 changes: 22 additions & 77 deletions
99
games-arcade/criticalmass/files/criticalmass-1.0.2-gcc43.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,46 @@ | ||
--- CriticalMass-1.0.0.orig/tinyxml/tinyxml.cpp 2003-03-03 03:34:58.000000000 +0100 | ||
+++ CriticalMass-1.0.0/tinyxml/tinyxml.cpp 2008-04-18 19:40:35.000000000 +0200 | ||
@@ -21,10 +21,12 @@ | ||
distribution. | ||
*/ | ||
|
||
#include "tinyxml.h" | ||
https://bugs.gentoo.org/218299 | ||
--- a/tinyxml/tinyxml.cpp | ||
+++ b/tinyxml/tinyxml.cpp | ||
@@ -25,2 +25,4 @@ | ||
|
||
+#include <cstring> | ||
+ | ||
|
||
TiXmlNode::TiXmlNode( NodeType _type ) | ||
{ | ||
parent = 0; | ||
type = _type; | ||
--- CriticalMass-1.0.0.orig/tinyxml/tinyxml.h 2003-03-03 03:34:58.000000000 +0100 | ||
+++ CriticalMass-1.0.0/tinyxml/tinyxml.h 2008-04-18 19:40:35.000000000 +0200 | ||
@@ -28,10 +28,11 @@ | ||
#ifdef _MSC_VER | ||
#pragma warning( disable : 4530 ) | ||
#pragma warning( disable : 4786 ) | ||
#endif | ||
--- a/tinyxml/tinyxml.h | ||
+++ b/tinyxml/tinyxml.h | ||
@@ -32,2 +32,3 @@ | ||
|
||
+#include <cstdlib> | ||
#include <string> | ||
#include <stdio.h> | ||
#include <assert.h> | ||
|
||
class TiXmlDocument; | ||
--- CriticalMass-1.0.0.orig/tinyxml/tinyxmlparser.cpp 2003-03-03 03:34:58.000000000 +0100 | ||
+++ CriticalMass-1.0.0/tinyxml/tinyxmlparser.cpp 2008-04-18 19:40:35.000000000 +0200 | ||
@@ -23,10 +23,12 @@ | ||
|
||
|
||
#include "tinyxml.h" | ||
#include <ctype.h> | ||
--- a/tinyxml/tinyxmlparser.cpp | ||
+++ b/tinyxml/tinyxmlparser.cpp | ||
@@ -27,2 +27,4 @@ | ||
|
||
+#include <cstring> | ||
+ | ||
const char* TiXmlBase::SkipWhiteSpace( const char* p ) | ||
{ | ||
while ( p && *p && | ||
( isspace( *p ) || *p == '\n' || *p == '\r' ) ) | ||
p++; | ||
--- CriticalMass-1.0.0.orig/utils/ResourceManager.cpp 2005-01-02 03:59:29.000000000 +0100 | ||
+++ CriticalMass-1.0.0/utils/ResourceManager.cpp 2008-04-18 19:40:35.000000000 +0200 | ||
@@ -20,10 +20,12 @@ | ||
#include <ResourceManager.hpp> | ||
#include <FindHash.hpp> | ||
#include <Endian.hpp> | ||
#include <WalkDirectory.hpp> | ||
--- a/utils/ResourceManager.cpp | ||
+++ b/utils/ResourceManager.cpp | ||
@@ -24,2 +24,4 @@ | ||
|
||
+#include <cstring> | ||
+ | ||
#ifdef WIN32 | ||
const char PATH_SEPERATOR = '\\'; | ||
#else | ||
const char PATH_SEPERATOR = '/'; | ||
#endif | ||
--- CriticalMass-1.0.0.orig/utils/Value.hpp 2004-12-18 03:41:24.000000000 +0100 | ||
+++ CriticalMass-1.0.0/utils/Value.hpp 2008-04-18 19:40:35.000000000 +0200 | ||
@@ -13,10 +13,11 @@ | ||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details | ||
// | ||
#ifndef _Value_hpp_ | ||
#define _Value_hpp_ | ||
--- a/utils/Value.hpp | ||
+++ b/utils/Value.hpp | ||
@@ -17,2 +17,3 @@ | ||
|
||
+#include <cstdlib> | ||
#include <stdio.h> | ||
#include <string> | ||
|
||
#include <Trace.hpp> | ||
|
||
--- CriticalMass-1.0.0.orig/utils/zStreamBufferImplZLib.cpp 2005-07-31 22:06:14.000000000 +0200 | ||
+++ CriticalMass-1.0.0/utils/zStreamBufferImplZLib.cpp 2008-04-18 19:40:35.000000000 +0200 | ||
@@ -10,10 +10,11 @@ | ||
// | ||
// This program is distributed in the hope that it will be useful, but WITHOUT | ||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details | ||
--- a/utils/zStream.cpp | ||
+++ b/utils/zStream.cpp | ||
@@ -14,2 +14,3 @@ | ||
// | ||
+#include <cstdlib> | ||
#include <Trace.hpp> | ||
#include <zStreamBufferImplZLib.hpp> | ||
|
||
bool ziStreamBufferImplZLib::init( void) | ||
{ | ||
--- CriticalMass-1.0.0.orig/utils/zStream.cpp 2005-07-31 22:06:14.000000000 +0200 | ||
+++ CriticalMass-1.0.0/utils/zStream.cpp 2008-04-18 19:40:35.000000000 +0200 | ||
@@ -10,10 +10,11 @@ | ||
// | ||
// This program is distributed in the hope that it will be useful, but WITHOUT | ||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details | ||
--- a/utils/zStreamBufferImplZLib.cpp | ||
+++ b/utils/zStreamBufferImplZLib.cpp | ||
@@ -14,2 +14,3 @@ | ||
// | ||
+#include <cstdlib> | ||
#include <Trace.hpp> | ||
#include <Endian.hpp> | ||
#include <zStream.hpp> | ||
#include <zStreamBufferImplLZMA.hpp> | ||
#include <zStreamBufferImplZLib.hpp> |
28 changes: 28 additions & 0 deletions
28
games-arcade/criticalmass/files/criticalmass-1.0.2-libpng.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
https://bugs.gentoo.org/206258 | ||
https://bugs.gentoo.org/383207 | ||
--- a/configure.in | ||
+++ b/configure.in | ||
@@ -101,3 +101,3 @@ | ||
CXXFLAGS="$CXXFLAGS -I/usr/X11R6/include" | ||
- AC_CHECK_LIB(png12, main,, AC_MSG_ERROR(libpng is needed)) | ||
+ AC_CHECK_LIB(png, main,, AC_MSG_ERROR(libpng is needed)) | ||
AC_CHECK_LIB(z, main,, AC_MSG_ERROR(libz is needed)) | ||
--- a/game/main.cpp | ||
+++ b/game/main.cpp | ||
@@ -30,2 +30,4 @@ | ||
|
||
+#include <zlib.h> | ||
+ | ||
void migrateConfig( void) | ||
--- a/utilssdl/PNG.cpp | ||
+++ b/utilssdl/PNG.cpp | ||
@@ -47,3 +47,3 @@ | ||
|
||
- check = fwrite( data, 1, length, (FILE *)(png->io_ptr)); | ||
+ check = fwrite( data, 1, length, (FILE *)(png_get_io_ptr(png))); | ||
if( check != length) | ||
@@ -74,3 +74,3 @@ | ||
|
||
- if( setjmp(_png->jmpbuf)) | ||
+ if( setjmp(png_jmpbuf(_png))) | ||
{ |
11 changes: 0 additions & 11 deletions
11
games-arcade/criticalmass/files/criticalmass-1.0.2-libpng14.patch
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
games-arcade/criticalmass/files/criticalmass-1.0.2-libpng15.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.