summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-14 18:07:00 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-14 18:55:16 -0400
commit449d7802c1c41097291ff82f28518ae7afffec3e (patch)
treeeee8d647985572f08ec6a48260ad26b991813a62 /games-util
parentnet-misc/lksctp-tools: bump to v1.0.19 (diff)
downloadgentoo-449d7802c1c41097291ff82f28518ae7afffec3e.tar.gz
gentoo-449d7802c1c41097291ff82f28518ae7afffec3e.tar.bz2
gentoo-449d7802c1c41097291ff82f28518ae7afffec3e.zip
games-util/ucon64: add 2.2.1
- add IUSE debug, usb, zlib - set default discmage.so path not to need user intervention - shorter elog given ucon64's output already mentions .ucon64/dat - use fixes suggested by upstream in bug #753950 Closes: https://bugs.gentoo.org/753950 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r--games-util/ucon64/Manifest1
-rw-r--r--games-util/ucon64/files/ucon64-2.2.1-change-mem2-64bit.patch23
-rw-r--r--games-util/ucon64/files/ucon64-2.2.1-respect-flags.patch35
-rw-r--r--games-util/ucon64/files/ucon64-2.2.1-zlib.patch26
-rw-r--r--games-util/ucon64/ucon64-2.2.1.ebuild65
5 files changed, 150 insertions, 0 deletions
diff --git a/games-util/ucon64/Manifest b/games-util/ucon64/Manifest
index f98924b25a06..2ead28e44b30 100644
--- a/games-util/ucon64/Manifest
+++ b/games-util/ucon64/Manifest
@@ -1 +1,2 @@
DIST ucon64-2.0.0-src.tar.gz 1188488 BLAKE2B 846ea6142eb50abc8165c9abb3cc05245f891b78d786798758e393032cc59c1f3cccc0fe0e70e256e308f709870bc1cc2754df30a8fababea30eda84fd1b2b64 SHA512 d021fe6db9530405773e1e209bdfafe41a2bd997f275ca7fb387f9b3d8639f4581c2761cbdce859a1831d6eba9dab4d5df1019605698c6cb6a4695ab091b001c
+DIST ucon64-2.2.1-src.tar.gz 1476080 BLAKE2B 8f7010bde2c7306f6a76dec4ce5e31975c286801e6504bf8bc99287bd7adc4ab10331a8cab308fed83ece9e13bdb01327f6d3439eba776038dbb19eb2b72cf70 SHA512 34453399151e5ed256fdcf387b9d32a052718b264e51b99a2be251b90589337d13cd317f8d1aa7d3c8e39c8e407b22797d4608ec6d14b99c8673ec74f349f6c2
diff --git a/games-util/ucon64/files/ucon64-2.2.1-change-mem2-64bit.patch b/games-util/ucon64/files/ucon64-2.2.1-change-mem2-64bit.patch
new file mode 100644
index 000000000000..d07a18fdd8f0
--- /dev/null
+++ b/games-util/ucon64/files/ucon64-2.2.1-change-mem2-64bit.patch
@@ -0,0 +1,23 @@
+Fix crash on 64bit platforms in change_mem2()
+https://bugs.gentoo.org/753950
+
+From upstream:
+https://sourceforge.net/p/ucon64/svn/2821/
+--- a/libdiscmage/misc.c
++++ b/libdiscmage/misc.c
+@@ -1875,5 +1875,5 @@
+ if (strpos == pos_1st_esc)
+ setindex = 0; // reset argument pointer
+- if (pos_1st_esc == (unsigned int) -1)
++ if (pos_1st_esc == (size_t) -1)
+ pos_1st_esc = strpos;
+
+--- a/misc/misc.c
++++ b/misc/misc.c
+@@ -502,5 +502,5 @@
+ if (strpos == pos_1st_esc)
+ setindex = 0; // reset argument pointer
+- if (pos_1st_esc == (unsigned int) -1)
++ if (pos_1st_esc == (size_t) -1)
+ pos_1st_esc = strpos;
+
diff --git a/games-util/ucon64/files/ucon64-2.2.1-respect-flags.patch b/games-util/ucon64/files/ucon64-2.2.1-respect-flags.patch
new file mode 100644
index 000000000000..c1c9ed6f78da
--- /dev/null
+++ b/games-util/ucon64/files/ucon64-2.2.1-respect-flags.patch
@@ -0,0 +1,35 @@
+Respect *FLAGS and toolchain variables in Makefiles where missing.
+--- a/Makefile
++++ b/Makefile
+@@ -12,3 +12,3 @@
+ CFLAGS+=-I. -Wall -W -Wno-implicit-fallthrough -Wno-format-truncation \
+--Wno-stringop-overflow -O3 -fsigned-char
++-Wno-stringop-overflow -fsigned-char
+ # Enable -Wstringop-overflow[=type] when it is no longer a broken, partial
+@@ -19,3 +19,2 @@
+ # ld: warning: option -s is obsolete and being ignored
+-LDFLAGS+=-s
+ endif
+--- a/backup/libcd64/Makefile
++++ b/backup/libcd64/Makefile
+@@ -1,2 +1 @@
+-CC=gcc
+
+@@ -7,3 +6,2 @@
+ else
+-CFLAGS+=-O6 -funroll-loops -fexpensive-optimizations
+ endif
+@@ -181,4 +179,4 @@
+ else
+- ld -r $^ $(LIBS) -o $*.o
+- ar crs $@ $*.o
++ $(LD) -r $^ $(LIBS) -o $*.o
++ $(AR) crs $@ $*.o
+ endif
+--- a/libdiscmage/Makefile.in
++++ b/libdiscmage/Makefile.in
+@@ -33,3 +33,2 @@
+ # /usr/bin/libtool: -static not specified, -s invalid
+-LDFLAGS+=-s
+ endif
+
diff --git a/games-util/ucon64/files/ucon64-2.2.1-zlib.patch b/games-util/ucon64/files/ucon64-2.2.1-zlib.patch
new file mode 100644
index 000000000000..a618c3bce75a
--- /dev/null
+++ b/games-util/ucon64/files/ucon64-2.2.1-zlib.patch
@@ -0,0 +1,26 @@
+Fix undefined macro issue when compiling with zlib.
+https://bugs.gentoo.org/753950
+
+From upstream:
+https://sourceforge.net/p/ucon64/svn/2817/
+https://sourceforge.net/p/ucon64/svn/2819/
+--- a/libdiscmage/ioapi.h
++++ b/libdiscmage/ioapi.h
+@@ -35,4 +35,7 @@
+ extern "C" {
+ #endif
++#ifndef OF
++#define OF(x) x
++#endif
+
+ typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
+--- a/misc/ioapi.h
++++ b/misc/ioapi.h
+@@ -35,4 +35,7 @@
+ extern "C" {
+ #endif
++#ifndef OF
++#define OF(x) x
++#endif
+
+ typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
diff --git a/games-util/ucon64/ucon64-2.2.1.ebuild b/games-util/ucon64/ucon64-2.2.1.ebuild
new file mode 100644
index 000000000000..13ebde02c0b5
--- /dev/null
+++ b/games-util/ucon64/ucon64-2.2.1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+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"
+S="${WORKDIR}/${P}-src/src"
+
+LICENSE="LGPL-2.1+ GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug usb zlib"
+
+RDEPEND="
+ usb? ( virtual/libusb:0 )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-change-mem2-64bit.patch
+ "${FILESDIR}"/${P}-respect-flags.patch
+ "${FILESDIR}"/${P}-zlib.patch
+)
+
+src_prepare() {
+ default
+
+ sed "/discmage.so/s|.* \"|\"${EPREFIX}/usr/$(get_libdir)/${PN}/|" \
+ -i ucon64_misc.c || die
+}
+
+src_configure() {
+ local econfargs=(
+ $(use_enable debug)
+ $(use_with usb libusb)
+ $(use_with zlib)
+ --enable-ppdev
+ --with-libcd64
+ --with-libdiscmage
+ )
+ econf "${econfargs[@]}"
+
+ tc-export AR CC LD # for libcd64 with respect-flags.patch
+}
+
+src_install() {
+ dobin ucon64
+
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe libdiscmage/discmage.so
+
+ docinto html
+ dodoc -r ../images ../{changes,developers,faq,hardware,readme}.html
+}
+
+pkg_postinst() {
+ if [[ ! ${REPLACING_VERSIONS} ]]; then
+ elog "Be sure to check ~/.ucon64rc for some options after"
+ elog "you've run uCON64 for the first time."
+ fi
+}