Bug 217436

Summary: A port without any OPTIONS_DEFINE won't package file in DOCSDIR or PORTEXAMPLESDIR if WITHOUT=DOCS/EXAMPLES
Product: Ports & Packages Reporter: John W. O'Brien <john>
Component: Ports FrameworkAssignee: Mathieu Arnold <mat>
Status: Closed FIXED    
Severity: Affects Only Me CC: john, portmgr, ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description John W. O'Brien 2017-02-28 20:59:31 UTC
Expected behavior
=================

A build with all options disabled will install plugins, templates, and tools.


Observed behavior
=================

With EXAMPLES disabled, the package contains only a README file.

With EXAMPLES and DOCS disabled, the package is empty.


How to reproduce
================

Build the port with EXAMPLES disabled.
Comment 1 John W. O'Brien 2017-02-28 21:23:50 UTC
Also, it looks like the port needs

    OPTIONS_DEFINE= EXAMPLES DOCS

too. Otherwise, under poudriere

    OPTIONS_UNSET+= DOCS EXAMPLES
    sysutils_munin-contrib_SET+= EXAMPLES

still emits an empty package.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2017-03-01 08:45:08 UTC
Mmmm, fun.

The port does not have any option defined, because nothing is optional.

So, changing the options globally for the ports framework should not break it.

So, this is a framework bug, not a bug in this port.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-03-02 09:56:32 UTC
A commit references this bug:

Author: mat
Date: Thu Mar  2 09:55:20 UTC 2017
New revision: 435222
URL: https://svnweb.freebsd.org/changeset/ports/435222

Log:
  Update to latest commit.

  Also, don't use PORTDOCS and PORTEXAMPLES, even if the port does not
  define both options, the files are not packaged if you set a global
  OPTIONS_UNSET.

  PR:		217436
  Sponsored by:	Absolight

Changes:
  head/sysutils/munin-contrib/Makefile
  head/sysutils/munin-contrib/distinfo