summaryrefslogtreecommitdiff
path: root/app-misc/bfr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-31 15:12:39 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-31 15:12:39 +0100
commit2cfae1fadeca2d0c51a301318c96c2cf5073eb6f (patch)
tree711cd9c9044cc9edd306df0c2c17f06558024a29 /app-misc/bfr
parent100ce16c6fb75a4911f388aa77f860324607c869 (diff)
gentoo auto-resync : 31:07:2022 - 15:12:39
Diffstat (limited to 'app-misc/bfr')
-rw-r--r--app-misc/bfr/Manifest3
-rw-r--r--app-misc/bfr/bfr-1.6-r4.ebuild (renamed from app-misc/bfr/bfr-1.6-r3.ebuild)11
-rw-r--r--app-misc/bfr/files/bfr-1.6-long-types.patch124
3 files changed, 133 insertions, 5 deletions
diff --git a/app-misc/bfr/Manifest b/app-misc/bfr/Manifest
index 572e2d87d631..3a2133d09829 100644
--- a/app-misc/bfr/Manifest
+++ b/app-misc/bfr/Manifest
@@ -1,4 +1,5 @@
+AUX bfr-1.6-long-types.patch 3638 BLAKE2B 251050b40495293b2ed9c3a27b12584a9556a92194338714294129cf74faa5e5cc45e1f139da7ebff4322750593a9b3a04c2190edff6acf81e34d65df6b8d084 SHA512 dd9067e5d8cc323f069bb1f7e6866a1948a6426ac71541e0855d7a2ce595aa4ffcc49f78413604b86c7b871d5788339382b89136a7a8628ba320b8288244c5f0
AUX bfr-1.6-perl.patch 326 BLAKE2B b5e5273b8cd5e198d5c3dd76740d7d3e8588571e29822095ffe3b0eb50a85d6422163aca0774d8de955c64bf066ffc445d3e140eb5dcb4d06e39274c07e8e6fe SHA512 8f65f5113b60a6cbe692b9b2cbf02a7a7b3f046a6a5203cc05cae7a08e1344afd5ababa41608d334d5d1f04afb0eb2bf705622056c5620626805eec41351ffc3
DIST bfr-1.6.tar.bz2 81002 BLAKE2B 24339eb7e882ca319b29a2a5e033ccfd6a0abe920572d4f023b4ad0321e2e9ce3096c3aba317bada297f9d17bbe368edf08cddd903377e99f5cc2a1dda7261ea SHA512 19939218029219cc328e3efb8e799bb8c755ccff7b8cb81ba0c735d499a48f581aa42322045fdbd153dcfdb8792e84d9fddbfba9e9c5d94675e2830163936762
-EBUILD bfr-1.6-r3.ebuild 472 BLAKE2B 69448e3a3679eda1132337a9266cea69104d86e99e1a011a3b4a9063eeb60feacfa87de4fdc1e257e6dbf1d53fc007a8c068cfdfa2d5f338ba6ca1a7854d4452 SHA512 24963a3e7643e5fc836aba516036a0c8490f69c8d0d259b93f5f9637f4ff041ec9b5cd81e73df16390c86a78b825e5d5ea8651ee9c8a87157c3ffa4994190f00
+EBUILD bfr-1.6-r4.ebuild 511 BLAKE2B 1add19dd4e7993d4553b2b926f8307ca9b9e40b2145c5f640a852b3861ba8a237036c833495e15e095544ea41c785383293d3fe0c6a7cd9bebfba28925e5bfe2 SHA512 c6224795facd6d345295137fbf0e3ba9bf3d6cfc2c78f6728f562705fa91e598698cd1c3a89d171f9a7f35d9f444783cfa5189493a006c640c82b87516fe8e67
MISC metadata.xml 272 BLAKE2B a253052dbe7dfd2dea2cdc3692698a5a94d0e2414979a348d56448cee6329b7fe29a1f252146f9ff04c1ea3b270996631395ecea454ac901eb726dc0b4dd9f29 SHA512 247c1006dd352c3cc7ee07dee2f283394767bdc0f72f0438a6cc845ac53549c05b3741c64ffedb992f003759e67f24aaa7121561db97d1b095c11269115746dc
diff --git a/app-misc/bfr/bfr-1.6-r3.ebuild b/app-misc/bfr/bfr-1.6-r4.ebuild
index 686e7fe594b8..c12eec636233 100644
--- a/app-misc/bfr/bfr-1.6-r3.ebuild
+++ b/app-misc/bfr/bfr-1.6-r4.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit toolchain-funcs
@@ -13,9 +13,12 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc ppc64 sparc x86"
-DEPEND="dev-lang/perl"
+BDEPEND="dev-lang/perl"
-PATCHES=( "${FILESDIR}/${P}-perl.patch" )
+PATCHES=(
+ "${FILESDIR}"/${P}-perl.patch
+ "${FILESDIR}"/${P}-long-types.patch
+)
src_configure() {
tc-export CC
diff --git a/app-misc/bfr/files/bfr-1.6-long-types.patch b/app-misc/bfr/files/bfr-1.6-long-types.patch
new file mode 100644
index 000000000000..d14010b13516
--- /dev/null
+++ b/app-misc/bfr/files/bfr-1.6-long-types.patch
@@ -0,0 +1,124 @@
+--- a/bfr.c
++++ b/bfr.c
+@@ -222,7 +222,7 @@
+ temp = tv.tv_sec - prev_spit_s;
+ if(((temp*1000000UL) + (tv.tv_usec - prev_spit_u) > 1000000UL)) {
+ unsigned long long thistime;
+- int i, point1, point2;
++ long i, point1, point2;
+ switch(p_rate) {
+ case 1000 : units1 = "t/s";
+ break;
+@@ -309,7 +309,8 @@
+ * if we get an error, go to WO mode
+ */
+
+- int retval, wantedbytes;
++ int retval;
++ long wantedbytes;
+ retval = wantedbytes = 0;
+
+ if(readptr == bufsize) {
+@@ -373,8 +374,8 @@
+ return 0;
+ }
+
+-int bytes_to_write() {
+- int wantedbytes = 0;
++long bytes_to_write() {
++ long wantedbytes = 0;
+ if(writeptr == bufsize) {
+ writeptr = 0;
+ if(readptr == 0)
+@@ -392,7 +393,7 @@
+ debug("write type 2: ");
+ }
+ if(cap) {
+- int temp;
++ long temp;
+ temp = cap - run_avg_o;
+ temp -= written_this_time;
+ if(temp < 0) {
+@@ -415,7 +416,8 @@
+ * also check to see if we can go to mode RW from mode BF
+ */
+
+- int retval, wantedbytes;
++ int retval;
++ long wantedbytes;
+ retval = 0;
+
+ if(writeptr == 0) {
+@@ -520,12 +522,12 @@
+
+ /* the main program *gasp* */
+ int main(int argc, char *argv[]) {
+- int finished, retval, filenames, maxval, capping, should_fork;
++ long finished, retval, maxval, capping, should_fork;
+ fd_set readfds, writefds, exceptfds;
+ struct timeval thetime;
+ char *optstr, tch;
+ char *opt_bufsize, *opt_timeout, *opt_cap, *opt_throttle, *opt_min, *opt_init, *opt_progress, *outdev;
+- int temp;
++ long temp;
+
+ /* defaults */
+ opt_min = "10%";
+@@ -545,7 +547,6 @@
+ writeptr = 0;
+ readptr = 0;
+ total_written = 0;
+- filenames = 0;
+ mystate = IN;
+ stdin_mode = 1;
+ #ifdef DEBUG
+@@ -704,7 +705,8 @@
+ if(should_fork) {
+ int mypipe[2], rv;
+ verbose("forking\n");
+- pipe(mypipe);
++ if(pipe(mypipe))
++ exit(fprintf(stderr,"No pipe!\n"));
+ rv = fork();
+ if(!rv) {
+ bufsize = 10240;
+@@ -727,7 +729,7 @@
+ infd = open(argv[my_optind],O_RDONLY);
+ if(infd == -1)
+ exit(fprintf(stderr,"Cannot open file: %s\n",argv[my_optind]));
+- verbose("opening file %s: %i\n",argv[my_optind],infd);
++ verbose("opening file %s: %li\n",argv[my_optind],infd);
+ stdin_mode = 0;
+ }
+ my_optind++;
+@@ -735,7 +737,7 @@
+
+ buffer = (char *)malloc(bufsize);
+ if(buffer == NULL) {
+- fprintf(stderr,"malloc()ing a buffer of size %i failed!\n",bufsize);
++ fprintf(stderr,"malloc()ing a buffer of size %li failed!\n",bufsize);
+ fprintf(stderr,"Perhaps you don't have enough memory, perhaps you've\n");
+ fprintf(stderr,"exceeded a memory usage quota.\n");
+ exit(1);
+@@ -869,7 +871,7 @@
+ if(my_optind < argc) {
+ if(strcmp("-",argv[my_optind])) {
+ infd = open(argv[my_optind],O_RDONLY|O_NONBLOCK);
+- verbose("opening file %s: %i\n",argv[my_optind],infd);
++ verbose("opening file %s: %li\n",argv[my_optind],infd);
+ if(infd == -1)
+ perror(NAME);
+ } else {
+--- a/bfr.h
++++ b/bfr.h
+@@ -62,8 +62,8 @@
+ unsigned char verbose, progress;
+ state mystate;
+ char *modestrings[] = {"IN","RO","BF","WO","RW"};
+-int initial, threshold, bufsize, writeptr, readptr, timeout, infd, outfd, throttle, my_optind, stdin_mode, p_units, p_rate, p_cdmode, p_mode, cap;
+-int prev_rp = 0, prev_wp = 0, run_avg_t = 0, prev_ts = 0, prev_tu, thetimes, thetimeu, written_this_time = 0;
++long initial, threshold, bufsize, writeptr, readptr, timeout, infd, outfd, throttle, my_optind, stdin_mode, p_units, p_rate, p_cdmode, p_mode, cap;
++long prev_rp = 0, prev_wp = 0, run_avg_t = 0, prev_ts = 0, prev_tu, thetimes, thetimeu, written_this_time = 0;
+ unsigned long run_avg_i, run_avg_o;
+ unsigned long long total_written;
+ struct timeval tv;