Bug 271124 - graphics/libjxl: fails to package with JPEG unset
Summary: graphics/libjxl: fails to package with JPEG unset
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-04-28 19:00 UTC by fsbruva
Modified: 2023-04-28 19:59 UTC (History)
0 users

See Also:
jbeich: maintainer-feedback+
jbeich: merge-quarterly+


Attachments
Proposed patch to add JPEG conditionality (254 bytes, patch)
2023-04-28 19:00 UTC, fsbruva
no flags Details | Diff
Revised patch to add JPEG conditionality (566 bytes, patch)
2023-04-28 19:07 UTC, fsbruva
no flags Details | Diff
Revised patch to add JPEG conditionality (568 bytes, patch)
2023-04-28 19:11 UTC, fsbruva
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fsbruva 2023-04-28 19:00:22 UTC
Created attachment 241835 [details]
Proposed patch to add JPEG conditionality

Problem: making the libjxl port with JPEG option unset causes packaging failure

===>  Building package for libjxl-0.8.1
pkg-static: Unable to access file /wrkdirs/usr/ports/graphics/libjxl/work/stage/usr/local/bin/cjpeg_hdr:No such file or directory
*** Error code 1

Discussion: The Makefile correctly instructs CMAKE to not search for JPEG based on the set/unset status of the JPEG option. However, according to https://github.com/libjxl/libjxl/blob/c27d499263435ac77007174e0f1cf54557cff23a/tools/CMakeLists.txt#L147, that also disables compilation of the cjpeg_hdr binary.

Proposed solution: The attached patch amends the pkg-plist for the port to be contingent on the JPEG option. This avoids the above errorwhen JPEG is unset, and permits the compilation of cjpeg_hdr when the JPEG option is set.
Comment 1 fsbruva 2023-04-28 19:07:08 UTC
Created attachment 241836 [details]
Revised patch to add JPEG conditionality

Add bump to PORTREVISION.
Comment 2 fsbruva 2023-04-28 19:11:26 UTC
Created attachment 241837 [details]
Revised patch to add JPEG conditionality

Correct line spacing.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-04-28 19:56:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0bafdac68158d54d6aa6a06c96b566809066d770

commit 0bafdac68158d54d6aa6a06c96b566809066d770
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-04-28 19:47:08 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-04-28 19:52:48 +0000

    graphics/libjxl: unbreak JPEG=off after 115fc1237eeb

    Error: Missing: bin/cjpeg_hdr

    https://github.com/libjxl/libjxl/commit/759a29f9e6e0

    PR:             271124
    Submitted by:   fsbruva@yahoo.com

 graphics/libjxl/pkg-plist | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-04-28 19:58:42 UTC
A commit in branch 2023Q2 references this bug:

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

commit b363c3f5e16411122fd079cde2453a8f0edaf24d
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-04-28 19:47:08 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-04-28 19:56:37 +0000

    graphics/libjxl: unbreak JPEG=off after 115fc1237eeb

    Error: Missing: bin/cjpeg_hdr

    https://github.com/libjxl/libjxl/commit/759a29f9e6e0

    PR:             271124
    Submitted by:   fsbruva@yahoo.com

    (cherry picked from commit 0bafdac68158d54d6aa6a06c96b566809066d770)

 graphics/libjxl/pkg-plist | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Jan Beich freebsd_committer freebsd_triage 2023-04-28 19:59:24 UTC
Bumping PORTREVISION isn't necessary if it failed to build before.