[pokerth/f16] * Sun Oct 9 2011 Ryan Rix <ry at n.rix.si> - 0.8.3-9 - Grammar and update to personal specifications -

Ryan Rix rrix at fedoraproject.org
Mon Oct 10 03:20:07 UTC 2011


commit 7da7404f5ca5e39b0b91aee768444514c328e6a4
Author: Ryan Rix <ry at n.rix.si>
Date:   Sun Oct 9 19:21:56 2011 -0700

    * Sun Oct 9 2011 Ryan Rix <ry at n.rix.si> - 0.8.3-9
    - Grammar and update to personal specifications
    - Apply patch to fix GNUTLS issues from Paul Frields <pfrields at fedoraproject dot org>

 pokerth-0.8.3-gnutls-only.patch |  142 +++++++++++++++++++++++++++++++++++++++
 pokerth.spec                    |   52 ++++++++------
 2 files changed, 171 insertions(+), 23 deletions(-)
---
diff --git a/pokerth-0.8.3-gnutls-only.patch b/pokerth-0.8.3-gnutls-only.patch
new file mode 100644
index 0000000..1f3242f
--- /dev/null
+++ b/pokerth-0.8.3-gnutls-only.patch
@@ -0,0 +1,142 @@
+Only in PokerTH-0.8.3-src: bin
+Only in PokerTH-0.8.3-src: chatcleaner
+Only in PokerTH-0.8.3-src: lib
+Only in PokerTH-0.8.3-src: Makefile
+Only in PokerTH-0.8.3-src: Makefile.chatcleaner
+Only in PokerTH-0.8.3-src: Makefile.pokerth_db
+Only in PokerTH-0.8.3-src: Makefile.pokerth_game
+Only in PokerTH-0.8.3-src: Makefile.pokerth_lib
+Only in PokerTH-0.8.3-src: Makefile.pokerth_protocol
+Only in PokerTH-0.8.3-src: Makefile.pokerth_server
+Only in PokerTH-0.8.3-src: mocs
+Only in PokerTH-0.8.3-src: obj
+Only in PokerTH-0.8.3-src: pokerth
+diff -ur PokerTH-0.8.3-src-foo/pokerth_game.pro PokerTH-0.8.3-src/pokerth_game.pro
+--- PokerTH-0.8.3-src-foo/pokerth_game.pro	2011-08-27 00:56:23.541971807 -0400
++++ PokerTH-0.8.3-src/pokerth_game.pro	2011-10-02 13:45:26.875003939 -0400
+@@ -332,7 +332,7 @@
+ 		LIBS += -lcrypto -lssl -llibeay32 -lssleay32 -lgsasl
+ 	}
+ 	!pkth_win64 {
+-		LIBS += -lgnutls-openssl -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
++		LIBS += -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
+ 	}
+ 	win32-g++-cross {
+ 		LIBS += -lsqlite3
+@@ -453,8 +453,7 @@
+                 -lSDL_mixer \
+ 		-lgsasl
+ 	!isEmpty( BSD ):isEmpty( kFreeBSD ):LIBS += -lcrypto
+-	else:LIBS += -lgnutls-openssl \
+-		-lgcrypt
++	else:LIBS += -lgcrypt
+ 	TARGETDEPS += ./lib/libpokerth_lib.a \
+ 		./lib/libpokerth_db.a \
+ 		./lib/libpokerth_protocol.a
+diff -ur PokerTH-0.8.3-src-foo/pokerth_server.pro PokerTH-0.8.3-src/pokerth_server.pro
+--- PokerTH-0.8.3-src-foo/pokerth_server.pro	2011-08-27 00:56:23.562971837 -0400
++++ PokerTH-0.8.3-src/pokerth_server.pro	2011-10-02 13:45:45.949929421 -0400
+@@ -134,7 +134,7 @@
+ 		LIBS += -lcrypto -lssl -llibeay32 -lssleay32 -lgsasl
+ 	}
+ 	!pkth_win64 {
+-		LIBS += -lgnutls-openssl -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
++		LIBS += -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
+ 	}
+ 	win32-g++-cross {
+ 		LIBS += -lsqlite3
+@@ -277,7 +277,7 @@
+ 	!isEmpty( BSD ): isEmpty( kFreeBSD ){
+ 		LIBS += -lcrypto -liconv
+ 	} else {
+-		LIBS += -lgnutls-openssl -lgcrypt
++		LIBS += -lgcrypt
+ 	}
+ 
+ 	TARGETDEPS += ./lib/libpokerth_lib.a \
+Only in PokerTH-0.8.3-src: qrc_pokerth.cpp
+diff -ur PokerTH-0.8.3-src-foo/src/core/common/crypthelper.cpp PokerTH-0.8.3-src/src/core/common/crypthelper.cpp
+--- PokerTH-0.8.3-src-foo/src/core/common/crypthelper.cpp	2011-01-16 14:36:15.000000000 -0500
++++ PokerTH-0.8.3-src/src/core/common/crypthelper.cpp	2011-10-02 14:31:02.616044597 -0400
+@@ -170,13 +170,13 @@
+ 	{
+ 		// Calculate MD5 sum of file.
+ 		unsigned char readBuf[8192];
+-		MD5_CTX context;
++		gcry_md_hd_t context;
+ 		int numBytes;
+ 
+-		MD5_Init(&context);
++		gcry_md_open(&context, GCRY_MD_MD5, 0);
+ 		while ((numBytes = fread(readBuf, 1, sizeof(readBuf), file)) > 0)
+-			MD5_Update(&context, readBuf, numBytes);
+-		MD5_Final(buf.GetData(), &context);
++			gcry_md_write(context, readBuf, numBytes);
++		memcpy(buf.m_data, gcry_md_read(context, GCRY_MD_MD5), 16);
+ 		retVal = ferror(file) == 0;
+ 
+ 		fclose(file);
+diff -ur PokerTH-0.8.3-src-foo/src/core/crypthelper.h PokerTH-0.8.3-src/src/core/crypthelper.h
+--- PokerTH-0.8.3-src-foo/src/core/crypthelper.h	2011-01-16 14:36:15.000000000 -0500
++++ PokerTH-0.8.3-src/src/core/crypthelper.h	2011-10-02 14:27:27.572863717 -0400
+@@ -56,7 +56,7 @@
+ 	virtual const unsigned char *GetData() const;
+ 	virtual int GetDataSize() const;
+ 
+-private:
++	//private:
+ 	unsigned char m_data[MD5_DATA_SIZE];
+ };
+ 
+diff -ur PokerTH-0.8.3-src-foo/src/core/openssl_wrapper.h PokerTH-0.8.3-src/src/core/openssl_wrapper.h
+--- PokerTH-0.8.3-src-foo/src/core/openssl_wrapper.h	2011-01-16 14:36:15.000000000 -0500
++++ PokerTH-0.8.3-src/src/core/openssl_wrapper.h	2011-10-02 12:40:20.431586507 -0400
+@@ -68,7 +68,7 @@
+ 	#include <openssl/evp.h>
+ #else
+ 	// For all other systems, we use GnuTLS.
+-	#include <gnutls/openssl.h>
++//	#include <gnutls/openssl.h>
+ 	#include <gcrypt.h>
+ 	#define PKTH_USE_GNUTLS
+ #endif
+diff -ur PokerTH-0.8.3-src-foo/src/engine/local_engine/tools.cpp PokerTH-0.8.3-src/src/engine/local_engine/tools.cpp
+--- PokerTH-0.8.3-src-foo/src/engine/local_engine/tools.cpp	2011-01-16 14:36:20.000000000 -0500
++++ PokerTH-0.8.3-src/src/engine/local_engine/tools.cpp	2011-10-02 13:39:53.801305014 -0400
+@@ -39,9 +39,9 @@
+ 
+ 		for (i=0; i<howMany; i++) {
+ 
+-			if(!RAND_bytes(rand_buf, 4))
++		  if(!memcpy(rand_buf, gcry_random_bytes(4, GCRY_STRONG_RANDOM), 4))
+ 			{
+-				LOG_MSG("RAND_bytes failed!");
++				LOG_MSG("gcry_random_bytes failed!");
+ 			}
+ 
+ 			randNumber = 0;
+@@ -69,9 +69,9 @@
+ 		int counter(0);
+ 		while (counter < howMany) {
+ 
+-			if(!RAND_bytes(rand_buf, 4))
++		  if(!memcpy(rand_buf, gcry_random_bytes(4, GCRY_STRONG_RANDOM), 4))
+ 			{
+-				LOG_MSG("RAND_bytes failed!");
++				LOG_MSG("gcry_random_bytes failed!");
+ 			}
+ 
+ 			randNumber = 0;
+diff -ur PokerTH-0.8.3-src-foo/src/net/common/socket_startup.cpp PokerTH-0.8.3-src/src/net/common/socket_startup.cpp
+--- PokerTH-0.8.3-src-foo/src/net/common/socket_startup.cpp	2011-01-16 14:36:14.000000000 -0500
++++ PokerTH-0.8.3-src/src/net/common/socket_startup.cpp	2011-10-02 13:41:57.278822678 -0400
+@@ -75,7 +75,7 @@
+ 	gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_boost);
+ 	gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ #endif
+-	return SSL_library_init() == 1;
++	//return SSL_library_init() == 1;
+ }
+ 
+ void
+Only in PokerTH-0.8.3-src: uics
diff --git a/pokerth.spec b/pokerth.spec
index 585ddf0..f143030 100644
--- a/pokerth.spec
+++ b/pokerth.spec
@@ -1,32 +1,33 @@
-Name:		pokerth
-Version:	0.8.3
-Release:	7%{?dist}
-Summary:	A Texas-Holdem poker game
-Group:		Amusements/Games
-License:	GPLv2+
-URL:		http://www.pokerth.net
-Source0:	http://downloads.sourceforge.net/%{name}/PokerTH-%{version}-src.tar.bz2
+Name:           pokerth
+Version:        0.8.3
+Release:        9%{?dist}
+Summary:        A Texas-Holdem poker game
+Group:          Amusements/Games
+License:        GPLv2+
+URL:            http://www.pokerth.net
+Source0:        http://downloads.sourceforge.net/%{name}/PokerTH-%{version}-src.tar.bz2
 # Patch to fix build against newer versions of Boost. Already reported and 
 # fixed upstream.
-Patch0:		pokerth-0.8.3-filesystem.patch
-BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-
-BuildRequires:	desktop-file-utils
-BuildRequires:	qt4-devel
-BuildRequires:	zlib-devel
-BuildRequires:	libcurl-devel
-BuildRequires:	gnutls-devel
-BuildRequires:	boost-devel >= 1.37
-BuildRequires:	SDL_mixer-devel
-BuildRequires:	libgsasl-devel
-BuildRequires:	sqlite-devel
+Patch0:         pokerth-0.8.3-filesystem.patch
+Patch1:         pokerth-0.8.3-gnutls-only.patch
+BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildRequires:  desktop-file-utils
+BuildRequires:  qt4-devel
+BuildRequires:  zlib-devel
+BuildRequires:  libcurl-devel
+BuildRequires:  gnutls-devel
+BuildRequires:  boost-devel >= 1.37
+BuildRequires:  SDL_mixer-devel
+BuildRequires:  libgsasl-devel
+BuildRequires:  sqlite-devel
 
 # Removed bundled fonts
-Requires:	dejavu-sans-fonts
-Requires:	urw-fonts
+Requires:       dejavu-sans-fonts
+Requires:       urw-fonts
 
 %description
-PokerTH is a poker game written in C++/QT4. You can play the popular
+PokerTH is a poker game written in C++/Qt4. You can play the popular
 "Texas Hold'em" poker variant against up to six computer-opponents or
 play network games with people all over the world. This poker engine
 is available for Linux, Windows, and MacOSX.
@@ -34,6 +35,7 @@ is available for Linux, Windows, and MacOSX.
 %prep
 %setup -q -n PokerTH-%{version}-src
 %patch0 -p1
+%patch1 -p1
 
 # Fix permissions
 chmod 644 ChangeLog
@@ -81,6 +83,10 @@ rm -rf %{buildroot}
 %{_datadir}/pixmaps/%{name}.png
 
 %changelog
+* Sun Oct 9 2011 Ryan Rix <ry at n.rix.si> - 0.8.3-9
+- Grammar and update to personal specifications
+- Apply patch to fix GNUTLS issues from Paul Frields <pfrields at fedoraproject dot org>
+
 * Fri Jul 22 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 0.8.3-7
 - Bump spec due to new boost.
 


More information about the scm-commits mailing list