From 4ce1ddb7a829d76df83d0737a2a797561c6eabae Mon Sep 17 00:00:00 2001 From: Bruno Wolff III Date: Oct 03 2010 17:32:34 +0000 Subject: Update to 0.9.13. ghc-hslogger is available now, so server can use logging. Use -dynamic for ghc builds. --- diff --git a/.gitignore b/.gitignore index 47396b8..53904bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hedgewars-src-0.9.12.tar.bz2 +/hedgewars-src-0.9.13.tar.bz2 diff --git a/hedgewars-0.9.0-debuginfo.patch b/hedgewars-0.9.0-debuginfo.patch deleted file mode 100644 index 8c1e1e3..0000000 --- a/hedgewars-0.9.0-debuginfo.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up hedgewars-src-0.9.7/CMakeLists.txt~ hedgewars-src-0.9.7/CMakeLists.txt ---- hedgewars-src-0.9.7/CMakeLists.txt~ 2008-11-04 11:01:50.000000000 +0100 -+++ hedgewars-src-0.9.7/CMakeLists.txt 2008-11-04 11:01:50.000000000 +0100 -@@ -52,7 +52,7 @@ if(WIN32 AND NOT UNIX) - set(CPACK_NSIS_MODIFY_PATH OFF) - set(CPACK_GENERATOR "ZIP;NSIS") - else(WIN32 AND NOT UNIX) -- set(CPACK_STRIP_FILES "bin/hedgewars;bin/hwengine") -+ set(CPACK_STRIP_FILES "") - endif(WIN32 AND NOT UNIX) - - set(CPACK_SOURCE_IGNORE_FILES -diff -up hedgewars-src-0.9.12/hedgewars/CMakeLists.txt~ hedgewars-src-0.9.12/hedgewars/CMakeLists.txt ---- hedgewars-src-0.9.12/hedgewars/CMakeLists.txt~ 2009-10-18 18:55:53.000000000 +0200 -+++ hedgewars-src-0.9.12/hedgewars/CMakeLists.txt 2009-12-01 15:06:23.000000000 +0100 -@@ -96,7 +96,7 @@ endif (NOT pascal_compiler) - set(pascal_compiler_flags ${noexecstack_flags} "-B" "-FE../bin" "-Fl../bin/" "-Cs2000000" "-vwi" ${hwengine_project}) - - if(OPTIMIZATIONS) -- set(pascal_compiler_flags "-O2" "-Xs" "-Nu" ${pascal_compiler_flags}) -+ set(pascal_compiler_flags "-g" "-O2" "-Xs" "-Nu" ${pascal_compiler_flags}) - if(APPLE AND NOT universal_build) - set(pascal_compiler_flags "-fPIC" "-CfSSE2" ${pascal_compiler_flags}) #instruction set for ppc is 7400 - endif() diff --git a/hedgewars-compiler-opts.patch b/hedgewars-compiler-opts.patch new file mode 100644 index 0000000..ae50855 --- /dev/null +++ b/hedgewars-compiler-opts.patch @@ -0,0 +1,38 @@ +--- CMakeLists.txt.orig 2010-04-03 11:38:48.000000000 -0500 ++++ CMakeLists.txt 2010-10-03 12:00:04.881370735 -0500 +@@ -122,9 +122,9 @@ + + + #set default flags values for all the project +-set(CMAKE_C_FLAGS "-pipe") +-set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer") +-set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG") ++set(CMAKE_C_FLAGS ${CFLAGS}) ++set(CMAKE_C_FLAGS_RELEASE ${CFLAGS}) ++set(CMAKE_C_FLAGS_DEBUG ${CFLAGS}) + 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}) +@@ -137,10 +137,10 @@ + + if(Optz) + set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" ${pascal_compiler_flags_cmn}) +- set(haskell_compiler_flags_cmn "-O2" "-w") ++ set(haskell_compiler_flags_cmn ${CFLAGS} "-dynamic") + else(Optz) +- set(pascal_compiler_flags_cmn "-O-" "-ghl" "-dDEBUGFILE" "-vwnv" ${pascal_compiler_flags_cmn}) +- set(haskell_compiler_flags_cmn "-Wall" "-debug" "-dcore-lint") ++ set(pascal_compiler_flags_cmn "-O2" "-Xs" "-Si" ${pascal_compiler_flags_cmn}) ++ set(haskell_compiler_flags_cmn ${CFLAGS} "-dynamic") + endif(Optz) + + +@@ -192,7 +192,7 @@ + set(CPACK_NSIS_MODIFY_PATH OFF) + set(CPACK_GENERATOR "ZIP;NSIS") + else(WIN32 AND NOT UNIX) +- 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-nolog.patch b/hedgewars-nolog.patch deleted file mode 100644 index 45c755e..0000000 --- a/hedgewars-nolog.patch +++ /dev/null @@ -1,133 +0,0 @@ ---- gameServer/OfficialServer/DBInteraction.hs.orig 2010-05-23 17:45:54.000000000 -0500 -+++ gameServer/OfficialServer/DBInteraction.hs 2010-05-23 17:46:06.000000000 -0500 -@@ -13,7 +13,7 @@ - import qualified Data.Map as Map - import Monad - import Maybe --import System.Log.Logger -+-- import System.Log.Logger - import Data.Time - ------------------------ - import CoreTypes ---- gameServer/Actions.hs.orig 2010-05-23 17:38:47.000000000 -0500 -+++ gameServer/Actions.hs 2010-05-23 17:48:22.000000000 -0500 -@@ -5,7 +5,7 @@ - import Data.IntMap - import qualified Data.IntSet as IntSet - import qualified Data.Sequence as Seq --import System.Log.Logger -+-- import System.Log.Logger - import Monad - import Data.Time - import Maybe -@@ -133,7 +133,7 @@ - - - processAction (clID, serverInfo, clients, rooms) (ByeClient msg) = do -- infoM "Clients" (show (clientUID client) ++ " quits: " ++ msg) -+-- infoM "Clients" (show (clientUID client) ++ " quits: " ++ msg) - (_, _, newClients, newRooms) <- - if roomID client /= 0 then - processAction (clID, serverInfo, clients, rooms) $ RoomRemoveThisClient "quit" -@@ -354,14 +354,14 @@ - processAction (clID, serverInfo, clients, rooms) (ProcessAccountInfo info) = - case info of - HasAccount passwd isAdmin -> do -- infoM "Clients" $ show clID ++ " has account" -+-- infoM "Clients" $ show clID ++ " has account" - writeChan (sendChan $ clients ! clID) ["ASKPASSWORD"] - return (clID, serverInfo, adjust (\cl -> cl{webPassword = passwd, isAdministrator = isAdmin}) clID clients, rooms) - Guest -> do -- infoM "Clients" $ show clID ++ " is guest" -+-- infoM "Clients" $ show clID ++ " is guest" - processAction (clID, serverInfo, adjust (\cl -> cl{logonPassed = True}) clID clients, rooms) MoveToLobby - Admin -> do -- infoM "Clients" $ show clID ++ " is admin" -+-- infoM "Clients" $ show clID ++ " is admin" - foldM processAction (clID, serverInfo, adjust (\cl -> cl{logonPassed = True, isAdministrator = True}) clID clients, rooms) [MoveToLobby, AnswerThisClient ["ADMIN_ACCESS"]] - - -@@ -402,7 +402,7 @@ - - processAction (clID, serverInfo, clients, rooms) (AddClient client) = do - let updatedClients = insert (clientUID client) client clients -- infoM "Clients" (show (clientUID client) ++ ": New client. Time: " ++ show (connectTime client)) -+-- infoM "Clients" (show (clientUID client) ++ ": New client. Time: " ++ show (connectTime client)) - writeChan (sendChan client) ["CONNECTED", "Hedgewars server http://www.hedgewars.org/"] - - let newLogins = takeWhile (\(_ , time) -> (connectTime client) `diffUTCTime` time <= 11) $ lastLogins serverInfo ---- gameServer/hedgewars-server.hs.orig 2010-05-23 17:38:56.000000000 -0500 -+++ gameServer/hedgewars-server.hs 2010-05-23 17:44:33.000000000 -0500 -@@ -11,7 +11,7 @@ - #else - import qualified Control.Exception as Exception - #endif --import System.Log.Logger -+-- import System.Log.Logger - ----------------------------------- - import Opts - import CoreTypes -@@ -25,9 +25,9 @@ - #endif - - --setupLoggers = -- updateGlobalLogger "Clients" -- (setLevel INFO) -+-- setupLoggers = -+-- updateGlobalLogger "Clients" -+-- (setLevel INFO) - - main = withSocketsDo $ do - #if !defined(mingw32_HOST_OS) -@@ -35,7 +35,7 @@ - installHandler sigCHLD Ignore Nothing; - #endif - -- setupLoggers -+-- setupLoggers - - stats <- atomically $ newTMVar (StatisticsInfo 0 0) - dbQueriesChan <- newChan ---- gameServer/ServerCore.hs.orig 2010-05-23 17:39:06.000000000 -0500 -+++ gameServer/ServerCore.hs 2010-05-23 17:49:23.000000000 -0500 -@@ -6,7 +6,7 @@ - import Control.Concurrent.Chan - import Control.Monad - import qualified Data.IntMap as IntMap --import System.Log.Logger -+-- import System.Log.Logger - -------------------------------------- - import CoreTypes - import NetRoutines -@@ -36,12 +36,12 @@ - (clientUID ci, serverInfo, clients, rooms) (AddClient ci) - - ClientMessage (clID, cmd) -> do -- debugM "Clients" $ (show clID) ++ ": " ++ (show cmd) -+-- debugM "Clients" $ (show clID) ++ ": " ++ (show cmd) - if clID `IntMap.member` clients then - reactCmd serverInfo clID cmd clients rooms - else - do -- debugM "Clients" "Message from dead client" -+-- debugM "Clients" "Message from dead client" - return (serverInfo, clients, rooms) - - ClientAccountInfo (clID, info) -> -@@ -51,7 +51,7 @@ - (ProcessAccountInfo info) - else - do -- debugM "Clients" "Got info for dead client" -+-- debugM "Clients" "Got info for dead client" - return (serverInfo, clients, rooms) - - TimerAction tick -> -@@ -84,4 +84,4 @@ - - forkIO $ mainLoop serverInfo IntMap.empty (IntMap.singleton 0 newRoom) - -- forever $ threadDelay (60 * 60 * 10^6) >> putStrLn "***" -\ No newline at end of file -+ forever $ threadDelay (60 * 60 * 10^6) >> putStrLn "***" diff --git a/hedgewars-remove-Nu.patch b/hedgewars-remove-Nu.patch deleted file mode 100644 index 0e6f3a4..0000000 --- a/hedgewars-remove-Nu.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- hedgewars/CMakeLists.txt.orig 2010-05-23 15:06:21.000000000 -0500 -+++ hedgewars/CMakeLists.txt 2010-05-23 15:06:32.000000000 -0500 -@@ -96,7 +96,7 @@ - set(pascal_compiler_flags ${noexecstack_flags} "-B" "-FE../bin" "-Fl../bin/" "-Cs2000000" "-vwi" ${hwengine_project}) - - if(OPTIMIZATIONS) -- set(pascal_compiler_flags "-g" "-O2" "-Xs" "-Nu" ${pascal_compiler_flags}) -+ set(pascal_compiler_flags "-g" "-O2" "-Xs" ${pascal_compiler_flags}) - if(APPLE AND NOT universal_build) - set(pascal_compiler_flags "-fPIC" "-CfSSE2" ${pascal_compiler_flags}) #instruction set for ppc is 7400 - endif() diff --git a/hedgewars.spec b/hedgewars.spec index 25d6a49..ee37705 100644 --- a/hedgewars.spec +++ b/hedgewars.spec @@ -1,6 +1,6 @@ Name: hedgewars -Version: 0.9.12 -Release: 4%{?dist} +Version: 0.9.13 +Release: 1%{?dist} Summary: 2D tankbattle game with the tanks replaced by hedgehogs Group: Amusements/Games License: GPL+ @@ -8,13 +8,11 @@ URL: http://www.hedgewars.org/ Source0: http://hedgewars.org/download/hedgewars-src-%{version}.tar.bz2 Source1: %{name}.desktop Source2: %{name}.png -Patch0: hedgewars-0.9.0-debuginfo.patch -Patch1: hedgewars-remove-Nu.patch -Patch2: hedgewars-nolog.patch +Patch0: hedgewars-compiler-opts.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 google-droid-sans-fonts hicolor-icon-theme +Requires: dejavu-sans-fonts wqy-zenhei-fonts hicolor-icon-theme # https://bugzilla.redhat.com/show_bug.cgi?id=520400 ExcludeArch: ppc64 @@ -33,26 +31,19 @@ such as the "Rope" or "Parachute", to move to otherwise inaccessible areas. Summary: Standalone server for hedgewars Group: Amusements/Games Requires: %{name} -Requires: ghc-stm -Requires: ghc-dataenc -Requires: ghc-network -Requires: ghc-utf8-string BuildRequires: ghc BuildRequires: ghc-stm-devel BuildRequires: ghc-dataenc-devel BuildRequires: ghc-network-devel BuildRequires: ghc-utf8-string-devel +BuildRequires: ghc-hslogger-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 -p1 -%patch1 -%patch2 -sed -i "s/-w -O2 -fomit-frame-pointer/$RPM_OPT_FLAGS/" CMakeLists.txt - +%patch0 %build %cmake -DWITH_SERVER=1 . @@ -65,11 +56,11 @@ make install DESTDIR=$RPM_BUILD_ROOT # replace private font copies with symlinks to system versions rm $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DejaVuSans-Bold.ttf -rm $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DroidSansFallback.ttf +rm $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/wqy-zenhei.ttc ln -s ../../../fonts/dejavu/DejaVuSans-Bold.ttf \ $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DejaVuSans-Bold.ttf -ln -s ../../../fonts/google-droid/DroidSansFallback.ttf \ - $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/DroidSansFallback.ttf +ln -s ../../../fonts/wqy-zenhei/wqy-zenhei.ttc \ + $RPM_BUILD_ROOT%{_datadir}/%{name}/Data/Fonts/wqy-zenhei.ttc # below is the desktop file and icon stuff. mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications @@ -113,6 +104,10 @@ fi %changelog +* Sun Oct 03 2010 Bruno Wolff III 0.9.13-1 +- Update to 0.9.13 - Change summary at: http://www.hedgewars.org/node/2037 +- Server logging enable now that ghc-hslogger is available. + * Sun Jun 13 2010 Bruno Wolff III 0.9.12-4 - In F14 ghc-utf8-string-devel needs to be build required. diff --git a/sources b/sources index 9ef23c7..6c7645f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -10e9815d19df066b5df074fc2cd08c26 hedgewars-src-0.9.12.tar.bz2 +b91de13d54670970568b56f150cf9fe4 hedgewars-src-0.9.13.tar.bz2