void-packages/srcpkgs/perl-Tk/patches/cross.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

27 lines
938 B
Diff

For libpng and libjpeg Makefile.PL tries to run a short test program to see if
the system libraries can be used. From native builds we know they can so remove
the test.
--- a/PNG/Makefile.PL 2013-11-18 10:04:04.000000000 +0100
+++ b/PNG/Makefile.PL 2018-09-14 09:31:08.785202470 +0200
@@ -53,8 +53,7 @@
$all_libs = "$libpng_libs $zlib_libs";
}
-if ($Tk::MMtry::VERSION ge '4.007' &&
- try_run("config/has_png.c",[$all_cflags],[$all_libs]))
+if ($Tk::MMtry::VERSION ge '4.007')
{
warn "Using system's -lpng\n";
Tk::MMutil::TkExtMakefile(
--- a/JPEG/Makefile.PL 2013-11-18 10:04:04.000000000 +0100
+++ b/JPEG/Makefile.PL 2018-09-14 09:35:28.041623709 +0200
@@ -6,7 +6,7 @@
use Tk::MMtry;
-if ($Tk::MMtry::VERSION ge '4.007' && try_run("config/has_jpeg.c",['-I/usr/local/include'],['-ljpeg']))
+if ($Tk::MMtry::VERSION ge '4.007')
{
push(@args, LIBS => ['-ljpeg'],
INC => '-I/usr/local/include',