void-packages/srcpkgs/dialogbox/patches/fix-cxx11-string_literals.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

41 lines
1.7 KiB
Diff

Compiling with -std=c++11 requires blanks between string literals
and macros defining strings.
--- a/dialogmain.cpp 2016-03-02 20:31:01.000000000 +0100
+++ b/dialogmain.cpp 2016-12-27 22:03:26.774405881 +0100
@@ -28,7 +28,7 @@
#define VERSION "1.0"
static const char* about_message=
-PROGRAM_NAME" v"VERSION"\n\
+PROGRAM_NAME " v" VERSION "\n\
Copyright (C) 2015, 2016 Andriy Martynets <martynets@volia.ua>\n\
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n\
This program comes with ABSOLUTELY NO WARRANTY.\n\
@@ -37,7 +37,7 @@
More information on <https://github.com/martynets/dialogbox/>.\n";
static const char* about_html_message=
-"<h3>"PROGRAM_NAME" version "VERSION"</h3>\
+"<h3>" PROGRAM_NAME " version " VERSION "</h3>\
<p><b>Copyright (C) 2015, 2016 Andriy Martynets </b><a href=\"mailto:martynets@volia.ua\">martynets@volia.ua</a></p>\
<p><b>License GPLv3+:</b> GNU GPL version 3 or later <a href=\"http://gnu.org/licenses/gpl.html\">http://gnu.org/licenses/gpl.html</a>.</p>\
<p>This program comes with ABSOLUTELY NO WARRANTY. \
@@ -45,7 +45,7 @@
under certain conditions. See the GNU GPL for details.</p>\
<p>More information on <a href=\"https://github.com/martynets/dialogbox/\">https://github.com/martynets/dialogbox/</a>.</p>";
-static const char* default_title=PROGRAM_NAME" v"VERSION;
+static const char* default_title=PROGRAM_NAME " v" VERSION;
static void help();
static void version();
@@ -104,7 +104,7 @@
static void help()
{
const char* usage=
-"Usage: "PROGRAM_NAME" [options]\n\
+"Usage: " PROGRAM_NAME " [options]\n\
Translate commands on stdin into widgets of GUI dialogbox and output user\n\
actions to stdout.\n\
\n\