While the build still succeeds, the sequence is wrong: it tries to force usage of Homebrew without checking if is available at all, tries to download a version for a random macOS version, when that fails, it adds incorrect ldflags.
Executing: cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_R_R-jqr/R-jqr/work/jqr" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCRosettaPorts_R_R-jqr/R-jqr/work/destroot/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library
* installing *source* package ‘jqr’ ...
** package ‘jqr’ successfully unpacked and MD5 sums checked
** using staged installation
Using autobrew bundle: jq-1.6-high_sierra.tar.xz
tar: Unrecognized archive format: Inappropriate file type or format
tar: Error exit delayed from previous errors.
Using PKG_CFLAGS=-I/opt/local/var/macports/build/_opt_PPCRosettaPorts_R_R-jqr/R-jqr/work/jqr/.deps/include
Using PKG_LIBS=-L/opt/local/var/macports/build/_opt_PPCRosettaPorts_R_R-jqr/R-jqr/work/jqr/.deps/lib -ljq -lonig
** libs
using C compiler: ‘gcc-mp-12 (MacPorts gcc12 12.2.0_0) 12.2.0’
What should be done instead:
Check whether jq is installed.
If installed, apply appropriate ldflags.
If not installed, use Homebrew or Macports depending on what is actually available. Even better – ask the user. Do not force a package manager choice.
Obviously, download a generic source of jq and not some randomly picked macOS version tarball.
This fails to work as supposed: https://github.com/ropensci/jqr/blob/ead84fad5ee57abb6ec35c48e1225eca17a28b29/configure#L17-L32
While the build still succeeds, the sequence is wrong: it tries to force usage of Homebrew without checking if is available at all, tries to download a version for a random macOS version, when that fails, it adds incorrect ldflags.
What should be done instead:
jq
is installed.jq
and not some randomly picked macOS version tarball.