nano: bump version.

This commit is contained in:
Jerome Duval
2015-03-23 17:54:33 +00:00
parent 6a1e875c40
commit 53cd1af66b
2 changed files with 179 additions and 16 deletions

View File

@@ -12,28 +12,48 @@ functionality. Features include:
- More syntax highlighting samples (Fortran, objC, OCaml, Makefiles)
"
HOMEPAGE="http://www.nano-editor.org/"
SRC_URI="http://ftpmirror.gnu.org/nano/nano-2.3.1.tar.gz"
CHECKSUM_MD5="af09f8828744b0ea0808d6c19a2b4bfd"
SRC_URI="http://www.nano-editor.org/dist/v2.4/nano-$portVersion.tar.gz"
CHECKSUM_SHA256="5076fb502680503e648cbdcbf2077e39fba193420ae19203f0a54cb2d94a75bd"
LICENSE="GNU GPL v3"
COPYRIGHT="1999-2010 Free Software Foundation, Inc. "
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="sys-libs/ncurses >= 5.6
sys-apps/groff >= 1.20.1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="nano-$portVersion.patchset"
PROVIDES="
nano = $portVersion compat >= 2
cmd:nano = $portVersion compat >= 2
cmd:rnano = $portVersion compat >= 2
"
REQUIRES="
haiku
cmd:groff
lib:libncurses
"
BUILD_REQUIRES="
devel:libncurses
"
BUILD_PREREQUIRES="
haiku_devel
cmd:autoreconf
cmd:gcc
cmd:groff
cmd:ld
cmd:libtoolize
cmd:make
cmd:pkg_config
"
BUILD()
{
cd nano-2.3.1
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--datadir=`finddir B_COMMON_DATA_DIRECTORY` \
--infodir=$COMMON_DOCS/info \
--mandir=$COMMON_DOCS/man
make
autoreconf
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
cd nano-2.3.1
make install
}
LICENSE="GNU GPL v3"
COPYRIGHT="1999-2011 Free Software Foundation, Inc. "

View File

@@ -0,0 +1,143 @@
From 1ec2570c4e742b7efe9f83a78c001a890f8e6dc3 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 23 Mar 2015 17:20:54 +0000
Subject: Haiku patch
diff --git a/src/files.c b/src/files.c
index bd07597..ee8a350 100644
--- a/src/files.c
+++ b/src/files.c
@@ -1220,11 +1220,11 @@ void do_insertfile(
#if !defined(DISABLE_MULTIBUFFER) && !defined(DISABLE_HISTORIES)
if (ISSET(MULTIBUFFER)) {
+ ssize_t savedposline, savedposcol;
/* Update the screen to account for the current
* buffer. */
display_buffer();
- ssize_t savedposline, savedposcol;
if (ISSET(POS_HISTORY) &&
#ifndef NANO_TINY
!execute &&
diff --git a/src/text.c b/src/text.c
index dd72308..59c904d 100644
--- a/src/text.c
+++ b/src/text.c
@@ -395,11 +395,12 @@ void undo_cut(undo *u)
/* Redo a cut, or undo an uncut. */
void redo_cut(undo *u)
{
+ filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
+
/* If we cut the magicline, we may as well not crash. :/ */
if (!u->cutbuffer)
return;
- filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
cutbuffer = NULL;
cutbottom = NULL;
@@ -430,6 +431,7 @@ void redo_cut(undo *u)
/* Undo the last thing(s) we did. */
void do_undo(void)
{
+ filestruct *f;
undo *u = openfile->current_undo;
filestruct *t = 0;
size_t len = 0;
@@ -440,7 +442,7 @@ void do_undo(void)
return;
}
- filestruct *f = fsfromline(u->mark_begin_lineno);
+ f = fsfromline(u->mark_begin_lineno);
if (!f) {
statusbar(_("Internal error: can't match line %d. Please save your work."), u->mark_begin_lineno);
return;
@@ -526,6 +528,7 @@ void do_undo(void)
break;
case INSERT:
undidmsg = _("text insert");
+ {
filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
cutbuffer = NULL;
cutbottom = NULL;
@@ -544,6 +547,7 @@ void do_undo(void)
cutbuffer = oldcutbuffer;
cutbottom = oldcutbottom;
openfile->mark_set = FALSE;
+ }
break;
case REPLACE:
undidmsg = _("text replace");
@@ -570,6 +574,7 @@ void do_undo(void)
/* Redo the last thing(s) we undid. */
void do_redo(void)
{
+ filestruct *f;
undo *u = openfile->undotop;
size_t len = 0;
char *data, *redidmsg = NULL;
@@ -585,7 +590,7 @@ void do_redo(void)
return;
}
- filestruct *f = fsfromline(u->mark_begin_lineno);
+ f = fsfromline(u->mark_begin_lineno);
if (!f) {
statusbar(_("Internal error: can't match line %d. Please save your work."), u->mark_begin_lineno);
return;
@@ -1069,6 +1074,7 @@ fprintf(stderr, "action = %d, fs->last_action = %d, openfile->current->lineno =
free_filestruct(u->cutbuffer);
u->cutbuffer = copy_filestruct(cutbuffer);
if (u->mark_set) {
+ ssize_t line;
/* If the "marking" operation was from right-->left or
* bottom-->top, then swap the mark points. */
if ((u->lineno == u->mark_begin_lineno && u->begin < u->mark_begin_x)
@@ -1077,7 +1083,7 @@ fprintf(stderr, "action = %d, fs->last_action = %d, openfile->current->lineno =
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
@@ -1151,6 +1157,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. */
@@ -1204,8 +1212,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
@@ -2664,7 +2672,11 @@ const char *do_alt_speller(char *tempfile_name)
ssize_t current_y_save = openfile->current_y;
ssize_t lineno_save = openfile->current->lineno;
struct stat spellfileinfo;
+#ifdef __HAIKU__
+ time_t timestamp;
+#else
__time_t timestamp;
+#endif
pid_t pid_spell;
char *ptr;
static int arglen = 3;
--
1.8.3.4