Bug 195817

Summary: Mk/bsd.options.mk: ${opt}_USE_OFF is missing
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Ports FrameworkAssignee: Antoine Brodin <antoine>
Status: Closed FIXED    
Severity: Affects Only Me CC: portmgr
Priority: --- Keywords: feature, needs-patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description Jan Beich freebsd_committer freebsd_triage 2014-12-09 06:04:54 UTC
Some ports may benefit from having USE_FOO defined when an option is disabled. For example, the following currently doesn't work

  SDL2_USE=       SDL=sdl2
  SDL2_USE_OFF=   SDL=sdl

and needs to be rewritten as either

  SDL2_USE=       SDL=sdl2
  SDL2_LIB_DEPENDS_OFF=libSDL.so:${PORTSDIR}/devel/sdl12

or

  SDL2_USE=       SDL=sdl2

  .include <bsd.port.options.mk>

  .if ! ${PORT_OPTIONS:MSDL2}
  USE_SDL=        sdl
  .endif
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2015-01-18 23:02:56 UTC
It seems a few ports already use this non-existing feature:

archivers/libarchive/Makefile:NETTLE_USE_OFF=           OPENSSL=yes
games/xqf/Makefile:GTK2_USE_OFF=                GNOME=gdkpixbuf
net-im/skype4/Makefile:#NVIDIA_GL_USE_OFF=      LINUX_APPS=dri
net-mgmt/ettercap/Makefile:PLUGINS_USE_OFF=     LDCONFIG=yes
security/openconnect/Makefile:GNUTLS_USE_OFF=           OPENSSL=yes
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2015-01-18 23:06:52 UTC
Created attachment 151812 [details]
patch
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2015-01-21 16:43:05 UTC
Take
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-01-22 12:18:21 UTC
A commit references this bug:

Author: antoine
Date: Thu Jan 22 12:18:01 UTC 2015
New revision: 377651
URL: https://svnweb.freebsd.org/changeset/ports/377651

Log:
  Add a ${opt}_USE_OFF option helper

  PR:		195817
  Differential Revision:	https://reviews.freebsd.org/D1581
  Reviewed by:	bapt, mat, jbeich
  With hat:	portmgr

Changes:
  head/Mk/bsd.options.mk