* [gentoo-commits] repo/gentoo:master commit in: app-accessibility/nfbtrans/files/, app-accessibility/nfbtrans/
@ 2017-06-13 16:37 William Hubbs
0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2017-06-13 16:37 UTC (permalink / raw
To: gentoo-commits
commit: edc9fec4b7cfd3d8c0095b33e3a32f2bcbb54586
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 13 16:35:05 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jun 13 16:37:04 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edc9fec4
app-accessibility/nfbtrans: 7.74-r2 revbump for #621510 and #395281
Package-Manager: Portage-2.3.5, Repoman-2.3.1
.../nfbtrans/files/nfbtrans-7.74-gentoo-fix.patch | 4 +-
.../files/nfbtrans-7.74-respect-ldflags.patch | 24 +++++++++++
app-accessibility/nfbtrans/nfbtrans-7.74-r2.ebuild | 46 ++++++++++++++++++++++
3 files changed, 72 insertions(+), 2 deletions(-)
diff --git a/app-accessibility/nfbtrans/files/nfbtrans-7.74-gentoo-fix.patch b/app-accessibility/nfbtrans/files/nfbtrans-7.74-gentoo-fix.patch
index b44f5bc207c..7040de343db 100644
--- a/app-accessibility/nfbtrans/files/nfbtrans-7.74-gentoo-fix.patch
+++ b/app-accessibility/nfbtrans/files/nfbtrans-7.74-gentoo-fix.patch
@@ -1,5 +1,5 @@
---- nfbtrans.c.orig 2004-09-21 19:52:34.341784094 -0500
-+++ nfbtrans.c 2004-09-21 19:54:07.005727168 -0500
+--- a/nfbtrans.c 2004-09-21 19:52:34.341784094 -0500
++++ b/nfbtrans.c 2004-09-21 19:54:07.005727168 -0500
@@ -6,7 +6,7 @@
#define LINT_ARGS
#define DOS
diff --git a/app-accessibility/nfbtrans/files/nfbtrans-7.74-respect-ldflags.patch b/app-accessibility/nfbtrans/files/nfbtrans-7.74-respect-ldflags.patch
new file mode 100644
index 00000000000..61c991c8a36
--- /dev/null
+++ b/app-accessibility/nfbtrans/files/nfbtrans-7.74-respect-ldflags.patch
@@ -0,0 +1,24 @@
+--- a/Makefile 2017-06-13 11:08:23.428114301 -0500
++++ b/Makefile 2017-06-13 11:09:01.084376256 -0500
+@@ -28,10 +28,10 @@
+ djgppall: nfbtrans.exe
+
+ nfbtrans: $(OBJFILES)
+- $(CC) $(CFLAGS) $(OBJFILES) $(LIBS) -o nfbtrans
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJFILES) $(LIBS) -o nfbtrans
+
+ nfbtrans.exe:$(OBJFILES)
+- $(CC) $(CFLAGS) $(OBJFILES) -o nfbtrans.exe
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJFILES) -o nfbtrans.exe
+
+ ultrix:
+ $(MAKE) CFLAGS=-O
+@@ -44,7 +44,7 @@
+
+ insight:
+ insight -fno-builtin -fwritable-strings \
+- $(CFLAGS) $(OBJFILES) $(LIBS) -o nfbtrans
++ $(CFLAGS) $(LDFLAGS) $(OBJFILES) $(LIBS) -o nfbtrans
+
+ aix:
+ $(MAKE) all CC=cc CFLAGS="-o -Dunix -Daix"
diff --git a/app-accessibility/nfbtrans/nfbtrans-7.74-r2.ebuild b/app-accessibility/nfbtrans/nfbtrans-7.74-r2.ebuild
new file mode 100644
index 00000000000..57efe93d042
--- /dev/null
+++ b/app-accessibility/nfbtrans/nfbtrans-7.74-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="braille translator from the National Federation of the Blind"
+HOMEPAGE="http://www.nfb.org/nfbtrans"
+SRC_URI="http://www.nfb.org/Images/nfb/Products_Technology/nfbtr774.zip"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=" >=app-arch/unzip-5.50-r2"
+RDEPEND=""
+
+S=${WORKDIR}
+
+PATCHES=(
+"${FILESDIR}"/${P}-gentoo-fix.patch
+"${FILESDIR}"/${P}-getline-fix.patch
+"${FILESDIR}"/${P}-respect-ldflags.patch
+)
+
+src_prepare() {
+ mv MAKEFILE Makefile || die
+ mv SPANISH.ZIP spanish.zip || die
+ emake lowercase
+ default
+}
+
+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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-accessibility/nfbtrans/files/, app-accessibility/nfbtrans/
@ 2023-05-11 1:21 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-05-11 1:21 UTC (permalink / raw
To: gentoo-commits
commit: 1e312126df0b0debe1e16baf40d210c0377df4fb
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 00:36:32 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 11 00:36:32 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e312126
app-accessibility/nfbtrans: fix modern C issues
Closes: https://bugs.gentoo.org/874390
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../nfbtrans/files/nfbtrans-7.74-modern-c.patch | 98 ++++++++++++++++++++++
app-accessibility/nfbtrans/nfbtrans-7.74-r3.ebuild | 49 +++++++++++
2 files changed, 147 insertions(+)
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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-11 1:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11 1:21 [gentoo-commits] repo/gentoo:master commit in: app-accessibility/nfbtrans/files/, app-accessibility/nfbtrans/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2017-06-13 16:37 William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox