void-packages/srcpkgs/OpenXcom/patches/openxcom-cmath-algorithm-fixes.patch
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

55 lines
1.7 KiB
Diff

diff -aur src/Basescape/BaseInfoState.h src/Basescape/BaseInfoState.h
--- a/src/Basescape/BaseInfoState.h 2018-03-14 15:06:59.665628271 +0000
+++ b/src/Basescape/BaseInfoState.h 2018-03-14 15:43:22.067605905 +0000
@@ -19,6 +19,7 @@
#ifndef OPENXCOM_BASEINFOSTATE_H
#define OPENXCOM_BASEINFOSTATE_H
+#include <cmath>
#include "../Engine/State.h"
namespace OpenXcom
diff -aur src/Basescape/CraftInfoState.h src/Basescape/CraftInfoState.h
--- a/src/Basescape/CraftInfoState.h 2018-03-14 15:02:09.783729176 +0000
+++ b/src/Basescape/CraftInfoState.h 2018-03-14 15:43:16.476703036 +0000
@@ -19,6 +19,7 @@
#ifndef OPENXCOM_CRAFTINFOSTATE_H
#define OPENXCOM_CRAFTINFOSTATE_H
+#include <cmath>
#include "../Engine/State.h"
namespace OpenXcom
diff -aur src/Engine/Language.h src/Engine/Language.h
--- a/src/Engine/Language.h 2018-03-14 15:11:37.236763021 +0000
+++ b/src/Engine/Language.h 2018-03-14 15:42:14.751775215 +0000
@@ -23,6 +23,7 @@
#include <vector>
#include <string>
#include <yaml-cpp/yaml.h>
+#include <algorithm>
#include "LocalizedText.h"
#include "../Savegame/Soldier.h"
diff -aur src/Engine/OptionInfo.h src/Engine/OptionInfo.h
--- a/src/Engine/OptionInfo.h 2018-03-14 15:14:50.346384845 +0000
+++ b/src/Engine/OptionInfo.h 2018-03-14 15:42:14.750775233 +0000
@@ -23,6 +23,7 @@
#include <string>
#include <map>
#include <SDL.h>
+#include <algorithm>
namespace OpenXcom
{
diff -aur src/Savegame/CraftWeapon.h src/Savegame/CraftWeapon.h
--- a/src/Savegame/CraftWeapon.h 2018-03-14 15:27:14.695387913 +0000
+++ b/src/Savegame/CraftWeapon.h 2018-03-14 15:42:14.748775267 +0000
@@ -21,6 +21,7 @@
#include <string>
#include <yaml-cpp/yaml.h>
+#include <cmath>
namespace OpenXcom
{