From owner-svn-ports-all@freebsd.org Sun May 31 12:42:20 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C2943346B1; Sun, 31 May 2020 12:42:20 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ZdHJ3hMRz43vR; Sun, 31 May 2020 12:42:20 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79F291A2B3; Sun, 31 May 2020 12:42:20 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04VCgK9e042771; Sun, 31 May 2020 12:42:20 GMT (envelope-from adridg@FreeBSD.org) Received: (from adridg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04VCgKL3042769; Sun, 31 May 2020 12:42:20 GMT (envelope-from adridg@FreeBSD.org) Message-Id: <202005311242.04VCgKL3042769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adridg set sender to adridg@FreeBSD.org using -f From: Adriaan de Groot Date: Sun, 31 May 2020 12:42:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r537158 - in head/emulators/qmc2: . files X-SVN-Group: ports-head X-SVN-Commit-Author: adridg X-SVN-Commit-Paths: in head/emulators/qmc2: . files X-SVN-Commit-Revision: 537158 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2020 12:42:20 -0000 Author: adridg Date: Sun May 31 12:42:19 2020 New Revision: 537158 URL: https://svnweb.freebsd.org/changeset/ports/537158 Log: emulators/qmc2: Prep-work for Qt 5.15; compatible with Qt 5.14 In Qt 5.15 an enumeration is introduced which has enumerators True and False, used like QCborSimpleType::False. In C++ that's 3 tokens, one name. The C Preprocessor deals with tokens, though, and since some headers #define False 0, we end up with tokens QCborSimpleType::0 instead, which is nonsense. The actual defines are only relevant in C code internals, not the API for lzma that is used from C++. So somewhat-hackishly just switch off the #defines when in C++ mode. The change is complicated by this *particular* source file being in DOS CRLF mode. Reported by: tcberner Added: head/emulators/qmc2/files/patch-qmc2_lzma_7zTypes.h (contents, props changed) Modified: head/emulators/qmc2/Makefile Modified: head/emulators/qmc2/Makefile ============================================================================== --- head/emulators/qmc2/Makefile Sun May 31 11:54:27 2020 (r537157) +++ head/emulators/qmc2/Makefile Sun May 31 12:42:19 2020 (r537158) @@ -3,7 +3,7 @@ PORTNAME= qmc2 PORTVERSION= 0.195 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= emulators MASTER_SITES= SF @@ -17,7 +17,7 @@ OPTIONS_DEFINE= DOCS NO_WRKSUBDIR= yes -USES= compiler:c++11-lang gl gmake qt:5 sdl tar:bzip2 xorg +USES= compiler:c++11-lang dos2unix gl gmake qt:5 sdl tar:bzip2 xorg USE_XORG= x11 xmu USE_GL= gl glu USE_QT= buildtools_build core declarative gui multimedia \ @@ -39,6 +39,12 @@ DESKTOP_ENTRIES="QMC2" "MAME frontend" "${DATADIR}/img "${PORTNAME}-arcade" "Game;Emulator;Qt;" "true" \ "CHDMAN GUI" "Qt CHDMAN GUI" "${DATADIR}/img/qchdman.png" \ "qchdman" "Game;Emulator;Qt;" "true" \ + +# This seems to be third-party, and has DOS line-endings. It also +# needs to be patched because of a confusing build error: #define True 1 +# is a bad idea in C++ code that *also* uses True as an identifier +# in some scopes. +DOS2UNIX_FILES= qmc2/lzma/7zTypes.h post-patch: @${CP} ${FILESDIR}/Makefile ${WRKSRC} Added: head/emulators/qmc2/files/patch-qmc2_lzma_7zTypes.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/qmc2/files/patch-qmc2_lzma_7zTypes.h Sun May 31 12:42:19 2020 (r537158) @@ -0,0 +1,23 @@ +This avoids errors list the following, where True is a C++ +identifier used in scoped context; the #define eats it. + +/usr/local/include/qt5/QtCore/qcborstreamreader.h:143:76: error: expected unqualified-id + bool isFalse() const { return isSimpleType(QCborSimpleType::False); } + ^ +lzma/7zTypes.h:98:15: note: expanded from macro 'False' +#define False 0 + +--- qmc2/lzma/7zTypes.h.orig 2020-05-30 14:14:41 UTC ++++ qmc2/lzma/7zTypes.h +@@ -94,8 +94,11 @@ typedef size_t SizeT; + #endif + + typedef int Bool_7z; ++#ifndef __cplusplus ++/* Only for library internals */ + #define True 1 + #define False 0 ++#endif + + + #ifdef _WIN32