summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2009-12-06 00:25:27 +0300
committerArwed von Merkatz2010-01-02 15:16:20 +0100
commit66c8ec754a0bcae6797a162bbfe4f065df970d7d (patch)
treef399576fe1932f2fe58e810afaedacc16bbf0511
parentac2e1bb52a8f84fb0d5dbb2dd1d691d6da89f16b (diff)
nano: fixed compilation without wordwrap support
(cherry picked from commit 8de70d081a559bd3855c7dffaed74e9e29ce5e50)
-rwxr-xr-xeditors/nano/DETAILS1
-rw-r--r--editors/nano/HISTORY5
-rwxr-xr-xeditors/nano/PRE_BUILD4
-rw-r--r--editors/nano/nowrap.patch64
4 files changed, 74 insertions, 0 deletions
diff --git a/editors/nano/DETAILS b/editors/nano/DETAILS
index 7a8ea0647e..5389f83fe6 100755
--- a/editors/nano/DETAILS
+++ b/editors/nano/DETAILS
@@ -1,5 +1,6 @@
SPELL=nano
VERSION=2.2.0
+ PATCHLEVEL=1
BRANCH=`echo $VERSION | cut -d . -f 1,2`
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_GPG=gurus.gpg:${SOURCE}.sig:WORKS_FOR_ME
diff --git a/editors/nano/HISTORY b/editors/nano/HISTORY
index 50ccefcc6d..03ce9e7120 100644
--- a/editors/nano/HISTORY
+++ b/editors/nano/HISTORY
@@ -1,3 +1,8 @@
+2009-12-05 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS: PATCHLEVEL=1
+ * PRE_BUILD: added, to apply the patch
+ * nowrap.patch: added, to fix compilation without wordwrap support
+
2009-11-30 Ladislav Hagara <hgr@vabo.cz>
* DETAILS: 2.2.0
diff --git a/editors/nano/PRE_BUILD b/editors/nano/PRE_BUILD
new file mode 100755
index 0000000000..f358167761
--- /dev/null
+++ b/editors/nano/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p0 < "$SPELL_DIRECTORY/nowrap.patch"
diff --git a/editors/nano/nowrap.patch b/editors/nano/nowrap.patch
new file mode 100644
index 0000000000..a60a99ded2
--- /dev/null
+++ b/editors/nano/nowrap.patch
@@ -0,0 +1,64 @@
+--- src/text.c.orig 2009-11-29 09:12:39.000000000 +0300
++++ src/text.c 2009-12-05 23:23:22.373425488 +0300
+@@ -481,6 +481,7 @@
+ if (u->xflags == UNDO_DEL_BACKSPACE)
+ openfile->current_x += strlen(u->strdata);
+ break;
++#ifndef DISABLE_WRAPPING
+ case SPLIT:
+ undidmsg = _("line wrap");
+ f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1);
+@@ -494,6 +495,7 @@
+ }
+ renumber(f);
+ break;
++#endif /* DISABLE_WRAPPING */
+ case UNSPLIT:
+ undidmsg = _("line join");
+ t = make_new_node(f);
+@@ -618,6 +620,7 @@
+ do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
+ do_enter(TRUE);
+ break;
++#ifndef DISABLE_WRAPPING
+ case SPLIT:
+ undidmsg = _("line wrap");
+ if (u->xflags & UNDO_SPLIT_MADENEW)
+@@ -625,6 +628,7 @@
+ do_wrap(f, TRUE);
+ renumber(f);
+ break;
++#endif /* DISABLE_WRAPPING */
+ case UNSPLIT:
+ undidmsg = _("line join");
+ len = strlen(f->data) + strlen(u->strdata + 1);
+@@ -900,6 +904,7 @@
+ u->strdata = data;
+ }
+ break;
++#ifndef DISABLE_WRAPPING
+ case SPLIT:
+ wrap_loc = break_line(openfile->current->data, fill
+ #ifndef DISABLE_HELP
+@@ -913,6 +918,7 @@
+ u->strdata2 = mallocstrcpy(NULL, fs->current->next->data);
+ u->begin = wrap_loc;
+ break;
++#endif /* DISABLE_WRAPPING */
+ case INSERT:
+ case REPLACE:
+ data = mallocstrcpy(NULL, fs->current->data);
+@@ -1058,11 +1064,13 @@
+ case INSERT:
+ u->mark_begin_lineno = openfile->current->lineno;
+ break;
++#ifndef DISABLE_WRAPPING
+ case SPLIT:
+ /* This will only be called if we made a completely new line,
+ and as such we should note that so we can destroy it later */
+ u->xflags = UNDO_SPLIT_MADENEW;
+ break;
++#endif /* DISABLE_WRAPPING */
+ case UNSPLIT:
+ /* These cases are handled by the earlier check for a new line and action */
+ case ENTER: