From nobody Fri Jul 07 18:16:15 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyM674hLTz4lB9N; Fri, 7 Jul 2023 18:16:15 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyM6747h3z3JGg; Fri, 7 Jul 2023 18:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688753775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O35w1KVtHExaRroK+ayf/0+BTA5UcYB+qjo+jBlqS00=; b=cUQ2E3S3b1fgC+lZri915so0tHR6LrREUp9dHqIMnV8d8z9EisDz42FX0tSBA471LsoQpU i/2B/MdFuDcoJSqsnRkuRQSpkNXFZyzWS2wI0cHLgcMEe76hhHO8GYhyxC34fTe6PJKgsc 1BxwodqazuE3R4tso9QcG6oIHAZHTAa8dYovc9kmZu1vRL6y3ZS5ErECRC2wTVyZ9hQhEy 5LIZNcE5WUV5udIECBZOiIcP0A55Jxje0ZfyHUI0Y+oRtVqsY3xVpqNGApLdMr6bffGGuT bnQkP6q7jUWDqIDzw7HEoF3dUAZJ9seMY3TK6k5pA4qhyZtjV1WNELH08Fh9jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688753775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O35w1KVtHExaRroK+ayf/0+BTA5UcYB+qjo+jBlqS00=; b=moqA0VAWWT6t2F1i25U2A1sqjDwwGlz26AZ4NM7VNoWgcvASIhdjxum6a3N4+++e2dMiDf BroqQTK0y47JTPoJRG3yFjkadolzArbYXhzkrifWLziMAnHZkEA0LTDcuX59yHSkO+Ax06 78fiJc4uawFymjts8xZyVXMlvEGoqkejr0TIz8P/HRYzx6GNMJrKTht3/CMTotxIK/6w6e JRBDXN3G8IPuZp5pv1cfnmlbhtFvT+Z0DEHo8uoMiE5T/VIqFVmKhzj73Yn7kdq47niDsu 39E2qWrtPJSHDS1AyxheAnx7gcHWsgUMlILDeWgCjkmhpBdpH7wWE7rkYIhP4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688753775; a=rsa-sha256; cv=none; b=G6tOZDF73Tw8ZFlLP3ZYHa5UGt4Kcui+bJjFuMBT6TJmNxfrV+x3EeWi29hicHTQTXmmfZ z75U0u+1njUhyilL4iHdrIJGYl4jkGg3O6KUzZe8JUx0MSq9KTPKku0ymRk6RxqIhBWtx1 lJ/Vsn/3NsYrNJ58nYPO1rdBzOPiwlcRLV6Ka/aPqUKvPm0PtzGULw8lnEwLOEsRPVH2qz t3upzcSgJpZRpZKoPHOjSFCnr6kxDE7RpX59OEyxpfNro4Ydv15e1Q9A9GbhSPZzn8i8Om 9l2TupzP1NlvJ/e1V9onr04zOqEbKa7E5VR8Y2nj2FOupEeMPTGgp3BKHYYeOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyM673C7GzpW7; Fri, 7 Jul 2023 18:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367IGFrI047466; Fri, 7 Jul 2023 18:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367IGFfG047465; Fri, 7 Jul 2023 18:16:15 GMT (envelope-from git) Date: Fri, 7 Jul 2023 18:16:15 GMT Message-Id: <202307071816.367IGFfG047465@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 51ba50369d68 - main - graphics/libecwj2: patches to compile in C++17 mode List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51ba50369d682508ca1b8842fa4331e3501bf517 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/ports/commit/?id=51ba50369d682508ca1b8842fa4331e3501bf517 commit 51ba50369d682508ca1b8842fa4331e3501bf517 Author: Gleb Smirnoff AuthorDate: 2023-07-07 18:15:37 +0000 Commit: Gleb Smirnoff CommitDate: 2023-07-07 18:15:37 +0000 graphics/libecwj2: patches to compile in C++17 mode --- graphics/libecwj2/Makefile | 3 +- graphics/libecwj2/files/patch-unique_ptr | 36 +++++++++++++++ graphics/libecwj2/files/patch-unregister | 76 ++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 2 deletions(-) diff --git a/graphics/libecwj2/Makefile b/graphics/libecwj2/Makefile index b4310c6eddae..f42cbf860b2a 100644 --- a/graphics/libecwj2/Makefile +++ b/graphics/libecwj2/Makefile @@ -1,6 +1,6 @@ PORTNAME= libecwj2 PORTVERSION= 3.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics MASTER_SITES= http://glebi.us/tmp/403/ DISTFILES= ecw_jpeg_2000_sdk_3_3_source.zip @@ -17,7 +17,6 @@ LICENSE_TEXT= Registration required to download sources,\ LICENSE_PERMS= auto-accept USES= gmake libtool zip -USE_CXXSTD= c++11 USE_LDCONFIG= yes GNU_CONFIGURE= yes INSTALL_TARGET= install-strip diff --git a/graphics/libecwj2/files/patch-unique_ptr b/graphics/libecwj2/files/patch-unique_ptr new file mode 100644 index 000000000000..a1228b6235d6 --- /dev/null +++ b/graphics/libecwj2/files/patch-unique_ptr @@ -0,0 +1,36 @@ +--- Source/include/NCSJPCNode.h.orig 2023-06-26 20:16:29.710073000 -0700 ++++ Source/include/NCSJPCNode.h 2023-06-27 06:42:55.697501000 -0700 +@@ -136,17 +136,7 @@ + CNCSError GetError(ContextID nCtx); + + protected: +- class ContextAutoPtr: public std::auto_ptr { +- public: +- ContextAutoPtr() {}; +- ContextAutoPtr(Context *s): std::auto_ptr(s) {}; +- ContextAutoPtr(const ContextAutoPtr &s) { +- ContextAutoPtr P(s.get()); +- *this = P; +- }; +- ~ContextAutoPtr() {}; +- }; +- std::map *m_pContext;/*std::auto_ptr*/ ++ std::map> *m_pContext; + + /** + * Get the context for the given ContextID +--- Source/C/NCSEcw/NCSJP2/NCSJPCNode.cpp.orig 2023-06-26 20:32:03.064056000 -0700 ++++ Source/C/NCSEcw/NCSJP2/NCSJPCNode.cpp 2023-06-26 20:59:13.970978000 -0700 +@@ -209,10 +209,9 @@ + void CNCSJPCNode::SetContext(ContextID nCtx, Context *pCtx) + { + if(!m_pContext) { +- m_pContext = new std::map; ++ m_pContext = new std::map>; + } +- ContextAutoPtr P(pCtx); +- (*m_pContext)[nCtx] = P; ++ (*m_pContext)[nCtx] = std::unique_ptr(pCtx); + }; + + CNCSJPCNode::Context::Context() diff --git a/graphics/libecwj2/files/patch-unregister b/graphics/libecwj2/files/patch-unregister new file mode 100644 index 000000000000..80ad6fa62ef5 --- /dev/null +++ b/graphics/libecwj2/files/patch-unregister @@ -0,0 +1,76 @@ +--- Source/C/NCSEcw/NCSJP2/NCSJP2FileView.cpp.orig 2023-06-26 20:13:13.572938000 -0700 ++++ Source/C/NCSEcw/NCSJP2/NCSJP2FileView.cpp 2023-06-26 20:13:28.835768000 -0700 +@@ -2863,9 +2863,9 @@ + IEEE4 *NCS_RESTRICT pB = ppInputLines[2]; + + for(i = 0; i < nInOutSizeX; i++) { +- register IEEE4 fRed = *(pR++); +- register IEEE4 fGreen = *(pG++); +- register IEEE4 fBlue = *(pB++); ++ IEEE4 fRed = *(pR++); ++ IEEE4 fGreen = *(pG++); ++ IEEE4 fBlue = *(pB++); + + *(pY++) = ((0.299f * fRed) + (0.587f * fGreen) + (0.114f * fBlue)); + *(pU++) = ((-0.1687f * fRed) + (-0.3313f * fGreen) + (0.5f * fBlue)); +@@ -2877,9 +2877,9 @@ + UINT8 *NCS_RESTRICT pB = (UINT8*)ppInputLines[2]; + + for(i = 0; i < nInOutSizeX; i++) { +- register IEEE4 fRed = *(pR++); +- register IEEE4 fGreen = *(pG++); +- register IEEE4 fBlue = *(pB++); ++ IEEE4 fRed = *(pR++); ++ IEEE4 fGreen = *(pG++); ++ IEEE4 fBlue = *(pB++); + + *(pY++) = ((0.299f * fRed) + (0.587f * fGreen) + (0.114f * fBlue)); + *(pU++) = ((-0.1687f * fRed) + (-0.3313f * fGreen) + (0.5f * fBlue)); +--- Source/C/NCSEcw/NCSEcw/NCSHuffmanCoder.cpp.orig 2023-06-26 20:29:32.610922000 -0700 ++++ Source/C/NCSEcw/NCSEcw/NCSHuffmanCoder.cpp 2023-06-26 20:29:50.210010000 -0700 +@@ -275,7 +275,7 @@ + UINT32 nRawLength) + { + UINT8 *pOutput = pPacked; +- register UINT32 nWordCount = nRawLength / 2; ++ UINT32 nWordCount = nRawLength / 2; + + m_pTree = new CTree(); + m_pTree->Pack(&pOutput, pUnPacked, nWordCount); +@@ -311,9 +311,9 @@ + INT16 *pUnPacked, + UINT32 nRawLength) + { +- register UINT32 nWordCount = nRawLength / 2; +- register INT16 *pOutput = (INT16*)pUnPacked; +- register UINT32 nBitsUsed = 0; ++ UINT32 nWordCount = nRawLength / 2; ++ INT16 *pOutput = (INT16*)pUnPacked; ++ UINT32 nBitsUsed = 0; + + m_pTree = new CTree(&pPacked); + +@@ -330,8 +330,8 @@ + } + + if(pNode->m_Symbol.bZeroRun) { +- register UINT16 nZero; +- register UINT16 nZeroRun = pNode->m_Symbol.nValue; ++ UINT16 nZero; ++ UINT16 nZeroRun = pNode->m_Symbol.nValue; + + if( nZeroRun >= nWordCount ) { + nZero = (UINT16)nWordCount + 1; +@@ -378,9 +378,9 @@ + extern "C" NCSHuffmanSymbol *unpack_huffman_symbol(UINT8 **ppPacked, + NCSHuffmanState *pState) + { +- register UINT32 nBitsUsed = pState->nBitsUsed; +- register CNCSHuffmanCoder::CCodeNode *pNode = ((CNCSHuffmanCoder::CTree*)pState->pTree)->m_pRoot; +- register UINT8 *pEncoded = *ppPacked; ++ UINT32 nBitsUsed = pState->nBitsUsed; ++ CNCSHuffmanCoder::CCodeNode *pNode = ((CNCSHuffmanCoder::CTree*)pState->pTree)->m_pRoot; ++ UINT8 *pEncoded = *ppPacked; + + while (pNode->m_Children.m_P.m_p0Child != 0) { + pNode = pNode->m_Children.m_Children[(pEncoded[nBitsUsed >> 3] >> (nBitsUsed & 0x7)) & 0x1];