summaryrefslogtreecommitdiff
path: root/app-accessibility/nfbtrans
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-11 05:45:51 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-11 05:45:51 +0100
commit980af9d76d4b7d7541b41eeff427e5cbd5cf7ec3 (patch)
tree0b86d672e967b7f78ba20788fd85818efd54dc01 /app-accessibility/nfbtrans
parentf356af92b88d56b78588e81310493d4f5a2f6d18 (diff)
gentoo auto-resync : 11:05:2023 - 05:45:51
Diffstat (limited to 'app-accessibility/nfbtrans')
-rw-r--r--app-accessibility/nfbtrans/Manifest2
-rw-r--r--app-accessibility/nfbtrans/files/nfbtrans-7.74-modern-c.patch98
-rw-r--r--app-accessibility/nfbtrans/nfbtrans-7.74-r3.ebuild49
3 files changed, 149 insertions, 0 deletions
diff --git a/app-accessibility/nfbtrans/Manifest b/app-accessibility/nfbtrans/Manifest
index 9e231bca6bc7..44060884b622 100644
--- a/app-accessibility/nfbtrans/Manifest
+++ b/app-accessibility/nfbtrans/Manifest
@@ -1,6 +1,8 @@
AUX nfbtrans-7.74-gentoo-fix.patch 237 BLAKE2B 79966d78a265660633d8e6ad89c2f10a30c94ff5cfaff0cb9e336f0bcdc7d40b2c031b5f69c6b470e1407fd785325bbfdf5c446c3cd3f7766693fd364a20e397 SHA512 9ecd42454f7ef9f00e0a3c1a4eccd8a3dd3df02bb0653acf5fd9b570b2d7d49f126b0db19a3f571d0d1130d73670d317bea42b0e1d894ff785ad8b8f6dc3cef7
AUX nfbtrans-7.74-getline-fix.patch 880 BLAKE2B 67afefad755a077d949cb492a37af44f275693be3291218882a475059103fc8cf526d67a153c671b51a6f8e80e72ebb4b739e68680285f6b70c2a044f962c078 SHA512 bec4b16259ffb15a396542525ddb5dd8a72da5d4a73b108ee41dd005d00c978d3991d69a5b4cacc963c27a8b186305c619fc3c41860d40fbcaa41843d2fc168d
+AUX nfbtrans-7.74-modern-c.patch 2993 BLAKE2B 204cfed94e38fdd6b152766ec3b46c8a90b65e759cc0171da88f9b08b924180e07d5fded313c08e9ab9c9bc0b9dbbe75fe45abf4e1fd61acfebf94013e5940d5 SHA512 d4a7a5de432256d99de43fd4625cd23717bd1dbd4d2849bc00508840671462e71c232397ac0cfa1e2e007df0e95284d485407be94bf60be4543dd4b125a717fe
AUX nfbtrans-7.74-respect-ldflags.patch 620 BLAKE2B 672883ec0b74c2eb0657756d56f2ee862c676844192a293e4139d0dd76548b6e6c047eb530e96f66eb4e398ffc4304c124d50ba59ebcf440cde59ad219c39ec3 SHA512 65f6c0752ea4ca8badfad0322b8709f7f55cb1e55a57ba2bc4edb0a748584a9c725a9cf9836a67df02d7b9b158f8b46ddae711a1b5d368ed56728a2495272eb1
DIST nfbtr774.zip 470847 BLAKE2B 54dd9b612c6dda0734d5b21c1ed8b0d428663d2b442406cb36276afd1a6c0b742ddcb4848954a0bbdd29cb300dab6a55dd9b3bafeb603b08ef6a7e678c0d9a86 SHA512 58fa72c53d88d11fa005572f4e2ebd81d21afaec2fac0e986bfad66b42c194ec3573199e2f2b863725001c1cb777b60881605a1533f7eb73e31e24a244673c2c
EBUILD nfbtrans-7.74-r2.ebuild 953 BLAKE2B 384239e2ad6daefb5f3088f9058bdc8a990b5f031f7fba531f16532ea38e5038b411afb3b3db788b143529950c33b4c2f4ff3709ba030523db582ccdd6fcef8b SHA512 2221fe80b7ad10e1e09a12552f1604451c38b66edadf39353eaf99ea885a8ee3222a8f8cfcc6e1a174d92f358bd3a9daa1da19ec872c08d43ad65eecc7d60197
+EBUILD nfbtrans-7.74-r3.ebuild 990 BLAKE2B f6d777201708fc7e8fed4bfcf2d827a5895d010c46b58fd9c8e5e8b1fca9e2fb80df4aea0f90b502e6e77f18b19ab51c0b185bb2029d3a86e5bb446f8178f12c SHA512 2924c5e28357cba72af7f57cc4d1a4f071392c34a5869158e752a6f3f0b23ff45de52dab196fe2ae1e23817187f88c3acd0f4b49bb29eb03571547cdfded14bf
MISC metadata.xml 346 BLAKE2B 7e1272166e3d172f7228c972568c726842ae777ba6a347e8142de8736bebc86d2312d68fcde332947b03c48a7d388371b9f8a231fbcb4b0f37077615ee6f2645 SHA512 b6a500e0266cc804bd2b3b15dd1555801dd2afa30dde160264c6745e55f67576dbc980112c23982d378824d6681ae28e993dcfe48f99b9c5b5eef0092faab4d5
diff --git a/app-accessibility/nfbtrans/files/nfbtrans-7.74-modern-c.patch b/app-accessibility/nfbtrans/files/nfbtrans-7.74-modern-c.patch
new file mode 100644
index 000000000000..7752655138fe
--- /dev/null
+++ b/app-accessibility/nfbtrans/files/nfbtrans-7.74-modern-c.patch
@@ -0,0 +1,98 @@
+https://bugs.gentoo.org/874390
+
+Fix -Wimplicit-function-declaration and -Wformat-security.
+--- a/NFBTRANS.C
++++ b/NFBTRANS.C
+@@ -8,10 +8,12 @@
+ #else
+ #define UNIX_PATH "/etc/nfbtrans/"
+ #endif /* unix */
+-#include <stdio.h>
++#include <ctype.h>
++#include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #ifdef DOS
+ #include <io.h>
+ #include <string.h>
+@@ -132,6 +134,12 @@ char *output_extension[2] = {".brf", ".txt"};
+ int paramcount;
+ char **paramstr;
+
++void strnset(char *string, char c, short n);
++int strcmpi(char *s1, char *s2);
++void unbuf_stdin();
++void restore_stdin();
++void save_stdin();
++
+ typedef struct
+ {
+ char *name;
+@@ -5130,7 +5138,7 @@ void insert_hyphen_word(int date_only)
+ field[l - 1] = 0; /* remove lf */
+ if (!lines)
+ { /* first line */
+- fprintf(tempfile, date_string);
++ fprintf(tempfile, "%s", date_string);
+ cptr = strchr(field, 'A');
+ if (cptr)
+ strcpy(field, cptr); /* get rid of date */
+@@ -5341,7 +5349,7 @@ void test_hyphen_dictionary(int mode)
+ /* open for r+ */
+ open_hyp_dictionary(hyphen_dic_name, 3, 1);
+ rewind(hyp_dic_ptr);
+- fprintf(hyp_dic_ptr, date_string);
++ fprintf(hyp_dic_ptr, "%s", date_string);
+ open_hyp_dictionary(hyphen_dic_name, 3, 2);
+ } /* date found on first line */
+ else
+@@ -6511,7 +6519,7 @@ void translate_file()
+ { /* no file args */
+ if (!indirect_ptr)
+ {
+- fprintf(stderr, menu[10]);
++ fprintf(stderr, "%s", menu[10]);
+ get_input(temp, 80);
+ if (!temp[0])
+ exit_program(0);
+@@ -6709,9 +6717,9 @@ void translate_file()
+ if (!trans_mode1)
+ { /* get secondary translation mode */
+ i = (trans_default / 10);
+- fprintf(stderr, menu[0]);
++ fprintf(stderr, "%s", menu[0]);
+ for (j = 5; j < 8; j++)
+- fprintf(stderr, menu[j]);
++ fprintf(stderr, "%s", menu[j]);
+ backspace_int(i);
+ do
+ {
+@@ -6744,7 +6752,7 @@ void translate_file()
+ } /* construct output name */
+ else
+ { /* prompt */
+- fprintf(stderr, menu[11]);
++ fprintf(stderr, "%s", menu[11]);
+ get_input(outf_name, MAXPATHLEN - 1);
+ } /* prompt */
+ if (!outf_name[0])
+@@ -7110,7 +7118,7 @@ void get_page_range()
+ if (pageend < pagestart)
+ { /* pageend */
+ pageend = 9999;
+- fprintf(stderr, menu[9]);
++ fprintf(stderr, "%s", menu[9]);
+ backspace_int(pageend);
+ get_input(temp, 5);
+ get_end_page(temp);
+@@ -7481,7 +7489,7 @@ int main(int argc, char *argv[])
+ { /* choose mode */
+ j = (trans_default % 10);
+ for (i = 0; i < 4; i++)
+- fprintf(stderr, menu[i]);
++ fprintf(stderr, "%s", menu[i]);
+ while (trans_mode < 1 || trans_mode > 3)
+ {
+ fprintf(stderr, "\n%s", menu[4]);
diff --git a/app-accessibility/nfbtrans/nfbtrans-7.74-r3.ebuild b/app-accessibility/nfbtrans/nfbtrans-7.74-r3.ebuild
new file mode 100644
index 000000000000..6e3e0b89805f
--- /dev/null
+++ b/app-accessibility/nfbtrans/nfbtrans-7.74-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Braille translator from the National Federation of the Blind"
+HOMEPAGE="http://www.nfbnet.org/download/nfbtrans.htm"
+SRC_URI="http://www.nfb.org/Images/nfb/Products_Technology/nfbtr$(ver_rs 1-2 '').zip"
+S="${WORKDIR}"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+BDEPEND=">=app-arch/unzip-5.50-r2"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo-fix.patch
+ "${FILESDIR}"/${P}-getline-fix.patch
+ "${FILESDIR}"/${P}-respect-ldflags.patch
+ "${FILESDIR}"/${P}-modern-c.patch
+)
+
+src_prepare() {
+ mv MAKEFILE Makefile || die
+ mv SPANISH.ZIP spanish.zip || die
+
+ default
+
+ emake lowercase
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBS= \
+ CFLAGS="${CFLAGS} -DLINUX" \
+ LDFLAGS="${LDFLAGS}" \
+ all
+}
+
+src_install() {
+ dobin nfbtrans
+ dodoc *fmt readme.txt makedoc
+ insinto /etc/nfbtrans
+ doins *cnf *tab *dic spell.dat *zip
+}