Currently, there are 2 versions of JPEG (graphics/jpeg and libjpeg-turbo) that supply their own version of the jpeg library. When attempting to build packages for ports that can use either port, the package fails to build due to one of the dependencies only has: LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg Fix: The attached patch adds a new USES feature for jpeg allowing the appropriate jpeg port to be selected. USES+= jpeg:[build,run,lib] - if ${PREFIX}/include/turbojpeg.h is found use graphics/libjpeg-turbo, otherwise use graphics/jpeg USES+= jpeg:[build,run,lib]:jpeg - uses graphics/jpeg USES+= jpeg:[build,run,lib]:turbo - uses graphics/libjpeg-turbo Ports can use this new feature by adding HPJPG to OPTIONS_DEFINE and the following description: HPJPG_DESC= Build with High-Performance JPEG support Then below the '.include <bsd.port.options.mk>' line add the following: .if ${PORT_OPTIONS:MHPJPG} USES+= jpeg[:lib]:turbo .else USES+= jpeg[:lib] .endif NOTE: 1. the 'lib' arg is optional, as that is the default. 2. HPJPG was taken from the net/tigervnc port Patch attached with submission follows: How-To-Repeat: Try to build /usr/ports/net/tigervnc with the HPJPG option enabled. It will fail to build due to one of the indirect dependencies graphics/jasper (built with the graphics/jpeg port) causes a conflict between graphics/jpeg and graphics/libjpeg-turbo as both ports install the same files. See ports/179236
Maintainer of Mk/Uses, Please note that PR ports/180159 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/180159 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
A patch for graphics/jasper that uses this feature is in: http://www.freebsd.org/cgi/query-pr.cgi?pr=180175 -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.
Can you attach again the patch to this bug, somehow it seems the previously added one is messed up
Bapt, it's not a patch, it's complete replacement. Right now both affected ports PRs have been rejected, but I suppose they could be reopened if jpeg.mk is updated. Scot, I suspect if you don't supply an actual patch then this PR will be rejected too.
submitter timed out, closing.
antoine added preliminary support in ports r390308 and according to review D1582 plans to switch consumers en masse to jpeg-turbo. And bapt seems to work on adding flavour support to both ports infrastructure and pkg(8). The approach here fails to account package-only users that may have jpeg consumers installed that depend on both -turbo and IJG variants. Also, partially obsolete by ports r365789 which moved turbojpeg library with different API/ABI into a separate port but kept the confusing name while net/tigervnc with HPJPG=on was left to depend on libturbojpeg even though it doesn't use tj* symbols.