Summary: | games-util/ucon64-2.2.1 version bump | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paul Hartman <gentoo> |
Component: | Current packages | Assignee: | Gentoo Games <games> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | dbjh, gentoo, jstein, nitro |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Fixes issue with undefined zlib macro OF.
Fixes issue with undefined zlib macro OF. Also in libdiscmage. ucon64-2.2.1.ebuild Fixes crash in change_mem2() on 64-bit platforms. |
Description
Paul Hartman
2020-11-10 23:35:09 UTC
Developer here. It is now at version 2.2.1. I am curious about the errors you got with the original source code though. To be honest, I never noticed that MiniZip's development had continued as part of zlib. On the author's page (http://www.winimage.com/zLibDll/minizip.html) it appears as if 1.01e is the latest version, which is what is used in uCON64 (with some small changes indicated by static code analyzers). Since the code compiles cleanly on several OSes, including several Linux variants with several versions of GCC (5 - 10) I am surprised that it results in compiler errors. So, could you post the compiler output when compiling 2.2.1, please? Thanks in advance! Hi dbjh, thanks for your attention! I've been using uCON since the old "Chicken & chp" versions in the early '90s... thanks for keeping it alive. I downloaded the source for 2.2.1 from sourceforge, extracted it to a clear directory, cd src, ./configure, make I am using gcc-10.2.0 with zlib 1.2.11 installed on my system. Make has no problems until it gets to misc/ioapi.c: In file included from misc/ioapi.c:28: ./misc/ioapi.h:38:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 38 | typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); | ^~ ./misc/ioapi.h:39:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 39 | typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); | ^~ ./misc/ioapi.h:40:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 40 | typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); | ^~ ./misc/ioapi.h:41:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 41 | typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); | ^~ ./misc/ioapi.h:42:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 42 | typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); | ^~ ./misc/ioapi.h:43:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 43 | typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); | ^~ ./misc/ioapi.h:44:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 44 | typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); | ^~ ./misc/ioapi.h:48:5: error: unknown type name ‘open_file_func’ 48 | open_file_func zopen_file; | ^~~~~~~~~~~~~~ ./misc/ioapi.h:49:5: error: unknown type name ‘read_file_func’ 49 | read_file_func zread_file; | ^~~~~~~~~~~~~~ ./misc/ioapi.h:50:5: error: unknown type name ‘write_file_func’ 50 | write_file_func zwrite_file; | ^~~~~~~~~~~~~~~ ./misc/ioapi.h:51:5: error: unknown type name ‘tell_file_func’ 51 | tell_file_func ztell_file; | ^~~~~~~~~~~~~~ ./misc/ioapi.h:52:5: error: unknown type name ‘seek_file_func’ 52 | seek_file_func zseek_file; | ^~~~~~~~~~~~~~ ./misc/ioapi.h:53:5: error: unknown type name ‘close_file_func’ 53 | close_file_func zclose_file; | ^~~~~~~~~~~~~~~ ./misc/ioapi.h:54:5: error: unknown type name ‘testerror_file_func’ 54 | testerror_file_func zerror_file; | ^~~~~~~~~~~~~~~~~~~ ./misc/ioapi.h:60:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 60 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); | ^~ misc/ioapi.c:51:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 51 | voidpf ZCALLBACK fopen_file_func OF(( | ^~ misc/ioapi.c:56:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 56 | uLong ZCALLBACK fread_file_func OF(( | ^~ misc/ioapi.c:62:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 62 | uLong ZCALLBACK fwrite_file_func OF(( | ^~ misc/ioapi.c:68:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 68 | long ZCALLBACK ftell_file_func OF(( | ^~ misc/ioapi.c:72:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 72 | long ZCALLBACK fseek_file_func OF(( | ^~ misc/ioapi.c:78:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 78 | int ZCALLBACK fclose_file_func OF(( | ^~ misc/ioapi.c:82:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ 82 | int ZCALLBACK ferror_file_func OF(( | ^~ misc/ioapi.c: In function ‘fill_fopen_filefunc’: misc/ioapi.c:195:36: warning: assignment to ‘int’ from ‘void * (*)()’ makes integer from pointer without a cast [-Wint-conversion] 195 | pzlib_filefunc_def->zopen_file = fopen_file_func; | ^ misc/ioapi.c:196:36: warning: assignment to ‘int’ from ‘uLong (*)()’ {aka ‘long unsigned int (*)()’} makes integer from pointer without a cast [-Wint-conversion] 196 | pzlib_filefunc_def->zread_file = fread_file_func; | ^ misc/ioapi.c:197:37: warning: assignment to ‘int’ from ‘uLong (*)()’ {aka ‘long unsigned int (*)()’} makes integer from pointer without a cast [-Wint-conversion] 197 | pzlib_filefunc_def->zwrite_file = fwrite_file_func; | ^ misc/ioapi.c:198:36: warning: assignment to ‘int’ from ‘long int (*)()’ makes integer from pointer without a cast [-Wint-conversion] 198 | pzlib_filefunc_def->ztell_file = ftell_file_func; | ^ misc/ioapi.c:199:36: warning: assignment to ‘int’ from ‘long int (*)()’ makes integer from pointer without a cast [-Wint-conversion] 199 | pzlib_filefunc_def->zseek_file = fseek_file_func; | ^ misc/ioapi.c:200:37: warning: assignment to ‘int’ from ‘int (*)()’ makes integer from pointer without a cast [-Wint-conversion] 200 | pzlib_filefunc_def->zclose_file = fclose_file_func; | ^ misc/ioapi.c:201:37: warning: assignment to ‘int’ from ‘int (*)()’ makes integer from pointer without a cast [-Wint-conversion] 201 | pzlib_filefunc_def->zerror_file = ferror_file_func; | ^ make: *** [Makefile:175: misc/ioapi.o] Error 1 Created attachment 676066 [details, diff]
Fixes issue with undefined zlib macro OF.
In uCON64 base directory, apply patch with:
patch -p1 < OF.patch
Hi Paul, Thanks for the feedback, I appreciate it. I have added a patch that should solve the problem. I have also submitted it to SVN. Please let me know about your results. Perfect, it builds clean with no warning or error now here. Thank you! I will take a stab at putting together an updated gentoo ebuild later tonight. Created attachment 676723 [details, diff]
Fixes issue with undefined zlib macro OF. Also in libdiscmage.
Slightly expanded the patch to solve the same issue for libdiscmage (disabled by default).
In the uCON64 base directory, apply the patch with:
patch -p1 < OF.patch
@Paul: Any update on the ebuild?
Created attachment 677107 [details]
ucon64-2.2.1.ebuild
Here is a rough ebuild I put together. Disclaimer: I don't know what I'm doing and I hope someone can peer review and clean it up as needed. But it at least builds and installs the program for me.
Take the patch from the other attachment and put it in files/ucon64-2.2.1-of.patch
Thank you
Created attachment 678517 [details, diff] Fixes crash in change_mem2() on 64-bit platforms. Just fixed a crash in change_mem2() on 64-bit platforms. That function is used for patching functionality. This thread seemed to be the best place to post this. Apologies if I am wrong about that. @Paul: Perhaps you can update your proposed ebuild? I am not sure if you used the current (outdated) ebuild as a template, but for the record, it can be found here: https://gitweb.gentoo.org/repo/gentoo.git/tree/games-util/ucon64 *** Bug 602866 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=449d7802c1c41097291ff82f28518ae7afffec3e commit 449d7802c1c41097291ff82f28518ae7afffec3e Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2021-06-14 22:07:00 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2021-06-14 22:55:16 +0000 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> games-util/ucon64/Manifest | 1 + .../files/ucon64-2.2.1-change-mem2-64bit.patch | 23 ++++++++ .../ucon64/files/ucon64-2.2.1-respect-flags.patch | 35 ++++++++++++ games-util/ucon64/files/ucon64-2.2.1-zlib.patch | 26 +++++++++ games-util/ucon64/ucon64-2.2.1.ebuild | 65 ++++++++++++++++++++++ 5 files changed, 150 insertions(+) |