[hedgewars] Updates from Hans

Bruno Wolff III bruno at fedoraproject.org
Sat Nov 3 15:55:16 UTC 2012


commit 35dc01186ae8485302426b1a34d2e788eb289615
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sat Nov 3 08:31:45 2012 -0500

    Updates from Hans
    
    Two patch files adjusted for source changes and the specfile updated for
    the latest hedgewars release (0.9.18).

 hedgewars-compiler-opts.patch |   50 ++++++++++++++++++++++------------------
 hedgewars-no-bytestring.patch |   20 ++++++++--------
 hedgewars.spec                |   39 +++++++++++++++----------------
 3 files changed, 56 insertions(+), 53 deletions(-)
---
diff --git a/hedgewars-compiler-opts.patch b/hedgewars-compiler-opts.patch
index 12b7110..eb1aa0b 100644
--- a/hedgewars-compiler-opts.patch
+++ b/hedgewars-compiler-opts.patch
@@ -1,11 +1,12 @@
---- CMakeLists.txt.orig	2011-11-19 14:48:08.000000000 -0600
-+++ CMakeLists.txt	2012-01-01 14:12:05.663480659 -0600
-@@ -147,9 +147,9 @@
+diff -up hedgewars-src-0.9.18/CMakeLists.txt~ hedgewars-src-0.9.18/CMakeLists.txt
+--- hedgewars-src-0.9.18/CMakeLists.txt~	2012-10-31 21:48:12.000000000 +0100
++++ hedgewars-src-0.9.18/CMakeLists.txt	2012-11-01 21:09:58.058213117 +0100
+@@ -158,9 +158,9 @@ endif (CMAKE_BUILD_TYPE)
  
  
- #set default flags values for all the project
+ #set default flags values for all projects
 -set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}")
--set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
+-set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
 -set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
 +set(CMAKE_C_FLAGS ${CFLAGS})
 +set(CMAKE_C_FLAGS_RELEASE ${CFLAGS})
@@ -13,27 +14,30 @@
  set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
  set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
  set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
-@@ -159,11 +159,11 @@
- if(Optz)
- #	set(pascal_compiler_flags_cmn "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
- 	set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
--	set(haskell_compiler_flags_cmn "-O2" "-w" "-fno-warn-unused-do-bind")
-+	set(haskell_compiler_flags_cmn ${CFLAGS} "-dynamic")
- else(Optz)
- #	set(pascal_compiler_flags_cmn "-O-" "-g" "-gh" "-gl" "-dDEBUGFILE" ${pascal_compiler_flags_cmn})
--	set(pascal_compiler_flags_cmn "-O-" "-g" "-gl" "-dDEBUGFILE" ${pascal_compiler_flags_cmn})
--	set(haskell_compiler_flags_cmn "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind")
-+	set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" ${pascal_compiler_flags_cmn})
-+	set(haskell_compiler_flags_cmn ${CFLAGS} "-dynamic")
- endif(Optz)
+@@ -182,13 +182,12 @@ set(haskell_flags "-O2" ${ghflags_parsed
+ #get BUILD_TYPE and enable/disable optimisation
+ if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
+     message(STATUS "Building Debug flavour")
+-    set(pascal_flags "-O-" "-g" "-gl" "-gv" ${pascal_flags})
+-    set(haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind" ${haskell_flags})
++    set(pascal_flags "-O2" "-Xs" "-Si" ${pascal_flags})
++    set(haskell_flags ${CFLAGS} "-dynamic" ${haskell_flags})
+ else()
+     message(STATUS "Building Release flavour")
+-#    set(pascal_flags "-O3" "-OpPENTIUM4" "-CfSSE3" "-Xs" "-Si" ${pascal_flags})
+-    set(pascal_flags "-Os" "-Ooregvar" "-Xs" "-Si" ${pascal_flags})
+-    set(haskell_flags "-w" "-fno-warn-unused-do-bind" ${haskell_flags})
++    set(pascal_flags "-O2" "-Xs" "-Si" ${pascal_flags})
++    set(haskell_flags ${CFLAGS} "-dynamic" ${haskell_flags})
+ endif()
  
  
-@@ -220,7 +220,7 @@
- 	set(CPACK_GENERATOR "ZIP;NSIS")
- 	set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars")
+@@ -274,7 +273,7 @@ if(WIN32 AND NOT UNIX)
+     set(CPACK_GENERATOR "ZIP;NSIS")
+     set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars")
  else(WIN32 AND NOT UNIX)
--	set(CPACK_STRIP_FILES "bin/hedgewars;bin/hwengine")
-+	set(CPACK_STRIP_FILES "")
+-    set(CPACK_STRIP_FILES "bin/hedgewars;bin/hwengine")
++    set(CPACK_STRIP_FILES "")
  endif(WIN32 AND NOT UNIX)
  
  set(CPACK_SOURCE_IGNORE_FILES
diff --git a/hedgewars-no-bytestring.patch b/hedgewars-no-bytestring.patch
index afe5ddf..3f415d0 100644
--- a/hedgewars-no-bytestring.patch
+++ b/hedgewars-no-bytestring.patch
@@ -1,12 +1,12 @@
---- hedgewars-0.9.17.orig/gameServer/Actions.hs	2011-11-22 17:57:10.482642522 -0800
-+++ hedgewars-0.9.17/gameServer/Actions.hs	2011-11-22 17:57:11.838642515 -0800
+--- hedgewars-src-0.9.18/gameServer/Actions.hs	2012-10-31 21:48:12.000000000 +0100
++++ hedgewars-src-0.9.18.new/gameServer/Actions.hs	2012-11-01 21:13:01.257303511 +0100
 @@ -1,4 +1,4 @@
 -{-# LANGUAGE CPP, OverloadedStrings #-}
 +{-# LANGUAGE CPP, OverloadedStrings, RankNTypes #-}
+ {-# OPTIONS_GHC -fno-warn-orphans #-}
  module Actions where
  
- import Control.Concurrent
-@@ -85,6 +85,11 @@
+@@ -92,6 +92,11 @@
      ri <- clientRoomA
      liftM (map sendChan . filter (/= cl)) $ roomClientsS ri
  
@@ -18,7 +18,7 @@
  processAction :: Action -> StateT ServerState IO ()
  
  
-@@ -429,7 +434,7 @@
+@@ -509,7 +514,7 @@
      si <- gets serverInfo
      newClId <- io $ do
          ci <- addClient rnc cl
@@ -27,16 +27,16 @@
  
          infoM "Clients" (show ci ++ ": New client. Time: " ++ show (connectTime cl))
  
---- hedgewars-0.9.17.orig/gameServer/Utils.hs	2011-11-22 17:57:10.530642521 -0800
-+++ hedgewars-0.9.17/gameServer/Utils.hs	2011-11-22 17:57:11.842642515 -0800
-@@ -13,7 +13,6 @@
+--- hedgewars-src-0.9.18/gameServer/Utils.hs	2012-10-29 07:10:05.000000000 +0100
++++ hedgewars-src-0.9.18.new/gameServer/Utils.hs	2012-11-01 21:12:29.897291647 +0100
+@@ -11,7 +11,6 @@
+ import qualified Data.List as List
  import Control.Monad
- import qualified Codec.Binary.Base64 as Base64
  import qualified Data.ByteString.Lazy as BL
 -import qualified Text.Show.ByteString as BS
  import qualified Data.ByteString.Char8 as B
  import qualified Data.ByteString.UTF8 as UTF8
- import qualified Data.ByteString as BW
+ import Data.Maybe
 @@ -105,8 +104,8 @@
          Right (a, new_b) -> let (a', b') = unfoldrE f new_b in (a : a', b')
          Left new_b       -> ([], new_b)
diff --git a/hedgewars.spec b/hedgewars.spec
index e6f2d97..1c6f1f2 100644
--- a/hedgewars.spec
+++ b/hedgewars.spec
@@ -1,11 +1,12 @@
 Name:           hedgewars
-Version:        0.9.17
-Release:        8%{?dist}
+Version:        0.9.18
+Release:        1%{?dist}
 Summary:        2D tankbattle game with the tanks replaced by hedgehogs
 Group:          Amusements/Games
 License:        GPL+
 URL:            http://www.hedgewars.org/
-Source0:        http://hedgewars.org/download/hedgewars-src-%{version}.tar.bz2
+# Note -2 upstream respun the tarbal...
+Source0:        http://download.gna.org/hedgewars/hedgewars-src-%{version}-2.tar.bz2
 Source1:        %{name}.desktop
 Patch0:         hedgewars-compiler-opts.patch
 # Text.Show.ByteString currently isn't available in Fedora and for the
@@ -15,7 +16,6 @@ Patch0:         hedgewars-compiler-opts.patch
 # avoid the same issue. The original patch is available from:
 # https://launchpadlibrarian.net/85736468/hedgewars_0.9.17-1~maverick0.1.debdiff
 Patch1:         hedgewars-no-bytestring.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  fpc qt4-devel SDL_mixer-devel SDL_net-devel SDL_image-devel
 BuildRequires:  SDL_ttf-devel openssl-devel cmake desktop-file-utils
 Requires:       dejavu-sans-fonts wqy-zenhei-fonts hicolor-icon-theme
@@ -45,15 +45,17 @@ BuildRequires:  ghc-utf8-string-devel
 BuildRequires:  ghc-hslogger-devel
 BuildRequires:  ghc-haskell2010-devel
 BuildRequires:  ghc-deepseq-devel
+BuildRequires:  ghc-vector-devel
 
 %description -n hedgewars-server
 A standalone server that can be used for LAN play or a private internet server.
 
 %prep
 %setup -q -n %{name}-src-%{version}
-%patch0
+%patch0 -p1
 %patch1 -p1
 
+
 %build
 %cmake -DWITH_SERVER=1 .
 make %{?_smp_mflags} VERBOSE=1
@@ -84,25 +86,20 @@ install -p -m 644 misc/hedgewars.png \
   $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %post
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %postun
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 
 %files
-%defattr(-,root,root,-)
 %doc COPYING Fonts_LICENSE.txt README
 %{_bindir}/%{name}
 %{_bindir}/hwengine
@@ -112,11 +109,13 @@ fi
 %{_datadir}/icons/hicolor/512x512/apps/%{name}.png
 
 %files -n hedgewars-server
-%defattr(-,root,root,-)
 %{_bindir}/%{name}-server
 
 
 %changelog
+* Thu Nov  1 2012 Hans de Goede <hdegoede at redhat.com> - 0.9.18-1
+- Update to latest upstream release: 0.9.18
+
 * Sat Aug 11 2012 Bruno Wolff III <bruno at wolff.to> - 0.9.17-8
 - Rebuild for libffi soname bump
 
@@ -146,7 +145,7 @@ fi
 - Use modified Debian patch to work around Text.Show.ByteString not being available
 - hedgewars-server now needs ghc-deepseq
 
-* Fri Oct 21 2011 Marcela Mašláňová <mmaslano at redhat.com> - 0.9.15-10.2
+* Fri Oct 21 2011 Marcela Ma??l????ov?? <mmaslano at redhat.com> - 0.9.15-10.2
 - rebuild with new gmp without compat lib
 
 * Tue Oct 11 2011 Peter Schiffer <pschiffe at redhat.com> - 0.9.15-10.1
@@ -170,7 +169,7 @@ fi
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.15-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
-* Thu Feb 03 2011 Dan Horák <dan[at]danny.cz> 0.9.15-4
+* Thu Feb 03 2011 Dan Hor??k <dan[at]danny.cz> 0.9.15-4
 - add s390(x) to ExcludeArch - no fpc or ghc there
 
 * Wed Feb 01 2011 Bruno Wolff III <bruno at wolff.to> 0.9.15-3


More information about the scm-commits mailing list