diff --git a/ncompress-4.2.4.4-2GB.patch b/ncompress-4.2.4.4-2GB.patch deleted file mode 100644 index 58e77ce7932ef5157264e9201c76dc83cbc3a40d..0000000000000000000000000000000000000000 --- a/ncompress-4.2.4.4-2GB.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/compress42.c b/compress42.c -index 5d5f049..2807058 100644 ---- a/compress42.c -+++ b/compress42.c -@@ -1355,7 +1355,7 @@ compress(fdin, fdout) - REG11 int boff; - REG12 int n_bits; - REG13 int ratio; -- REG14 long checkpoint; -+ REG14 unsigned long long checkpoint; - REG15 code_int extcode; - union - { --- -1.8.3.1 - diff --git a/ncompress-4.2.4.4-endians.patch b/ncompress-4.2.4.4-endians.patch deleted file mode 100644 index 58e9b4e4e09d47211ca482d9173a615d426d01b0..0000000000000000000000000000000000000000 --- a/ncompress-4.2.4.4-endians.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/compress42.c b/compress42.c -index 2807058..1d9e375 100644 ---- a/compress42.c -+++ b/compress42.c -@@ -468,7 +468,7 @@ typedef unsigned char char_type; - - union bytes - { -- long word; -+ int word; - struct - { - #if BYTEORDER == 4321 --- -1.8.3.1 - diff --git a/ncompress-4.2.4.4-filenamelen.patch b/ncompress-4.2.4.4-filenamelen.patch deleted file mode 100644 index d026ca58612a1a700364112f6260f588446531f2..0000000000000000000000000000000000000000 --- a/ncompress-4.2.4.4-filenamelen.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/compress42.c b/compress42.c -index bec7a2f..ff437e5 100644 ---- a/compress42.c -+++ b/compress42.c -@@ -151,6 +151,7 @@ - #include - #include - #include -+#include - - #if !defined(DOS) && !defined(WINDOWS) - # include -@@ -229,6 +230,8 @@ static inline access(const char *pathname, int mode) - # define OBUFSIZ BUFSIZ /* Default output buffer size */ - #endif - -+#define MAXPATHLEN PATH_MAX /* MAXPATHLEN - maximum length of a pathname we allow */ -+ - /* Defines for third byte of header */ - #define MAGIC_1 (char_type)'\037'/* First byte of compressed file */ - #define MAGIC_2 (char_type)'\235'/* Second byte of compressed file */ -@@ -713,6 +716,7 @@ main(argc, argv) - REG3 char **filelist; - REG4 char **fileptr; - int seen_double_dash = 0; -+ int i = 0; - - #ifdef SIGINT - if ((fgnd_flag = (signal(SIGINT, SIG_IGN)) != SIG_IGN)) -@@ -730,13 +734,18 @@ main(argc, argv) - nomagic = 1; /* Original didn't have a magic number */ - #endif - -- filelist = (char **)malloc(argc*sizeof(char *)); -+ for (i=0; i(MAXPATHLEN-1)) { -+ fprintf(stderr,"Filename too long\n"); -+ exit(1); -+ } -+ } -+ filelist = fileptr = (char **)malloc(argc*sizeof(char *)); - if (filelist == NULL) - { - fprintf(stderr, "Cannot allocate memory for file list.\n"); - exit (1); - } -- fileptr = filelist; - *filelist = NULL; - - if((progname = strrchr(argv[0], '/')) != 0) -@@ -886,7 +895,9 @@ nextarg: continue; - decompress(0, 1); - } - -+ free(filelist); - exit((exit_code== -1) ? 1:exit_code); -+ return 0; - } - - void diff --git a/ncompress-4.2.4.4-lfs.patch b/ncompress-4.2.4.4-lfs.patch deleted file mode 100644 index 613aa872bad4bab5f70ea0bef940cdf35ba6a8e1..0000000000000000000000000000000000000000 --- a/ncompress-4.2.4.4-lfs.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/compress42.c b/compress42.c -index 5d5f049..bec7a2f 100644 ---- a/compress42.c -+++ b/compress42.c -@@ -140,6 +140,7 @@ - # define MINGW - #endif - -+#include - #include - #include - #include -@@ -549,8 +550,8 @@ int remove_ofname = 0; /* Remove output file on a error */ - char *ofname = NULL; /* Output filename */ - int fgnd_flag = 0; /* Running in background (SIGINT=SIGIGN) */ - --long bytes_in; /* Total number of byte from input */ --long bytes_out; /* Total number of byte to output */ -+long long bytes_in; /* Total number of byte from input */ -+long long bytes_out; /* Total number of byte to output */ - - /* - * 8086 & 80286 Has a problem with array bigger than 64K so fake the array diff --git a/ncompress-4.2.4.4-make.patch b/ncompress-4.2.4.4-make.patch deleted file mode 100644 index 16981374bd4a2469a736fcd6bd085a2424610514..0000000000000000000000000000000000000000 --- a/ncompress-4.2.4.4-make.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/Makefile.def b/Makefile.def -index 0d0e6ba..5763398 100644 ---- a/Makefile.def -+++ b/Makefile.def -@@ -32,7 +32,14 @@ MANDIR=$(PREFIX)/share/man/man1 - # -DDEF_ERRNO=1 Define errno (not defined in errno.h). - # -DMAXSEG_64K=1 -BITS=16 Support segment processor like 80286. - # --options= $(CFLAGS) $(CPPFLAGS) -DDIRENT=1 -DUSERMEM=800000 -DREGISTERS=3 -+options= $(CFLAGS) $(CPPFLAGS) -DDIRENT=1 -DUSERMEM=800000 -DREGISTERS=20 \ -+ -D_FILE_OFFSET_BITS=64 \ -+ -D_LARGEFILE_SOURCE \ -+ -DNOFUNCDEF=1 \ -+ -DOBUFSIZ=1024 \ -+ -DUTIME_H \ -+ -DSYSDIR=1 \ -+ $(ARCH_FLAGS) - - # library options - LBOPT= $(LDFLAGS) --- -1.8.3.1 - diff --git a/ncompress-4.2.4.4-memmove.patch b/ncompress-4.2.4.4-memmove.patch deleted file mode 100644 index d8fec3e7b0489ddb486b5c3d0904b4c16c1599f9..0000000000000000000000000000000000000000 --- a/ncompress-4.2.4.4-memmove.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urNp ncompress-4.2.4-orig/compress42.c ncompress-4.2.4/compress42.c ---- ncompress-4.2.4-orig/compress42.c 2012-01-03 15:13:58.014222927 +0100 -+++ ncompress-4.2.4/compress42.c 2012-01-03 15:15:17.117097419 +0100 -@@ -1441,7 +1441,7 @@ compress(fdin, fdout) - boff = -(((OBUFSIZ<<3)-boff)%(n_bits<<3)); - bytes_out += OBUFSIZ; - -- memcpy(outbuf, outbuf+OBUFSIZ, (outbits>>3)+1); -+ memmove(outbuf, outbuf+OBUFSIZ, (outbits>>3)+1); - memset(outbuf+(outbits>>3)+1, '\0', OBUFSIZ); - } - diff --git a/ncompress-4.2.4.6.tar.gz b/ncompress-4.2.4.6.tar.gz deleted file mode 100644 index eb83fde32984ed78578d0f238bd18e8f60b05a91..0000000000000000000000000000000000000000 Binary files a/ncompress-4.2.4.6.tar.gz and /dev/null differ diff --git a/ncompress-5.0.tar.gz b/ncompress-5.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4499b3162929d66856c82d52a06f2952a180bc92 Binary files /dev/null and b/ncompress-5.0.tar.gz differ diff --git a/ncompress-compression-with-9-bits-don-t-work.patch b/ncompress-compression-with-9-bits-don-t-work.patch deleted file mode 100644 index 2b44617b69322b114a450e85348a3ae1dc02b4e6..0000000000000000000000000000000000000000 --- a/ncompress-compression-with-9-bits-don-t-work.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c3644836a013841efd385a05e6f250985c024dfe Mon Sep 17 00:00:00 2001 -From: hexiaowen -Date: Fri, 3 May 2019 16:06:24 +0800 -Subject: [PATCH] ncompress: compression with 9 bits don't work - ---- - compress42.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/compress42.c b/compress42.c -index 834c2f2..19a4043 100644 ---- a/compress42.c -+++ b/compress42.c -@@ -233,7 +233,7 @@ - #define FIRST 257 /* first free entry */ - #define CLEAR 256 /* table clear output code */ - --#define INIT_BITS 9 /* initial number of bits/code */ -+#define INIT_BITS 8 /* initial number of bits/code */ - - #ifndef SACREDMEM - /* -@@ -835,7 +835,7 @@ main(argc, argv) - nextarg: continue; - } - -- if (maxbits < INIT_BITS) maxbits = INIT_BITS; -+ if (maxbits <= INIT_BITS) maxbits = INIT_BITS + 1; - if (maxbits > BITS) maxbits = BITS; - - if (*filelist != NULL) --- -1.8.3.1 - diff --git a/ncompress.spec b/ncompress.spec index 7d3bd290ea1d61480d40892853ab2551499dd77b..a4410e2d35ebc68b47f55fdce6b0267f70f7e9cc 100644 --- a/ncompress.spec +++ b/ncompress.spec @@ -1,20 +1,11 @@ Name: ncompress -Version: 4.2.4.6 +Version: 5.0 Release: 1 Summary: A fast, simple LZW file compressor License: Public Domain URL: http://ncompress.sourceforge.net/ Source0: https://github.com/vapier/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch0: %{name}-4.2.4.4-make.patch -Patch1: %{name}-4.2.4.4-lfs.patch -Patch2: %{name}-4.2.4.4-filenamelen.patch -Patch3: %{name}-4.2.4.4-2GB.patch -Patch4: %{name}-4.2.4.4-endians.patch -Patch5: %{name}-4.2.4.4-memmove.patch - -Patch6000: ncompress-compression-with-9-bits-don-t-work.patch - BuildRequires: git gcc glibc-devel %description @@ -48,6 +39,9 @@ ln -sf compress.1 %{buildroot}%{_mandir}/man1/uncompress.1 %{_mandir}/man1/*.gz %changelog +* Mon Jun 27 2022 dillon chen -5.0-1 +- update to 5.0 + * Tue Feb 02 2021 shixuantong - 4.2.4.6-1 - Type:enhancement - ID:NA @@ -80,4 +74,3 @@ ln -sf compress.1 %{buildroot}%{_mandir}/man1/uncompress.1 * Wed Aug 22 2018 openEuler Buildteam - 4.2.4.4-14 - Package init -