From nobody Tue Apr 19 04:23:30 2022 X-Original-To: dev-commits-ports-main@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 C48AD11DE706; Tue, 19 Apr 2022 04:23:30 +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 4Kj9fB58K8z3FH6; Tue, 19 Apr 2022 04:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650342210; 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=NsM3K+7+VMEE1RRj4zvZUv9pqerDKgothWdMswv39to=; b=gZZyVBl/90NqyQIxRWidB54KOXrQLsYSEIESrDbIn26a/7vvq3adjrrsy0gSPUodLKEfRV zh85ii29E1ewNAD8zb/hwuZUDJUvCNyMgEnmRXQoluVgXgNJhoCfUh0/ZZWS8oUcVes9kH QpynwGrQLymHq+m/br/YfR0jN6GaEXFlLWn66612UzI0Q2gELo6dE6kBnBm42upLYZpeZl K/Sy1uHvO3pWwd7XYcLBdBs7EEtHwgn2eH3RplJ3J4K6MYM714+jL02jj25x1V30umHIFe B/mSwHgFG6/K9Uqn9/RIg8Hv6ILXNrOS3xiz53JFOWdhdrnu9+bWvO17IT6xhQ== 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 909A720983; Tue, 19 Apr 2022 04:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23J4NU82043692; Tue, 19 Apr 2022 04:23:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23J4NUHc043691; Tue, 19 Apr 2022 04:23:30 GMT (envelope-from git) Date: Tue, 19 Apr 2022 04:23:30 GMT Message-Id: <202204190423.23J4NUHc043691@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: 68c868c99fb9 - main - graphics/dcp2icc: patch the code so it conforms to more strict C++ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68c868c99fb9f7c462f19c890c13fd47fc6c47f8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650342210; 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=NsM3K+7+VMEE1RRj4zvZUv9pqerDKgothWdMswv39to=; b=r+Xnb4r4QMyzLsm9+Ivr2MazxaVVnfTNDAJumcCWl9xjDvYHrq5E8qMB+005bFwKjq07HI Nv5wXhmATbEm2yNjtbjEaFjQdZGCp6U5C5vskWDB3oTepFCu0hKxT3YqhBeBZYhJp7/Owh 0nIsj1EiHZjAFDVvG8+0zFzGhjEQgCHm3dKTj+2Y3o9JlYStsy4yQo1+oETRI2VuFkICqc UR2sWXR5MDE/smxhtnGXkNlu69FS5/t/ukSMk2/ijdnwYYYtZgCU7ZggRM4IJ/5HODV1IB ggoUrPCVAbbYNnMMddgIBLuWZ7R22VEB7wiN5gCZblsv+EqMS/Qvx86QlayceA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650342210; a=rsa-sha256; cv=none; b=avXGjyA/lGwCBa5MfI3r8bvTW8MyoHjE+SIGGkGm6jFwCUVw/uIxdmW3r/XSp7MDm0mIlM DHSgpfJzi8/Aa23sNtS1zOjnQAjN21uG147XjrI9PXwk/BVlzxYsvzH8CJjYv2XHJ6TMs9 Sc8VG/Wgk7pbWE7rtloZGUj7Bf03bTr8yOiwwek3IPBm3XpcG/guAkRG+JGbn3Q+fSgcus rB3e4EjbS3OtXDoRqJ5VJA5DjOgekZNi6Jn7B+7CKJRZtZENPIeoKvJF2SDMeT44WmW/DN mid/+Slzj+RvVBwZRAq7B+Cmo5iHPGtj7hbuJFO8pyEht+oPgIpYBN3fZCrJpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=68c868c99fb9f7c462f19c890c13fd47fc6c47f8 commit 68c868c99fb9f7c462f19c890c13fd47fc6c47f8 Author: Alexey Dokuchaev AuthorDate: 2022-04-19 04:22:42 +0000 Commit: Alexey Dokuchaev CommitDate: 2022-04-19 04:22:42 +0000 graphics/dcp2icc: patch the code so it conforms to more strict C++ The port still requires GCC to build for now, but this would allow to possibly use our system (Clang) or some other modern compiler. --- graphics/dcp2icc/files/patch-#include-cstdlib | 12 ++++++++++++ graphics/dcp2icc/files/patch-inttypes-fixes | 28 +++++++++++++-------------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/graphics/dcp2icc/files/patch-#include-cstdlib b/graphics/dcp2icc/files/patch-#include-cstdlib index d79591cfcf15..0dc316dca1b8 100644 --- a/graphics/dcp2icc/files/patch-#include-cstdlib +++ b/graphics/dcp2icc/files/patch-#include-cstdlib @@ -20,6 +20,18 @@ #include "P2_Handler.hpp" #include "MD5.h" +@@ -679,9 +681,9 @@ void P2_MetaHandler::SetStartTimecodeFromLegacyXML ( X + + } else if ( p2FrameRate == "59.94p" ) { + +- if ( p2DropFrameFlag == "true" ) { ++ if ( std::strcmp ( p2DropFrameFlag, "true" ) == 0 ) { + dmTimeFormat = "5994DropTimecode"; +- } else if ( p2DropFrameFlag == "false" ) { ++ } else if ( std::strcmp ( p2DropFrameFlag, "false" ) == 0 ) { + dmTimeFormat = "5994NonDropTimecode"; + } + --- XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/SonyHDV_Handler.cpp 2008-10-06 07:18:56 UTC +++ XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/SonyHDV_Handler.cpp @@ -7,6 +7,8 @@ diff --git a/graphics/dcp2icc/files/patch-inttypes-fixes b/graphics/dcp2icc/files/patch-inttypes-fixes index 5c270ec0ea73..15026b266eea 100644 --- a/graphics/dcp2icc/files/patch-inttypes-fixes +++ b/graphics/dcp2icc/files/patch-inttypes-fixes @@ -90,10 +90,10 @@ if ( ! XMP_LitNMatch ( strValue, "0x", 2 ) ) { - count = sscanf ( strValue, "%lld%c", &result, &nextCh ); -+ count = sscanf ( strValue, "%"PRId64"%c", &result, &nextCh ); ++ count = sscanf ( strValue, "%" PRId64 "%c", &result, &nextCh ); } else { - count = sscanf ( strValue, "%llx%c", &result, &nextCh ); -+ count = sscanf ( strValue, "%"PRIx64"%c", &result, &nextCh ); ++ count = sscanf ( strValue, "%" PRIx64 "%c", &result, &nextCh ); } if ( count != 1 ) XMP_Throw ( "Invalid integer string", kXMPErr_BadParam ); @@ -113,7 +113,7 @@ char buffer [32]; // A 64-bit number is at most 20 digits. this->xmpObj.DeleteProperty ( kXMP_NS_DM, "duration" ); // Delete the whole struct. - snprintf ( buffer, sizeof(buffer), "%llu", mvhd.duration ); // AUDIT: The buffer is big enough. -+ snprintf ( buffer, sizeof(buffer), "%"PRIu64, mvhd.duration ); // AUDIT: The buffer is big enough. ++ snprintf ( buffer, sizeof(buffer), "%" PRIu64, mvhd.duration ); // AUDIT: The buffer is big enough. this->xmpObj.SetStructField ( kXMP_NS_DM, "duration", kXMP_NS_DM, "value", &buffer[0] ); snprintf ( buffer, sizeof(buffer), "1/%u", mvhd.timescale ); // AUDIT: The buffer is big enough. this->xmpObj.SetStructField ( kXMP_NS_DM, "duration", kXMP_NS_DM, "scale", &buffer[0] ); @@ -132,7 +132,7 @@ char strValue[20]; - snprintf ( strValue, sizeof(strValue), "%lu", binValue ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRIu32, binValue ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRIu32, binValue ); // AUDIT: Using sizeof(strValue) is safe. xmp->SetProperty ( xmpNS, xmpProp, strValue ); @@ -141,7 +141,7 @@ char strValue[40]; - snprintf ( strValue, sizeof(strValue), "%lu/%lu", binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRIu32"/%"PRIu32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRIu32 "/%" PRIu32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. xmp->SetProperty ( xmpNS, xmpProp, strValue ); @@ -150,7 +150,7 @@ char strValue[40]; - snprintf ( strValue, sizeof(strValue), "%ld/%ld", binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRId32"/%"PRId32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRId32 "/%" PRId32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. xmp->SetProperty ( xmpNS, xmpProp, strValue ); @@ -177,7 +177,7 @@ char strValue[20]; - snprintf ( strValue, sizeof(strValue), "%ld", binValue ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRId32, binValue ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRId32, binValue ); // AUDIT: Using sizeof(strValue) is safe. xmp->SetProperty ( xmpNS, xmpProp, strValue ); @@ -186,7 +186,7 @@ char strValue[20]; - snprintf ( strValue, sizeof(strValue), "%lu", binValue ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRIu32, binValue ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRIu32, binValue ); // AUDIT: Using sizeof(strValue) is safe. xmp->AppendArrayItem ( xmpNS, xmpProp, kXMP_PropArrayIsOrdered, strValue ); @@ -195,7 +195,7 @@ char strValue[40]; - snprintf ( strValue, sizeof(strValue), "%lu/%lu", binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRIu32"/%"PRIu32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRIu32 "/%" PRIu32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. xmp->AppendArrayItem ( xmpNS, xmpProp, kXMP_PropArrayIsOrdered, strValue ); @@ -204,7 +204,7 @@ char strValue[40]; - snprintf ( strValue, sizeof(strValue), "%ld/%ld", binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRId32"/%"PRId32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRId32 "/%" PRId32, binNum, binDenom ); // AUDIT: Using sizeof(strValue) is safe. xmp->AppendArrayItem ( xmpNS, xmpProp, kXMP_PropArrayIsOrdered, strValue ); @@ -231,7 +231,7 @@ char strValue[20]; - snprintf ( strValue, sizeof(strValue), "%ld", binValue ); // AUDIT: Using sizeof(strValue) is safe. -+ snprintf ( strValue, sizeof(strValue), "%"PRId32, binValue ); // AUDIT: Using sizeof(strValue) is safe. ++ snprintf ( strValue, sizeof(strValue), "%" PRId32, binValue ); // AUDIT: Using sizeof(strValue) is safe. xmp->AppendArrayItem ( xmpNS, xmpProp, kXMP_PropArrayIsOrdered, strValue ); @@ -240,7 +240,7 @@ } - snprintf ( buffer, sizeof(buffer), "%ld/%ld", binNum, binDenom ); // AUDIT: Use of sizeof(buffer) is safe. -+ snprintf ( buffer, sizeof(buffer), "%"PRId32"/%"PRId32, binNum, binDenom ); // AUDIT: Use of sizeof(buffer) is safe. ++ snprintf ( buffer, sizeof(buffer), "%" PRId32 "/%" PRId32, binNum, binDenom ); // AUDIT: Use of sizeof(buffer) is safe. xmp->AppendArrayItem ( xmpNS, arrayPath.c_str(), kXMP_PropArrayIsOrdered, buffer ); @@ -249,7 +249,7 @@ } - snprintf ( buffer, sizeof(buffer), "%lu/%lu", binNum, binDenom ); // AUDIT: Use of sizeof(buffer) is safe. -+ snprintf ( buffer, sizeof(buffer), "%"PRIu32"/%"PRIu32, binNum, binDenom ); // AUDIT: Use of sizeof(buffer) is safe. ++ snprintf ( buffer, sizeof(buffer), "%" PRIu32 "/%" PRIu32, binNum, binDenom ); // AUDIT: Use of sizeof(buffer) is safe. xmp->AppendArrayItem ( xmpNS, arrayPath.c_str(), kXMP_PropArrayIsOrdered, buffer ); @@ -267,7 +267,7 @@ if ( (degDenom == 1) && (minDenom == 1) && (secDenom == 1) ) { - snprintf ( buffer, sizeof(buffer), "%lu,%lu,%lu%c", degNum, minNum, secNum, ref ); // AUDIT: Using sizeof(buffer is safe. -+ snprintf ( buffer, sizeof(buffer), "%"PRIu32",%"PRIu32",%"PRIu32"%c", degNum, minNum, secNum, ref ); // AUDIT: Using sizeof(buffer is safe. ++ snprintf ( buffer, sizeof(buffer), "%" PRIu32 ",%" PRIu32 ",%" PRIu32 "%c", degNum, minNum, secNum, ref ); // AUDIT: Using sizeof(buffer is safe. } else {