void-packages/srcpkgs/eboard/patches/configure.patch
Đoàn Trần Công Danh a03d116397 srcpkgs/e*: convert patches to -Np1
```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

48 lines
897 B
Diff

--- a/configure 2017-01-05 01:07:49.029440284 +0100
+++ b/configure 2017-01-08 19:42:47.704475698 +0100
@@ -16,6 +16,7 @@
my $manprefix = '';
#my $dgt = 1;
+
# ------------
sub usage;
@@ -640,7 +641,20 @@
# print CONFIGH "#define WITH_DGT_BOARD 1\n";
# }
#}
+ #
+@envcxxflags = split(/ /, $ENV{CXXFLAGS});
+for (@envcxxflags) {
+ if ($_ ne "") {
+ push @cxxflags, "$_";
+}
+}
+@envldflags = split(/ /, $ENV{LDFLAGS});
+for (@envldflags) {
+ if ($_ ne "") {
+ push @ldflags, "$_";
+}
+}
# end
@@ -649,7 +663,7 @@
}
if ($manprefix eq '') {
- $manprefix = "$prefix/man";
+ $manprefix = "$prefix/share/man";
}
print CONFIGH "#define DATADIR \"$dataprefix\"\n";
@@ -666,7 +680,6 @@
close CONFIGH;
print "wrote $configh\n";
-print CONFIGMAKE "CXX = $cxx\n";
print CONFIGMAKE "CXXFLAGS = @cxxflags\n";
print CONFIGMAKE "LDFLAGS = @ldflags\n";