diff options
author | Andreas Steinmetz <ast@domdv.de> | 2022-07-31 14:31:57 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2022-07-31 14:31:57 +0200 |
commit | 0f3a2656dfde8de6278d54bb7c9aae5b93e14ec1 (patch) | |
tree | 1280d30a46dd085db4a103d4bbad696f62be8d48 /app-misc/bfr | |
parent | app-misc/astrolog: drop 5.40-r3 (diff) | |
download | gentoo-0f3a2656dfde8de6278d54bb7c9aae5b93e14ec1.tar.gz gentoo-0f3a2656dfde8de6278d54bb7c9aae5b93e14ec1.tar.bz2 gentoo-0f3a2656dfde8de6278d54bb7c9aae5b93e14ec1.zip |
app-misc/bfr: update EAPI 6 -> 8
Closes: https://bugs.gentoo.org/629688
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-misc/bfr')
-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.patch | 124 |
2 files changed, 131 insertions, 4 deletions
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; |