SD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: bf83a6ced2e0 - main - graphics/timg: fix build on 32-bit architectures 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf83a6ced2e0a5be4040df05c400930cffcb042b Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=bf83a6ced2e0a5be4040df05c400930cffcb042b commit bf83a6ced2e0a5be4040df05c400930cffcb042b Author: Robert Clausecker AuthorDate: 2025-01-30 13:47:39 +0000 Commit: Robert Clausecker CommitDate: 2025-02-11 13:25:53 +0000 graphics/timg: fix build on 32-bit architectures Add a bunch of missing casts. Approved by: portmgr (build fix blanket) MFH: 2025Q1 --- graphics/timg/Makefile | 3 --- graphics/timg/files/patch-src_timg-time.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/graphics/timg/Makefile b/graphics/timg/Makefile index 798c98bf0721..79f6f8b10af4 100644 --- a/graphics/timg/Makefile +++ b/graphics/timg/Makefile @@ -10,9 +10,6 @@ WWW= https://github.com/hzeller/timg LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -NOT_FOR_ARCHS= i386 -NOT_FOR_ARCHS_REASON= non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long long') to 'long' in initializer list - LIB_DEPENDS= libavutil.so:multimedia/ffmpeg \ libdeflate.so:archivers/libdeflate \ libexif.so:graphics/libexif \ diff --git a/graphics/timg/files/patch-src_timg-time.h b/graphics/timg/files/patch-src_timg-time.h new file mode 100644 index 000000000000..d25219cb8bcc --- /dev/null +++ b/graphics/timg/files/patch-src_timg-time.h @@ -0,0 +1,19 @@ +--- src/timg-time.h.orig 2025-01-30 13:44:32 UTC ++++ src/timg-time.h +@@ -50,13 +50,13 @@ class Duration { (public) + } + + static constexpr Duration Millis(int64_t ms) { +- return {ms / 1000, (ms % 1000) * 1000000}; ++ return {static_cast(ms / 1000), static_cast((ms % 1000) * 1000000)}; + } + static constexpr Duration Micros(int64_t usec) { +- return {usec / 1000, (usec % 1000000) * 1000}; ++ return {static_cast(usec / 1000), static_cast((usec % 1000000) * 1000)}; + } + static constexpr Duration Nanos(int64_t nanos) { +- return {nanos / 1000000000, nanos % 1000000000}; ++ return {static_cast(nanos / 1000000000), static_cast(nanos % 1000000000)}; + } + static constexpr Duration InfiniteFuture() { + return {1000000000, 0}; // a few years; infinite enough :)