diff --git a/sys-apps/diffutils/diffutils-3.7.recipe b/sys-apps/diffutils/diffutils-3.10.recipe similarity index 74% rename from sys-apps/diffutils/diffutils-3.7.recipe rename to sys-apps/diffutils/diffutils-3.10.recipe index b6857b7af..6c050ec75 100644 --- a/sys-apps/diffutils/diffutils-3.7.recipe +++ b/sys-apps/diffutils/diffutils-3.10.recipe @@ -18,37 +18,43 @@ COPYRIGHT="1992-2016 Free Software Foundation, Inc." LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="http://ftpmirror.gnu.org/diffutils/diffutils-$portVersion.tar.xz" -CHECKSUM_SHA256="b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26" +CHECKSUM_SHA256="90e5e93cc724e4ebe12ede80df1634063c7a855692685919bfe60b556c9bd09e" PATCHES="diffutils-$portVersion.patchset" -ARCHITECTURES="all" +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" PROVIDES=" - diffutils = $portVersion + diffutils$secondaryArchSuffix = $portVersion cmd:cmp = $portVersion cmd:diff = $portVersion cmd:diff3 = $portVersion cmd:sdiff = $portVersion " REQUIRES=" - haiku + haiku$secondaryArchSuffix " +if [ "$targetArchitecture" = x86_gcc2 ]; then + REPLACES=" + diffutils + " +fi BUILD_REQUIRES=" - haiku_devel + haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" cmd:awk - cmd:gcc + cmd:gcc$secondaryArchSuffix cmd:make cmd:perl " -defineDebugInfoPackage diffutils \ - $binDir/cmp \ - $binDir/diff \ - $binDir/diff3 \ - $binDir/sdiff +defineDebugInfoPackage diffutils$secondaryArchSuffix \ + $prefix/bin/cmp \ + $prefix/bin/diff \ + $prefix/bin/diff3 \ + $prefix/bin/sdiff BUILD() { @@ -56,8 +62,10 @@ BUILD() export CXXFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS" export LDFLAGS="-lposix_error_mapper" - runConfigure ./configure \ + runConfigure --omit-dirs binDir ./configure \ + --bindir=$prefix/bin \ --disable-gcc-warnings + make $jobArgs } diff --git a/sys-apps/diffutils/diffutils-3.6.recipe b/sys-apps/diffutils/diffutils-3.6.recipe deleted file mode 100644 index f75f106d6..000000000 --- a/sys-apps/diffutils/diffutils-3.6.recipe +++ /dev/null @@ -1,73 +0,0 @@ -SUMMARY="Several programs for finding differences between files" -DESCRIPTION="You can use the diff command to show differences between two \ -files, or each corresponding file in two directories. diff outputs \ -differences between files line by line in any of several formats, selectable \ -by command line options. This set of differences is often called a 'diff' or \ -'patch'. -You can use the cmp command to show the offsets and line numbers where two \ -files differ. cmp can also show all the characters that differ between the two \ -files, side by side. -You can use the diff3 command to show differences among three files. When two \ -people have made independent changes to a common original, diff3 can report \ -the differences between the original and the two changed versions, and can \ -produce a merged file that contains both persons' changes together with \ -warnings about conflicts. -You can use the sdiff command to merge two files interactively." -HOMEPAGE="https://www.gnu.org/software/diffutils/" -COPYRIGHT="1992-2016 Free Software Foundation, Inc." -LICENSE="GNU GPL v3" -REVISION="2" -SOURCE_URI="http://ftpmirror.gnu.org/diffutils/diffutils-$portVersion.tar.xz" -CHECKSUM_SHA256="d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6" -PATCHES="diffutils-$portVersion.patchset" - -ARCHITECTURES="all" - -PROVIDES=" - diffutils = $portVersion - cmd:cmp = $portVersion - cmd:diff = $portVersion - cmd:diff3 = $portVersion - cmd:sdiff = $portVersion - " -REQUIRES=" - haiku - " - -BUILD_REQUIRES=" - haiku_devel - " -BUILD_PREREQUIRES=" - cmd:awk - cmd:gcc - cmd:make - cmd:perl - " - -defineDebugInfoPackage diffutils \ - $binDir/cmp \ - $binDir/diff \ - $binDir/diff3 \ - $binDir/sdiff - -BUILD() -{ - export CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS" - export CXXFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS" - export LDFLAGS="-lposix_error_mapper" - - runConfigure ./configure \ - --disable-gcc-warnings - make $jobArgs -} - -INSTALL() -{ - make install - rm $libDir/charset.alias -} - -TEST() -{ - make check -} diff --git a/sys-apps/diffutils/diffutils-3.8.recipe b/sys-apps/diffutils/diffutils-3.8.recipe deleted file mode 100644 index 813f7fb5c..000000000 --- a/sys-apps/diffutils/diffutils-3.8.recipe +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY="Several programs for finding differences between files" -DESCRIPTION="You can use the diff command to show differences between two \ -files, or each corresponding file in two directories. diff outputs \ -differences between files line by line in any of several formats, selectable \ -by command line options. This set of differences is often called a 'diff' or \ -'patch'. -You can use the cmp command to show the offsets and line numbers where two \ -files differ. cmp can also show all the characters that differ between the two \ -files, side by side. -You can use the diff3 command to show differences among three files. When two \ -people have made independent changes to a common original, diff3 can report \ -the differences between the original and the two changed versions, and can \ -produce a merged file that contains both persons' changes together with \ -warnings about conflicts. -You can use the sdiff command to merge two files interactively." -HOMEPAGE="https://www.gnu.org/software/diffutils/" -COPYRIGHT="1992-2016 Free Software Foundation, Inc." -LICENSE="GNU GPL v3" -REVISION="1" -SOURCE_URI="http://ftpmirror.gnu.org/diffutils/diffutils-$portVersion.tar.xz" -CHECKSUM_SHA256="a6bdd7d1b31266d11c4f4de6c1b748d4607ab0231af5188fc2533d0ae2438fec" -PATCHES="diffutils-$portVersion.patchset" - -ARCHITECTURES="all ?x86_gcc2" - -PROVIDES=" - diffutils = $portVersion - cmd:cmp = $portVersion - cmd:diff = $portVersion - cmd:diff3 = $portVersion - cmd:sdiff = $portVersion - " -REQUIRES=" - haiku - " - -BUILD_REQUIRES=" - haiku_devel - " -BUILD_PREREQUIRES=" - cmd:awk - cmd:gcc - cmd:make - cmd:perl - " - -defineDebugInfoPackage diffutils \ - $binDir/cmp \ - $binDir/diff \ - $binDir/diff3 \ - $binDir/sdiff - -BUILD() -{ - export CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS" - export CXXFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS" - export LDFLAGS="-lposix_error_mapper" - - runConfigure ./configure \ - --disable-gcc-warnings - make $jobArgs -} - -INSTALL() -{ - make install -} - -TEST() -{ - make check -} diff --git a/sys-apps/diffutils/patches/diffutils-3.10.patchset b/sys-apps/diffutils/patches/diffutils-3.10.patchset new file mode 100644 index 000000000..4aabd695a --- /dev/null +++ b/sys-apps/diffutils/patches/diffutils-3.10.patchset @@ -0,0 +1,19 @@ +From 91479a6afc97d6cf97d18e337ed0a55d21f53738 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Sun, 21 Aug 2016 05:35:54 +0000 +Subject: replace /usr/bin/perl by /bin/perl in man/help2man. + + +diff --git a/man/help2man b/man/help2man +index 7f83481..c48a4dd 100755 +--- a/man/help2man ++++ b/man/help2man +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!/bin/perl -w + + # Generate a short man page from --help and --version output. + # Copyright (C) 1997-2005, 2009-2011, 2013, 2015-2023 Free Software Foundation, +-- +2.39.2 + diff --git a/sys-apps/diffutils/patches/diffutils-3.6.patchset b/sys-apps/diffutils/patches/diffutils-3.6.patchset deleted file mode 100644 index 525b6885f..000000000 --- a/sys-apps/diffutils/patches/diffutils-3.6.patchset +++ /dev/null @@ -1,133 +0,0 @@ -From 90674adfccdfa1162465f421fe4ef982ad48200c Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Tue, 9 Aug 2016 18:34:58 +0300 -Subject: gcc2 fixes - - -diff --git a/src/dir.c b/src/dir.c -index 52c320a..03e2b32 100644 ---- a/src/dir.c -+++ b/src/dir.c -@@ -265,6 +265,7 @@ diff_dirs (struct comparison const *cmp, - /* Loop while files remain in one or both dirs. */ - while (*names[0] || *names[1]) - { -+ int v1; - /* Compare next name in dir 0 with next name in dir 1. - At the end of a dir, - pretend the "next name" in that dir is very large. */ -@@ -305,7 +306,7 @@ diff_dirs (struct comparison const *cmp, - } - } - -- int v1 = (*handle_file) (cmp, -+ v1 = (*handle_file) (cmp, - 0 < nameorder ? 0 : *names[0]++, - nameorder < 0 ? 0 : *names[1]++); - if (val < v1) -@@ -363,7 +364,8 @@ find_dir_file_pathname (char const *dir, char const *file) - match = file; /* longjmp may mess up MATCH. */ - else - { -- for (char const **p = dirdata.names; *p; p++) -+ char const **p; -+ for (p = dirdata.names; *p; p++) - if (compare_names (*p, file) == 0) - { - if (file_name_cmp (*p, file) == 0) -diff --git a/src/io.c b/src/io.c -index b4ef5dc..8806b7f 100644 ---- a/src/io.c -+++ b/src/io.c -@@ -281,6 +281,8 @@ find_and_hash_each_line (struct file_data *current) - size_t column = 0; - while ((c = *p++) != '\n') - { -+ size_t repetitions = 1; -+ - if (ig_white_space & IGNORE_TRAILING_SPACE - && isspace (c)) - { -@@ -295,8 +297,6 @@ find_and_hash_each_line (struct file_data *current) - while (isspace (c1)); - } - -- size_t repetitions = 1; -- - if (ig_white_space & IGNORE_TAB_EXPANSION) - switch (c) - { -diff --git a/src/util.c b/src/util.c -index 88955da..e4435c2 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -580,7 +580,7 @@ parse_diff_color (void) - int ind_no; /* Indicator number */ - char label[3]; /* Indicator label */ - struct color_ext_type *ext; /* Extension we are working on */ -- -+ enum parse_state state = PS_START; - if ((p = color_palette) == NULL || *p == '\0') - return; - -@@ -593,7 +593,6 @@ parse_diff_color (void) - advance. */ - buf = color_buf = xstrdup (p); - -- enum parse_state state = PS_START; - while (true) - { - switch (state) --- -2.12.2 - - -From 5ca0233267788fae744ad575bdafeee076302ec4 Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Sun, 21 Aug 2016 05:35:54 +0000 -Subject: additional gcc2 patch for diffutils-3.5. - - -diff --git a/src/diff3.c b/src/diff3.c -index 5f3c7cb..08f02c3 100644 ---- a/src/diff3.c -+++ b/src/diff3.c -@@ -264,6 +264,7 @@ main (int argc, char **argv) - char *commonname; - char **file; - struct stat statb; -+ char *b0, *b1; - - exit_failure = EXIT_TROUBLE; - initialize_main (&argc, &argv); -@@ -415,7 +416,6 @@ main (int argc, char **argv) - /* Invoke diff twice on two pairs of input files, combine the two - diffs, and output them. */ - -- char *b0, *b1; - commonname = file[rev_mapping[FILEC]]; - thread1 = process_diff (file[rev_mapping[FILE1]], commonname, &last_block, &b1); - thread0 = process_diff (file[rev_mapping[FILE0]], commonname, &last_block, &b0); --- -2.12.2 - - -From 4540be8615f3170629a326546f9f93008b38dbb1 Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Sun, 21 Aug 2016 05:35:54 +0000 -Subject: replace /usr/bin/perl by /bin/perl in man/help2man. - - -diff --git a/man/help2man b/man/help2man -index 54e5a31..6c5c093 100755 ---- a/man/help2man -+++ b/man/help2man -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!/bin/perl -w - - # Generate a short man page from --help and --version output. - # Copyright (C) 1997-2005, 2009-2011, 2013, 2015-2017 Free Software Foundation, --- -2.12.2 - diff --git a/sys-apps/diffutils/patches/diffutils-3.7.patchset b/sys-apps/diffutils/patches/diffutils-3.7.patchset deleted file mode 100644 index e0c3e76cd..000000000 --- a/sys-apps/diffutils/patches/diffutils-3.7.patchset +++ /dev/null @@ -1,303 +0,0 @@ -From 264b60b3ba542c7fafcc64397252a847e8034a60 Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Tue, 9 Aug 2016 18:34:58 +0300 -Subject: gcc2 fixes - - -diff --git a/src/dir.c b/src/dir.c -index 734603e..551c0fe 100644 ---- a/src/dir.c -+++ b/src/dir.c -@@ -265,6 +265,7 @@ diff_dirs (struct comparison const *cmp, - /* Loop while files remain in one or both dirs. */ - while (*names[0] || *names[1]) - { -+ int v1; - /* Compare next name in dir 0 with next name in dir 1. - At the end of a dir, - pretend the "next name" in that dir is very large. */ -@@ -305,7 +306,7 @@ diff_dirs (struct comparison const *cmp, - } - } - -- int v1 = (*handle_file) (cmp, -+ v1 = (*handle_file) (cmp, - 0 < nameorder ? 0 : *names[0]++, - nameorder < 0 ? 0 : *names[1]++); - if (val < v1) -@@ -363,7 +364,8 @@ find_dir_file_pathname (char const *dir, char const *file) - match = file; /* longjmp may mess up MATCH. */ - else - { -- for (char const **p = dirdata.names; *p; p++) -+ char const **p; -+ for (p = dirdata.names; *p; p++) - if (compare_names (*p, file) == 0) - { - if (file_name_cmp (*p, file) == 0) -diff --git a/src/io.c b/src/io.c -index 6c03c70..5705101 100644 ---- a/src/io.c -+++ b/src/io.c -@@ -281,6 +281,8 @@ find_and_hash_each_line (struct file_data *current) - size_t column = 0; - while ((c = *p++) != '\n') - { -+ size_t repetitions = 1; -+ - if (ig_white_space & IGNORE_TRAILING_SPACE - && isspace (c)) - { -@@ -295,8 +297,6 @@ find_and_hash_each_line (struct file_data *current) - while (isspace (c1)); - } - -- size_t repetitions = 1; -- - if (ig_white_space & IGNORE_TAB_EXPANSION) - switch (c) - { -diff --git a/src/util.c b/src/util.c -index 4f4d9bb..cddec11 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -580,7 +580,7 @@ parse_diff_color (void) - int ind_no; /* Indicator number */ - char label[3]; /* Indicator label */ - struct color_ext_type *ext; /* Extension we are working on */ -- -+ enum parse_state state = PS_START; - if ((p = color_palette) == NULL || *p == '\0') - return; - -@@ -593,7 +593,6 @@ parse_diff_color (void) - advance. */ - buf = color_buf = xstrdup (p); - -- enum parse_state state = PS_START; - while (true) - { - switch (state) --- -2.19.1 - - -From dc949e176ac2be4716680d799141a327a594fded Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Sun, 21 Aug 2016 05:35:54 +0000 -Subject: additional gcc2 patch for diffutils-3.5. - - -diff --git a/src/diff3.c b/src/diff3.c -index ec414a9..59eebcd 100644 ---- a/src/diff3.c -+++ b/src/diff3.c -@@ -264,6 +264,7 @@ main (int argc, char **argv) - char *commonname; - char **file; - struct stat statb; -+ char *b0, *b1; - - exit_failure = EXIT_TROUBLE; - initialize_main (&argc, &argv); -@@ -415,7 +416,6 @@ main (int argc, char **argv) - /* Invoke diff twice on two pairs of input files, combine the two - diffs, and output them. */ - -- char *b0, *b1; - commonname = file[rev_mapping[FILEC]]; - thread1 = process_diff (file[rev_mapping[FILE1]], commonname, &last_block, &b1); - thread0 = process_diff (file[rev_mapping[FILE0]], commonname, &last_block, &b0); --- -2.19.1 - - -From e42bf41db1daa4ea086e121e48557c46ff4f0858 Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Sun, 21 Aug 2016 05:35:54 +0000 -Subject: replace /usr/bin/perl by /bin/perl in man/help2man. - - -diff --git a/man/help2man b/man/help2man -index 304985c..b6ed40b 100755 ---- a/man/help2man -+++ b/man/help2man -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!/bin/perl -w - - # Generate a short man page from --help and --version output. - # Copyright (C) 1997-2005, 2009-2011, 2013, 2015-2018 Free Software Foundation, --- -2.19.1 - - -From 7f7d8250c31613f5f11533685290d7ac93e45e95 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sat, 23 Mar 2019 17:39:40 +0100 -Subject: gcc2 patch for version 3.7. - - -diff --git a/lib/diffseq.h b/lib/diffseq.h -index 9244729..c54b54c 100644 ---- a/lib/diffseq.h -+++ b/lib/diffseq.h -@@ -200,6 +200,7 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal, - OFFSET c; /* Cost. */ - bool odd = (fmid - bmid) & 1; /* True if southeast corner is on an odd - diagonal with respect to the northwest. */ -+ bool heuristic; - - fd[fmid] = xoff; - bd[bmid] = xlim; -@@ -279,9 +280,9 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal, - continue; - - #ifdef USE_HEURISTIC -- bool heuristic = ctxt->heuristic; -+ heuristic = ctxt->heuristic; - #else -- bool heuristic = false; -+ heuristic = false; - #endif - - /* Heuristic: check occasionally for a diagonal that has made lots -diff --git a/lib/filenamecat-lgpl.c b/lib/filenamecat-lgpl.c -index f50ecc1..fc2741c 100644 ---- a/lib/filenamecat-lgpl.c -+++ b/lib/filenamecat-lgpl.c -@@ -46,6 +46,8 @@ - char * - mfile_name_concat (char const *dir, char const *base, char **base_in_result) - { -+ char *p_concat; -+ char *p; - char const *dirbase = last_component (dir); - size_t dirbaselen = base_len (dirbase); - size_t dirlen = dirbase - dir + dirbaselen; -@@ -67,8 +69,7 @@ mfile_name_concat (char const *dir, char const *base, char **base_in_result) - sep = '.'; - } - -- char *p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); -- char *p; -+ p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); - - if (p_concat == NULL) - return NULL; -diff --git a/lib/mktime.c b/lib/mktime.c -index 9c3fb20..a344bb4 100644 ---- a/lib/mktime.c -+++ b/lib/mktime.c -@@ -271,6 +271,9 @@ static struct tm * - ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), - long_int *t, struct tm *tp) - { -+ long_int bad; -+ long_int ok; -+ struct tm oktm; - long_int t1 = (*t < mktime_min ? mktime_min - : *t <= mktime_max ? *t : mktime_max); - struct tm *r = convert_time (convert, t1, tp); -@@ -282,9 +285,9 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), - if (errno != EOVERFLOW) - return NULL; - -- long_int bad = t1; -- long_int ok = 0; -- struct tm oktm; oktm.tm_sec = -1; -+ bad = t1; -+ ok = 0; -+ oktm.tm_sec = -1; - - /* BAD is a known out-of-range value, and OK is a known in-range one. - Use binary search to narrow the range between BAD and OK until -@@ -366,6 +369,8 @@ __mktime_internal (struct tm *tp, - int negative_offset_guess; - - int sec_requested = sec; -+ long_int t0; -+ long_int t, t1, t2; - - if (LEAP_SECONDS_POSSIBLE) - { -@@ -381,18 +386,19 @@ __mktime_internal (struct tm *tp, - time. */ - - INT_SUBTRACT_WRAPV (0, off, &negative_offset_guess); -- long_int t0 = ydhms_diff (year, yday, hour, min, sec, -+ t0 = ydhms_diff (year, yday, hour, min, sec, - EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - negative_offset_guess); -- long_int t = t0, t1 = t0, t2 = t0; -+ t = t0, t1 = t0, t2 = t0; - - /* Repeatedly use the error to improve the guess. */ - - while (true) - { -+ long_int dt; - if (! ranged_convert (convert, &t, &tm)) - return -1; -- long_int dt = tm_diff (year, yday, hour, min, sec, &tm); -+ dt = tm_diff (year, yday, hour, min, sec, &tm); - if (dt == 0) - break; - -@@ -524,13 +530,15 @@ __mktime_internal (struct tm *tp, - time_t - mktime (struct tm *tp) - { -+# if defined _LIBC || NEED_MKTIME_WORKING -+ static mktime_offset_t localtime_offset; -+#endif - /* POSIX.1 8.1.1 requires that whenever mktime() is called, the - time zone names contained in the external variable 'tzname' shall - be set as if the tzset() function had been called. */ - __tzset (); - - # if defined _LIBC || NEED_MKTIME_WORKING -- static mktime_offset_t localtime_offset; - return __mktime_internal (tp, __localtime_r, &localtime_offset); - # else - # undef mktime -diff --git a/lib/regexec.c b/lib/regexec.c -index c7d099c..00d171f 100644 ---- a/lib/regexec.c -+++ b/lib/regexec.c -@@ -3346,12 +3346,13 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) - goto out_free; - - /* Avoid arithmetic overflow in size calculation. */ -+ { - size_t ndests_max - = ((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) - / (3 * sizeof (re_dfastate_t *))); - if (__glibc_unlikely (ndests_max < ndests)) - goto out_free; -- -+ } - if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX - + ndests * 3 * sizeof (re_dfastate_t *))) - dest_states = (re_dfastate_t **) -diff --git a/src/io.c b/src/io.c -index 5705101..fe49ee4 100644 ---- a/src/io.c -+++ b/src/io.c -@@ -487,10 +487,11 @@ prepare_text (struct file_data *current) - if (strip_trailing_cr) - { - char *srclim = p + buffered; -- *srclim = '\r'; - char *dst = rawmemchr (p, '\r'); -+ char const *src; -+ *srclim = '\r'; - -- for (char const *src = dst; src != srclim; src++) -+ for (src = dst; src != srclim; src++) - { - src += *src == '\r' && src[1] == '\n'; - *dst++ = *src; --- -2.19.1 - diff --git a/sys-apps/diffutils/patches/diffutils-3.8.patchset b/sys-apps/diffutils/patches/diffutils-3.8.patchset deleted file mode 100644 index 008ac65e8..000000000 --- a/sys-apps/diffutils/patches/diffutils-3.8.patchset +++ /dev/null @@ -1,283 +0,0 @@ -From f7edd6dab1f29779a4d064acee61cce6ce7ecbe9 Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Tue, 9 Aug 2016 18:34:58 +0300 -Subject: gcc2 fixes - - -diff --git a/src/dir.c b/src/dir.c -index 01a32ab..523f860 100644 ---- a/src/dir.c -+++ b/src/dir.c -@@ -265,6 +265,7 @@ diff_dirs (struct comparison const *cmp, - /* Loop while files remain in one or both dirs. */ - while (*names[0] || *names[1]) - { -+ int v1; - /* Compare next name in dir 0 with next name in dir 1. - At the end of a dir, - pretend the "next name" in that dir is very large. */ -@@ -305,7 +306,7 @@ diff_dirs (struct comparison const *cmp, - } - } - -- int v1 = (*handle_file) (cmp, -+ v1 = (*handle_file) (cmp, - 0 < nameorder ? 0 : *names[0]++, - nameorder < 0 ? 0 : *names[1]++); - if (val < v1) -@@ -363,7 +364,8 @@ find_dir_file_pathname (char const *dir, char const *file) - match = file; /* longjmp may mess up MATCH. */ - else - { -- for (char const **p = dirdata.names; *p; p++) -+ char const **p; -+ for (p = dirdata.names; *p; p++) - if (compare_names (*p, file) == 0) - { - if (file_name_cmp (*p, file) == 0) -diff --git a/src/io.c b/src/io.c -index 1f0e040..91d27c9 100644 ---- a/src/io.c -+++ b/src/io.c -@@ -281,6 +281,8 @@ find_and_hash_each_line (struct file_data *current) - size_t column = 0; - while ((c = *p++) != '\n') - { -+ size_t repetitions = 1; -+ - if (ig_white_space & IGNORE_TRAILING_SPACE - && isspace (c)) - { -@@ -295,8 +297,6 @@ find_and_hash_each_line (struct file_data *current) - while (isspace (c1)); - } - -- size_t repetitions = 1; -- - if (ig_white_space & IGNORE_TAB_EXPANSION) - switch (c) - { -diff --git a/src/util.c b/src/util.c -index 4348757..7772ebc 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -580,7 +580,7 @@ parse_diff_color (void) - int ind_no; /* Indicator number */ - char label[3]; /* Indicator label */ - struct color_ext_type *ext; /* Extension we are working on */ -- -+ enum parse_state state = PS_START; - if ((p = color_palette) == NULL || *p == '\0') - return; - -@@ -593,7 +593,6 @@ parse_diff_color (void) - advance. */ - buf = color_buf = xstrdup (p); - -- enum parse_state state = PS_START; - while (true) - { - switch (state) --- -2.30.2 - - -From b3d9fbef01fe56c14e5a73045abef9c3cbe07359 Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Sun, 21 Aug 2016 05:35:54 +0000 -Subject: additional gcc2 patch for diffutils-3.5. - - -diff --git a/src/diff3.c b/src/diff3.c -index 6be7e3c..7da42e2 100644 ---- a/src/diff3.c -+++ b/src/diff3.c -@@ -266,6 +266,7 @@ main (int argc, char **argv) - char *commonname; - char **file; - struct stat statb; -+ char *b0, *b1; - - exit_failure = EXIT_TROUBLE; - initialize_main (&argc, &argv); -@@ -420,7 +421,6 @@ main (int argc, char **argv) - /* Invoke diff twice on two pairs of input files, combine the two - diffs, and output them. */ - -- char *b0, *b1; - commonname = file[rev_mapping[FILEC]]; - thread1 = process_diff (file[rev_mapping[FILE1]], commonname, &last_block, &b1); - thread0 = process_diff (file[rev_mapping[FILE0]], commonname, &last_block, &b0); --- -2.30.2 - - -From 851998203df07998ea151c9afcb4fe74c3b199ab Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Sun, 21 Aug 2016 05:35:54 +0000 -Subject: replace /usr/bin/perl by /bin/perl in man/help2man. - - -diff --git a/man/help2man b/man/help2man -index 49a76e5..cc42446 100755 ---- a/man/help2man -+++ b/man/help2man -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!/bin/perl -w - - # Generate a short man page from --help and --version output. - # Copyright (C) 1997-2005, 2009-2011, 2013, 2015-2021 Free Software Foundation, --- -2.30.2 - - -From 34606b3643b0dec0654e69f8e682f27fc83316ed Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sat, 23 Mar 2019 17:39:40 +0100 -Subject: gcc2 patch for version 3.7. - - -diff --git a/lib/diffseq.h b/lib/diffseq.h -index 1cac430..bb9ecbe 100644 ---- a/lib/diffseq.h -+++ b/lib/diffseq.h -@@ -200,6 +200,7 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal, - OFFSET c; /* Cost. */ - bool odd = (fmid - bmid) & 1; /* True if southeast corner is on an odd - diagonal with respect to the northwest. */ -+ bool heuristic; - - fd[fmid] = xoff; - bd[bmid] = xlim; -@@ -279,9 +280,9 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal, - continue; - - #ifdef USE_HEURISTIC -- bool heuristic = ctxt->heuristic; -+ heuristic = ctxt->heuristic; - #else -- bool heuristic = false; -+ heuristic = false; - #endif - - /* Heuristic: check occasionally for a diagonal that has made lots -diff --git a/lib/filenamecat-lgpl.c b/lib/filenamecat-lgpl.c -index d52dc80..c02ff69 100644 ---- a/lib/filenamecat-lgpl.c -+++ b/lib/filenamecat-lgpl.c -@@ -47,6 +47,8 @@ - char * - mfile_name_concat (char const *dir, char const *base, char **base_in_result) - { -+ char *p_concat; -+ char *p; - char const *dirbase = last_component (dir); - size_t dirbaselen = base_len (dirbase); - size_t dirlen = dirbase - dir + dirbaselen; -@@ -68,7 +70,7 @@ mfile_name_concat (char const *dir, char const *base, char **base_in_result) - sep = '.'; - } - -- char *p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); -+ p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); - if (p_concat == NULL) - return NULL; - -diff --git a/lib/mktime.c b/lib/mktime.c -index ae721c7..2c0dd0f 100644 ---- a/lib/mktime.c -+++ b/lib/mktime.c -@@ -270,6 +270,9 @@ static struct tm * - ranged_convert (struct tm *(*convert) (const __time64_t *, struct tm *), - long_int *t, struct tm *tp) - { -+ long_int bad; -+ long_int ok; -+ struct tm oktm; - long_int t1 = (*t < mktime_min ? mktime_min - : *t <= mktime_max ? *t : mktime_max); - struct tm *r = convert_time (convert, t1, tp); -@@ -281,9 +284,9 @@ ranged_convert (struct tm *(*convert) (const __time64_t *, struct tm *), - if (errno != EOVERFLOW) - return NULL; - -- long_int bad = t1; -- long_int ok = 0; -- struct tm oktm; oktm.tm_sec = -1; -+ bad = t1; -+ ok = 0; -+ oktm.tm_sec = -1; - - /* BAD is a known out-of-range value, and OK is a known in-range one. - Use binary search to narrow the range between BAD and OK until -@@ -365,6 +368,8 @@ __mktime_internal (struct tm *tp, - int negative_offset_guess; - - int sec_requested = sec; -+ long_int t0; -+ long_int t, t1, t2; - - if (LEAP_SECONDS_POSSIBLE) - { -@@ -380,18 +385,19 @@ __mktime_internal (struct tm *tp, - time. */ - - INT_SUBTRACT_WRAPV (0, off, &negative_offset_guess); -- long_int t0 = ydhms_diff (year, yday, hour, min, sec, -+ t0 = ydhms_diff (year, yday, hour, min, sec, - EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - negative_offset_guess); -- long_int t = t0, t1 = t0, t2 = t0; -+ t = t0, t1 = t0, t2 = t0; - - /* Repeatedly use the error to improve the guess. */ - - while (true) - { -+ long_int dt; - if (! ranged_convert (convert, &t, &tm)) - return -1; -- long_int dt = tm_diff (year, yday, hour, min, sec, &tm); -+ dt = tm_diff (year, yday, hour, min, sec, &tm); - if (dt == 0) - break; - -@@ -523,13 +529,15 @@ __mktime_internal (struct tm *tp, - __time64_t - __mktime64 (struct tm *tp) - { -+# if defined _LIBC || NEED_MKTIME_WORKING -+ static mktime_offset_t localtime_offset; -+#endif - /* POSIX.1 8.1.1 requires that whenever mktime() is called, the - time zone names contained in the external variable 'tzname' shall - be set as if the tzset() function had been called. */ - __tzset (); - - # if defined _LIBC || NEED_MKTIME_WORKING -- static mktime_offset_t localtime_offset; - return __mktime_internal (tp, __localtime64_r, &localtime_offset); - # else - # undef mktime -diff --git a/src/io.c b/src/io.c -index 91d27c9..421f96b 100644 ---- a/src/io.c -+++ b/src/io.c -@@ -487,10 +487,11 @@ prepare_text (struct file_data *current) - if (strip_trailing_cr) - { - char *srclim = p + buffered; -- *srclim = '\r'; - char *dst = rawmemchr (p, '\r'); -+ char const *src; -+ *srclim = '\r'; - -- for (char const *src = dst; src != srclim; src++) -+ for (src = dst; src != srclim; src++) - { - src += *src == '\r' && src[1] == '\n'; - *dst++ = *src; --- -2.30.2 -