summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWorMzy Tykashi2016-05-09 14:50:38 +0100
committerWorMzy Tykashi2016-05-09 14:50:38 +0100
commit4a9750bfcd96497ac15db57420cda5970aa79e65 (patch)
tree04ad47ee4f046e453e24e75e95f07ad5cf9a0f2a
parente2aa0ceef0c2330bc15df71964c074833083474c (diff)
downloadaur-4a9750bfcd96497ac15db57420cda5970aa79e65.tar.gz
gcc 6 fixes
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--abs-fix.patch18
-rw-r--r--auto_ptr-fix.patch75
4 files changed, 110 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7498ec56b0c5..a2dc3261d251 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = openxcom
pkgdesc = An open-source reimplementation of the famous X-COM game
pkgver = 1.0
- pkgrel = 4
+ pkgrel = 5
url = http://openxcom.org/
install = openxcom.install
arch = i686
@@ -19,8 +19,12 @@ pkgbase = openxcom
depends = mesa
optdepends = openxcom-data-steam: Original XCom data files from steam
source = https://github.com/SupSuper/OpenXcom/archive/v1.0.tar.gz
+ source = abs-fix.patch
+ source = auto_ptr-fix.patch
source = openxcom.install
sha256sums = 45acb280010a01d60506b1c5f2951ae501c012cc6161aac470bd15c1e6981246
+ sha256sums = e4e3f082202e47ee7f8e9448d3d8111bba9a67d72f0fea32c3d6af788e7f91fe
+ sha256sums = 40b52c623a71fa8986296e8e6c3c775fe4751fe1846722ef1442bd171ac31a8b
sha256sums = 33a412d870d8c1399738b71f772aaa5954d0028a9c42373ca4a27124c154956d
pkgname = openxcom
diff --git a/PKGBUILD b/PKGBUILD
index d96f194db0e1..9f74d295cdbc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=openxcom
pkgver=1.0
-pkgrel=4
+pkgrel=5
pkgdesc="An open-source reimplementation of the famous X-COM game"
arch=('i686' 'x86_64')
url="http://openxcom.org/"
@@ -15,19 +15,28 @@ makedepends=('boost' 'glu' 'xmlto' 'docbook-xml' 'docbook-xsl')
optdepends=('openxcom-data-steam: Original XCom data files from steam')
install="${pkgname}.install"
source=("https://github.com/SupSuper/OpenXcom/archive/v1.0.tar.gz"
+ "abs-fix.patch"
+ "auto_ptr-fix.patch"
"${pkgname}.install")
sha256sums=('45acb280010a01d60506b1c5f2951ae501c012cc6161aac470bd15c1e6981246'
+ 'e4e3f082202e47ee7f8e9448d3d8111bba9a67d72f0fea32c3d6af788e7f91fe'
+ '40b52c623a71fa8986296e8e6c3c775fe4751fe1846722ef1442bd171ac31a8b'
'33a412d870d8c1399738b71f772aaa5954d0028a9c42373ca4a27124c154956d')
+prepare() {
+ cd OpenXcom-1.0
+ patch -p1 -i "$srcdir/abs-fix.patch"
+ patch -p1 -i "$srcdir/auto_ptr-fix.patch"
+}
build() {
- cd "${srcdir}/OpenXcom-1.0"
+ cd OpenXcom-1.0
./autogen.sh
./configure --prefix=/usr --without-docs
make
}
package() {
- cd "${srcdir}/OpenXcom-1.0"
+ cd OpenXcom-1.0
make DESTDIR="$pkgdir" install
}
diff --git a/abs-fix.patch b/abs-fix.patch
new file mode 100644
index 000000000000..46e3686a490b
--- /dev/null
+++ b/abs-fix.patch
@@ -0,0 +1,18 @@
+diff -aur a/src/Geoscape/Globe.cpp b/src/Geoscape/Globe.cpp
+--- a/src/Geoscape/Globe.cpp 2016-05-09 14:23:24.784162800 +0100
++++ b/src/Geoscape/Globe.cpp 2016-05-09 14:22:48.994666182 +0100
+@@ -1390,12 +1390,12 @@
+
+ if (fabs(sx)<0.01)
+ {
+- seg = abs( sy/(2*M_PI)*48 );
++ seg = std::abs( sy/(2*M_PI)*48 );
+ if (seg == 0) ++seg;
+ }
+ else
+ {
+- seg = abs( sx/(2*M_PI)*96 );
++ seg = std::abs( sx/(2*M_PI)*96 );
+ if (seg == 0) ++seg;
+ }
+
diff --git a/auto_ptr-fix.patch b/auto_ptr-fix.patch
new file mode 100644
index 000000000000..e8531642e801
--- /dev/null
+++ b/auto_ptr-fix.patch
@@ -0,0 +1,75 @@
+diff -aur a/src/Ruleset/RuleAlienMission.cpp b/src/Ruleset/RuleAlienMission.cpp
+--- a/src/Ruleset/RuleAlienMission.cpp 2016-05-09 14:33:33.955934374 +0100
++++ b/src/Ruleset/RuleAlienMission.cpp 2016-05-09 14:33:15.148834301 +0100
+@@ -85,7 +85,7 @@
+ if (assoc.end() == existing)
+ {
+ // New entry, load and add it.
+- std::auto_ptr<WeightedOptions> nw(new WeightedOptions);
++ std::unique_ptr<WeightedOptions> nw(new WeightedOptions);
+ nw->load(nn->second);
+ assoc.insert(std::make_pair(month, nw.release()));
+ }
+diff -aur a/src/Ruleset/Ruleset.cpp b/src/Ruleset/Ruleset.cpp
+--- a/src/Ruleset/Ruleset.cpp 2016-05-09 14:37:50.699784577 +0100
++++ b/src/Ruleset/Ruleset.cpp 2016-05-09 14:41:53.193130469 +0100
+@@ -437,7 +437,7 @@
+ }
+ else
+ {
+- std::auto_ptr<MCDPatch> patch(new MCDPatch());
++ std::unique_ptr<MCDPatch> patch(new MCDPatch());
+ patch->load(*i);
+ _MCDPatches[type] = patch.release();
+ _MCDPatchesIndex.push_back(type);
+@@ -446,7 +446,7 @@
+ for (YAML::const_iterator i = doc["extraSprites"].begin(); i != doc["extraSprites"].end(); ++i)
+ {
+ std::string type = (*i)["type"].as<std::string>();
+- std::auto_ptr<ExtraSprites> extraSprites(new ExtraSprites());
++ std::unique_ptr<ExtraSprites> extraSprites(new ExtraSprites());
+ extraSprites->load(*i, _modIndex);
+ _extraSprites.push_back(std::make_pair(type, extraSprites.release()));
+ _extraSpritesIndex.push_back(type);
+@@ -454,7 +454,7 @@
+ for (YAML::const_iterator i = doc["extraSounds"].begin(); i != doc["extraSounds"].end(); ++i)
+ {
+ std::string type = (*i)["type"].as<std::string>();
+- std::auto_ptr<ExtraSounds> extraSounds(new ExtraSounds());
++ std::unique_ptr<ExtraSounds> extraSounds(new ExtraSounds());
+ extraSounds->load(*i, _modIndex);
+ _extraSounds.push_back(std::make_pair(type, extraSounds.release()));
+ _extraSoundsIndex.push_back(type);
+@@ -468,7 +468,7 @@
+ }
+ else
+ {
+- std::auto_ptr<ExtraStrings> extraStrings(new ExtraStrings());
++ std::unique_ptr<ExtraStrings> extraStrings(new ExtraStrings());
+ extraStrings->load(*i);
+ _extraStrings[type] = extraStrings.release();
+ _extraStringsIndex.push_back(type);
+diff -aur a/src/Savegame/AlienStrategy.cpp b/src/Savegame/AlienStrategy.cpp
+--- a/src/Savegame/AlienStrategy.cpp 2016-05-09 14:37:50.704784621 +0100
++++ b/src/Savegame/AlienStrategy.cpp 2016-05-09 14:41:39.184983581 +0100
+@@ -87,7 +87,7 @@
+ {
+ std::string region = (*nn)["region"].as<std::string>();
+ const YAML::Node &missions = (*nn)["missions"];
+- std::auto_ptr<WeightedOptions> options(new WeightedOptions());
++ std::unique_ptr<WeightedOptions> options(new WeightedOptions());
+ options->load(missions);
+ _regionMissions.insert(std::make_pair(region, options.release()));
+ }
+diff -aur a/src/Savegame/SavedGame.cpp b/src/Savegame/SavedGame.cpp
+--- a/src/Savegame/SavedGame.cpp 2016-05-09 14:37:50.704784621 +0100
++++ b/src/Savegame/SavedGame.cpp 2016-05-09 14:41:29.698884793 +0100
+@@ -371,7 +371,7 @@
+ {
+ std::string missionType = (*it)["type"].as<std::string>();
+ const RuleAlienMission &mRule = *rule->getAlienMission(missionType);
+- std::auto_ptr<AlienMission> mission(new AlienMission(mRule));
++ std::unique_ptr<AlienMission> mission(new AlienMission(mRule));
+ mission->load(*it, *this);
+ _activeMissions.push_back(mission.release());
+ }