summaryrefslogtreecommitdiff
path: root/games-emulation/hatari
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-emulation/hatari
reinit the tree, so we can have metadata
Diffstat (limited to 'games-emulation/hatari')
-rw-r--r--games-emulation/hatari/Manifest7
-rw-r--r--games-emulation/hatari/files/hatari-1.8.0-gentoo-docdir.patch13
-rw-r--r--games-emulation/hatari/files/hatari-1.8.0-gentoo.patch112
-rw-r--r--games-emulation/hatari/hatari-1.8.0.ebuild84
-rw-r--r--games-emulation/hatari/metadata.xml8
5 files changed, 224 insertions, 0 deletions
diff --git a/games-emulation/hatari/Manifest b/games-emulation/hatari/Manifest
new file mode 100644
index 000000000000..0e11eec280c6
--- /dev/null
+++ b/games-emulation/hatari/Manifest
@@ -0,0 +1,7 @@
+AUX hatari-1.8.0-gentoo-docdir.patch 583 SHA256 159dd7203fa9feefb33f49b331f237f5d80639bc2d0ca33342c4359648161782 SHA512 95ee37df0b0bca685c2e03f02bcbcced71eb8463c32356956b440cb53248accd970d63a77bbb072d2703201cc7d40de1d13bacab2e8c36370664f4d8e085ebb9 WHIRLPOOL 4a6f7aa067293d9206ed8d4a693ce264d188fec70bc7447e7135a1484419f83ace5e178502aa81ac1e32f145d2d08b178235c5c4d9d42593c29b9c2611d197de
+AUX hatari-1.8.0-gentoo.patch 3174 SHA256 5f64695305cf1076e795ff8c17a903aa9aed4be02960b9491b637a0a93f8c3bc SHA512 d3b0240f657b219d7c770b8b64b0c904020036b71e4ebb7988b3f3f899010667cd4431db672b91f201ee16151ab1f278833e83c59decd9a4ce062930e8fda68e WHIRLPOOL 365d14b2aa87ae9213aac48367728605665cf3dc05ed3c2a12956b446dbba6514f60f6fd1c966cd70c42462dbe1c0605c341b751f1cb36c6d0450b58d920b982
+DIST hatari-1.8.0.tar.bz2 1985358 SHA256 7ecf486ba578e3b4d7a3d3e86ef3e879d5e5611b39c2504e38ccafdaacb5ffeb SHA512 498a6636eef78e85a4715e9df169d928ce97c0548145a95b41aa3aae28817b8e843de1d1390893863be05e4e9981c89236571ab2eb9239faad23b711542e4fa0 WHIRLPOOL 9e62bdf08247da20e451e032355849cbb0c4b683711ed5cea29f03a52cb5b276e996b9ea4fe5c38ecc09456248bd099eb8b1f35d93e6cba5d00b93a456329a01
+EBUILD hatari-1.8.0.ebuild 2396 SHA256 1a7ccdd4a69025e47be2b74a6d8d4d3e73ca032ccde68f4d20be5b419bf150ed SHA512 6a4e5b5afc1b1732b9ccb2176a7e3ebe86902903f9dd739a7afa93076dd45b324ae5e9369b012b08db03549908d90aa04241bbfb090f27e451bf0a209a4ad353 WHIRLPOOL 62a5f3ad511db3837858017a136f6deb77c5632472cc54367f25d3f7c48b7c98a5b5d81589aca2a9923c80a55b54c5eec5a280d5492c7548f532f5fb4e88995e
+MISC ChangeLog 2508 SHA256 8fb13928066d178f0e159a7889bfb8c6da53b6e6ee695f9251f707334134eeb3 SHA512 b3e381faac1b43afe15aaf1557fdea4d2e749eebd453fa03120ae9578d721e8d3cf3cd06eb4fdc6cc69f55cbca48c44667747c752b5ff9b5b3633c8696b889db WHIRLPOOL f6f5235b22a00f377899a4bf6f5019be922e74dccb7c110ca8727cb005ae7ffe48502c86e6215d95d2e90652827d19c0166098c48432bbc900daeec130c7af73
+MISC ChangeLog-2015 7865 SHA256 3361c3826827a4fc169f67ee787a954903fddff4845fd869361c7fbe29fb7ed3 SHA512 978aa4191274708a88c5fd803620ae7b6eff1f566d540410b6b2283f24e2a38066e797cfe0f151e8d196469350aff7da985945d69701185181732b27149f28b2 WHIRLPOOL b9cedbca26d3b5f7c85e13e6c2a6fd3029241075e179c7189b8dee30bdf74906650f3cef04ffc23603ceb261ad9be22c81da810c283561586447602605265310
+MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088
diff --git a/games-emulation/hatari/files/hatari-1.8.0-gentoo-docdir.patch b/games-emulation/hatari/files/hatari-1.8.0-gentoo-docdir.patch
new file mode 100644
index 000000000000..715fb189143f
--- /dev/null
+++ b/games-emulation/hatari/files/hatari-1.8.0-gentoo-docdir.patch
@@ -0,0 +1,13 @@
+--- hatari-1.6.1/python-ui/uihelpers.py
++++ hatari-1.6.1/python-ui/uihelpers.py
+@@ -97,9 +97,7 @@
+ # first try whether there are local Hatari docs in standard place
+ # for this Hatari/UI version
+ sep = os.sep
+- path = self.get_binary_path("hatari")
+- path = sep.join(path.split(sep)[:-2]) # remove "bin/hatari"
+- path = path + sep + "share" + sep + "doc" + sep + "hatari" + sep
++ path = "@DOCDIR@"
+ if os.path.exists(path + "manual.html"):
+ return path
+ # if not, point to latest Hatari HG version docs
diff --git a/games-emulation/hatari/files/hatari-1.8.0-gentoo.patch b/games-emulation/hatari/files/hatari-1.8.0-gentoo.patch
new file mode 100644
index 000000000000..4f10d6d9e3ce
--- /dev/null
+++ b/games-emulation/hatari/files/hatari-1.8.0-gentoo.patch
@@ -0,0 +1,112 @@
+--- hatari-1.4.0.orig/src/paths.c
++++ hatari-1.4.0/src/paths.c
+@@ -109,71 +109,6 @@
+ free(pTmpName);
+ }
+
+-
+-/**
+- * Locate the directory where the hatari executable resides
+- */
+-static char *Paths_InitExecDir(const char *argv0)
+-{
+- char *psExecDir; /* Path string where the hatari executable can be found */
+-
+- /* Allocate memory for storing the path string of the executable */
+- psExecDir = malloc(FILENAME_MAX);
+- if (!psExecDir)
+- {
+- fprintf(stderr, "Out of memory (Paths_Init)\n");
+- exit(-1);
+- }
+-
+- /* Determine the bindir...
+- * Start with empty string, then try to use OS specific functions,
+- * and finally analyze the PATH variable if it has not been found yet. */
+- psExecDir[0] = '\0';
+-
+-#if defined(__linux__)
+- {
+- int i;
+- /* On Linux, we can analyze the symlink /proc/self/exe */
+- i = readlink("/proc/self/exe", psExecDir, FILENAME_MAX);
+- if (i > 0)
+- {
+- char *p;
+- psExecDir[i] = '\0';
+- p = strrchr(psExecDir, '/'); /* Search last slash */
+- if (p)
+- *p = 0; /* Strip file name from path */
+- }
+- }
+-//#elif defined(WIN32) || defined(__CEGCC__)
+-// /* On Windows we can use GetModuleFileName for getting the exe path */
+-// GetModuleFileName(NULL, psExecDir, FILENAME_MAX);
+-#endif
+-
+- /* If we do not have the execdir yet, analyze argv[0] and the PATH: */
+- if (psExecDir[0] == 0)
+- {
+- if (strchr(argv0, PATHSEP) == 0)
+- {
+- /* No separator in argv[0], we have to explore PATH... */
+- Paths_GetExecDirFromPATH(argv0, psExecDir, FILENAME_MAX);
+- }
+- else
+- {
+- /* There was a path separator in argv[0], so let's assume a
+- * relative or absolute path to the current directory in argv[0] */
+- char *p;
+- strncpy(psExecDir, argv0, FILENAME_MAX);
+- psExecDir[FILENAME_MAX-1] = 0;
+- p = strrchr(psExecDir, PATHSEP); /* Search last slash */
+- if (p)
+- *p = 0; /* Strip file name from path */
+- }
+- }
+-
+- return psExecDir;
+-}
+-
+-
+ /**
+ * Initialize the users home directory string
+ * and Hatari's home directory (~/.hatari)
+@@ -226,8 +161,6 @@
+ */
+ void Paths_Init(const char *argv0)
+ {
+- char *psExecDir; /* Path string where the hatari executable can be found */
+-
+ /* Init working directory string */
+ if (getcwd(sWorkingDir, FILENAME_MAX) == NULL)
+ {
+@@ -238,27 +171,11 @@
+ /* Init the user's home directory string */
+ Paths_InitHomeDirs();
+
+- /* Get the directory where the executable resides */
+- psExecDir = Paths_InitExecDir(argv0);
+-
+- /* Now create the datadir path name from the bindir path name: */
+- if (psExecDir && strlen(psExecDir) > 0)
+- {
+- snprintf(sDataDir, sizeof(sDataDir), "%s%c%s",
+- psExecDir, PATHSEP, BIN2DATADIR);
+- }
+- else
+- {
+- /* bindir could not be determined, let's assume datadir is relative
+- * to current working directory... */
+- strcpy(sDataDir, BIN2DATADIR);
+- }
++ strcpy(sDataDir, BIN2DATADIR);
+
+ /* And finally make a proper absolute path out of datadir: */
+ File_MakeAbsoluteName(sDataDir);
+
+- free(psExecDir);
+-
+ /* fprintf(stderr, " WorkingDir = %s\n DataDir = %s\n UserHomeDir = %s\n HatariHomeDir = %s\n",
+ sWorkingDir, sDataDir, sUserHomeDir, sHatariHomeDir); */
+ }
diff --git a/games-emulation/hatari/hatari-1.8.0.ebuild b/games-emulation/hatari/hatari-1.8.0.ebuild
new file mode 100644
index 000000000000..defb5f6da8ce
--- /dev/null
+++ b/games-emulation/hatari/hatari-1.8.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit eutils toolchain-funcs cmake-utils python-single-r1 games
+
+DESCRIPTION="Atari ST emulator"
+HOMEPAGE="http://hatari.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/hatari/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ media-libs/libsdl[X,sound,video]
+ sys-libs/readline:0
+ media-libs/libpng:0
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${RDEPEND}
+ dev-python/pygtk[${PYTHON_USEDEP}]
+ games-emulation/emutos"
+
+pkg_setup() {
+ games_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-gentoo-docdir.patch
+ # build with newer zlib (bug #387829)
+ sed -i -e '1i#define OF(x) x' src/includes/unzip.h || die
+ sed -i -e '/Encoding/d' ./python-ui/hatariui.desktop || die
+ sed -i -e "s/python/${EPYTHON}/" tools/atari-hd-image.sh || die
+ sed -i \
+ -e "s%conf=.*$%conf=\"${GAMES_SYSCONFDIR}\"%" \
+ -e "s%path=.*$%path=\"${GAMES_DATADIR}/${PN}/hatariui\"%" \
+ python-ui/hatariui || die
+ sed -i -e "s#@DOCDIR@#/usr/share/doc/${PF}/html/#" python-ui/uihelpers.py || die
+ rm -f doc/CMakeLists.txt
+}
+
+src_configure() {
+ mycmakeargs=(
+ "-DCMAKE_VERBOSE_MAKEFILE=TRUE"
+ "-DCMAKE_BUILD_TYPE:STRING=Release"
+ "-DDATADIR=${GAMES_DATADIR}/${PN}"
+ "-DBIN2DATADIR=${GAMES_DATADIR}/${PN}"
+ "-DBINDIR=${GAMES_BINDIR}"
+ "-DICONDIR=/usr/share/pixmaps"
+ "-DDESKTOPDIR=/usr/share/applications"
+ "-DMANDIR=/usr/share/man/man1"
+ "-DDOCDIR=/usr/share/doc/${PF}"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ DOCS="readme.txt doc/*.txt" cmake-utils_src_install
+ dohtml -r doc/
+ python_fix_shebang "${ED%/}"/usr/share/games/hatari/{hatariui,hconsole}/
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ elog "You need a TOS ROM to run hatari. EmuTOS, a free TOS implementation,"
+ elog "has been installed in $(games_get_libdir) with a .img extension (there"
+ elog "are several from which to choose)."
+ elog
+ elog "Another option is to go to http://www.atari.st/ and get a real TOS:"
+ elog " http://www.atari.st/"
+ elog
+ elog "The first time you run hatari, you should configure it to find the"
+ elog "TOS you prefer to use. Be sure to save your settings."
+ echo
+}
diff --git a/games-emulation/hatari/metadata.xml b/games-emulation/hatari/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-emulation/hatari/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>