Subject: [PATCH v3] testing/wiimms-iso-tools: new aport

From: Sebastian <[email-masked]>
Date: Wed, 22 Dec 2021 13:56:55 -0500

https://wit.wiimm.de/
Set of command-line tools to work with Wii/GameCube ISO and WBFS files

Signed-off-by: Sebastian <[email-masked]>
---
 testing/wiimms-iso-tools/APKBUILD             | 33 +++++++++++++++
 .../wiimms-iso-tools/wiimms-iso-tools.patch   | 40 +++++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 testing/wiimms-iso-tools/APKBUILD
 create mode 100644 testing/wiimms-iso-tools/wiimms-iso-tools.patch

diff --git a/testing/wiimms-iso-tools/APKBUILD b/testing/wiimms-iso-tools/APKBUILD
new file mode 100644
index 00000000..dfa08444
--- /dev/null
+++ b/testing/wiimms-iso-tools/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Sebastian Hudak <[email-masked]>
+# Maintainer: Sebastian Hudak <[email-masked]>
+pkgname=wiimms-iso-tools
+pkgver=3.04a
+pkgrel=0
+pkgdesc="Set of command-line tools to work with Wii/GameCube ISO and WBFS files"
+# releases aren't tagged; this commit matches version 3.04a
+_commit=e58ce7463bc8829c46bcba52e8232f550e49c17c
+url="https://wit.wiimm.de/"
+arch="x86 x86_64"
+license="GPL-2.0-or-later"
+depends="ncurses openssl zlib"
+makedepends="bash binutils gcc linux-headers make ncurses-dev openssl-dev zlib-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$_commit.tar.gz::https://github.com/Wiimm/wiimms-iso-tools/archive/$_commit.tar.gz
+	$pkgname.patch"
+builddir="$srcdir/$pkgname-$_commit"
+options="!check" # No tests
+
+build() {
+	make -C project INSTALL_PATH="$pkgdir/usr" all doc
+}
+
+package() {
+	make -C project INSTALL_PATH="$pkgdir/usr" install
+	mkdir -p "$pkgdir"/usr/share/doc/wit/
+	install -m644 project/doc/*.txt "$pkgdir"/usr/share/doc/wit/
+}
+
+sha512sums="
+b750964dafd54a04b8c32849499e4af3a2c996aaa3c41e06766bdee1210bbe273aa4eaad0e75ff9142a93d36e3042f84e57a602ba6bd610e734f864f7504a842  wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c.tar.gz
+a2f33899537398371152970862dc4250ede19f290ffeb42e944f69db94d39f455f88f5e930bf4cd93003cf3b75380ced6ee989c30f9fed7ed5d49d6ced431483  wiimms-iso-tools.patch
+"
diff --git a/testing/wiimms-iso-tools/wiimms-iso-tools.patch b/testing/wiimms-iso-tools/wiimms-iso-tools.patch
new file mode 100644
index 00000000..4b14ed77
--- /dev/null
+++ b/testing/wiimms-iso-tools/wiimms-iso-tools.patch
@@ -0,0 +1,40 @@
+diff -Naur wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c/project/Makefile wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c-alpine/project/Makefile
+--- wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c/project/Makefile	2021-04-18 11:43:37.000000000 +0000
++++ wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c-alpine/project/Makefile	2021-12-11 23:47:51.596954056 +0000
+@@ -303,7 +303,6 @@
+ CFLAGS		+= -O3 -Isrc/libwbfs -Isrc -I$(UI) -I. -Iwork
+ 
+ ifeq ($(SYSTEM_LINUX),1)
+-  LIBS		+= -ltinfo
+   CFLAGS	+= -Wno-format-truncation
+ endif
+ 
+diff -Naur wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c/project/dclib/dclib-color.c wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c-alpine/project/dclib/dclib-color.c
+--- wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c/project/dclib/dclib-color.c	2021-04-18 11:43:37.000000000 +0000
++++ wiimms-iso-tools-e58ce7463bc8829c46bcba52e8232f550e49c17c-alpine/project/dclib/dclib-color.c	2021-12-11 23:48:55.610289581 +0000
+@@ -4810,8 +4810,6 @@
+ {
+     DASSERT(ssf);
+ 
+-    stdout = ssf->std_out;
+-    stderr = ssf->std_err;
+     stdlog = ssf->std_log;
+     stdmsg = ssf->std_msg;
+     stdwrn = ssf->std_wrn;
+@@ -4839,7 +4837,7 @@
+     if (ssf)
+ 	SaveStdFiles(ssf);
+ 
+-    stdout = stdwrn = stdmsg = f;
++    stdwrn = stdmsg = f;
+     colout = colwrn = colmsg = colset ? colset : GetFileColorSet(f);
+ 
+     // special handling for stdlog
+@@ -4851,7 +4849,6 @@
+ 
+     if (err_too)
+     {
+-	stderr = stdout;
+ 	colerr = colout;
+     }
+ }
-- 
2.34.1