summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-puzzle/xlogical/files/xlogical-1.0.7-gcc41.patch16
-rw-r--r--games-puzzle/xlogical/files/xlogical-1.0.7-gcc43.patch20
-rw-r--r--games-puzzle/xlogical/xlogical-1.0.7-r1.ebuild79
-rw-r--r--games-puzzle/xlogical/xlogical-1.0.7.ebuild59
4 files changed, 97 insertions, 77 deletions
diff --git a/games-puzzle/xlogical/files/xlogical-1.0.7-gcc41.patch b/games-puzzle/xlogical/files/xlogical-1.0.7-gcc41.patch
index 19cd188b0e0..5c77527dc59 100644
--- a/games-puzzle/xlogical/files/xlogical-1.0.7-gcc41.patch
+++ b/games-puzzle/xlogical/files/xlogical-1.0.7-gcc41.patch
@@ -1,5 +1,5 @@
---- properties.h.old 2007-01-11 17:33:45.000000000 +0100
-+++ properties.h 2007-01-11 17:34:32.000000000 +0100
+--- a/properties.h
++++ b/properties.h
@@ -33,9 +33,7 @@
#include <map>
#include <string>
@@ -10,8 +10,8 @@
#include "defs.h"
---- anim.h.old 2007-01-11 17:36:20.000000000 +0100
-+++ anim.h 2007-01-11 17:36:37.000000000 +0100
+--- a/anim.h
++++ b/anim.h
@@ -27,9 +27,7 @@
// Language Includes
#include <list>
@@ -22,8 +22,8 @@
// Application Includes
#include "graph.h"
---- exception.h.old 2007-01-11 17:37:37.000000000 +0100
-+++ exception.h 2007-01-11 17:38:21.000000000 +0100
+--- a/exception.h
++++ b/exception.h
@@ -27,10 +27,9 @@
// Language Includes
@@ -36,8 +36,8 @@
#define CatchEx(aEx) catch( CXLException aEx )
#define ThrowEx(aError) throw CXLException(aError,__FILE__,__LINE__)
---- gamelogic.cpp.old 2007-01-11 17:38:52.000000000 +0100
-+++ gamelogic.cpp 2007-01-11 17:39:12.000000000 +0100
+--- a/gamelogic.cpp
++++ b/gamelogic.cpp
@@ -154,7 +154,7 @@
levelFile = NULL;
}
diff --git a/games-puzzle/xlogical/files/xlogical-1.0.7-gcc43.patch b/games-puzzle/xlogical/files/xlogical-1.0.7-gcc43.patch
index 4b64fcd6778..594298c93d4 100644
--- a/games-puzzle/xlogical/files/xlogical-1.0.7-gcc43.patch
+++ b/games-puzzle/xlogical/files/xlogical-1.0.7-gcc43.patch
@@ -1,5 +1,5 @@
---- gamelogic.cpp
-+++ gamelogic.cpp
+--- a/gamelogic.cpp
++++ b/gamelogic.cpp
@@ -25,6 +25,7 @@
#include<fstream>
#include<cstdio>
@@ -8,8 +8,8 @@
#ifndef WIN32
#include<unistd.h>
---- levelmap.cpp
-+++ levelmap.cpp
+--- a/levelmap.cpp
++++ b/levelmap.cpp
@@ -21,6 +21,7 @@
////////////////////////////////////////////////////////////////////////
@@ -18,8 +18,8 @@
#include <cstdio>
#include <cctype>
#include <cstring>
---- mapedit.cpp
-+++ mapedit.cpp
+--- a/mapedit.cpp
++++ b/mapedit.cpp
@@ -26,6 +26,8 @@
#include<cstdio>
#include<list>
@@ -29,8 +29,8 @@
#ifndef WIN32
#include<unistd.h>
---- modlist.cpp
-+++ modlist.cpp
+--- a/modlist.cpp
++++ b/modlist.cpp
@@ -22,6 +22,7 @@
#include <iostream>
@@ -39,8 +39,8 @@
#ifdef WIN32
#include <afxwin.h>
---- tile_spinner.cpp
-+++ tile_spinner.cpp
+--- a/tile_spinner.cpp
++++ b/tile_spinner.cpp
@@ -24,6 +24,7 @@
diff --git a/games-puzzle/xlogical/xlogical-1.0.7-r1.ebuild b/games-puzzle/xlogical/xlogical-1.0.7-r1.ebuild
new file mode 100644
index 00000000000..835489919ed
--- /dev/null
+++ b/games-puzzle/xlogical/xlogical-1.0.7-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools desktop edos2unix
+
+MY_PV=$(ver_rs 2 '-')
+MY_P=${PN}-${MY_PV}
+DESCRIPTION="SDL logical clone"
+HOMEPAGE="https://changeling.ixionstudios.com/xlogical/"
+SRC_URI="https://changeling.ixionstudios.com/xlogical/downloads/${MY_P}.tar.bz2
+ alt_gfx? ( https://changeling.ixionstudios.com/xlogical/downloads/${PN}_gfx.zip )"
+S="${WORKDIR}"/${PN}-$(ver_cut 1-2)
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alt_gfx"
+
+DEPEND="
+ media-libs/libsdl[sound,video]
+ media-libs/sdl-image[jpeg]
+ media-libs/sdl-mixer[mod]
+"
+RDEPEND="
+ ${DEPEND}
+ acct-group/gamestat
+"
+BDEPEND="alt_gfx? ( app-arch/unzip )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc41.patch
+ "${FILESDIR}"/${P}-gcc43.patch
+)
+
+src_unpack() {
+ unpack ${MY_P}.tar.bz2
+
+ if use alt_gfx ; then
+ cd "${S}"/images || die
+ unpack xlogical_gfx.zip
+ fi
+}
+
+src_prepare() {
+ sed -i '/^CXXFLAGS/d' Makefile.am || die
+
+ edos2unix properties.h anim.h exception.h
+
+ default
+
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ # localstatedir is only used for the score file
+ # NOTE: Check on bumps!
+ econf --localstatedir="/var/games"
+}
+
+src_install() {
+ dobin ${PN}
+
+ insinto /usr/share/${PN}
+ doins -r ${PN}.{properties,levels} music sound images
+ find "${ED}" -name "Makefile*" -exec rm -f '{}' + || die
+
+ insinto /var/games/${PN}
+ doins ${PN}.scores
+
+ fowners root:gamestat /var/games/${PN}/${PN}.scores
+ fperms 660 /var/games/${PN}/${PN}.scores
+ fperms g+s /usr/bin/${PN}
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+ make_desktop_entry ${PN} "Xlogical"
+}
diff --git a/games-puzzle/xlogical/xlogical-1.0.7.ebuild b/games-puzzle/xlogical/xlogical-1.0.7.ebuild
deleted file mode 100644
index fd78761103c..00000000000
--- a/games-puzzle/xlogical/xlogical-1.0.7.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools versionator eutils games
-
-MY_PV=$(replace_version_separator 2 '-' )
-MY_P=${PN}-${MY_PV}
-DESCRIPTION="SDL logical clone"
-HOMEPAGE="https://changeling.ixionstudios.com/xlogical/"
-SRC_URI="https://changeling.ixionstudios.com/xlogical/downloads/${MY_P}.tar.bz2
- alt_gfx? ( http://changeling.ixionstudios.com/xlogical/downloads/xlogical_gfx.zip )"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="alt_gfx"
-
-RDEPEND="media-libs/libsdl[sound,video]
- media-libs/sdl-image[jpeg]
- media-libs/sdl-mixer[mod]"
-DEPEND="${RDEPEND}
- alt_gfx? ( app-arch/unzip )"
-
-S=${WORKDIR}/${PN}-$(get_version_component_range 1-2)
-
-src_unpack() {
- unpack ${MY_P}.tar.bz2
- if use alt_gfx ; then
- cd "${S}/images"
- unpack xlogical_gfx.zip
- fi
-}
-
-src_prepare() {
- sed -i '/^CXXFLAGS/d' Makefile.am || die
- edos2unix properties.h anim.h exception.h
- epatch \
- "${FILESDIR}"/${P}-gcc41.patch \
- "${FILESDIR}"/${P}-gcc43.patch
- mv configure.in configure.ac
- eautoreconf
-}
-
-src_install() {
- dogamesbin ${PN}
-
- insinto "${GAMES_DATADIR}"/${PN}
- doins -r ${PN}.{properties,levels} music sound images
- find "${D}" -name "Makefile*" -exec rm -f '{}' +
-
- insinto "${GAMES_STATEDIR}"/${PN}
- doins ${PN}.scores
- fperms 0660 "${GAMES_STATEDIR}"/${PN}/${PN}.scores
-
- dodoc AUTHORS ChangeLog NEWS README TODO
- make_desktop_entry ${PN} "Xlogical"
- prepgamesdirs
-}