Nano: bump (#3286)

This commit is contained in:
miqlas
2018-10-31 01:36:19 +01:00
committed by waddlesplash
parent be35c0e86f
commit 94056e0040
5 changed files with 11 additions and 257 deletions

View File

@@ -1,57 +0,0 @@
SUMMARY="Pico clone with more functionality under the GPL license"
DESCRIPTION="nano is a simple text editor for Unix-like computing systems \
or operating environments using a command line interface. It emulates the \
Pico text editor, part of the Pine email client, and also provides additional \
functionality. Features include:
- Customizable key bindings
- 'soft' line wrapping
- Full undo/redo support
- Pager support (reading from stdin)
- Warnings for un-writable files
- More syntax highlighting samples (Fortran, objC, OCaml, Makefiles)"
HOMEPAGE="https://www.nano-editor.org/"
COPYRIGHT="1999-2016 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="3"
SOURCE_URI="http://www.nano-editor.org/dist/v2.7/nano-$portVersion.tar.gz"
CHECKSUM_SHA256="226be22f46359007aa76499623739f4a7d5fa294a2899c70b21bc09b8d81d907"
PATCHES="nano-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
nano = $portVersion compat >= 2
cmd:nano = $portVersion compat >= 2
cmd:rnano = $portVersion compat >= 2
"
REQUIRES="
haiku
cmd:groff
lib:libncurses
"
BUILD_REQUIRES="
haiku_devel
devel:libncurses
"
BUILD_PREREQUIRES="
cmd:autoreconf
cmd:gcc
cmd:groff
cmd:ld
cmd:libtoolize
cmd:make
cmd:pkg_config
"
BUILD()
{
autoreconf
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -1,56 +0,0 @@
SUMMARY="Pico clone with more functionality under the GPL license"
DESCRIPTION="nano is a simple text editor for Unix-like computing systems \
or operating environments using a command line interface. It emulates the \
Pico text editor, part of the Pine email client, and also provides additional \
functionality. Features include:
- Customizable key bindings
- 'soft' line wrapping
- Full undo/redo support
- Pager support (reading from stdin)
- Warnings for un-writable files
- More syntax highlighting samples (Fortran, objC, OCaml, Makefiles)"
HOMEPAGE="https://www.nano-editor.org/"
COPYRIGHT="1999-2017 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="2"
SOURCE_URI="http://www.nano-editor.org/dist/v2.8/nano-$portVersion.tar.gz"
CHECKSUM_SHA256="a49a888c20f09a17c7f1049d1fda619472c92eedcb25fd4be5f088a51cc392a5"
ARCHITECTURES="x86_gcc2 ?x86 x86_64"
PROVIDES="
nano = $portVersion compat >= 2
cmd:nano = $portVersion compat >= 2
cmd:rnano = $portVersion compat >= 2
"
REQUIRES="
haiku
cmd:groff
lib:libncurses
"
BUILD_REQUIRES="
haiku_devel
devel:libncurses
"
BUILD_PREREQUIRES="
cmd:autoreconf
cmd:gcc
cmd:groff
cmd:ld
cmd:libtoolize
cmd:make
cmd:pkg_config
"
BUILD()
{
autoreconf
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -12,9 +12,9 @@ functionality. Features include:
HOMEPAGE="https://www.nano-editor.org/"
COPYRIGHT="1999-2018 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="2"
SOURCE_URI="https://www.nano-editor.org/dist/v2.9/nano-$portVersion.tar.gz"
CHECKSUM_SHA256="07192c320b74c1fb78437021e9affa6a9d55b806ee012de601902392eaa03601"
REVISION="1"
SOURCE_URI="https://www.nano-editor.org/dist/v3/nano-$portVersion.tar.xz"
CHECKSUM_SHA256="14c02ca40a5bc61c580ce2f9cb7f9fc72d5ccc9da17ad044f78f6fb3fdb7719e"
PATCHES="nano-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
@@ -27,12 +27,17 @@ PROVIDES="
REQUIRES="
haiku
cmd:groff
lib:libintl
lib:libncurses
lib:libz
"
BUILD_REQUIRES="
haiku_devel
devel:libiconv
devel:libintl
devel:libncurses
devel:libz
"
BUILD_PREREQUIRES="
cmd:autoreconf
@@ -41,7 +46,10 @@ BUILD_PREREQUIRES="
cmd:ld
cmd:libtoolize
cmd:make
cmd:msgfmt
cmd:msgmerge
cmd:pkg_config
cmd:xgettext
"
BUILD()

View File

@@ -1,141 +0,0 @@
From 13c59736cddc2aadf3bf2675b0f39dbc4e2411c9 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 21 Dec 2016 22:21:56 +0000
Subject: gcc2 patch
diff --git a/src/files.c b/src/files.c
index 8955e19..0939654 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2085,6 +2085,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp,
if (method == OVERWRITE && !tmp) {
/* If we must set the filename, and it changed, adjust things. */
if (!nonamechange && strcmp(openfile->filename, realname) != 0) {
+ char *newname;
#ifndef DISABLE_COLOR
char *oldname = openfile->syntax ? openfile->syntax->name : "";
filestruct *line = openfile->fileage;
@@ -2096,7 +2097,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp,
color_update();
color_init();
- char *newname = openfile->syntax ? openfile->syntax->name : "";
+ newname = openfile->syntax ? openfile->syntax->name : "";
/* If the syntax changed, discard and recompute the multidata. */
if (strcmp(oldname, newname) != 0) {
diff --git a/src/rcfile.c b/src/rcfile.c
index a9426d2..5353ae0 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -871,6 +871,8 @@ void grab_and_store(const char *kind, char *ptr, regexlisttype **storage)
/* Parse and store the name given after a linter/formatter command. */
void pick_up_name(const char *kind, char *ptr, char **storage)
{
+ char* p;
+ char* q;
assert(ptr != NULL);
if (!opensyntax) {
@@ -891,8 +893,8 @@ void pick_up_name(const char *kind, char *ptr, char **storage)
*storage = NULL;
else if (*ptr == '"') {
*storage = mallocstrcpy(NULL, ++ptr);
- char* q = *storage;
- char* p = *storage;
+ q = *storage;
+ p = *storage;
/* Snip out the backslashes of escaped characters. */
while (*p != '"') {
if (*p == '\0') {
diff --git a/src/text.c b/src/text.c
index c03f3d2..ad96970 100644
--- a/src/text.c
+++ b/src/text.c
@@ -657,11 +657,13 @@ void undo_cut(undo *u)
/* Redo a cut, or undo an uncut. */
void redo_cut(undo *u)
{
+ filestruct *oldcutbuffer, *oldcutbottom;
+
/* If we cut the magicline, we may as well not crash. :/ */
if (!u->cutbuffer)
return;
- filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
+ oldcutbuffer = cutbuffer; oldcutbottom = cutbottom;
cutbuffer = cutbottom = NULL;
goto_line_posx(u->lineno, u->begin);
@@ -683,6 +685,7 @@ void do_undo(void)
undo *u = openfile->current_undo;
filestruct *f, *t = NULL;
char *data, *undidmsg = NULL;
+ filestruct *oldcutbuffer, *oldcutbottom;
if (!u) {
statusbar(_("Nothing in undo buffer!"));
@@ -789,7 +792,7 @@ void do_undo(void)
#endif
case INSERT:
undidmsg = _("text insert");
- filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
+ oldcutbuffer = cutbuffer; oldcutbottom = cutbottom;
cutbuffer = NULL;
cutbottom = NULL;
/* Instead of a line number, u->mark_begin_lineno contains the number
@@ -835,7 +838,7 @@ void do_undo(void)
/* Redo the last thing(s) we undid. */
void do_redo(void)
{
- filestruct *f;
+ filestruct *f, *shoveline;
char *data, *redidmsg = NULL;
undo *u = openfile->undotop;
@@ -886,7 +889,7 @@ void do_redo(void)
break;
case ENTER:
redidmsg = _("line break");
- filestruct *shoveline = make_new_node(f);
+ shoveline = make_new_node(f);
shoveline->data = mallocstrcpy(NULL, u->strdata);
data = mallocstrncpy(NULL, f->data, u->begin + 1);
data[u->begin] = '\0';
@@ -1396,10 +1399,11 @@ fprintf(stderr, " >> Updating... action = %d, openfile->last_action = %d, openf
if ((u->lineno == u->mark_begin_lineno && u->begin < u->mark_begin_x)
|| u->lineno < u->mark_begin_lineno) {
size_t x_loc = u->begin;
+ ssize_t line;
u->begin = u->mark_begin_x;
u->mark_begin_x = x_loc;
- ssize_t line = u->lineno;
+ line = u->lineno;
u->lineno = u->mark_begin_lineno;
u->mark_begin_lineno = line;
} else
@@ -1481,6 +1485,8 @@ bool do_wrap(filestruct *line)
/* The next line, minus indentation. */
size_t next_line_len = 0;
/* The length of next_line. */
+ size_t old_x;
+ filestruct * oldLine;
/* There are three steps. First, we decide where to wrap. Then, we
* create the new wrap line. Finally, we clean up. */
@@ -1528,8 +1534,8 @@ bool do_wrap(filestruct *line)
add_undo(SPLIT_BEGIN);
#endif
- size_t old_x = openfile->current_x;
- filestruct * oldLine = openfile->current;
+ old_x = openfile->current_x;
+ oldLine = openfile->current;
openfile->current = line;
/* Step 2, making the new wrap line. It will consist of indentation
--
2.7.0