From 048695619a87150266f00a3223a87ee57b4fc167 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Fri, 11 Feb 2022 14:34:35 -0500 Subject: [PATCH] Update source snapshot from current upstream Add small fixes to correct FTBFS situation --- toolshed-OS9AttrToString-param.patch | 12 +++ toolshed-version-stringify.patch | 152 +++++++++++++++++++++++++++ toolshed.spec | 13 ++- 3 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 toolshed-OS9AttrToString-param.patch create mode 100644 toolshed-version-stringify.patch diff --git a/toolshed-OS9AttrToString-param.patch b/toolshed-OS9AttrToString-param.patch new file mode 100644 index 0000000..5212480 --- /dev/null +++ b/toolshed-OS9AttrToString-param.patch @@ -0,0 +1,12 @@ +diff -up ./libmisc/libmisccococonv.c.orig ./libmisc/libmisccococonv.c +--- ./libmisc/libmisccococonv.c.orig 2022-02-04 15:43:37.730514311 -0500 ++++ ./libmisc/libmisccococonv.c 2022-02-04 15:43:51.202566302 -0500 +@@ -545,7 +545,7 @@ void DECBToNative(char *buffer, u_int si + * + * Returns textual representation of file attributes to standard output + */ +-void OS9AttrToString(int attr_byte, char string[9]) ++void OS9AttrToString(int attr_byte, char *string) + { + int i; + char *attrs = "dsewrewr"; diff --git a/toolshed-version-stringify.patch b/toolshed-version-stringify.patch new file mode 100644 index 0000000..3a2b7d6 --- /dev/null +++ b/toolshed-version-stringify.patch @@ -0,0 +1,152 @@ +diff -up ./ar2/ar.c.orig ./ar2/ar.c +--- ./ar2/ar.c.orig 2022-02-04 15:26:23.682612220 -0500 ++++ ./ar2/ar.c 2022-02-04 15:28:00.464944064 -0500 +@@ -128,6 +128,10 @@ + #include "ar.h" + #include "lz1.h" + ++#define TOOLSHED_STR(x) #x ++#define TOOLSHED_VER(num) TOOLSHED_STR(num) ++#define TOOLSHED_VSTRING TOOLSHED_VER(TOOLSHED_VERSION) ++ + #if defined(BRAINDEAD) + # undef tolower + # define tolower ck_tolower +@@ -885,7 +889,7 @@ void fataln(int code, char *msg, long ar + */ + + static char *hlpmsg[] = { +- "ar2 from Toolshed " TOOLSHED_VERSION "\n", ++ "ar2 from Toolshed " TOOLSHED_VSTRING "\n", + "Ar V2.02 - archive file manager\n", + "Usage: ar2 -[] archive [file .. ]\n", + " is one of the following:\n", +diff -up ./cocofuse/cocofuse.c.orig ./cocofuse/cocofuse.c +--- ./cocofuse/cocofuse.c.orig 2022-02-04 15:30:29.809473609 -0500 ++++ ./cocofuse/cocofuse.c 2022-02-04 15:29:52.210328510 -0500 +@@ -30,6 +30,10 @@ + + #include + ++#define TOOLSHED_STR(x) #x ++#define TOOLSHED_VER(num) TOOLSHED_STR(num) ++#define TOOLSHED_VSTRING TOOLSHED_VER(TOOLSHED_VERSION) ++ + static int coco_access(const char *path, int mode); + static int coco_statfs(const char *path, struct statvfs *stbuf); + static int coco_fgetattr(const char *path, struct stat *stbuf, +@@ -699,7 +703,7 @@ static struct fuse_operations coco_files + + void usage(const char *name) + { +- printf("cocofuse from Toolshed " TOOLSHED_VERSION "\n"); ++ printf("cocofuse from Toolshed " TOOLSHED_VSTRING "\n"); + printf("Usage: %s: dskimage mountpoint [FUSE options]\n", name); + } + +diff -up ./makewav/makewav.c.orig ./makewav/makewav.c +--- ./makewav/makewav.c.orig 2022-02-04 15:34:00.255285749 -0500 ++++ ./makewav/makewav.c 2022-02-04 15:34:12.090331422 -0500 +@@ -22,6 +22,10 @@ + #include + #include + ++#define TOOLSHED_STR(x) #x ++#define TOOLSHED_VER(num) TOOLSHED_STR(num) ++#define TOOLSHED_VSTRING TOOLSHED_VER(TOOLSHED_VERSION) ++ + #if defined(__CYGWIN32__) || defined(__linux__) || defined(WIN32) + /* implemented based on OSX man page */ + static inline int digittoint(int c) +@@ -230,7 +234,7 @@ int main(int argc, char **argv) + if (argc < 2) + { + fprintf(stderr, +- "makewav from Toolshed " TOOLSHED_VERSION "\n"); ++ "makewav from Toolshed " TOOLSHED_VSTRING "\n"); + fprintf(stderr, + "makewav - S-record to CoCo/MC-10 audio WAV file\n"); + fprintf(stderr, "Copyright (C) 2007 Tim Lindner\n"); +diff -up ./os9/os9_main.c.orig ./os9/os9_main.c +--- ./os9/os9_main.c.orig 2022-02-04 15:34:39.767438231 -0500 ++++ ./os9/os9_main.c 2022-02-04 15:34:56.591503157 -0500 +@@ -12,13 +12,16 @@ + #include + #include + ++#define TOOLSHED_STR(x) #x ++#define TOOLSHED_VER(num) TOOLSHED_STR(num) ++#define TOOLSHED_VSTRING TOOLSHED_VER(TOOLSHED_VERSION) + + static void show_os9_help(char const *const *helpMessage); + static int do_command(int argc, char **argv); + + /* Help message */ + static char const *const helpMessage[] = { +- "os9 from Toolshed " TOOLSHED_VERSION "\n", ++ "os9 from Toolshed " TOOLSHED_VSTRING "\n", + "Syntax: os9 {[]} {[]}\n", + "Usage: OS-9 File Tools Executive\n", + "Options:\n", +diff -up ./tocgen/tocgen_main.c.orig ./tocgen/tocgen_main.c +--- ./tocgen/tocgen_main.c.orig 2022-02-04 15:31:17.642658204 -0500 ++++ ./tocgen/tocgen_main.c 2022-02-04 15:33:18.632125119 -0500 +@@ -9,12 +9,15 @@ + #include + #include + ++#define TOOLSHED_STR(x) #x ++#define TOOLSHED_VER(num) TOOLSHED_STR(num) ++#define TOOLSHED_VSTRING TOOLSHED_VER(TOOLSHED_VERSION) + + static int do_tocgen(char *infile, char *outfile, int quiet); + + /* Help message */ + static char const *const helpMessage[] = { +- "tocgen from Toolshed " TOOLSHED_VERSION "\n", ++ "tocgen from Toolshed " TOOLSHED_VSTRING "\n", + "Syntax: tocgen {[]} {} {[]} {[]}\n", + "Usage: Table of contents generator for Sierra AGI games.\n", + "Options:\n", +diff -up ./cecb/cecb_main.c.orig ./cecb/cecb_main.c +--- ./cecb/cecb_main.c.orig 2022-02-04 15:41:39.920059662 -0500 ++++ ./cecb/cecb_main.c 2022-02-04 15:42:26.617239873 -0500 +@@ -12,12 +12,16 @@ + #include + #include + ++#define TOOLSHED_STR(x) #x ++#define TOOLSHED_VER(num) TOOLSHED_STR(num) ++#define TOOLSHED_VSTRING TOOLSHED_VER(TOOLSHED_VERSION) ++ + static void show_cecb_help(char const *const *helpMessage); + static int do_command(int argc, char **argv); + + /* Help message */ + static char const *const helpMessage[] = { +- "cecb from Toolshed " TOOLSHED_VERSION "\n", ++ "cecb from Toolshed " TOOLSHED_VSTRING "\n", + "Syntax: cecb {[]} {[]}\n", + "Usage: Cassette BASIC File Tools Executive\n", + "Options:\n", +diff -up ./decb/decb_main.c.orig ./decb/decb_main.c +--- ./decb/decb_main.c.orig 2022-02-04 15:41:16.139967884 -0500 ++++ ./decb/decb_main.c 2022-02-04 15:41:34.436038498 -0500 +@@ -11,13 +11,16 @@ + + #include "util.h" + ++#define TOOLSHED_STR(x) #x ++#define TOOLSHED_VER(num) TOOLSHED_STR(num) ++#define TOOLSHED_VSTRING TOOLSHED_VER(TOOLSHED_VERSION) + + static void show_decb_help(char const *const *helpMessage); + static int do_command(int argc, char **argv); + + /* Help message */ + static char const *const helpMessage[] = { +- "decb from Toolshed " TOOLSHED_VERSION "\n", ++ "decb from Toolshed " TOOLSHED_VSTRING "\n", + "Syntax: decb {[]} {[]}\n", + "Usage: Disk BASIC File Tools Executive\n", + "Options:\n", diff --git a/toolshed.spec b/toolshed.spec index 9329671..c38e1f8 100644 --- a/toolshed.spec +++ b/toolshed.spec @@ -19,6 +19,9 @@ BuildRequires: gcc BuildRequires: fuse-devel BuildRequires: discount +Patch0: toolshed-version-stringify.patch +Patch1: toolshed-OS9AttrToString-param.patch + %description ToolShed is a package of utilities to perform cross-development from @@ -31,12 +34,17 @@ and much more. %prep %setup -q +%patch0 -p1 +%patch1 -p1 + # Turn-off weird doc permissions... chmod 0644 doc/* %build -make %{?_smp_mflags} CFLAGS="%{optflags} -fPIE -I../../../include -DSYSV" \ +make %{?_smp_mflags} CFLAGS="%{optflags} \ + -fPIE -DSYSV -Dunix -DUNIX -DSYSV -O3 -I. -I../../../include -Wall \ + -DTOOLSHED_VERSION=2.2 -D_FILE_OFFSET_BITS=64 -Wno-unused-result -Werror" \ -C build/unix @@ -52,7 +60,8 @@ make %{?_smp_mflags} -C build/unix install INSTALLDIR=%{buildroot}%{_bindir} DOC %changelog * Fri Feb 04 2022 John W. Linville 20220204hga1b3c7faf452-1 -- Update from current upstream +- Update source snapshot from current upstream +- Add small fixes to correct FTBFS situation * Thu Jan 27 2022 John W. Linville 20180731hg6906ea14f8f5-9 - Add -fPIE to CFLAGS definition in build section