Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2024 20:53:56 GMT
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3aaca1788173 - main - graphics/rawtherapee: work around jpeg-turbo regression
Message-ID:  <202405282053.44SKru77003745@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3aaca1788173e1e855ab87b9632bc54a0654ed2a

commit 3aaca1788173e1e855ab87b9632bc54a0654ed2a
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2024-05-28 20:48:06 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2024-05-28 20:53:44 +0000

    graphics/rawtherapee: work around jpeg-turbo regression
    
    jpeg-turbo hides the jpg_std_message_table, causing linker troubles,
    as reported by pkg-fallout.  This somehow also snuck past the -exp run.
    
    We now set up the default table in the code that wanted to reference it
    and steal the const pointer to the message table as a workaround.
    
    Also, the jpeg-turbo upgrade breaks rawtherapee at run-time, so we
    must bump its PORTREVISION.
    
    Rawtherapee 5.10_1 with jpeg-turbo 3.0.3 causes this error,
    preventing a program start:
    ld-elf.so.1: /usr/local/bin/rawtherapee: Undefined symbol "jpeg_std_message_table@LIBJPEG_8.0"
    
    PR:             279371
---
 graphics/rawtherapee/Makefile                        |  2 +-
 .../rawtherapee/files/patch-rtengine_jdatasrc.cc     | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/graphics/rawtherapee/Makefile b/graphics/rawtherapee/Makefile
index f415b7f66636..1753aab3ee68 100644
--- a/graphics/rawtherapee/Makefile
+++ b/graphics/rawtherapee/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	rawtherapee
 PORTVERSION=	5.10
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics
 MASTER_SITES=	https://rawtherapee.com/shared/source/ \
 		LOCAL/mandree/
diff --git a/graphics/rawtherapee/files/patch-rtengine_jdatasrc.cc b/graphics/rawtherapee/files/patch-rtengine_jdatasrc.cc
new file mode 100644
index 000000000000..950b3b205be2
--- /dev/null
+++ b/graphics/rawtherapee/files/patch-rtengine_jdatasrc.cc
@@ -0,0 +1,20 @@
+--- rtengine/jdatasrc.cc.orig	2024-02-16 05:12:09 UTC
++++ rtengine/jdatasrc.cc
+@@ -409,6 +409,8 @@ my_jpeg_std_error (struct jpeg_error_mgr * err)
+ GLOBAL(struct jpeg_error_mgr *)
+ my_jpeg_std_error (struct jpeg_error_mgr * err)
+ {
++    struct jpeg_error_mgr std_jpeg_err;
++    (void)jpeg_std_error(&std_jpeg_err);
+ 
+     err->error_exit = my_error_exit;
+     err->emit_message = emit_message;
+@@ -421,7 +423,7 @@ my_jpeg_std_error (struct jpeg_error_mgr * err)
+     err->msg_code = 0;        /* may be useful as a flag for "no error" */
+ 
+     /* Initialize message table pointers */
+-    err->jpeg_message_table = jpeg_std_message_table;
++    err->jpeg_message_table = std_jpeg_err.jpeg_message_table;
+     err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1;
+ 
+     err->addon_message_table = nullptr;



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