Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2025 13:30:37 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 07a93393cdae - 2025Q1 - graphics/timg: fix build on 32-bit architectures
Message-ID:  <202502111330.51BDUbtV075369@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2025Q1 has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=07a93393cdae6e2ee3666d4178d31b0d894826ed

commit 07a93393cdae6e2ee3666d4178d31b0d894826ed
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-01-30 13:47:39 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-02-11 13:29:50 +0000

    graphics/timg: fix build on 32-bit architectures
    
    Add a bunch of missing casts.
    
    Approved by:    portmgr (build fix blanket)
    MFH:            2025Q1
    
    (cherry picked from commit bf83a6ced2e0a5be4040df05c400930cffcb042b)
---
 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<time_t>(ms / 1000), static_cast<long>((ms % 1000) * 1000000)};
+     }
+     static constexpr Duration Micros(int64_t usec) {
+-        return {usec / 1000, (usec % 1000000) * 1000};
++        return {static_cast<time_t>(usec / 1000), static_cast<long>((usec % 1000000) * 1000)};
+     }
+     static constexpr Duration Nanos(int64_t nanos) {
+-        return {nanos / 1000000000, nanos % 1000000000};
++        return {static_cast<time_t>(nanos / 1000000000), static_cast<long>(nanos % 1000000000)};
+     }
+     static constexpr Duration InfiniteFuture() {
+         return {1000000000, 0};  // a few years; infinite enough :)



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