Bug 272155 - graphics/R-cran-jpeg: Fails to build when math/R is build without JPEG support
Summary: graphics/R-cran-jpeg: Fails to build when math/R is build without JPEG support
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Guangyuan Yang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-23 06:20 UTC by Florian Wagner
Modified: 2023-08-19 13:21 UTC (History)
4 users (show)

See Also:


Attachments
Fix (313 bytes, patch)
2023-06-23 06:20 UTC, Florian Wagner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Wagner 2023-06-23 06:20:58 UTC
Created attachment 242942 [details]
Fix

I've already written to the port maintainer directly but haven't heard back in two month.

I'm maintaining my own built of FreeBSD ports and for that I tend to disable a bunch of options here and there to get a learner dependency tree. One of these is unsetting JPEG when building math/R. Doing that makes building graphics/R-cran-jpeg fail:

  gmake[1]: Entering directory '/wrkdirs/usr/ports/graphics/R-cran-jpeg/work/jpeg/src'
  cc -I"/usr/local/lib/R/include" -DNDEBUG   -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include   -fpic  -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -c read.c -o read.o
  In file included from read.c:1:
  ./rjcommon.h:11:10: fatal error: 'jpeglib.h' file not found
  #include <jpeglib.h>

The reason for this is, that math/R without JPEG will not depend on jpeg-turbo and this it will not be implicitly installed when building CRAN ports. So there'll be no jpeglib.h to be found. On default (meaning JPEG option set for math/R) it'll be there "coincidentally" so everything works.

The fix for this is the explicitly USES=jpeg in graphics/R-cran-jpeg. Patch is attached.
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2023-08-19 13:21:33 UTC
Assigning maintainer