summaryrefslogtreecommitdiff
path: root/games-util/ucon64
diff options
context:
space:
mode:
Diffstat (limited to 'games-util/ucon64')
-rw-r--r--games-util/ucon64/Manifest7
-rw-r--r--games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch20
-rw-r--r--games-util/ucon64/files/ucon64-2.0.0-zlib.patch45
-rw-r--r--games-util/ucon64/metadata.xml11
-rw-r--r--games-util/ucon64/ucon64-2.0.0.ebuild61
5 files changed, 144 insertions, 0 deletions
diff --git a/games-util/ucon64/Manifest b/games-util/ucon64/Manifest
new file mode 100644
index 000000000000..218fa84e7a73
--- /dev/null
+++ b/games-util/ucon64/Manifest
@@ -0,0 +1,7 @@
+AUX ucon64-2.0.0-ovflfix.patch 681 SHA256 37ceb0e0211270dbf1b8fc0453f706f5a3d797b184e4fe42345f31b1eef8cf7c SHA512 050ad442ce4e2dfa45ef2cbe3245e623d965e922528a4c64c2652de07934d255d0581ceb536f0883c8f3291a30f9f1807d4078a14f9b29178495dab75a277402 WHIRLPOOL e479e7b8592b6f9864867aee5a3ec9c68764331d45680c2b4fb21e3019cbd8d654f4844a2c6baf29b4af6626986da508f02e11fda3f0b31576ad1d3e9df2f494
+AUX ucon64-2.0.0-zlib.patch 1274 SHA256 e8e8a3f78643630d57332747387a776e7742001507f43f494aa543121f8c98e9 SHA512 708034434a809f65c7cc05fcbae474a8dd5d473ae11458a4bb8510fd553da50691911c1e9fc8ee8457989192ad2b350ab6667214946d5d1f89bd64af8df7272f WHIRLPOOL 1382b8edd0dc9d687f50d802a1d478ed44288fdac40c7449123c86b2a99030efcce359c692eb054d7c44bb5d955d179d66284bf64bd093a6882a119c9ef90c2c
+DIST ucon64-2.0.0-src.tar.gz 1188488 SHA256 62064324a1912387f84ac9d4c521c5d5e7b80f2567e9f61bf0ab3e1d976c0127 SHA512 d021fe6db9530405773e1e209bdfafe41a2bd997f275ca7fb387f9b3d8639f4581c2761cbdce859a1831d6eba9dab4d5df1019605698c6cb6a4695ab091b001c WHIRLPOOL 922d22e3b856df221d66bc506bae73d895fddb7e2a0577a14569c9874d5ddac33bf8e6b91c7c2ec3f8e8fea59b57159085d9be2ddf046a2b96ed31004ffd153d
+EBUILD ucon64-2.0.0.ebuild 1426 SHA256 4b0b2dfc2a223f68fee8857dbfcca83b827f91c52a94f8afa6d291fdb4bf9f78 SHA512 2d5caf11804ef1f2e4460b1d7b4fd752e7aa38adaca13a16e0f3a0599b12979d3d62108c102b5cb4fdbb62066ff38b7f45cdb89069a1579dde9e59d1a2ff5a73 WHIRLPOOL d3637962731045a91cc706b1ec576c60301dcb586e43d57dee40f289826fd292d6db9ffba8144e09bb44283a333f3cd2a6bdaa5fdf9946d16eb05061a74ed53e
+MISC ChangeLog 2495 SHA256 324140b1d01b45dc7e8f1bb940d24815949976ad8b509716b5b2e4ee4a95c52a SHA512 27e3fe32da1f73787f32098089da703e38814ef8a0a9a802c77d578786918e0a13806b40c47e00282f9edcb62d27fda529832ed09939efdd6dfd4ebabd919146 WHIRLPOOL 0646ab6ba91133f83fed99877e2f67b9d937f4be58c2ea244a9489074d4601f31eec6f176f6fefa859f0e0ceba8051da107d71ba4b7ed5392200b75b84f11541
+MISC ChangeLog-2015 2458 SHA256 ec69624683cd6475bc7c44a961ac0c020c26db2c8a4b5fa080c65083530902af SHA512 dac6c95422a0754681f36f4ef23fd8c26f4a945a119bacd81d913c9dae685f81516ef55aa7879cf69fa2438003dea22be1e126020f93c70d1e8d12d59d8b90ac WHIRLPOOL 578fc600c6b4ee388528c28aebdb592e023bedb4296cb5e09d3a0189a00ca0fb938f9468d80a071d13966bcb392bdbb838f6a04fa928dd63aef77cd0b80e8cc8
+MISC metadata.xml 329 SHA256 33f2f4288407cfc950e779ae11bbf42bf2beb803aebb830d7ef8f0e4e6173814 SHA512 eeaeb79bd3f8931262b87f4956705aea7408f5afd8879e6b8c5d5436a851be22a2e9a9e22ccd5250ea270db0c2876633fbf3d160df47cff9be490e203619ed7f WHIRLPOOL 0a1bd74ece9428041e10718b724d9a9cec6e3c6ca94c41e1b613f0f0903596e3ee2f65eaa9c371a00ccfc387d7c99dbda47005d1690c7fda456e42ed6a45cc62
diff --git a/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch b/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch
new file mode 100644
index 000000000000..0a1668f2d09f
--- /dev/null
+++ b/games-util/ucon64/files/ucon64-2.0.0-ovflfix.patch
@@ -0,0 +1,20 @@
+--- backup/lynxit.c.old 2010-11-04 09:07:18.000000000 +0100
++++ backup/lynxit.c 2010-11-04 09:08:17.000000000 +0100
+@@ -561,7 +561,7 @@
+ return FALSE;
+ }
+
+- if (strcmp (header.magic, "LYNX") != 0)
++ if (memcmp (header.magic, "LYNX", sizeof(header.magic)) != 0)
+ {
+ MESSAGE (("ERROR : %s is not a lynx image\n", filename));
+ fclose (fp);
+@@ -682,7 +682,7 @@
+ #endif
+
+ memset (&header, 0, sizeof (st_lnx_header_t));
+- strcpy (header.magic, MAGIC_STRING);
++ memcpy (header.magic, MAGIC_STRING, sizeof(header.magic));
+ strcpy (header.cartname, cartname);
+ strcpy (header.manufname, manufname);
+ header.page_size_bank0 = cart_analyse (BANK0);
diff --git a/games-util/ucon64/files/ucon64-2.0.0-zlib.patch b/games-util/ucon64/files/ucon64-2.0.0-zlib.patch
new file mode 100644
index 000000000000..7a122713d232
--- /dev/null
+++ b/games-util/ucon64/files/ucon64-2.0.0-zlib.patch
@@ -0,0 +1,45 @@
+--- misc/unzip.h.old 2011-09-23 19:53:09.708884325 +0200
++++ misc/unzip.h 2011-09-23 19:54:00.012878355 +0200
+@@ -49,6 +49,10 @@
+ #include "zlib.h"
+ #endif
+
++#ifndef OF
++#define OF(x) x
++#endif
++
+ #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
+ /* like the STRICT of WIN32, we define a pointer that cannot be converted
+ from (void*) without cast */
+--- libdiscmage/unzip.h.old 2011-09-23 19:59:47.319837133 +0200
++++ libdiscmage/unzip.h 2011-09-23 20:00:07.230834769 +0200
+@@ -48,6 +48,9 @@
+ #ifndef _ZLIB_H
+ #include "zlib.h"
+ #endif
++#ifndef OF
++#define OF(x) x
++#endif
+
+ #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
+ /* like the STRICT of WIN32, we define a pointer that cannot be converted
+--- libdiscmage/misc_z.c.old 2012-03-19 08:39:41.975022496 +0100
++++ libdiscmage/misc_z.c 2012-03-19 08:40:13.109803301 +0100
+@@ -27,6 +27,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/stat.h>
++#define Z_SOLO
+ #include <zlib.h>
+ #include "misc_z.h"
+ #include "misc.h"
+--- misc/archive.c.old 2012-03-19 08:41:06.478999810 +0100
++++ misc/archive.c 2012-03-19 08:41:24.134741668 +0100
+@@ -27,6 +27,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/stat.h>
++#define Z_SOLO
+ #include <zlib.h>
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
diff --git a/games-util/ucon64/metadata.xml b/games-util/ucon64/metadata.xml
new file mode 100644
index 000000000000..04401fa31ab8
--- /dev/null
+++ b/games-util/ucon64/metadata.xml
@@ -0,0 +1,11 @@
+<?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>
+ <upstream>
+ <remote-id type="sourceforge">ucon64</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-util/ucon64/ucon64-2.0.0.ebuild b/games-util/ucon64/ucon64-2.0.0.ebuild
new file mode 100644
index 000000000000..b8875263099d
--- /dev/null
+++ b/games-util/ucon64/ucon64-2.0.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="The backup tool and wonderful emulator's Swiss Army knife program"
+HOMEPAGE="http://ucon64.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ucon64/${P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+S=${WORKDIR}/${P}-src/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ovflfix.patch \
+ "${FILESDIR}"/${P}-zlib.patch
+ sed -i \
+ -e "/^CFLAGS/s/-O3/${CFLAGS}/" \
+ -e "/^LDFLAGS/s/-s$/${LDFLAGS}/" \
+ {,libdiscmage/}Makefile.in || die
+}
+
+src_configure() {
+ local myconf
+
+ if [[ ! -e /usr/include/sys/io.h ]] ; then
+ ewarn "Disabling support for parallel port"
+ myconf="${myconf} --disable-parallel"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ dobin ucon64
+ dolib.so libdiscmage/discmage.so
+ cd ..
+ dohtml -x src -r -A png,jpg *
+}
+
+pkg_postinst() {
+ echo
+ elog "In order to use ${PN}, please create the directory ~/.ucon64/dat"
+ elog "The command to do that is:"
+ elog " mkdir -p ~/.ucon64/dat"
+ elog "Then, you can copy your DAT file collection to ~/.ucon64/dat"
+ elog
+ elog "To enable Discmage support, cp /usr/lib/discmage.so to ~/.ucon64"
+ elog "The command to do that is:"
+ elog " cp /usr/lib/discmage.so ~/.ucon64/"
+ elog
+ elog "Be sure to check ~/.ucon64rc for some options after"
+ elog "you've run uCON64 for the first time"
+}