void-packages/srcpkgs/sopwith/patches/enable_cross_compilation.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

37 lines
779 B
Diff

--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-AC_INIT(src/swmain.c)
+AC_INIT([sopwith], [1.8.4])
AC_CONFIG_AUX_DIR(autotools)
VERSION=1.8.4
@@ -46,7 +46,8 @@
;;
esac
-AM_INIT_AUTOMAKE(sopwith,$VERSION)
+AM_INIT_AUTOMAKE([-Wall foreign])
+AM_PROG_AR
AM_CONFIG_HEADER(config.h:config.hin)
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@
bin_PROGRAMS = @SOPWITH_BINS@
EXTRA_PROGRAMS = sopwith gtksopwith psopwith
-CFLAGS = @CFLAGS@ -I..
+AM_CFLAGS = @CFLAGS@ @SDL_CFLAGS@ -I..
COMMON_SRC = \
video.h swcollsn.c swgames.h swmain.h swutil.h \
--- a/src/sdl/Makefile.am
+++ b/src/sdl/Makefile.am
@@ -1,4 +1,4 @@
-CFLAGS=@CFLAGS@ @SDL_CFLAGS@ -I..
+AM_CFLAGS=@CFLAGS@ @SDL_CFLAGS@ -I..
noinst_LIBRARIES = libsdlsopwith.a