Bug 195817 - Mk/bsd.options.mk: ${opt}_USE_OFF is missing
Summary: Mk/bsd.options.mk: ${opt}_USE_OFF is missing
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Antoine Brodin
URL:
Keywords: feature, needs-patch
Depends on:
Blocks:
 
Reported: 2014-12-09 06:04 UTC by Jan Beich
Modified: 2015-01-22 12:18 UTC (History)
1 user (show)

See Also:


Attachments
patch (844 bytes, patch)
2015-01-18 23:06 UTC, Antoine Brodin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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