From 2eeafa4465bac5f6936549381fecd3e43c050da9aad4b91e741c7d4b051ab428 Mon Sep 17 00:00:00 2001 From: Dmitriy Perlow Date: Mon, 27 Jun 2016 05:02:19 +0000 Subject: [PATCH] Accepting request 404895 from home:susnux:branches:games Fixed build with gcc6 OBS-URL: https://build.opensuse.org/request/show/404895 OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=60 --- 0ad.changes | 5 +++++ 0ad.spec | 5 +++-- fix-c++14-compat.patch | 29 +++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 fix-c++14-compat.patch diff --git a/0ad.changes b/0ad.changes index b0445e1..6b699c8 100644 --- a/0ad.changes +++ b/0ad.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 27 01:18:13 UTC 2016 - rpm@fthiessen.de + +- Fixed build with gcc6 (Tumbleweed), added fix-c++14-compat.patch + ------------------------------------------------------------------- Mon May 16 13:12:05 UTC 2016 - jengelh@inai.de diff --git a/0ad.spec b/0ad.spec index 5994424..d4a432b 100644 --- a/0ad.spec +++ b/0ad.spec @@ -22,6 +22,8 @@ Release: 0 Url: http://play0ad.com/ Source: http://sourceforge.net/projects/zero-ad/files/releases/%{name}-%{version}-alpha-unix-build.tar.xz Source99: %{name}.changes +# PATCH-FIX-UPSTREAM fix-c++14-compat.patch - http://trac.wildfiregames.com/ticket/4073 +Patch0: fix-c++14-compat.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: gcc-c++ @@ -109,6 +111,7 @@ history. %prep %setup -q -n %{name}-%{version}-alpha +%patch0 -p1 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE99}")" DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" TIME="\"$(date -d "${modified}" "+%%T")\"" @@ -126,7 +129,6 @@ popd install -Dm 0755 binaries/system/pyrogenesis %{buildroot}%{_bindir}/pyrogenesis install -Dm 0755 binaries/system/libCollada.so %{buildroot}%{_libdir}/%{name}/libCollada.so install -Dm 0755 binaries/system/libAtlasUI.so %{buildroot}%{_libdir}/%{name}/libAtlasUI.so -#install -Dm 0755 binaries/system/libminiupnpc.so.* %{buildroot}%{_libdir}/%{name}/ install -Dm 0755 binaries/system/libmozjs31-ps-release.so %{buildroot}%{_libdir}/%{name}/libmozjs31-ps-release.so install -Dm 0755 binaries/system/libnvcore.so %{buildroot}%{_libdir}/%{name}/libnvcore.so install -Dm 0755 binaries/system/libnvimage.so %{buildroot}%{_libdir}/%{name}/libnvimage.so @@ -156,7 +158,6 @@ mkdir -p %{buildroot}%{_datadir}/%{name} %{_bindir}/pyrogenesis %{_libdir}/%{name}/libCollada.so %{_libdir}/%{name}/libAtlasUI.so -#%{_libdir}/%{name}/libminiupnpc.so.* %{_libdir}/%{name}/libmozjs31-ps-release.so %{_libdir}/%{name}/libnvcore.so %{_libdir}/%{name}/libnvimage.so diff --git a/fix-c++14-compat.patch b/fix-c++14-compat.patch new file mode 100644 index 0000000..30bce10 --- /dev/null +++ b/fix-c++14-compat.patch @@ -0,0 +1,29 @@ +diff -Nur 0ad-0.0.20-alpha/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp new/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp +--- 0ad-0.0.20-alpha/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp 2015-02-22 00:58:01.000000000 +0100 ++++ new/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp 2016-06-27 01:30:36.049140952 +0200 +@@ -621,7 +621,7 @@ + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (png_ptr == NULL) { + // nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name ); +- return false; ++ return NULL; + } + + // Allocate/initialize a memory block for the image information +@@ -629,14 +629,14 @@ + if (info_ptr == NULL) { + png_destroy_read_struct(&png_ptr, NULL, NULL); + // nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name ); +- return false; ++ return NULL; + } + + // Set up the error handling + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + // nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name ); +- return false; ++ return NULL; + } + + // Set up the I/O functions.