Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 2020 10:14:42 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r530634 - in head: . games games/pokerth games/pokerth/files
Message-ID:  <202004041014.034AEgD6052662@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Sat Apr  4 10:14:41 2020
New Revision: 530634
URL: https://svnweb.freebsd.org/changeset/ports/530634

Log:
  - Resurrect games/pokerth
  - Pass maintainership to submitter
  
  PR:		245280
  Submitted by:	tobias.rehbein@web.de

Added:
  head/games/pokerth/
     - copied from r487350, head/games/pokerth/
  head/games/pokerth/files/patch-pokerth__lib.pro   (contents, props changed)
  head/games/pokerth/files/patch-src_core_common_crypthelper.cpp   (contents, props changed)
Modified:
  head/MOVED
  head/games/Makefile
  head/games/pokerth/Makefile
  head/games/pokerth/files/patch-pokerth_server.pro
  head/games/pokerth/pkg-descr

Modified: head/MOVED
==============================================================================
--- head/MOVED	Sat Apr  4 09:32:21 2020	(r530633)
+++ head/MOVED	Sat Apr  4 10:14:41 2020	(r530634)
@@ -11787,7 +11787,6 @@ games/jag||2019-03-16|Has expired: Qt4 has been EOL si
 games/kardsgt||2019-03-16|Has expired: Qt4 has been EOL since december 2015
 games/kcheckers||2019-03-16|Has expired: Qt4 has been EOL since december 2015
 games/openpref||2019-03-16|Has expired: Qt4 has been EOL since december 2015
-games/pokerth||2019-03-16|Has expired: Qt4 has been EOL since december 2015
 games/qgo||2019-03-16|Has expired: Qt4 has been EOL since december 2015
 games/qtads||2019-03-16|Has expired: Qt4 has been EOL since december 2015
 games/quackle||2019-03-16|Has expired: Qt4 has been EOL since december 2015

Modified: head/games/Makefile
==============================================================================
--- head/games/Makefile	Sat Apr  4 09:32:21 2020	(r530633)
+++ head/games/Makefile	Sat Apr  4 10:14:41 2020	(r530634)
@@ -701,6 +701,7 @@
     SUBDIR += pmars
     SUBDIR += pmars-sdl
     SUBDIR += poker-eval
+    SUBDIR += pokerth
     SUBDIR += polyglot
     SUBDIR += pongix
     SUBDIR += ponscripter-sekai

Modified: head/games/pokerth/Makefile
==============================================================================
--- head/games/pokerth/Makefile	Thu Dec 13 06:59:34 2018	(r487350)
+++ head/games/pokerth/Makefile	Sat Apr  4 10:14:41 2020	(r530634)
@@ -3,36 +3,31 @@
 
 PORTNAME=	pokerth
 PORTVERSION=	1.1.2
-PORTREVISION=	8
+PORTREVISION=	9
 CATEGORIES=	games
 MASTER_SITES=	SF
 
-MAINTAINER=	madpilot@FreeBSD.org
-COMMENT=	Poker game written in C++/Qt4
+MAINTAINER=	tobias.rehbein@web.de
+COMMENT=	Poker game written in C++/Qt
 
 LICENSE=	AGPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-DEPRECATED=		Qt4 has been EOL since december 2015
-EXPIRATION_DATE=	2019-03-15
-
-BROKEN_SSL=	openssl111
-BROKEN_SSL_REASON=	Does not build with OpenSSL 1.1, variable has incomplete type 'EVP_CIPHER_CTX'
-
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
 		libmikmod.so:audio/libmikmod \
 		libgnutls.so:security/gnutls \
 		libcurl.so:ftp/curl \
-		libgsasl.so:security/gsasl \
+		libgsasl.so:security/libgsasl \
 		libtinyxml.so:textproc/tinyxml \
-		libprotobuf.so:devel/protobuf
-BUILD_DEPENDS=	${LOCALBASE}/include/libircclient.h:irc/libircclient \
+		libprotobuf.so:devel/protobuf \
+		libircclient.so:irc/libircclient
+BUILD_DEPENDS=	${LOCALBASE}/include/websocketpp/client.hpp:devel/websocketpp \
 		protoc:devel/protobuf
 
-USES=		compiler:c++11-lang iconv gmake qmake qt:4 sqlite ssl
+USES=		compiler:c++11-lang gl gmake iconv qmake qt:5 sdl sqlite ssl
+USE_GL=		gl
 USE_CXXSTD=	c++11
-USE_QT=		gui corelib network sql sql-sqlite3 \
-		moc_build rcc_build uic_build
+USE_QT=		buildtools_build core gui network sql sql-sqlite3 widgets
 USE_SDL=	mixer
 
 QMAKE_SOURCE_PATH=	pokerth.pro
@@ -44,10 +39,6 @@ PORTDOCS=	server_setup_howto.txt
 OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.options.mk>
-
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
-BROKEN=		${BROKEN_SSL_REASON}
-.endif
 
 post-patch:
 	@${REINPLACE_CMD} -E \

Added: head/games/pokerth/files/patch-pokerth__lib.pro
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/pokerth/files/patch-pokerth__lib.pro	Sat Apr  4 10:14:41 2020	(r530634)
@@ -0,0 +1,11 @@
+--- pokerth_lib.pro.orig	2020-04-01 19:13:37 UTC
++++ pokerth_lib.pro
+@@ -31,7 +31,7 @@ INCLUDEPATH += . \
+ 		src/engine/network_engine \
+ 		src/config \
+ 		src/core \
+-		src/third_party/websocketpp
++		$${PREFIX}/include/websocketpp
+ 
+ DEPENDPATH += . \
+ 		src \

Modified: head/games/pokerth/files/patch-pokerth_server.pro
==============================================================================
--- head/games/pokerth/files/patch-pokerth_server.pro	Thu Dec 13 06:59:34 2018	(r487350)
+++ head/games/pokerth/files/patch-pokerth_server.pro	Sat Apr  4 10:14:41 2020	(r530634)
@@ -1,6 +1,6 @@
---- pokerth_server.pro.orig	2014-01-10 21:18:20 UTC
+--- pokerth_server.pro.orig	2017-08-16 12:24:03 UTC
 +++ pokerth_server.pro
-@@ -264,7 +264,7 @@ unix : !mac {
+@@ -288,7 +288,7 @@ unix : !mac {
  			-lprotobuf
  	LIBS += -lgsasl
  	!isEmpty( BSD ): isEmpty( kFreeBSD ){

Added: head/games/pokerth/files/patch-src_core_common_crypthelper.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/pokerth/files/patch-src_core_common_crypthelper.cpp	Sat Apr  4 10:14:41 2020	(r530634)
@@ -0,0 +1,82 @@
+--- src/core/common/crypthelper.cpp.orig	2017-08-16 12:24:03 UTC
++++ src/core/common/crypthelper.cpp
+@@ -291,22 +291,33 @@ CryptHelper::AES128Encrypt(const unsigned char *keyDat
+ 		outCipher.resize(cipherSize);
+ 
+ #ifdef HAVE_OPENSSL
+-		EVP_CIPHER_CTX encryptCtx;
+-		EVP_CIPHER_CTX_init(&encryptCtx);
++	#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++		EVP_CIPHER_CTX *encryptCtx = EVP_CIPHER_CTX_new();  
++	#else
++		EVP_CIPHER_CTX _encryptCtx; 
++		EVP_CIPHER_CTX *encryptCtx; 
++		encryptCtx = &_encryptCtx; 
++	#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L 
++
++		EVP_CIPHER_CTX_init(encryptCtx);
+ 		int outCipherSize = cipherSize;
+ 
+-		int success = EVP_EncryptInit(&encryptCtx, EVP_aes_128_cbc(), key, iv);
+-		EVP_CIPHER_CTX_set_padding(&encryptCtx, 0);
++		int success = EVP_EncryptInit(encryptCtx, EVP_aes_128_cbc(), key, iv);
++		EVP_CIPHER_CTX_set_padding(encryptCtx, 0);
+ 		if (success) {
+-			success = EVP_EncryptUpdate(&encryptCtx, &outCipher[0], &outCipherSize, paddedPlainStr, paddedPlainSize);
++			success = EVP_EncryptUpdate(encryptCtx, &outCipher[0], &outCipherSize, paddedPlainStr, paddedPlainSize);
+ 
+ 			if (success && outCipherSize) {
+ 				// Since padding is off, this will not modify the cipher. However, parameters need to be set.
+-				EVP_EncryptFinal(&encryptCtx, &outCipher[0], &outCipherSize);
++				EVP_EncryptFinal(encryptCtx, &outCipher[0], &outCipherSize);
+ 				retVal = true;
+ 			}
+ 		} else
+ 			outCipher.clear();
++		
++	#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++		EVP_CIPHER_CTX_free(encryptCtx);
++	#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L 
+ #else
+ 		gcry_cipher_hd_t hd;
+ 		gcry_error_t err = gcry_cipher_open(&hd, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC, 0);
+@@ -338,22 +349,33 @@ CryptHelper::AES128Decrypt(const unsigned char *keyDat
+ 		BytesToKey(keyData, keySize, key, iv);
+ 		outPlain.resize(cipherSize);
+ #ifdef HAVE_OPENSSL
+-		EVP_CIPHER_CTX decryptCtx;
+-		EVP_CIPHER_CTX_init(&decryptCtx);
++	#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++		EVP_CIPHER_CTX *decryptCtx = EVP_CIPHER_CTX_new();  
++	#else
++		EVP_CIPHER_CTX _decryptCtx; 
++		EVP_CIPHER_CTX *decryptCtx; 
++		decryptCtx = &_decryptCtx; 
++	#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L 
++
++		EVP_CIPHER_CTX_init(decryptCtx);
+ 		int outPlainSize = cipherSize;
+ 
+-		int success = EVP_DecryptInit(&decryptCtx, EVP_aes_128_cbc(), key, iv);
+-		EVP_CIPHER_CTX_set_padding(&decryptCtx, 0);
++		int success = EVP_DecryptInit(decryptCtx, EVP_aes_128_cbc(), key, iv);
++		EVP_CIPHER_CTX_set_padding(decryptCtx, 0);
+ 		if (success) {
+-			success = EVP_DecryptUpdate(&decryptCtx, (unsigned char *)&outPlain[0], &outPlainSize, cipher, cipherSize);
++			success = EVP_DecryptUpdate(decryptCtx, (unsigned char *)&outPlain[0], &outPlainSize, cipher, cipherSize);
+ 
+ 			if (success && outPlainSize) {
+ 				// Since padding is off, this will not modify the plain text. However, parameters need to be set.
+-				EVP_DecryptFinal(&decryptCtx, (unsigned char *)outPlain.c_str(), &outPlainSize);
++				EVP_DecryptFinal(decryptCtx, (unsigned char *)outPlain.c_str(), &outPlainSize);
+ 				retVal = true;
+ 			}
+ 		} else
+ 			outPlain.clear();
++		
++	#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++		EVP_CIPHER_CTX_free(decryptCtx);
++	#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L 
+ #else
+ 		gcry_cipher_hd_t hd;
+ 		gcry_error_t err = gcry_cipher_open(&hd, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC, 0);

Modified: head/games/pokerth/pkg-descr
==============================================================================
--- head/games/pokerth/pkg-descr	Thu Dec 13 06:59:34 2018	(r487350)
+++ head/games/pokerth/pkg-descr	Sat Apr  4 10:14:41 2020	(r530634)
@@ -1,5 +1,5 @@
-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.
+PokerTH is a poker game written in C++/Qt. You can play the popular
+"Texas Hold'em" poker variant against up to nine computer-opponents
+or play internet games with people all over the world.
 
 WWW: https://www.pokerth.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004041014.034AEgD6052662>