public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-roguelike/scourge/files/, games-roguelike/scourge/
@ 2021-04-04 22:29 David Seifert
  0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2021-04-04 22:29 UTC (permalink / raw
  To: gentoo-commits

commit:     f8ca5cec3197b86edcd3df72896f567844d74796
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  4 22:28:44 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Apr  4 22:28:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8ca5cec

games-roguelike/scourge: Port to EAPI 7

* Fix building against Clang

Closes: https://bugs.gentoo.org/739330
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/scourge-0.21.1-Wc++11-narrowing.patch    | 18 ++++++++++++
 games-roguelike/scourge/scourge-0.21.1-r1.ebuild   | 32 ++++++++++++----------
 2 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch b/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
new file mode 100644
index 00000000000..a852248c9fc
--- /dev/null
+++ b/games-roguelike/scourge/files/scourge-0.21.1-Wc++11-narrowing.patch
@@ -0,0 +1,18 @@
+Allow compiling with Clang
+https://bugs.gentoo.org/739330
+
+--- a/src/sdlhandler.cpp
++++ b/src/sdlhandler.cpp
+@@ -1034,10 +1034,10 @@
+ bool SDLHandler::intersects( int x, int y, int w, int h,
+                              int x2, int y2, int w2, int h2 ) {
+ 	SDL_Rect ra = {
+-		x, y, w, h
++		static_cast<Sint16>(x), static_cast<Sint16>(y), static_cast<Uint16>(w), static_cast<Uint16>(h)
+ 	};
+ 	SDL_Rect rb = {
+-		x2, y2, w2, h2
++		static_cast<Sint16>(x2), static_cast<Sint16>(y2), static_cast<Uint16>(w2), static_cast<Uint16>(h2)
+ 	};
+ 	return intersects( &ra, &rb );
+ }

diff --git a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
index 5eeec7c5231..1a0a0a952bf 100644
--- a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
+++ b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
@@ -1,18 +1,20 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit autotools desktop wxwidgets
+EAPI=7
+
+inherit autotools desktop
 
 DESCRIPTION="A graphical rogue-like adventure game"
 HOMEPAGE="https://sourceforge.net/projects/scourge/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.src.tar.gz
+SRC_URI="
+	mirror://sourceforge/${PN}/${P}.src.tar.gz
 	mirror://sourceforge/${PN}/${P}.data.tar.gz"
+S="${WORKDIR}/${PN}"
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
 
 RDEPEND="
 	media-libs/freetype:2
@@ -24,17 +26,17 @@ RDEPEND="
 	virtual/libintl
 	virtual/opengl
 	virtual/glu"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
 	sys-devel/gettext
 	virtual/pkgconfig"
 
-S="${WORKDIR}/${PN}"
-
 PATCHES=(
 	"${FILESDIR}"/${P}-gcc47.patch
 	"${FILESDIR}"/${P}-gcc6.patch
 	"${FILESDIR}"/${P}-automake-1.13.patch
 	"${FILESDIR}"/${P}-freetype_pkgconfig.patch
+	"${FILESDIR}"/${P}-Wc++11-narrowing.patch
 )
 
 src_prepare() {
@@ -52,17 +54,17 @@ src_prepare() {
 }
 
 src_configure() {
-	local myeconfargs=(
-		--with-data-dir=/usr/share/${PN}
-		--localedir=/usr/share/locale
-	)
-	econf "${myeconfargs[@]}"
+	econf \
+		--disable-rpath \
+		--with-data-dir="${EPREFIX}"/usr/share/${PN}
 }
 
 src_install() {
 	default
-	insinto /usr/share/${PN}
-	doins -r ../scourge_data/*
+
+	insinto /usr/share/scourge
+	doins -r ../scourge_data/.
+
 	doicon assets/scourge.png
 	make_desktop_entry scourge S.C.O.U.R.G.E.
 }


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

* [gentoo-commits] repo/gentoo:master commit in: games-roguelike/scourge/files/, games-roguelike/scourge/
@ 2021-04-10  9:03 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2021-04-10  9:03 UTC (permalink / raw
  To: gentoo-commits

commit:     1189b6de0315cd2a9a3810b2e60bc45f5ce1be78
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 10 08:53:19 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 10 09:03:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1189b6de

games-roguelike/scourge: respect AR

Closes: https://bugs.gentoo.org/780450
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../scourge/files/scourge-0.21.1-freetype_pkgconfig.patch           | 6 ++----
 games-roguelike/scourge/files/scourge-0.21.1-gcc47.patch            | 4 ++--
 games-roguelike/scourge/scourge-0.21.1-r1.ebuild                    | 2 ++
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/games-roguelike/scourge/files/scourge-0.21.1-freetype_pkgconfig.patch b/games-roguelike/scourge/files/scourge-0.21.1-freetype_pkgconfig.patch
index d41ee1a4443..6a5a28d1c7a 100644
--- a/games-roguelike/scourge/files/scourge-0.21.1-freetype_pkgconfig.patch
+++ b/games-roguelike/scourge/files/scourge-0.21.1-freetype_pkgconfig.patch
@@ -1,7 +1,5 @@
-Index: scourge/configure.in
-===================================================================
---- scourge/configure.in	(revision 3411)
-+++ scourge/configure.in	(working copy)
+--- a/configure.in
++++ b/configure.in
 @@ -56,6 +56,7 @@
  # Set up binreloc (for a relocatable autopackage file)
  AM_BINRELOC

diff --git a/games-roguelike/scourge/files/scourge-0.21.1-gcc47.patch b/games-roguelike/scourge/files/scourge-0.21.1-gcc47.patch
index 6f3f7b3e2a6..c018d24ee38 100644
--- a/games-roguelike/scourge/files/scourge-0.21.1-gcc47.patch
+++ b/games-roguelike/scourge/files/scourge-0.21.1-gcc47.patch
@@ -1,5 +1,5 @@
---- a/src/squirrel/squtils.h	2012-08-30 18:06:43.474037926 +0200
-+++ b/src/squirrel/squtils.h	2012-08-30 18:14:13.300261523 +0200
+--- a/src/squirrel/squtils.h
++++ b/src/squirrel/squtils.h
 @@ -8,6 +8,9 @@
  #define SQ_FREE(__ptr,__size) sq_vm_free(__ptr,__size);
  #define SQ_REALLOC(__ptr,__oldsize,__size) sq_vm_realloc(__ptr,__oldsize,__size);

diff --git a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
index 1a0a0a952bf..9d4f7eec6a2 100644
--- a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
+++ b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-automake-1.13.patch
 	"${FILESDIR}"/${P}-freetype_pkgconfig.patch
 	"${FILESDIR}"/${P}-Wc++11-narrowing.patch
+	"${FILESDIR}"/${PN}-0.21.1-respect-AR.patch
 )
 
 src_prepare() {
@@ -49,6 +50,7 @@ src_prepare() {
 	sed -i \
 		-e '/snprintf/s/tmp, 256/tmp, sizeof(tmp)/' \
 		src/scourgehandler.cpp || die
+
 	mv configure.{in,ac} || die
 	eautoreconf
 }


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

* [gentoo-commits] repo/gentoo:master commit in: games-roguelike/scourge/files/, games-roguelike/scourge/
@ 2021-05-03  9:06 Sergei Trofimovich
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Trofimovich @ 2021-05-03  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     9dd2d8a9aefa61716da5cf16780d0a67c70449fa
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon May  3 09:00:41 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon May  3 09:06:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dd2d8a9

games-roguelike/scourge: tweak for gcc-11

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/787845
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../scourge/files/scourge-0.21.1-gcc-11.patch      | 62 ++++++++++++++++++++++
 games-roguelike/scourge/scourge-0.21.1-r1.ebuild   |  1 +
 2 files changed, 63 insertions(+)

diff --git a/games-roguelike/scourge/files/scourge-0.21.1-gcc-11.patch b/games-roguelike/scourge/files/scourge-0.21.1-gcc-11.patch
new file mode 100644
index 00000000000..7e5dc45199c
--- /dev/null
+++ b/games-roguelike/scourge/files/scourge-0.21.1-gcc-11.patch
@@ -0,0 +1,62 @@
+https://bugs.gentoo.org/787845
+--- a/src/common/constants.h
++++ b/src/common/constants.h
+@@ -970,7 +970,7 @@ struct t3DModel {
+ 
+ char *getAn( const char *name );
+ 
+-typedef unsigned char byte;
++typedef unsigned char scourge_byte;
+ 
+ extern void ComputeNormals( t3DModel *pModel );
+ extern void CreateTexture( GLuint textureArray[], char *strFileName, int textureID );
+--- a/src/render/Md2.h
++++ b/src/render/Md2.h
+@@ -52,8 +52,8 @@ struct tMd2Header {
+ 
+ /// This is used to store the vertices that are read in for the current frame.
+ struct tMd2AliasTriangle {
+-	byte vertex[3];
+-	byte lightNormalIndex;
++	scourge_byte vertex[3];
++	scourge_byte lightNormalIndex;
+ };
+ 
+ /// This stores the animation scale, translation and name information for a frame, plus verts.
+--- a/src/render/glshape.cpp
++++ b/src/render/glshape.cpp
+@@ -35,7 +35,7 @@ class Map;
+ // poor man's dynamic lightmaps: shaded sides
+ static GLuint lightmap_tex_num = 0;
+ static GLuint lightmap_tex_num2 = 0;
+-static unsigned char data[LIGHTMAP_SIZE * LIGHTMAP_SIZE * 3];
++static unsigned char data1[LIGHTMAP_SIZE * LIGHTMAP_SIZE * 3];
+ static unsigned char data2[LIGHTMAP_SIZE * LIGHTMAP_SIZE * 3];
+ 
+ GLShape::GLShape( Texture tex[], int width, int depth, int height, char const* name, int descriptionGroup,
+@@ -514,11 +514,11 @@ void GLShape::createDarkTexture( WallTheme *theme ) {
+ 			if ( !theme || !theme->getMultiTexSmooth( 0 ) ) d = Util::roll( 127.0f, 255.0f );
+ 
+ 			// purple
+-			data[i * LIGHTMAP_SIZE * 3 + j * 3 + 0] =
++			data1[i * LIGHTMAP_SIZE * 3 + j * 3 + 0] =
+ 			  ( unsigned char )( d * tmp * ( theme ? theme->getMultiTexRed( 0 ) : 0.8f ) );
+-			data[i * LIGHTMAP_SIZE * 3 + j * 3 + 1] =
++			data1[i * LIGHTMAP_SIZE * 3 + j * 3 + 1] =
+ 			  ( unsigned char )( d * tmp * ( theme ? theme->getMultiTexGreen( 0 ) : 0.4f ) );
+-			data[i * LIGHTMAP_SIZE * 3 + j * 3 + 2] =
++			data1[i * LIGHTMAP_SIZE * 3 + j * 3 + 2] =
+ 			  ( unsigned char )( d * tmp * ( theme ? theme->getMultiTexBlue( 0 ) : 1.0f ) );
+ 
+ 			d = 255.0f;
+@@ -542,8 +542,8 @@ void GLShape::createDarkTexture( WallTheme *theme ) {
+ 	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ 	glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
+ 	glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
+-	glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, 0, GL_RGB, GL_UNSIGNED_BYTE, data );
+-	gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, GL_RGB, GL_UNSIGNED_BYTE, data );
++	glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, 0, GL_RGB, GL_UNSIGNED_BYTE, data1 );
++	gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, GL_RGB, GL_UNSIGNED_BYTE, data1 );
+ 
+ 	glBindTexture( GL_TEXTURE_2D, lightmap_tex_num2 );
+ 	glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );

diff --git a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
index 9d4f7eec6a2..a0ae342f3b0 100644
--- a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
+++ b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
@@ -38,6 +38,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-freetype_pkgconfig.patch
 	"${FILESDIR}"/${P}-Wc++11-narrowing.patch
 	"${FILESDIR}"/${PN}-0.21.1-respect-AR.patch
+	"${FILESDIR}"/${P}-gcc-11.patch
 )
 
 src_prepare() {


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

end of thread, other threads:[~2021-05-03  9:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-10  9:03 [gentoo-commits] repo/gentoo:master commit in: games-roguelike/scourge/files/, games-roguelike/scourge/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-05-03  9:06 Sergei Trofimovich
2021-04-04 22:29 David Seifert

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