summaryrefslogtreecommitdiff
path: root/app-editors/nano
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /app-editors/nano
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'app-editors/nano')
-rw-r--r--app-editors/nano/Manifest17
-rw-r--r--app-editors/nano/files/nano-4.8-justify_keystroke_crash_fix.patch34
-rw-r--r--app-editors/nano/files/nano-4.9.3-disable-speller_build_fix.patch342
-rw-r--r--app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch46
-rw-r--r--app-editors/nano/nano-4.9.3.ebuild10
-rw-r--r--app-editors/nano/nano-5.0-r1.ebuild (renamed from app-editors/nano/nano-4.9.2.ebuild)9
-rw-r--r--app-editors/nano/nano-5.1.ebuild (renamed from app-editors/nano/nano-4.6-r1.ebuild)12
-rw-r--r--app-editors/nano/nano-5.2.ebuild89
-rw-r--r--app-editors/nano/nano-9999.ebuild9
9 files changed, 524 insertions, 44 deletions
diff --git a/app-editors/nano/Manifest b/app-editors/nano/Manifest
index fb68edbe9db3..c88d869f9c2a 100644
--- a/app-editors/nano/Manifest
+++ b/app-editors/nano/Manifest
@@ -1,9 +1,12 @@
-AUX nano-4.8-justify_keystroke_crash_fix.patch 1046 BLAKE2B adcbab5895d84e43c8682db0a5c01446f38c3c4dced4c12b191e6d0474557094e942bb1d1632241418b3b312c7cd79ee7afac81117115cb295786fbff8f62eaa SHA512 61be139d4b81b9d3032ed56d99649cf29a96ebfa0878ae50cf7633f3a6836d6efc7a0434da68cffe5d15c3871e47b210628b27ac634add9bef57db3c139ba6ea
-DIST nano-4.6.tar.gz 2970798 BLAKE2B d6dfc702d374d1cbcd61080c8e0082b7931dc8c593c97eb705d878d25487a78dc1ebcb8004f742f5ecc3af1b5a31abcf6577e87aba96fb95d16029ff55e7af58 SHA512 76fb43495ca1f88ee8864eee5d023b6cd86bc35fba00151b4c6af53ae06e6b3828379e7d52a16c7df0956e9e04602a86ff8e8a7c1997320507ca041195bf004b
-DIST nano-4.9.2.tar.gz 2996106 BLAKE2B f3de611022f72de050f96b254a10fb9587014e4e239e34024d1941f9bd5d6abef17dbd1da95bba7cd328237137be1c79421ef7423cf40bab6a5577f9ae8ba587 SHA512 bbb43b63e03d104f168394c00778b5674249285c2400bb4664738a5badc7e5320b5a96f6b0275aa4e6f34f8127830564e87a8658442e358e5261116c595155b6
+AUX nano-4.9.3-disable-speller_build_fix.patch 10305 BLAKE2B 1a319fa63eadfa8c98b2f3f35df3cae631253606f6ac38fce96049a1078f13b5885dc368d725d09bbf7cd840c0766d446f757282693526f9fb723b05d1d6c4f4 SHA512 ceef1ba4ce7fc296785cd579bc645d9565d16b9adffbb6871684421823addbef87a70bfcd8f3f87bc7e48477ee0c56d3b326aaa9c019e0d04a7f000bc46076c2
+AUX nano-4.9.3-minimal_build_fix.patch 1357 BLAKE2B d204314118779f7e433cea11ea070e66ea445c47259d48960cb96a7a4b63cf5b4ff2a8f0254573a57b78d194354af2a3d8b4ddb43a1af9f31a6fa12ea8628f1a SHA512 a4a1ddb4c1f1999251d499f8068ddc0e743e4499a1bf3781095c604ac08a1700f8648d30441c5aa6a2e96d75df262c77dec7f64bc29faa3b87ba8b664227614a
DIST nano-4.9.3.tar.gz 2999198 BLAKE2B a96f707936934a965a9a41dfe13ac1ebbe1a5e38db714df6d219b2c6539f24924d4c4f0451508718f66259854806032b84dc89850a7fd55d157f28ae23531d0e SHA512 233e6ed103441bd2c85ed21c50547f85dc0838cc750a5e9b16ecfb393e3b7b978e971af4a4164062c7c267c98895ecb696c02cbd2e4c2eb1ceee657fd026c30a
-EBUILD nano-4.6-r1.ebuild 2237 BLAKE2B db4fb753e8949f3049410ac0fb8d34239d1c1e05695a524aa65cb56bed024d81f7144c1bbb6474128a80fb07ea23943e804de96380053450949530554c6e4165 SHA512 de8b6e421684b4f11bd9e913e521bfbc1e6403751a9fa6af74c8ca6d90fbc2ef46d520939004a92c07a716fee66114bc244e8d862c91d823121791f36ee8eb8b
-EBUILD nano-4.9.2.ebuild 2176 BLAKE2B a904639e81b80ea3aa0bdfbf9b11abd81f9b84580e8ff1b763c47dbbcfa5d7742086336dd223b02127d1bc03265b9bacc974e091cf96e190e3ebd1c7dfdcc89d SHA512 f27889a95c6d7d0dbdf4caf41a17177236daea30b723aa0f8e122b802fef6b9806e745f337f0f6fada69abd288ba7dabdb57a57ea1433c30204938cb2aae632c
-EBUILD nano-4.9.3.ebuild 2176 BLAKE2B a904639e81b80ea3aa0bdfbf9b11abd81f9b84580e8ff1b763c47dbbcfa5d7742086336dd223b02127d1bc03265b9bacc974e091cf96e190e3ebd1c7dfdcc89d SHA512 f27889a95c6d7d0dbdf4caf41a17177236daea30b723aa0f8e122b802fef6b9806e745f337f0f6fada69abd288ba7dabdb57a57ea1433c30204938cb2aae632c
-EBUILD nano-9999.ebuild 2176 BLAKE2B a904639e81b80ea3aa0bdfbf9b11abd81f9b84580e8ff1b763c47dbbcfa5d7742086336dd223b02127d1bc03265b9bacc974e091cf96e190e3ebd1c7dfdcc89d SHA512 f27889a95c6d7d0dbdf4caf41a17177236daea30b723aa0f8e122b802fef6b9806e745f337f0f6fada69abd288ba7dabdb57a57ea1433c30204938cb2aae632c
+DIST nano-5.0.tar.gz 3034734 BLAKE2B 03ea59c97c0e421ed92f588a2e6991f968b2f341761db66fda077ab827d00b9eb13930f08011f0028010e2005bb912ead723928b482a0532e924f85757a75569 SHA512 7e650676a15a185a9695eb49ae5cf441e3d42ae13817a9d3e64cb347c795840712778ac464fd5c578cc6464132206ee06dba52a06a218bcc865485ce3502a4bb
+DIST nano-5.1.tar.gz 2861977 BLAKE2B c826782683d26b4c27ffb82e8c4dabad543fe93f53d942bc6ad57b8acb7959595986216a1936d69b0a63b72da101de2c886995421db93c76ee842313799de78d SHA512 8007f40f27a1235d59f5559b6629a3a5a1a579a2356c8825dfef121f4ba7e6c5196e4cedea441c7e856f9add1e9739b14b4142a0a14dab90841110218149df11
+DIST nano-5.2.tar.gz 2865091 BLAKE2B 3822b3fd8dede897d698401a06ea0b4b49bf39f48d16c750e273007b1795a8adfc71654eadc08039a5c6999973ff7e70148b4c720b32a8f361424404e3c2ff3f SHA512 4c77bcfdf704a7882e944cb6d4cd571b698447500255e5701d30990def56cec0c396a33c761b8149f3cc4208a8dcd0f39372804d54cbe6bc2db9244f4a2259b3
+EBUILD nano-4.9.3.ebuild 2334 BLAKE2B a46bb4bc1a3cb5d62c0f7db03c7ad1785d168daae307275b198e7f4527d98d84c7b7557ee1cfe2f70e4aa5e60f8cda4abb5fd8261decdcd4f7ff11f54f25e686 SHA512 a8dab8ae77a332ca5576b907e8a73fd288f3da0f8fdd4c2d52ab4e747c911c30425b81db7958a6b3a256ce4b1a2d6a480a728991e67b66d6d09434f36aaad1ef
+EBUILD nano-5.0-r1.ebuild 2434 BLAKE2B 45daba891451bdb52ef94979aeed565ecd21a5c315f2cd575a2e3f00ec64d4c9f8ad392f1a90a9bce4879725a4fa8a39ef2443aed0ad6836a8a572838f22b546 SHA512 07d7f7ff0b04629106e0710dfb47b2ef397b69c4bb50b65b908cae1843424bd1425108b5a6ecfdc7411b3cd27f3f40f92bb7c8df87c18005bfabafd2e183b315
+EBUILD nano-5.1.ebuild 2434 BLAKE2B 45daba891451bdb52ef94979aeed565ecd21a5c315f2cd575a2e3f00ec64d4c9f8ad392f1a90a9bce4879725a4fa8a39ef2443aed0ad6836a8a572838f22b546 SHA512 07d7f7ff0b04629106e0710dfb47b2ef397b69c4bb50b65b908cae1843424bd1425108b5a6ecfdc7411b3cd27f3f40f92bb7c8df87c18005bfabafd2e183b315
+EBUILD nano-5.2.ebuild 2434 BLAKE2B 45daba891451bdb52ef94979aeed565ecd21a5c315f2cd575a2e3f00ec64d4c9f8ad392f1a90a9bce4879725a4fa8a39ef2443aed0ad6836a8a572838f22b546 SHA512 07d7f7ff0b04629106e0710dfb47b2ef397b69c4bb50b65b908cae1843424bd1425108b5a6ecfdc7411b3cd27f3f40f92bb7c8df87c18005bfabafd2e183b315
+EBUILD nano-9999.ebuild 2434 BLAKE2B 45daba891451bdb52ef94979aeed565ecd21a5c315f2cd575a2e3f00ec64d4c9f8ad392f1a90a9bce4879725a4fa8a39ef2443aed0ad6836a8a572838f22b546 SHA512 07d7f7ff0b04629106e0710dfb47b2ef397b69c4bb50b65b908cae1843424bd1425108b5a6ecfdc7411b3cd27f3f40f92bb7c8df87c18005bfabafd2e183b315
MISC metadata.xml 1642 BLAKE2B bd201f1a56bd864dbf7ce5e8dd8b9e0f1a34c236543d8bffa096da1f53460e824171ec629fa84a0a31919fa128e248397671129b8c0a23dfdda9d685e789bf87 SHA512 1b9eac65c24ddc6b917a8bbd1849a7dfd7f29cfa6430eb5945b1a09ec036e68023159882c632fe3dfe04038673cac68ecc74fb128a8bbdf1a2b0aa6cfd3a398c
diff --git a/app-editors/nano/files/nano-4.8-justify_keystroke_crash_fix.patch b/app-editors/nano/files/nano-4.8-justify_keystroke_crash_fix.patch
deleted file mode 100644
index e18425a6b802..000000000000
--- a/app-editors/nano/files/nano-4.8-justify_keystroke_crash_fix.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2d05ce37c60a157760f386badc387e2d53b2fa75 Mon Sep 17 00:00:00 2001
-From: Benno Schulenberg <bensberg@telfort.nl>
-Date: Thu, 5 Mar 2020 16:57:16 +0100
-Subject: [PATCH] justify: do not crash when the user attempts to justify an
- empty region
-
-This fixes https://savannah.gnu.org/bugs/?57959.
-
-Bug existed since version 4.0, since the justifying
-of a marked region was introduced.
----
- src/text.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/text.c b/src/text.c
-index 957938f4..4fe7eb96 100644
---- a/src/text.c
-+++ b/src/text.c
-@@ -1930,6 +1930,12 @@ void do_justify(bool full_justify)
- get_region((const linestruct **)&first_par_line, &top_x,
- (const linestruct **)&last_par_line, &bot_x, &right_side_up);
-
-+ /* When the marked region is empty, do nothing. */
-+ if (first_par_line == last_par_line && top_x == bot_x) {
-+ statusline(NOTICE, _("Nothing changed"));
-+ return;
-+ }
-+
- /* Save the starting point of the marked region. */
- was_top_lineno = first_par_line->lineno;
- was_top_x = top_x;
---
-2.25.2
-
diff --git a/app-editors/nano/files/nano-4.9.3-disable-speller_build_fix.patch b/app-editors/nano/files/nano-4.9.3-disable-speller_build_fix.patch
new file mode 100644
index 000000000000..978e24de805d
--- /dev/null
+++ b/app-editors/nano/files/nano-4.9.3-disable-speller_build_fix.patch
@@ -0,0 +1,342 @@
+From 4b7f7a30c9ec593d68186b1dfef44d4e2bda735b Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Mon, 22 Jun 2020 08:39:59 +0200
+Subject: [PATCH] build: fix compilation when configured with
+ --disable-speller
+
+Move two functions that are used by the formatter too
+to between the proper #ifdef.
+
+Problem existed since commit 8089f5ad from a month ago.
+
+Backported to v4.9.3
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ src/text.c | 302 ++++++++++++++++++++++++++---------------------------
+ 1 file changed, 151 insertions(+), 151 deletions(-)
+
+diff --git a/src/text.c b/src/text.c
+index 93ad3704..c7690fd0 100644
+--- a/src/text.c
++++ b/src/text.c
+@@ -2011,8 +2011,159 @@ void construct_argument_list(char ***arguments, char *command, char *filename)
+ (*arguments)[count - 2] = filename;
+ (*arguments)[count - 1] = NULL;
+ }
++
++/* Open the specified file, and if that succeeds, remove the text of the marked
++ * region or of the entire buffer and read the file contents into its place. */
++bool replace_buffer(const char *filename, undo_type action, const char *operation)
++{
++ linestruct *was_cutbuffer = cutbuffer;
++ int descriptor;
++ FILE *stream;
++
++ descriptor = open_file(filename, FALSE, &stream);
++
++ if (descriptor < 0)
++ return FALSE;
++
++ cutbuffer = NULL;
++
++#ifndef NANO_TINY
++ add_undo(COUPLE_BEGIN, operation);
++
++ /* Cut either the marked region or the whole buffer. */
++ add_undo(action, NULL);
++#endif
++ do_snip(FALSE, openfile->mark, openfile->mark == NULL, FALSE);
++#ifndef NANO_TINY
++ update_undo(action);
+ #endif
+
++ /* Discard what was cut. */
++ free_lines(cutbuffer);
++ cutbuffer = was_cutbuffer;
++
++ /* Insert the spell-checked file into the cleared area. */
++ read_file(stream, descriptor, filename, TRUE);
++
++#ifndef NANO_TINY
++ add_undo(COUPLE_END, operation);
++#endif
++ return TRUE;
++}
++
++/* Execute the given program, with the given temp file as last argument. */
++const char *treat(char *tempfile_name, char *theprogram, bool spelling)
++{
++ ssize_t lineno_save = openfile->current->lineno;
++ size_t current_x_save = openfile->current_x;
++ size_t pww_save = openfile->placewewant;
++ bool was_at_eol = (openfile->current->data[openfile->current_x] == '\0');
++ struct stat fileinfo;
++ long timestamp_sec, timestamp_nsec;
++ static char **arguments = NULL;
++ pid_t thepid;
++ int program_status;
++ bool replaced = FALSE;
++
++ /* Get the timestamp and the size of the temporary file. */
++ stat(tempfile_name, &fileinfo);
++ timestamp_sec = (long)fileinfo.st_mtim.tv_sec;
++ timestamp_nsec = (long)fileinfo.st_mtim.tv_nsec;
++
++ /* If the number of bytes to check is zero, get out. */
++ if (fileinfo.st_size == 0)
++ return NULL;
++
++ /* Exit from curses mode to give the program control of the terminal. */
++ endwin();
++
++ construct_argument_list(&arguments, theprogram, tempfile_name);
++
++ /* Fork a child process and run the given program in it. */
++ if ((thepid = fork()) == 0) {
++ execvp(arguments[0], arguments);
++
++ /* Terminate the child if the program is not found. */
++ exit(9);
++ } else if (thepid < 0)
++ return _("Could not fork");
++
++ /* Block SIGWINCHes while waiting for the program to end,
++ * so nano doesn't get pushed past the wait(). */
++ block_sigwinch(TRUE);
++ wait(&program_status);
++ block_sigwinch(FALSE);
++
++ /* Restore the terminal state and reenter curses mode. */
++ terminal_init();
++ doupdate();
++
++ if (!WIFEXITED(program_status) || WEXITSTATUS(program_status) > 2) {
++ statusline(ALERT, _("Error invoking '%s'"), arguments[0]);
++ return NULL;
++ } else if (WEXITSTATUS(program_status) != 0)
++ statusline(ALERT, _("Program '%s' complained"), arguments[0]);
++
++ /* Stat the temporary file again. */
++ stat(tempfile_name, &fileinfo);
++
++ /* When the temporary file wasn't touched, say so and leave. */
++ if ((long)fileinfo.st_mtim.tv_sec == timestamp_sec &&
++ (long)fileinfo.st_mtim.tv_nsec == timestamp_nsec) {
++ statusbar(_("Nothing changed"));
++ return NULL;
++ }
++
++#ifndef NANO_TINY
++ /* Replace the marked text (or entire text) with the corrected text. */
++ if (spelling && openfile->mark) {
++ ssize_t was_mark_lineno = openfile->mark->lineno;
++ bool upright = mark_is_before_cursor();
++
++ replaced = replace_buffer(tempfile_name, CUT, "spelling correction");
++
++ /* Adjust the end point of the marked region for any change in
++ * length of the region's last line. */
++ if (upright)
++ current_x_save = openfile->current_x;
++ else
++ openfile->mark_x = openfile->current_x;
++
++ /* Restore the mark. */
++ openfile->mark = line_from_number(was_mark_lineno);
++ } else
++#endif
++ {
++ openfile->current = openfile->filetop;
++ openfile->current_x = 0;
++
++ replaced = replace_buffer(tempfile_name, CUT_TO_EOF,
++ /* TRANSLATORS: The next two go with Undid/Redid messages. */
++ (spelling ? N_("spelling correction") : N_("formatting")));
++ }
++
++ /* Go back to the old position. */
++ goto_line_posx(lineno_save, current_x_save);
++ if (was_at_eol || openfile->current_x > strlen(openfile->current->data))
++ openfile->current_x = strlen(openfile->current->data);
++
++#ifndef NANO_TINY
++ if (replaced)
++ update_undo(COUPLE_END);
++#endif
++
++ openfile->placewewant = pww_save;
++ adjust_viewport(STATIONARY);
++
++ if (spelling)
++ statusbar(_("Finished checking spelling"));
++ else
++ statusbar(_("Buffer has been processed"));
++
++ return NULL;
++}
++#endif /* ENABLE_SPELLER || ENABLE_COLOR */
++
+ #ifdef ENABLE_SPELLER
+ /* Let the user edit the misspelled word. Return FALSE if the user cancels. */
+ bool fix_spello(const char *word)
+@@ -2307,157 +2458,6 @@ const char *do_int_speller(const char *tempfile_name)
+ return NULL;
+ }
+
+-/* Open the specified file, and if that succeeds, remove the text of the marked
+- * region or of the entire buffer and read the file contents into its place. */
+-bool replace_buffer(const char *filename, undo_type action, const char *operation)
+-{
+- linestruct *was_cutbuffer = cutbuffer;
+- int descriptor;
+- FILE *stream;
+-
+- descriptor = open_file(filename, FALSE, &stream);
+-
+- if (descriptor < 0)
+- return FALSE;
+-
+- cutbuffer = NULL;
+-
+-#ifndef NANO_TINY
+- add_undo(COUPLE_BEGIN, operation);
+-
+- /* Cut either the marked region or the whole buffer. */
+- add_undo(action, NULL);
+-#endif
+- do_snip(FALSE, openfile->mark, openfile->mark == NULL, FALSE);
+-#ifndef NANO_TINY
+- update_undo(action);
+-#endif
+-
+- /* Discard what was cut. */
+- free_lines(cutbuffer);
+- cutbuffer = was_cutbuffer;
+-
+- /* Insert the spell-checked file into the cleared area. */
+- read_file(stream, descriptor, filename, TRUE);
+-
+-#ifndef NANO_TINY
+- add_undo(COUPLE_END, operation);
+-#endif
+- return TRUE;
+-}
+-
+-/* Execute the given program, with the given temp file as last argument. */
+-const char *treat(char *tempfile_name, char *theprogram, bool spelling)
+-{
+- ssize_t lineno_save = openfile->current->lineno;
+- size_t current_x_save = openfile->current_x;
+- size_t pww_save = openfile->placewewant;
+- bool was_at_eol = (openfile->current->data[openfile->current_x] == '\0');
+- struct stat fileinfo;
+- long timestamp_sec, timestamp_nsec;
+- static char **arguments = NULL;
+- pid_t thepid;
+- int program_status;
+- bool replaced = FALSE;
+-
+- /* Get the timestamp and the size of the temporary file. */
+- stat(tempfile_name, &fileinfo);
+- timestamp_sec = (long)fileinfo.st_mtim.tv_sec;
+- timestamp_nsec = (long)fileinfo.st_mtim.tv_nsec;
+-
+- /* If the number of bytes to check is zero, get out. */
+- if (fileinfo.st_size == 0)
+- return NULL;
+-
+- /* Exit from curses mode to give the program control of the terminal. */
+- endwin();
+-
+- construct_argument_list(&arguments, theprogram, tempfile_name);
+-
+- /* Fork a child process and run the given program in it. */
+- if ((thepid = fork()) == 0) {
+- execvp(arguments[0], arguments);
+-
+- /* Terminate the child if the program is not found. */
+- exit(9);
+- } else if (thepid < 0)
+- return _("Could not fork");
+-
+- /* Block SIGWINCHes while waiting for the program to end,
+- * so nano doesn't get pushed past the wait(). */
+- block_sigwinch(TRUE);
+- wait(&program_status);
+- block_sigwinch(FALSE);
+-
+- /* Restore the terminal state and reenter curses mode. */
+- terminal_init();
+- doupdate();
+-
+- if (!WIFEXITED(program_status) || WEXITSTATUS(program_status) > 2) {
+- statusline(ALERT, _("Error invoking '%s'"), arguments[0]);
+- return NULL;
+- } else if (WEXITSTATUS(program_status) != 0)
+- statusline(ALERT, _("Program '%s' complained"), arguments[0]);
+-
+- /* Stat the temporary file again. */
+- stat(tempfile_name, &fileinfo);
+-
+- /* When the temporary file wasn't touched, say so and leave. */
+- if ((long)fileinfo.st_mtim.tv_sec == timestamp_sec &&
+- (long)fileinfo.st_mtim.tv_nsec == timestamp_nsec) {
+- statusbar(_("Nothing changed"));
+- return NULL;
+- }
+-
+-#ifndef NANO_TINY
+- /* Replace the marked text (or entire text) with the corrected text. */
+- if (spelling && openfile->mark) {
+- ssize_t was_mark_lineno = openfile->mark->lineno;
+- bool upright = mark_is_before_cursor();
+-
+- replaced = replace_buffer(tempfile_name, CUT, "spelling correction");
+-
+- /* Adjust the end point of the marked region for any change in
+- * length of the region's last line. */
+- if (upright)
+- current_x_save = openfile->current_x;
+- else
+- openfile->mark_x = openfile->current_x;
+-
+- /* Restore the mark. */
+- openfile->mark = line_from_number(was_mark_lineno);
+- } else
+-#endif
+- {
+- openfile->current = openfile->filetop;
+- openfile->current_x = 0;
+-
+- replaced = replace_buffer(tempfile_name, CUT_TO_EOF,
+- /* TRANSLATORS: The next two go with Undid/Redid messages. */
+- (spelling ? N_("spelling correction") : N_("formatting")));
+- }
+-
+- /* Go back to the old position. */
+- goto_line_posx(lineno_save, current_x_save);
+- if (was_at_eol || openfile->current_x > strlen(openfile->current->data))
+- openfile->current_x = strlen(openfile->current->data);
+-
+-#ifndef NANO_TINY
+- if (replaced)
+- update_undo(COUPLE_END);
+-#endif
+-
+- openfile->placewewant = pww_save;
+- adjust_viewport(STATIONARY);
+-
+- if (spelling)
+- statusbar(_("Finished checking spelling"));
+- else
+- statusbar(_("Buffer has been processed"));
+-
+- return NULL;
+-}
+-
+ /* Spell check the current file. If an alternate spell checker is
+ * specified, use it. Otherwise, use the internal spell checker. */
+ void do_spell(void)
+--
+2.28.0
+
diff --git a/app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch b/app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch
new file mode 100644
index 000000000000..52112bab7235
--- /dev/null
+++ b/app-editors/nano/files/nano-4.9.3-minimal_build_fix.patch
@@ -0,0 +1,46 @@
+From a98f48b4e82db7d30aa04925fb28344f5bce8c7c Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@telfort.nl>
+Date: Mon, 22 Jun 2020 14:00:23 +0200
+Subject: [PATCH] build: fix compilation for --enable-tiny --enable-color
+ --enable-nanorc
+
+Backported to v4.9.3
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ src/nano.c | 2 +-
+ src/text.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/nano.c b/src/nano.c
+index be80a073..3ac81ba4 100644
+--- a/src/nano.c
++++ b/src/nano.c
+@@ -1079,7 +1079,7 @@ RETSIGTYPE do_continue(int signal)
+ ungetch(KEY_FLUSH);
+ }
+
+-#if !defined(NANO_TINY) || defined(ENABLE_SPELLER)
++#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
+ /* Block or unblock the SIGWINCH signal, depending on the blockit parameter. */
+ void block_sigwinch(bool blockit)
+ {
+diff --git a/src/text.c b/src/text.c
+index c7690fd0..32727946 100644
+--- a/src/text.c
++++ b/src/text.c
+@@ -2032,10 +2032,10 @@ bool replace_buffer(const char *filename, undo_type action, const char *operatio
+
+ /* Cut either the marked region or the whole buffer. */
+ add_undo(action, NULL);
+-#endif
+ do_snip(FALSE, openfile->mark, openfile->mark == NULL, FALSE);
+-#ifndef NANO_TINY
+ update_undo(action);
++#else
++ do_snip(FALSE, TRUE, FALSE, FALSE);
+ #endif
+
+ /* Discard what was cut. */
+--
+2.28.0
+
diff --git a/app-editors/nano/nano-4.9.3.ebuild b/app-editors/nano/nano-4.9.3.ebuild
index e27dda0e78d7..5e77b11f1a70 100644
--- a/app-editors/nano/nano-4.9.3.ebuild
+++ b/app-editors/nano/nano-4.9.3.ebuild
@@ -10,7 +10,7 @@ if [[ ${PV} == "9999" ]] ; then
else
MY_P="${PN}-${PV/_}"
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"
@@ -32,6 +32,14 @@ BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
"
+
+REQUIRED_USE="!ncurses? ( slang? ( minimal ) )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-disable-speller_build_fix.patch"
+ "${FILESDIR}/${P}-minimal_build_fix.patch" #734856
+)
+
src_prepare() {
default
if [[ ${PV} == "9999" ]] ; then
diff --git a/app-editors/nano/nano-4.9.2.ebuild b/app-editors/nano/nano-5.0-r1.ebuild
index e27dda0e78d7..86f22534c12f 100644
--- a/app-editors/nano/nano-4.9.2.ebuild
+++ b/app-editors/nano/nano-5.0-r1.ebuild
@@ -32,6 +32,9 @@ BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
"
+
+REQUIRED_USE="!ncurses? ( slang? ( minimal ) )"
+
src_prepare() {
default
if [[ ${PV} == "9999" ]] ; then
@@ -74,6 +77,12 @@ src_install() {
sed -i \
-e '/^# include /s:# *::' \
"${ED}"/etc/nanorc || die
+
+ # Since nano-5.0 these are no longer being "enabled" by default
+ # (bug #736848)
+ local rcdir="/usr/share/nano"
+ mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
+ rmdir "${ED}"${rcdir}/extra || die
fi
use split-usr && dosym ../../bin/nano /usr/bin/nano
diff --git a/app-editors/nano/nano-4.6-r1.ebuild b/app-editors/nano/nano-5.1.ebuild
index 28d67f86b940..86f22534c12f 100644
--- a/app-editors/nano/nano-4.6-r1.ebuild
+++ b/app-editors/nano/nano-5.1.ebuild
@@ -10,7 +10,7 @@ if [[ ${PV} == "9999" ]] ; then
else
MY_P="${PN}-${PV/_}"
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"
@@ -32,7 +32,9 @@ BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
"
-PATCHES=( "${FILESDIR}/${PN}-4.8-justify_keystroke_crash_fix.patch" )
+
+REQUIRED_USE="!ncurses? ( slang? ( minimal ) )"
+
src_prepare() {
default
if [[ ${PV} == "9999" ]] ; then
@@ -75,6 +77,12 @@ src_install() {
sed -i \
-e '/^# include /s:# *::' \
"${ED}"/etc/nanorc || die
+
+ # Since nano-5.0 these are no longer being "enabled" by default
+ # (bug #736848)
+ local rcdir="/usr/share/nano"
+ mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
+ rmdir "${ED}"${rcdir}/extra || die
fi
use split-usr && dosym ../../bin/nano /usr/bin/nano
diff --git a/app-editors/nano/nano-5.2.ebuild b/app-editors/nano/nano-5.2.ebuild
new file mode 100644
index 000000000000..86f22534c12f
--- /dev/null
+++ b/app-editors/nano/nano-5.2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.sv.gnu.org/nano.git"
+ inherit git-r3 autotools
+else
+ MY_P="${PN}-${PV/_}"
+ SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="GNU GPL'd Pico clone with more functionality"
+HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="debug justify +magic minimal ncurses nls slang +spell +split-usr static unicode"
+
+LIB_DEPEND=">=sys-libs/ncurses-5.9-r1:0=[unicode?]
+ sys-libs/ncurses:0=[static-libs(+)]
+ magic? ( sys-apps/file[static-libs(+)] )
+ nls? ( virtual/libintl )
+ !ncurses? ( slang? ( sys-libs/slang[static-libs(+)] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+BDEPEND="
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+"
+
+REQUIRED_USE="!ncurses? ( slang? ( minimal ) )"
+
+src_prepare() {
+ default
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ local myconf=(
+ --bindir="${EPREFIX}"/bin
+ --htmldir=/trash
+ $(use_enable !minimal color)
+ $(use_enable !minimal multibuffer)
+ $(use_enable !minimal nanorc)
+ $(use_enable magic libmagic)
+ $(use_enable spell speller)
+ $(use_enable justify)
+ $(use_enable debug)
+ $(use_enable nls)
+ $(use_enable unicode utf8)
+ $(use_enable minimal tiny)
+ $(usex ncurses --without-slang $(use_with slang))
+ )
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ # don't use "${ED}" here or things break (#654534)
+ rm -r "${D}"/trash || die
+
+ dodoc doc/sample.nanorc
+ docinto html
+ dodoc doc/faq.html
+ insinto /etc
+ newins doc/sample.nanorc nanorc
+ if ! use minimal ; then
+ # Enable colorization by default.
+ sed -i \
+ -e '/^# include /s:# *::' \
+ "${ED}"/etc/nanorc || die
+
+ # Since nano-5.0 these are no longer being "enabled" by default
+ # (bug #736848)
+ local rcdir="/usr/share/nano"
+ mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
+ rmdir "${ED}"${rcdir}/extra || die
+ fi
+
+ use split-usr && dosym ../../bin/nano /usr/bin/nano
+}
diff --git a/app-editors/nano/nano-9999.ebuild b/app-editors/nano/nano-9999.ebuild
index e27dda0e78d7..86f22534c12f 100644
--- a/app-editors/nano/nano-9999.ebuild
+++ b/app-editors/nano/nano-9999.ebuild
@@ -32,6 +32,9 @@ BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
"
+
+REQUIRED_USE="!ncurses? ( slang? ( minimal ) )"
+
src_prepare() {
default
if [[ ${PV} == "9999" ]] ; then
@@ -74,6 +77,12 @@ src_install() {
sed -i \
-e '/^# include /s:# *::' \
"${ED}"/etc/nanorc || die
+
+ # Since nano-5.0 these are no longer being "enabled" by default
+ # (bug #736848)
+ local rcdir="/usr/share/nano"
+ mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die
+ rmdir "${ED}"${rcdir}/extra || die
fi
use split-usr && dosym ../../bin/nano /usr/bin/nano