Hello community, here is the log from the commit of package openttd for openSUSE:Factory checked in at 2016-09-14 23:34:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openttd (Old) and /work/SRC/openSUSE:Factory/.openttd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openttd" Changes: -------- --- /work/SRC/openSUSE:Factory/openttd/openttd.changes 2016-06-19 11:08:51.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.openttd.new/openttd.changes 2016-09-14 23:34:07.000000000 +0200 @@ -1,0 +2,11 @@ +Sat Jul 16 08:42:48 UTC 2016 - [email protected] + +- Update to version 1.6.1 (see changelog.txt) +- Drop openttd-gcc5.patch as it is not required anymore. +- Add gcc-version-detection.patch in collaboration with upstream. +- Add a man page for the dedicated server binary. +- Remove unnecessary desktop category macros. +- Use standard post macros for icons and starters. +- Eliminate duplicate files using fdupes. + +------------------------------------------------------------------- Old: ---- openttd-1.5.3-source.tar.xz openttd-gcc5.patch New: ---- gcc-version-detection.patch openttd-1.6.1-source.tar.xz openttd.appdata.xml ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openttd.spec ++++++ --- /var/tmp/diff_new_pack.islewO/_old 2016-09-14 23:34:09.000000000 +0200 +++ /var/tmp/diff_new_pack.islewO/_new 2016-09-14 23:34:09.000000000 +0200 @@ -18,17 +18,22 @@ Name: openttd -Version: 1.5.3 +Version: 1.6.1 Release: 0 Summary: An open source clone of Chris Sawyer's Transport Tycoon Deluxe License: GPL-2.0 Group: Amusements/Games/Strategy/Other Url: http://www.openttd.org Source: http://binaries.openttd.org/releases/%{version}/%{name}-%{version}-source.tar.xz -Patch0: openttd-gcc5.patch +# PATCH-FEATURE-UPSTREAM https://bugs.openttd.org/task/6490 +Source2: openttd.appdata.xml +# PATCH-FIX-UPSTREAM https://bugs.openttd.org/task/6487 +Patch0: gcc-version-detection.patch BuildRequires: SDL-devel +BuildRequires: fdupes BuildRequires: fontconfig-devel -BuildRequires: gcc-c++ +BuildRequires: gcc-c++ > 3.3 +BuildRequires: hicolor-icon-theme BuildRequires: libicu-devel BuildRequires: libpng-devel BuildRequires: pkgconfig @@ -53,7 +58,6 @@ %else BuildRequires: desktop-file-utils BuildRequires: grfcodec -Requires: hicolor-icon-theme %endif %if 0%{?suse_version} || 0%{?mdkversion} Recommends: openttd-openmsx @@ -137,23 +141,21 @@ make %{?_smp_mflags} VERBOSE=1 %install -# install the dedicated binary +# install the dedicated server install -D -m0755 dedicated/openttd %{buildroot}%{_bindir}/%{name}-dedicated -# install the gui binary +install -D -m0644 dedicated/man/openttd.6.gz %{buildroot}%{_mandir}/man6/%{name}-dedicated.6.gz + +# install the game make install INSTALL_DIR=%{buildroot} VERBOSE=1 -%if 0%{?suse_version} -%suse_update_desktop_file -r %{name} Game StrategyGame -%else -%if 0%{?fedora} || 0%{?mdkversion} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600 -desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ - --add-category=StrategyGame \ - media/openttd.desktop -%endif -%endif +mkdir -p %{buildroot}%{_datadir}/appdata +install -D -m0644 %{S:2} %{buildroot}%{_datadir}/appdata/openttd.appdata.xml + +%fdupes %{buildroot}%{_datadir} %post -touch --no-create %{_datadir}/icons/hicolor >/dev/null 2>&1 || : +%desktop_database_post +%icon_theme_cache_post %post dedicated rm -f %{_bindir}/%{name} @@ -165,18 +167,15 @@ fi %postun -if [ "$1" -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor >/dev/null 2>&1 - gtk-update-icon-cache %{_datadir}/icons/hicolor >/dev/null 2>&1 || : -fi - -%posttrans -gtk-update-icon-cache %{_datadir}/icons/hicolor >/dev/null 2>&1 || : +%desktop_database_postun +%icon_theme_cache_postun %files %defattr(-, root, root) %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop +%dir %{_datadir}/appdata/ +%{_datadir}/appdata/openttd.appdata.xml %{_datadir}/icons/hicolor %{_datadir}/pixmaps/%{name}.32.xpm %{_mandir}/man6/%{name}.6.* @@ -184,6 +183,7 @@ %files dedicated %defattr(-, root, root) %{_bindir}/%{name}-dedicated +%{_mandir}/man6/%{name}-dedicated.6.* %files data %defattr(-, root, root) ++++++ gcc-version-detection.patch ++++++ >From f7a7f141d3086c288746436eab98b89938b17519 Mon Sep 17 00:00:00 2001 From: frosch <[email protected]> Date: Sun, 17 Jul 2016 11:10:21 +0000 Subject: [PATCH] (svn r27616) -Codechange [FS#6487]: [Build] Change the GCC version detection so that it works with two-digit and truncated versions. --- config.lib | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/config.lib b/config.lib index 2ef6712..02a1573 100644 --- a/config.lib +++ b/config.lib @@ -1330,9 +1330,11 @@ make_compiler_cflags() { ldflags="$ldflags -rdynamic" else # Enable some things only for certain GCC versions - cc_version=`$1 -dumpversion | cut -c 1,3` + # cc_version = major_version * 100 + minor_version + # For example: "3.3" -> 303, "4.9.2" -> 409, "6" -> 600, "23.5" -> 2305 + cc_version=`$1 -dumpversion | $awk -F . '{printf "%d%02d", $1, $2}'` - if [ $cc_version -lt 33 ]; then + if [ $cc_version -lt 303 ]; then log 1 "configure: error: gcc older than 3.3 can't compile OpenTTD because of its poor template support" exit 1 fi @@ -1345,20 +1347,20 @@ make_compiler_cflags() { if [ $enable_assert -eq 0 ]; then # Do not warn about unused variables when building without asserts flags="$flags -Wno-unused-variable" - if [ $cc_version -ge 46 ]; then + if [ $cc_version -ge 406 ]; then # GCC 4.6 gives more warnings, disable them too flags="$flags -Wno-unused-but-set-variable" flags="$flags -Wno-unused-but-set-parameter" fi fi - if [ $cc_version -ge 34 ]; then + if [ $cc_version -ge 304 ]; then # Warn when a variable is used to initialise itself: # int a = a; flags="$flags -Winit-self" fi - if [ $cc_version -ge 40 ]; then + if [ $cc_version -ge 400 ]; then # GCC 4.0+ complains about that we break strict-aliasing. # On most places we don't see how to fix it, and it doesn't # break anything. So disable strict-aliasing to make the @@ -1369,7 +1371,7 @@ make_compiler_cflags() { flags="$flags -Wcast-qual" fi - if [ $cc_version -ge 42 ]; then + if [ $cc_version -ge 402 ]; then # GCC 4.2+ automatically assumes that signed overflows do # not occur in signed arithmetics, whereas we are not # sure that they will not happen. It furthermore complains @@ -1380,19 +1382,19 @@ make_compiler_cflags() { flags="$flags -Wnon-virtual-dtor" fi - if [ $cc_version -ge 43 ] && [ $cc_version -lt 60 ]; then + if [ $cc_version -ge 403 ] && [ $cc_version -lt 600 ]; then # Use gnu++0x mode so static_assert() is available. # Don't use c++0x, it breaks mingw (with gcc 4.4.0). cxxflags="$cxxflags -std=gnu++0x" fi - if [ $cc_version -eq 45 ]; then + if [ $cc_version -eq 405 ]; then # Prevent optimisation supposing enums are in a range specified by the standard # For details, see http://gcc.gnu.org/PR43680 flags="$flags -fno-tree-vrp" fi - if [ $cc_version -ge 47 ]; then + if [ $cc_version -ge 407 ]; then # Disable -Wnarrowing which gives many warnings, such as: # warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing] # They are valid according to the C++ standard, but useless. @@ -1401,7 +1403,7 @@ make_compiler_cflags() { flags="$flags -Wno-free-nonheap-object" fi - if [ $cc_version -ge 60 ]; then + if [ $cc_version -ge 600 ]; then # -flifetime-dse=2 (default since GCC 6) doesn't play # well with our custom pool item allocator cxxflags="$cxxflags -flifetime-dse=1 -std=gnu++14" @@ -1412,7 +1414,7 @@ make_compiler_cflags() { has_lto=`$1 -dumpspecs | grep '\%{flto'` if [ -n "$has_lto" ]; then # Use LTO only if we see LTO exists and is requested - if [ $cc_version -lt 46 ]; then + if [ $cc_version -lt 406 ]; then flags="$flags -flto" else flags="$flags -flto=jobserver" @@ -1511,7 +1513,7 @@ make_cflags_and_ldflags() { fi fi - if [ "$os" = "OSX" ] && [ $cc_version -eq 40 ]; then + if [ "$os" = "OSX" ] && [ $cc_version -eq 400 ]; then # Apple's GCC 4.0 has a compiler bug for x86_64 with (higher) optimization, # wrongly optimizing ^= in loops. This disables the failing optimisation. CFLAGS="$CFLAGS -fno-expensive-optimizations" @@ -1535,7 +1537,7 @@ make_cflags_and_ldflags() { LDFLAGS="$LDFLAGS -mwin32" fi if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then - if [ $cc_version -lt 46 ]; then + if [ $cc_version -lt 406 ]; then flags="$flags -mno-cygwin" LDFLAGS="$LDFLAGS -mno-cygwin" fi @@ -1548,10 +1550,10 @@ make_cflags_and_ldflags() { LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -limm32" - if [ $cc_version -ge 44 ]; then + if [ $cc_version -ge 40 ]; then LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++" fi - if [ $cc_version -ge 47 ]; then + if [ $cc_version -ge 407 ]; then CFLAGS="$CFLAGS -mno-ms-bitfields" fi fi ++++++ openttd-1.5.3-source.tar.xz -> openttd-1.6.1-source.tar.xz ++++++ /work/SRC/openSUSE:Factory/openttd/openttd-1.5.3-source.tar.xz /work/SRC/openSUSE:Factory/.openttd.new/openttd-1.6.1-source.tar.xz differ: char 27, line 1
