summaryrefslogtreecommitdiff
path: root/games-util/ucon64
diff options
context:
space:
mode:
Diffstat (limited to 'games-util/ucon64')
-rw-r--r--games-util/ucon64/Manifest5
-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, 142 insertions, 0 deletions
diff --git a/games-util/ucon64/Manifest b/games-util/ucon64/Manifest
new file mode 100644
index 000000000000..c33e021261c1
--- /dev/null
+++ b/games-util/ucon64/Manifest
@@ -0,0 +1,5 @@
+AUX ucon64-2.0.0-ovflfix.patch 681 BLAKE2B 7244c12a6e2cae4fe5bc2e8dd0325aa04098b638eaf11b7040dbcad342080a522241f7b3d76b522eb632fef7d0a3bc6d020d1d0669e177b779a9c32e494e3189 SHA512 050ad442ce4e2dfa45ef2cbe3245e623d965e922528a4c64c2652de07934d255d0581ceb536f0883c8f3291a30f9f1807d4078a14f9b29178495dab75a277402
+AUX ucon64-2.0.0-zlib.patch 1274 BLAKE2B 8e53d1c559f75a6b0a4e40a510ed4eccd6ff7d1b5b3ae8f81061503ea7aadc1ec36d35fc670f1afed6e85fb5daf601d49650f1e2e2de5e2942a8f359e7dc2f89 SHA512 708034434a809f65c7cc05fcbae474a8dd5d473ae11458a4bb8510fd553da50691911c1e9fc8ee8457989192ad2b350ab6667214946d5d1f89bd64af8df7272f
+DIST ucon64-2.0.0-src.tar.gz 1188488 BLAKE2B 846ea6142eb50abc8165c9abb3cc05245f891b78d786798758e393032cc59c1f3cccc0fe0e70e256e308f709870bc1cc2754df30a8fababea30eda84fd1b2b64 SHA512 d021fe6db9530405773e1e209bdfafe41a2bd997f275ca7fb387f9b3d8639f4581c2761cbdce859a1831d6eba9dab4d5df1019605698c6cb6a4695ab091b001c
+EBUILD ucon64-2.0.0.ebuild 1428 BLAKE2B 4a7df9af94c6b1802f77d7ea947447ddc08eb17a134992a36c60cd516fd9dc5e5b727f22c09092305a8049442795a9dcb9793b7fb806148c4f384daa83f9f03b SHA512 7ade0622278b5fab6b6fd6a7319ac6d29329c376c55efbc902c151c11720793e352359d5c78029681e5ae4fa063921935f3a39d6cda3181ea36162a46646bc83
+MISC metadata.xml 329 BLAKE2B 7e77481b48419ef3da77a1b758a5e49c3f6686bdec3c14f81fe4f5051aec4b63433b970b6bb8ea5fc3ca4f98893a372cf3fb32c0e8bc3098379729cfd6672995 SHA512 eeaeb79bd3f8931262b87f4956705aea7408f5afd8879e6b8c5d5436a851be22a2e9a9e22ccd5250ea270db0c2876633fbf3d160df47cff9be490e203619ed7f
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..694c0f57261b
--- /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"
+}