public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-strategy/scorched3d/, games-strategy/scorched3d/files/
@ 2016-12-19 11:15 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2016-12-19 11:15 UTC (permalink / raw
  To: gentoo-commits

commit:     1bbcfc9ae3dfdfcbdd35151cb7b6050776215e4d
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 19 11:11:21 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Dec 19 11:15:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bbcfc9a

games-strategy/scorched3d: Fix building with GCC 6

Gentoo-bug: 601890
* EAPI=6
* Remove games.eclass
* Make PATCHES -p1 compliant

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../scorched3d/files/scorched3d-44-fix-c++14.patch | 14 ++++
 .../scorched3d/files/scorched3d-44-freetype.patch  | 12 +--
 .../scorched3d/files/scorched3d-44-jpeg9.patch     |  4 +-
 .../scorched3d/files/scorched3d-44-wxgtk.patch     | 12 +--
 games-strategy/scorched3d/scorched3d-44-r2.ebuild  | 97 ++++++++++++++++++++++
 5 files changed, 125 insertions(+), 14 deletions(-)

diff --git a/games-strategy/scorched3d/files/scorched3d-44-fix-c++14.patch b/games-strategy/scorched3d/files/scorched3d-44-fix-c++14.patch
new file mode 100644
index 00000000..e3cba27
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-fix-c++14.patch
@@ -0,0 +1,14 @@
+In C++14, bool -> T* implicit conversions are not allowed anymore.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=601890
+
+--- a/src/common/weapons/AccessoryStore.cpp
++++ b/src/common/weapons/AccessoryStore.cpp
+@@ -156,7 +156,7 @@
+ 	Accessory *parent, XMLNode *currentNode)
+ {
+ 	XMLNode *typeNode = 0;
+-	if (!currentNode->getNamedParameter("type", typeNode)) return false;
++	if (!currentNode->getNamedParameter("type", typeNode)) return NULL;
+ 
+ 	AccessoryPart *accessoryPart = 
+ 		AccessoryMetaRegistration::getNewAccessory(typeNode->getContent(), this);

diff --git a/games-strategy/scorched3d/files/scorched3d-44-freetype.patch b/games-strategy/scorched3d/files/scorched3d-44-freetype.patch
index 93c8ca3..e471797 100644
--- a/games-strategy/scorched3d/files/scorched3d-44-freetype.patch
+++ b/games-strategy/scorched3d/files/scorched3d-44-freetype.patch
@@ -1,5 +1,5 @@
---- acinclude.m4.orig
-+++ acinclude.m4
+--- a/acinclude.m4
++++ b/acinclude.m4
 @@ -437,7 +437,7 @@
     if test "$FT2_CONFIG" = "no" ; then
       no_ft=yes
@@ -9,8 +9,8 @@
       FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
       ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
         sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
---- src.orig/client/GLEXT/GLFont2dFreeType.h
-+++ src/client/GLEXT/GLFont2dFreeType.h
+--- a/src/client/GLEXT/GLFont2dFreeType.h
++++ b/src/client/GLEXT/GLFont2dFreeType.h
 @@ -23,10 +23,10 @@
  
  #include <GLEXT/GLFont2dStorage.h>
@@ -26,8 +26,8 @@
  #include <string>
  
  class GLFont2dFreeType
---- src.orig/launcher/wxdialogs/TrueTypeFont.h
-+++ src/launcher/wxdialogs/TrueTypeFont.h
+--- a/src/launcher/wxdialogs/TrueTypeFont.h
++++ b/src/launcher/wxdialogs/TrueTypeFont.h
 @@ -25,10 +25,10 @@
  #include <wx/image.h>
  #include <ft2build.h>

diff --git a/games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch b/games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch
index 8255dd3..1cebf3e 100644
--- a/games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch
+++ b/games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch
@@ -1,5 +1,5 @@
---- src/common/image/ImageJpgFactory.cpp.old	2014-12-03 09:52:03.306552513 +0100
-+++ src/common/image/ImageJpgFactory.cpp	2014-12-03 09:53:22.117786304 +0100
+--- a/src/common/image/ImageJpgFactory.cpp.old	2014-12-03 09:52:03.306552513 +0100
++++ b/src/common/image/ImageJpgFactory.cpp	2014-12-03 09:53:22.117786304 +0100
 @@ -79,7 +79,7 @@
  	src->next_input_byte = FakeEOI;
  	src->bytes_in_buffer = 2;

diff --git a/games-strategy/scorched3d/files/scorched3d-44-wxgtk.patch b/games-strategy/scorched3d/files/scorched3d-44-wxgtk.patch
index ef2e27a..ee8b975 100644
--- a/games-strategy/scorched3d/files/scorched3d-44-wxgtk.patch
+++ b/games-strategy/scorched3d/files/scorched3d-44-wxgtk.patch
@@ -2,8 +2,8 @@ Description: Fix to build with wxWidgets 3.0
 Author: Olly Betts <olly@survex.com>
 Last-Update: 2014-05-01
 
---- src/launcher/wxdialogs/Display.cpp
-+++ src/launcher/wxdialogs/Display.cpp
+--- a/src/launcher/wxdialogs/Display.cpp
++++ b/src/launcher/wxdialogs/Display.cpp
 @@ -26,7 +26,7 @@
  	// Display settings
  	wxStaticBox *displayBox = new wxStaticBox(parent, -1, wxT("&Display"));
@@ -49,8 +49,8 @@ Last-Update: 2014-05-01
  	
  	keyboardKeyList.clear();
  	if (!Keyboard::instance()->loadKeyFile())
---- src/launcher/wxdialogs/SettingsDialog.cpp
-+++ src/launcher/wxdialogs/SettingsDialog.cpp
+--- a/src/launcher/wxdialogs/SettingsDialog.cpp
++++ b/src/launcher/wxdialogs/SettingsDialog.cpp
 @@ -105,7 +105,7 @@
  	mainPanel_ = new wxPanel(book_, -1);
  	book_->AddPage(mainPanel_, wxT("Main"));
@@ -114,8 +114,8 @@ Last-Update: 2014-05-01
  	playersPanelSizer->Add(sizer, 0, wxALL | wxALIGN_CENTER, 10);
  
  	for (int i=0; i<24; i++)
---- src/launcher/wxdialogs/DisplayDialog.cpp
-+++ src/launcher/wxdialogs/DisplayDialog.cpp
+--- a/src/launcher/wxdialogs/DisplayDialog.cpp
++++ b/src/launcher/wxdialogs/DisplayDialog.cpp
 @@ -449,15 +449,15 @@
  	IDC_SLIDER1_CTRL->SetValue(OptionsDisplay::instance()->getBrightness());
  	IDC_SLIDER1_CTRL->SetToolTip(wxString(OptionsDisplay::instance()->getBrightnessEntry().getDescription(), wxConvUTF8));

diff --git a/games-strategy/scorched3d/scorched3d-44-r2.ebuild b/games-strategy/scorched3d/scorched3d-44-r2.ebuild
new file mode 100644
index 00000000..2469bcc
--- /dev/null
+++ b/games-strategy/scorched3d/scorched3d-44-r2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+WX_GTK_VER=3.0
+
+inherit autotools eutils wxwidgets
+
+DESCRIPTION="Multi-player tank battle in 3D (OpenGL)"
+HOMEPAGE="http://www.scorched3d.co.uk/"
+SRC_URI="mirror://sourceforge/scorched3d/Scorched3D-${PV}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="dedicated mysql"
+
+RDEPEND="
+	dev-libs/expat
+	media-fonts/dejavu
+	media-libs/libpng:0=
+	media-libs/libsdl[video]
+	media-libs/sdl-net
+	sys-libs/zlib
+	virtual/jpeg:0
+	!dedicated? (
+		virtual/opengl
+		virtual/glu
+		media-libs/glew:0=
+		media-libs/libogg
+		media-libs/libvorbis
+		media-libs/openal
+		media-libs/freealut
+		x11-libs/wxGTK:${WX_GTK_VER}[X]
+		media-libs/freetype:2
+		sci-libs/fftw:3.0=
+	)
+	mysql? ( virtual/mysql )"
+DEPEND="${RDEPEND}
+	!dedicated? ( virtual/pkgconfig )"
+
+S=${WORKDIR}/scorched
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fixups.patch
+	"${FILESDIR}"/${P}-gcc43.patch
+	"${FILESDIR}"/${P}-odbc.patch
+	"${FILESDIR}"/${P}-win32.patch
+	"${FILESDIR}"/${P}-freetype.patch
+	"${FILESDIR}"/${P}-jpeg9.patch
+	"${FILESDIR}"/${P}-wxgtk.patch
+	"${FILESDIR}"/${P}-fix-c++14.patch
+)
+
+pkg_setup() {
+	setup-wxwidgets
+}
+
+src_prepare() {
+	edos2unix \
+		src/launcher/wxdialogs/SettingsDialog.cpp \
+		src/launcher/wxdialogs/DisplayDialog.cpp \
+		src/launcher/wxdialogs/Display.cpp \
+		src/launcher/wxdialogs/KeyDialog.cpp
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		--datadir="${EPREFIX}"/usr/share/${PN} \
+		--with-fftw="${EPREFIX}"/usr \
+		--with-ogg="${EPREFIX}"/usr \
+		--with-vorbis="${EPREFIX}"/usr \
+		--with-docdir="${EPREFIX}"/usr/share/doc/${PF} \
+		--with-wx-config="${WX_CONFIG}" \
+		--without-pgsql \
+		$(use_with mysql) \
+		$(use_enable dedicated serveronly)
+}
+
+src_install() {
+	default
+
+	# remove bundled fonts
+	rm "${ED%/}"/usr/share/${PN}/data/fonts/* || die
+	dosym /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/${PN}/data/fonts/dejavusans.ttf
+	dosym /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf /usr/share/${PN}/data/fonts/dejavusconbd.ttf
+	dosym /usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf /usr/share/${PN}/data/fonts/dejavusmobd.ttf
+
+	if ! use dedicated; then
+		newicon data/images/tank-old.bmp ${PN}.bmp
+		make_desktop_entry ${PN} "Scorched 3D" /usr/share/pixmaps/${PN}.bmp
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/scorched3d/, games-strategy/scorched3d/files/
@ 2023-11-24 13:27 Pacho Ramos
  0 siblings, 0 replies; 2+ messages in thread
From: Pacho Ramos @ 2023-11-24 13:27 UTC (permalink / raw
  To: gentoo-commits

commit:     9d891dae91ecbca789d01478be467ae2bfc9eaa7
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 24 13:26:29 2023 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Fri Nov 24 13:26:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d891dae

games-strategy/scorched3d: Port to wxGTK 3.2

And more fixes

Closes: https://bugs.gentoo.org/657280
Closes: https://bugs.gentoo.org/665900
Closes: https://bugs.gentoo.org/699168
Closes: https://bugs.gentoo.org/831909
Closes: https://bugs.gentoo.org/884919
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 games-strategy/scorched3d/Manifest                 |   1 +
 .../files/scorched3d-44-hang-fast-machines.patch   |  53 ++++++++
 .../scorched3d/files/scorched3d-44-help.patch      |  12 ++
 .../files/scorched3d-44-openal-pkgconfig.patch     | 137 +++++++++++++++++++++
 .../scorched3d/files/scorched3d-44-wxgtk32.patch   |  19 +++
 games-strategy/scorched3d/scorched3d-44-r3.ebuild  |  98 +++++++++++++++
 6 files changed, 320 insertions(+)

diff --git a/games-strategy/scorched3d/Manifest b/games-strategy/scorched3d/Manifest
index 9cbe11fb8ca1..06cfa10a2301 100644
--- a/games-strategy/scorched3d/Manifest
+++ b/games-strategy/scorched3d/Manifest
@@ -1 +1,2 @@
 DIST Scorched3D-44-src.tar.gz 41689613 BLAKE2B 61f5536ad6e9dedeb0e778f90d73aa918f890632385278d4d788a43f1e199e817d6199f923c264dadbe8084fa53c32968b599c9b08784de0d5752069f9bed818 SHA512 27341d12ef9db5b64c1051a8abe45cef8a957e26c2cd8928f64c071589052d2857fc6f8104772bb67d5d348aef14122a117d9e00d61e4d9f963f3b5bbe5859ca
+DIST scorched3d.png 4559 BLAKE2B dba1c4021844b71cea7e71132f6a1ff6ecfbd5bcf8978210b56100d005accdcb85eaa619406863dc0582413cd1d4c0c07d7d1924cbcef49d80af7eaaf77c41ff SHA512 3034e7ff643443bbc283c0c566d0ef062c10b9f7d326f005ebbe87e68b795cafff20ce65dd4656057aac7982eee4cff44196e0e38a3b6bbd556c98439e3950d4

diff --git a/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch b/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch
new file mode 100644
index 000000000000..4773081b6f31
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch
@@ -0,0 +1,53 @@
+diff -up scorched/src/common/coms/ComsLoadLevelMessage.cpp~ scorched/src/common/coms/ComsLoadLevelMessage.cpp
+--- scorched/src/common/coms/ComsLoadLevelMessage.cpp~	2014-08-01 18:47:31.000000000 +0200
++++ scorched/src/common/coms/ComsLoadLevelMessage.cpp	2020-08-13 21:33:59.895250469 +0200
+@@ -108,6 +108,49 @@ bool ComsLoadLevelMessage::loadState(Sco
+ 
+ bool ComsLoadLevelMessage::loadTanks(ScorchedContext &context)
+ {
++	/*
++	 * There is a timing bug which shows on really fast machines
++	 * where the client starts talking to the server before the
++	 * server initial setup is done.
++	 * In sofar as I have managed to debug this, the following
++	 * happens on slower machines, aka the GOOD case:
++	 *
++	 * Server TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++	 * Server TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++	 * Server TankAddSimAction::invokeAction() new Tank "Player 1"
++	 * Server TankAddSimAction::invokeAction() new Tank "Spectator"
++	 * Client TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++	 * Client TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++	 * Client TankAddSimAction::invokeAction() new Tank "Player 1"
++	 * Client TankAddSimAction::invokeAction() new Tank "Spectator"
++	 * 
++	 * Note the server internally creates all tanks before the
++	 * client does and thus before the client starts sending
++	 * messages related to these tanks to the server.
++	 *
++	 * On a fast enough system (i7-10610U) the following order
++	 * has been observed instead:
++	 *
++	 * Server TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++	 * Server TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++	 * Client TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++	 * Client TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++	 * Client TankAddSimAction::invokeAction() new Tank "Player 1"
++	 * Client TankAddSimAction::invokeAction() new Tank "Spectator"
++	 * Server TankAddSimAction::invokeAction() new Tank "Player 1"
++	 * Server TankAddSimAction::invokeAction() new Tank "Spectator"
++	 *
++	 * Note the server creates the "Player 1" and "Spectator"
++	 * tanks after the client, this causes the server to ignore
++	 * some initial messages from the client related to these
++	 * tanks, after which things get stuck, breaking non-networked
++	 * games on fast machines.
++	 *
++	 * The sleep below is an ugly but effective workaround for this
++	 * issue.
++	 */
++	SDL_Delay(100);
++
+ 	NetBufferReader reader(tanksBuffer_);
+ 
+ 	// Add any new tanks

diff --git a/games-strategy/scorched3d/files/scorched3d-44-help.patch b/games-strategy/scorched3d/files/scorched3d-44-help.patch
new file mode 100644
index 000000000000..4da81a9a53a9
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-help.patch
@@ -0,0 +1,12 @@
+diff -up scorched/src/common/common/DefinesScorched.cpp.orig scorched/src/common/common/DefinesScorched.cpp
+--- scorched/src/common/common/DefinesScorched.cpp.orig	2009-02-15 15:11:18.000000000 +0100
++++ scorched/src/common/common/DefinesScorched.cpp	2009-02-16 14:28:53.000000000 +0100
+@@ -58,7 +58,7 @@ void S3D::showURL(const std::string &url
+ 	std::string buffer = S3D::formatStringBuffer("open %s", url.c_str());
+ 	system(buffer.c_str());
+ #else
+-	std::string buffer = S3D::formatStringBuffer("firefox %s", url.c_str());
++	std::string buffer = S3D::formatStringBuffer("xdg-open %s", url.c_str());
+ 	system(buffer.c_str());
+ #endif // __DARWIN__
+ #endif // _WIN32

diff --git a/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch b/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch
new file mode 100644
index 000000000000..2e1f4bac98a0
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch
@@ -0,0 +1,137 @@
+Description: make use of pkg-config instead of openal-config
+From: Reinhard Tartler <siretart@tauware.de>
+Date: Sun, 28 Jun 2009 20:04:31 +0200
+Subject: openal-pkgconfig
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533973
+
+---
+ configure-al.m4 | 118 ++------------------------------------------------------
+ 1 file changed, 4 insertions(+), 114 deletions(-)
+
+diff --git a/configure-al.m4 b/configure-al.m4
+index e37c20b..5250f0d 100644
+--- a/configure-al.m4
++++ b/configure-al.m4
+@@ -1,118 +1,8 @@
+ dnl Checking for OpenAL
+-AC_ARG_WITH([openal-static],
+-            AC_HELP_STRING([--with-openal-static],
+-                           [enable static linking for openal (default no)]),
+-            [use_static_openal=${withval}],,)
+-AC_ARG_ENABLE(openaltest, 
+-	[  --disable-openaltest    Do not try to compile and run a test OpenAL program],
+-		    , enable_openaltest=yes)
+-AC_MSG_CHECKING(for OpenAL support)
+-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no)
+-if test x$OPENAL_CONFIG = xno; then
+-	echo "The openal-config script installed by OpenAL could not be found"
+-	echo "Make sure openal-config is in your path, or set the OPENAL_CONFIG"
+-	echo "environment variable to the full path to openal-config."
+-	echo "Trying pkg-config instead."
+-
+-	AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+-	if test x$PKG_CONFIG = xno; then
+-		echo "The pkg-config script could not be found"
+-		echo "Make sure pkg-config is in your path, or set the PKG_CONFIG"
+-		echo "environment variable to the full path to pkg-config."
+-
+-		AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/])
+-	else
+-		OPENAL_CONFIG="$PKG_CONFIG openal";
+-	fi
+-fi
+-	
+-if test x"$use_static_openal" = x"yes"; then
+-	AL_LIBS="/usr/local/lib/libopenal.a"
+-else
+-	AL_LIBS="`$OPENAL_CONFIG --libs`"
+-fi
+-
+-AL_CFLAGS="`$OPENAL_CONFIG --cflags`"
+-
+-AC_MSG_RESULT(yes)
+-
+-AC_MSG_CHECKING(for Freealut support)
+-AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no)
+-if test x$FREEALUT_CONFIG = xno; then
+-	echo "*** Warning: The freealut-config script installed by OpenAL could not be found."
+-	echo "*** The alut library is required, however some older OpenAL distribitions may include it."
+-	echo "*** If Scorched3D fails to link check alut is in the link line."
+-	echo "*** Alternatively, make sure freealut-config is in your path, or set the FREEALUT_CONFIG"
+-	echo "*** environment variable to the full path to openal-config."
+-else
+-
+-	AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`"
+-	AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`"
+-
+-	AC_MSG_RESULT(yes)
+-fi
+-
+-AC_MSG_CHECKING(for OpenAL compilation)
+-if test "x$enable_openaltest" = "xyes" ; then
+-
+-	ac_save_CFLAGS="$CFLAGS"
+-	ac_save_LIBS="$LIBS"
+-	CFLAGS="$CFLAGS $AL_CFLAGS"
+-	LIBS="$AL_LIBS $LIBS"
+-
+-	AC_TRY_COMPILE([
+-#ifdef __APPLE__
+-		#include <OpenAL/al.h>
+-		#include <OpenAL/alc.h>
+-#else
+-		#include <AL/al.h>
+-		#include <AL/alut.h>
+-		#include <AL/alc.h>
+-#endif
+-
+-		],[
+-		],[
+-		have_openal=yes	
+-		],[
+-		echo "*** Failed to compile using the OpenAL library."
+-		echo "*** CFLAGS = $AL_CFLAGS";
+-    		AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
+-	])
+-
+-	AC_TRY_LINK([
+-#ifdef __APPLE__
+-		#include <OpenAL/al.h>
+-		#include <OpenAL/alc.h>
+-#else
+-		#include <AL/al.h>
+-		#include <AL/alut.h>
+-		#include <AL/alc.h>
+-#endif
+-
+-		int main(int argc, char *argv[])
+-		{
+-			alutInit(argc, argv);
+-			return 0;
+-		}
+-#undef  main
+-#define main K_and_R_C_main
+-
+-		],[
+-		],[
+-		have_openal=yes	
+-		],[
+-		echo "*** Compiled but failed to link using the OpenAL library."
+-		echo "*** LIBS = $AL_LIBS";
+-		echo "*** Check the OpenAL library is on the LD_LIBRARY_PATH";
+-    		AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.])
+-	])
+-
+-	CFLAGS="$ac_save_CFLAGS"
+-	LIBS="$ac_save_LIBS"
+-
+-	AC_MSG_RESULT(yes)
+-fi
+-
++PKG_CHECK_MODULES([OPENAL], [openal])
++PKG_CHECK_MODULES([FREEALUT], [freealut])
++AL_CFLAGS="$OPENAL_CFLAGS $FREEALUT_CFLAGS"
++AL_LIBS="$OPENAL_LIBS $FREEALUT_LIBS"
+ AC_SUBST(AL_CFLAGS)
+ AC_SUBST(AL_LIBS)
+ 

diff --git a/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch b/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch
new file mode 100644
index 000000000000..9ee0b8c34b58
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch
@@ -0,0 +1,19 @@
+--- a/src/launcher/scorched/main.cpp
++++ b/src/launcher/scorched/main.cpp
+@@ -26,6 +26,7 @@
+ #include <graph/OptionsDisplay.h>
+ #include <wx/wx.h>
+ #include <wx/utils.h>
++#include <wx/sizer.h>
+ #include <locale.h>
+ #include <math.h>
+ #include <signal.h>
+@@ -86,6 +87,8 @@ int main(int argc, char *argv[])
+ 		ScorchedParams::instance()->getSDLInitVideo() = true;
+ 	}
+ 
++	wxSizerFlags::DisableConsistencyChecks();
++
+ #ifdef _WIN32
+ 		wxEntry((WXHINSTANCE) (HINSTANCE) GetModuleHandle(NULL),
+ 			(WXHINSTANCE) NULL, "", SW_SHOWNORMAL);

diff --git a/games-strategy/scorched3d/scorched3d-44-r3.ebuild b/games-strategy/scorched3d/scorched3d-44-r3.ebuild
new file mode 100644
index 000000000000..526a838be935
--- /dev/null
+++ b/games-strategy/scorched3d/scorched3d-44-r3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.2-gtk3"
+inherit autotools desktop edos2unix wxwidgets
+
+DESCRIPTION="Multi-player tank battle in 3D (OpenGL)"
+HOMEPAGE="http://www.scorched3d.co.uk/"
+SRC_URI="mirror://sourceforge/scorched3d/Scorched3D-${PV}-src.tar.gz
+	https://salsa.debian.org/games-team/scorched3d/-/raw/master/debian/scorched3d.png"
+S="${WORKDIR}/scorched"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="dedicated mysql"
+
+RDEPEND="
+	dev-libs/expat
+	media-fonts/dejavu
+	media-libs/libpng:0=
+	media-libs/libsdl[video]
+	media-libs/sdl-net
+	sys-libs/zlib
+	x11-misc/xdg-utils
+	virtual/jpeg:0
+	!dedicated? (
+		virtual/opengl
+		virtual/glu
+		media-libs/glew:0=
+		media-libs/libogg
+		media-libs/libvorbis
+		media-libs/openal
+		media-libs/freealut
+		x11-libs/wxGTK:${WX_GTK_VER}[X]
+		media-libs/freetype:2
+		sci-libs/fftw:3.0=
+	)
+	mysql? ( dev-db/mysql-connector-c )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="!dedicated? ( virtual/pkgconfig )"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fixups.patch
+	"${FILESDIR}"/${P}-gcc43.patch
+	"${FILESDIR}"/${P}-odbc.patch
+	"${FILESDIR}"/${P}-win32.patch
+	"${FILESDIR}"/${P}-freetype.patch
+	"${FILESDIR}"/${P}-jpeg9.patch
+	"${FILESDIR}"/${P}-wxgtk.patch
+	"${FILESDIR}"/${P}-fix-c++14.patch
+	"${FILESDIR}"/${P}-help.patch
+	"${FILESDIR}"/${P}-hang-fast-machines.patch
+	"${FILESDIR}"/${P}-wxgtk32.patch
+	"${FILESDIR}"/${P}-openal-pkgconfig.patch
+)
+
+src_prepare() {
+	edos2unix \
+		src/launcher/wxdialogs/SettingsDialog.cpp \
+		src/launcher/wxdialogs/DisplayDialog.cpp \
+		src/launcher/wxdialogs/Display.cpp \
+		src/launcher/wxdialogs/KeyDialog.cpp
+	default
+	eautoreconf
+}
+
+src_configure() {
+	setup-wxwidgets
+	econf \
+		--datadir="${EPREFIX}"/usr/share/${PN} \
+		--with-fftw="${EPREFIX}"/usr \
+		--with-ogg="${EPREFIX}"/usr \
+		--with-vorbis="${EPREFIX}"/usr \
+		--with-docdir="${EPREFIX}"/usr/share/doc/${PF} \
+		--with-wx-config="${WX_CONFIG}" \
+		--without-pgsql \
+		$(use_with mysql) \
+		$(use_enable dedicated serveronly)
+}
+
+src_install() {
+	default
+
+	# remove bundled fonts
+	rm "${ED}"/usr/share/${PN}/data/fonts/* || die
+	dosym ../../../fonts/dejavu/DejaVuSans.ttf /usr/share/${PN}/data/fonts/dejavusans.ttf
+	dosym ../../../fonts/dejavu/DejaVuSansCondensed-Bold.ttf /usr/share/${PN}/data/fonts/dejavusconbd.ttf
+	dosym ../../../fonts/dejavu/DejaVuSansMono-Bold.ttf /usr/share/${PN}/data/fonts/dejavusmobd.ttf
+
+	if ! use dedicated; then
+		doicon "${DISTDIR}"/${PN}.png
+		make_desktop_entry ${PN} "Scorched 3D"
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-24 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-19 11:15 [gentoo-commits] repo/gentoo:master commit in: games-strategy/scorched3d/, games-strategy/scorched3d/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2023-11-24 13:27 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox