public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-arcade/abe/, games-arcade/abe/files/
@ 2021-06-15 20:02 Ionen Wolkens
  0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2021-06-15 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     467c360abf7822d6d964f417eacdec882dfbaaac
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 15 01:17:00 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Jun 15 20:00:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=467c360a

games-arcade/abe: tidy ebuild and add missing EPREFIX

src_unpack was only to extract a .bmp icon that is
not XDG compliant (game itself reads the .tar directly)

Also moved patch comments inside the patches themselves.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-arcade/abe/abe-1.1-r1.ebuild                 | 43 +++++++---------------
 games-arcade/abe/files/abe-1.1-doublefree.patch    |  6 ++-
 .../abe/files/abe-1.1-format-security.patch        |  5 ++-
 games-arcade/abe/files/abe-1.1-format.patch        |  6 ++-
 games-arcade/abe/files/abe-1.1-settings.patch      |  8 ++--
 5 files changed, 30 insertions(+), 38 deletions(-)

diff --git a/games-arcade/abe/abe-1.1-r1.ebuild b/games-arcade/abe/abe-1.1-r1.ebuild
index 0e3877c63b4..db902811eb9 100644
--- a/games-arcade/abe/abe-1.1-r1.ebuild
+++ b/games-arcade/abe/abe-1.1-r1.ebuild
@@ -13,53 +13,38 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
-DEPEND="media-libs/libsdl[sound,video]
-	x11-libs/libXi
-	media-libs/sdl-mixer[vorbis]"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
-	unpack ${A}
-	cd "${S}" || die
-	unpack ./images/images.tar
-}
+RDEPEND="
+	media-libs/libsdl[sound,video]
+	media-libs/sdl-mixer[vorbis]
+	x11-libs/libXi"
+DEPEND="${RDEPEND}"
 
 PATCHES=(
-	# From Fedora:
-	# Enable changing the video settings.  Sent upstream 2 Apr 2006:
-	# https://sourceforge.net/p/abe/bugs/1/
 	"${FILESDIR}"/${P}-settings.patch
-
-	# Fix a double free() bug.  Sent upstream 15 Mar 2011:
-	# https://sourceforge.net/p/abe/patches/1/
 	"${FILESDIR}"/${P}-doublefree.patch
-
-	# Fix an incorrect printf format specifier.  Sent upstream 15 Mar 2011:
-	# https://sourceforge.net/p/abe/patches/2/
 	"${FILESDIR}"/${P}-format.patch
-
-	# Fix build failure with -Werror=format-security
 	"${FILESDIR}"/${P}-format-security.patch
 )
 
 src_prepare() {
 	default
-	sed -i \
-		-e "/^TR_CFLAGS/d" \
-		-e "/^TR_CXXFLAGS/d" \
-		configure || die
+
+	sed -i '/^TR_CFLAGS/d;/^TR_CXXFLAGS/d' configure || die
 }
 
 src_configure() {
 	tc-export CC CXX
-	econf --with-data-dir=/usr/share/${PN}
+
+	econf --with-data-dir="${EPREFIX}"/usr/share/${PN}
 }
 
 src_install() {
 	dobin src/abe
+
 	insinto /usr/share/${PN}
-	doins -r images sounds maps
-	newicon tom1.bmp abe.bmp
-	make_desktop_entry abe "Abe's Amazing Adventure" /usr/share/pixmaps/abe.bmp
+	doins -r images maps sounds
+
+	make_desktop_entry abe "Abe's Amazing Adventure" applications-games
+
 	einstalldocs
 }

diff --git a/games-arcade/abe/files/abe-1.1-doublefree.patch b/games-arcade/abe/files/abe-1.1-doublefree.patch
index ce7389d9710..82d49031844 100644
--- a/games-arcade/abe/files/abe-1.1-doublefree.patch
+++ b/games-arcade/abe/files/abe-1.1-doublefree.patch
@@ -1,5 +1,7 @@
---- a/src/Main.c.orig	2005-03-05 09:20:04.000000000 -0700
-+++ b/src/Main.c	2011-03-14 10:08:31.846413904 -0600
+Fix a double free() bug.  Sent upstream 15 Mar 2011:
+https://sourceforge.net/p/abe/patches/1/
+--- a/src/Main.c
++++ b/src/Main.c
 @@ -35,8 +35,6 @@
      for(i = 0; modes[i]; ++i)
        printf("\t%d x %d\n", modes[i]->w, modes[i]->h);

diff --git a/games-arcade/abe/files/abe-1.1-format-security.patch b/games-arcade/abe/files/abe-1.1-format-security.patch
index ad88b4b6048..9f98b080f53 100644
--- a/games-arcade/abe/files/abe-1.1-format-security.patch
+++ b/games-arcade/abe/files/abe-1.1-format-security.patch
@@ -1,5 +1,6 @@
---- ./src/Game.c.orig	2005-03-05 09:20:04.000000000 -0700
-+++ ./src/Game.c	2013-11-20 12:30:00.000000000 -0700
+Fix build failure with -Werror=format-security
+--- ./src/Game.c
++++ ./src/Game.c
 @@ -6,21 +6,14 @@ Game game;
  
  // path_sprintf should not be used by other .c files, as it does not fit for them.

diff --git a/games-arcade/abe/files/abe-1.1-format.patch b/games-arcade/abe/files/abe-1.1-format.patch
index 52953474571..eed86f83483 100644
--- a/games-arcade/abe/files/abe-1.1-format.patch
+++ b/games-arcade/abe/files/abe-1.1-format.patch
@@ -1,5 +1,7 @@
---- a/src/MapIO.c.orig	2005-03-05 09:20:04.000000000 -0700
-+++ b/src/MapIO.c	2011-03-14 10:15:33.166949366 -0600
+Fix an incorrect printf format specifier. Sent upstream 15 Mar 2011:
+https://sourceforge.net/p/abe/patches/2/
+--- a/src/MapIO.c
++++ b/src/MapIO.c
 @@ -93,7 +93,7 @@
    // compression step 1: read compressed data from disk
    // FIXME: what would be nicer is to only allocate as much mem as used on disk.

diff --git a/games-arcade/abe/files/abe-1.1-settings.patch b/games-arcade/abe/files/abe-1.1-settings.patch
index ea5809f7386..c0471a03388 100644
--- a/games-arcade/abe/files/abe-1.1-settings.patch
+++ b/games-arcade/abe/files/abe-1.1-settings.patch
@@ -1,6 +1,8 @@
-diff -Naur --exclude '*.swp' abe-1.1/src/Menu.c abe-1.1.new/src/Menu.c
---- abe-1.1/src/Menu.c	2005-03-05 08:20:04.000000000 -0800
-+++ abe-1.1.new/src/Menu.c	2006-04-02 15:04:37.000000000 -0700
+From Fedora:
+Enable changing the video settings.Sent upstream 2 Apr 2006:
+https://sourceforge.net/p/abe/bugs/1/
+--- a/src/Menu.c
++++ b/src/Menu.c
 @@ -116,7 +116,7 @@
    if(n == SOUND_ENABLED || n == MUSIC_ENABLED)
      return sound_loaded;


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

* [gentoo-commits] repo/gentoo:master commit in: games-arcade/abe/, games-arcade/abe/files/
@ 2023-12-12 14:07 Petr Vaněk
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vaněk @ 2023-12-12 14:07 UTC (permalink / raw
  To: gentoo-commits

commit:     0c523bee351da584ede413328675090afbb7a337
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 07:50:29 2023 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Tue Dec 12 14:07:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c523bee

games-arcade/abe: update configuration phase

Original configure script contains problematic detections which fail
with modern compilers. Moreover, the X detection is removed because the
game uses only libsdl and there is no need to link with any X library.

Closes: https://bugs.gentoo.org/883287
Closes: https://bugs.gentoo.org/898794
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 .../abe/{abe-1.1-r1.ebuild => abe-1.1-r2.ebuild}   | 11 +++++---
 games-arcade/abe/files/abe-1.1-no-x-check.patch    | 29 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/games-arcade/abe/abe-1.1-r1.ebuild b/games-arcade/abe/abe-1.1-r2.ebuild
similarity index 78%
rename from games-arcade/abe/abe-1.1-r1.ebuild
rename to games-arcade/abe/abe-1.1-r2.ebuild
index 4dbe4a24dfaa..20d29934e37b 100644
--- a/games-arcade/abe/abe-1.1-r1.ebuild
+++ b/games-arcade/abe/abe-1.1-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit desktop toolchain-funcs
+inherit autotools desktop toolchain-funcs
 
 DESCRIPTION="Scrolling, platform-jumping, key-collecting, ancient pyramid exploring game"
 HOMEPAGE="https://abe.sourceforge.net/"
@@ -18,7 +18,7 @@ KEYWORDS="~amd64 ~x86"
 RDEPEND="
 	media-libs/libsdl[sound,video]
 	media-libs/sdl-mixer[vorbis]
-	x11-libs/libXi"
+"
 DEPEND="${RDEPEND}"
 
 PATCHES=(
@@ -26,12 +26,17 @@ PATCHES=(
 	"${FILESDIR}"/${P}-doublefree.patch
 	"${FILESDIR}"/${P}-format.patch
 	"${FILESDIR}"/${P}-format-security.patch
+	"${FILESDIR}"/${P}-no-x-check.patch
 )
 
 src_prepare() {
 	default
 
-	sed -i '/^TR_CFLAGS/d;/^TR_CXXFLAGS/d' configure || die
+	sed -i '/^TR_CFLAGS/d;/^TR_CXXFLAGS/d' configure.in || die
+
+	# original configure contains problematic detections with modern compilers
+	# see #883287, #898794
+	eautoreconf
 }
 
 src_configure() {

diff --git a/games-arcade/abe/files/abe-1.1-no-x-check.patch b/games-arcade/abe/files/abe-1.1-no-x-check.patch
new file mode 100644
index 000000000000..a02eaa4b898c
--- /dev/null
+++ b/games-arcade/abe/files/abe-1.1-no-x-check.patch
@@ -0,0 +1,29 @@
+Remove check for X.
+
+The game uses only SDL library. There is no need to check for X.
+
+diff --git a/configure.in b/configure.in
+index 2270cb4..f0a93c6 100644
+--- a/configure.in
++++ b/configure.in
+@@ -98,17 +98,6 @@ if test "x$is_win32" = "xyes" ; then
+     TR_LIBS="$TR_LIBS -luser32 -lgdi32"
+ fi
+ 
+-dnl --------------------------------------------------------------------------
+-dnl Check for X  
+-dnl Note that we only need libs (so that glut links properly on all systems).
+-dnl --------------------------------------------------------------------------
+-if test "x$is_win32" = "xno" ; then
+-    AC_PATH_XTRA
+-    if test "x$no_x" = "x" ; then
+-	TR_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lXi -lXext -lXmu -lXt $X_EXTRA_LIBS $TR_LIBS"
+-    fi
+-fi
+-
+ dnl --------------------------------------------------------------------------
+ dnl Check for some common libraries
+ dnl --------------------------------------------------------------------------
+-- 
+2.41.0
+


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

end of thread, other threads:[~2023-12-12 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-15 20:02 [gentoo-commits] repo/gentoo:master commit in: games-arcade/abe/, games-arcade/abe/files/ Ionen Wolkens
  -- strict thread matches above, loose matches on Subject: below --
2023-12-12 14:07 Petr Vaněk

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