From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jul 1 09:20:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 94B9ED6B for ; Mon, 1 Jul 2013 09:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7739C1BFB for ; Mon, 1 Jul 2013 09:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r619K06A063419 for ; Mon, 1 Jul 2013 09:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r619K0Sl063418; Mon, 1 Jul 2013 09:20:00 GMT (envelope-from gnats) Resent-Date: Mon, 1 Jul 2013 09:20:00 GMT Resent-Message-Id: <201307010920.r619K0Sl063418@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Scot Hetzel Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6C5399FA for ; Mon, 1 Jul 2013 09:12:26 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 5ECAA1B7E for ; Mon, 1 Jul 2013 09:12:26 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r619CQcx002158 for ; Mon, 1 Jul 2013 09:12:26 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r619CQH2002154; Mon, 1 Jul 2013 09:12:26 GMT (envelope-from nobody) Message-Id: <201307010912.r619CQH2002154@oldred.freebsd.org> Date: Mon, 1 Jul 2013 09:12:26 GMT From: Scot Hetzel To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/180159: Mk/Uses/jpeg.mk: Used to add dependancy on either jpeg or libjpeg-turbo ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2013 09:20:00 -0000 >Number: 180159 >Category: ports >Synopsis: Mk/Uses/jpeg.mk: Used to add dependancy on either jpeg or libjpeg-turbo ports >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 01 09:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Scot Hetzel >Release: >Organization: >Environment: >Description: 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 >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 >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 ' 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: # $FreeBSD$ # # handle dependency on the graphics/jpeg or graphics/libjpeg-turbo ports # # MAINTAINER: portmgr@FreeBSD.org # # Feature: jpeg # Usage: USES=jpeg or USES=jpeg:ARGS # Valid ARGS: build, run, lib (default, implicit), turbo, jpeg # # turbo use graphics/libjpeg-turbo # jpeg use graphics/jpeg # # if neither turbo or jpeg is specified, then we will default to # graphics/jpeg, unless graphics/libjpeg-turbo port is installed. # .if !defined(_INCLUDE_USES_JPEG_MK) _INCLUDE_USES_JPEG_MK= yes .if !defined(jpeg_ARGS) jpeg_ARGS= lib .endif _valid_ARGS= build run lib turbo jpeg _jpeg_ARGS= ${jpeg_ARGS:C/\:/ /g} .if defined(jpeg_ARGS) . for arg in ${_jpeg_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+=jpeg:${jpeg_ARGS}' usage: argument [${arg}] is not recognized . endif . endfor .endif .if exists(${PREFIX}/include/turbojpeg.h) . if empty(_jpeg_ARGS:Mjpeg) _jpeg_ARGS+=turbo . endif .endif .if ${_jpeg_ARGS:Mjpeg} . if exists(${PREFIX}/bin/tjbench) IGNORE= The graphics/libjpeg-turbo port is installed, uninstall it to use graphics/jpeg . endif .endif .if ${_jpeg_ARGS:Mturbo} . if exists(${PREFIX}/bin/jpegexiforient) IGNORE= The graphics/jpeg port is installed, uninstall it to use graphics/libjpeg-turbo . endif .endif .if ${_jpeg_ARGS:Mturbo} _JPEG_DEPENDS= tjbench:${PORTSDIR}/graphics/libjpeg-turbo _JPEG_LIB_DEPENDS= turbojpeg:${PORTSDIR}/graphics/libjpeg-turbo .else _JPEG_DEPENDS= jpegexiforient:${PORTSDIR}/graphics/jpeg _JPEG_LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg .endif .if ${_jpeg_ARGS:Mbuild} BUILD_DEPENDS+= ${_JPEG_DEPENDS} .elif ${_jpeg_ARGS:Mrun} RUN_DEPENDS+= ${_JPEG_DEPENDS} .else LIB_DEPENDS+= ${_JPEG_LIB_DEPENDS} .endif .endif >Release-Note: >Audit-Trail: >Unformatted: