rpms/hedgewars/devel hedgewars-nolog.patch, NONE, 1.1 hedgewars-remove-Nu.patch, NONE, 1.1 hedgewars.spec, 1.25, 1.26

Hans de Goede jwrdegoede at fedoraproject.org
Tue May 25 12:18:18 UTC 2010


Author: jwrdegoede

Update of /cvs/pkgs/rpms/hedgewars/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv5702

Modified Files:
	hedgewars.spec 
Added Files:
	hedgewars-nolog.patch hedgewars-remove-Nu.patch 
Log Message:
* Sun May 23 2010 Bruno Wolff III <bruno at wolff.to> 0.9.12-3
- Fix FTBFS bug 595168 due to invalid -Nu option for fpc.
- Add a dedicated server sub package (with logging disabled)


hedgewars-nolog.patch:
 Actions.hs                      |   12 ++++++------
 OfficialServer/DBInteraction.hs |    2 +-
 ServerCore.hs                   |   10 +++++-----
 hedgewars-server.hs             |   10 +++++-----
 4 files changed, 17 insertions(+), 17 deletions(-)

--- NEW FILE hedgewars-nolog.patch ---
--- 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 "***"

hedgewars-remove-Nu.patch:
 CMakeLists.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE hedgewars-remove-Nu.patch ---
--- 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()			


Index: hedgewars.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hedgewars/devel/hedgewars.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- hedgewars.spec	1 Dec 2009 14:11:26 -0000	1.25
+++ hedgewars.spec	25 May 2010 12:18:17 -0000	1.26
@@ -1,6 +1,6 @@
 Name:           hedgewars
 Version:        0.9.12
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        2D tankbattle game with the tanks replaced by hedgehogs
 Group:          Amusements/Games
 License:        GPL+
@@ -9,6 +9,8 @@ Source0:        http://hedgewars.org/dow
 Source1:        %{name}.desktop
 Source2:        %{name}.png
 Patch0:         hedgewars-0.9.0-debuginfo.patch
+Patch1:         hedgewars-remove-Nu.patch
+Patch2:         hedgewars-nolog.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
@@ -27,15 +29,31 @@ thereby winning the game. Hedgehogs may 
 of ways, normally by walking and jumping but also by using particular tools
 such as the "Rope" or "Parachute", to move to otherwise inaccessible areas.
 
+%package -n hedgewars-server
+Summary:        Standalone server for hedgewars
+Group:          Amusements/Games
+Requires:       %{name}
+Requires:       ghc-stm
+Requires:       ghc-dataenc
+Requires:       ghc-network
+BuildRequires:  ghc
+BuildRequires:  ghc-stm-devel
+BuildRequires:  ghc-dataenc-devel
+BuildRequires:  ghc-network-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
 
 
 %build
-%cmake .
+%cmake -DWITH_SERVER=1 .
 make %{?_smp_mflags} VERBOSE=1
 
 
@@ -62,7 +80,7 @@ install -p -m 644 %{SOURCE2} \
 
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+#rm -rf $RPM_BUILD_ROOT
 
 
 %post
@@ -87,8 +105,16 @@ fi
 %{_datadir}/applications/fedora-%{name}.desktop
 %{_datadir}/icons/hicolor/32x32/apps/%{name}.png
 
+%files -n hedgewars-server
+%defattr(-,root,root,-)
+%{_bindir}/%{name}-server
+
 
 %changelog
+* Sun May 23 2010 Bruno Wolff III <bruno at wolff.to> 0.9.12-3
+- Fix FTBFS bug 595168 due to invalid -Nu option for fpc.
+- Add a dedicated server sub package (with logging disabled)
+
 * Tue Dec  1 2009 Hans de Goede <hdegoede at redhat.com> 0.9.12-2
 - Use RPM_OPT_FLAGS when building c++ code and pass -g to fpc (#542000)
 



More information about the scm-commits mailing list