Move some twenty files that originally were part of the Wine Staging
patchset when Wine 2.0 branched and have been integrated into the Wine
development tree since then from being only included in packages / installed
ports when option STAGING is active to the general case (i.e., omit
the leading %%STAGING%% marker from their entries in pkg-plist).
This points to an unfortunate deficiency in Mk/Scripts/check-stagedir.sh
which we are relying on. 
--- Comment #2 from Mathieu Arnold <[hidden email]> ---
(In reply to Gerald Pfeifer from comment #0)
> It appears that Mk/Scripts/check-stagedir.sh completely misses files that
> - in the staging directory, and
> - are listed in pkg-plist with an %%OPTION%% prefix when OPTION is off.
> Those files should be included in packages (or when the port is installed),
> are not.
No they should not.
The files should only be included if opt is enabled.
There are many, many, ports that stage all the files but only package them if
some options are enabled.
> And check-stagedir.sh should diagnose that those files are in stagedir, but
> not included in pkg-plist.
Well, it might be an idea to say something, like "this file is installed but
not packaged" but it must not be either a warning or an error.
> This is quite a problem!
This is a problem in *1* port, but "fixing" it in the framework would break
many, many ports.
> How to reproduce:
> 1. chdir $PORTSDIR/emulators/wine-devel
> 2. svn up -r 445571 (the version before I'll fix pkg-plist in a minute)
> 3. Run the following script (after adjusting STAGEDIR and PREFIX)
> grep %%STAGING%% pkg-plist | while read f; do
> f=`echo $f | sed -e 's/%%STAGING%%//'`
> if [ -f "$STAGEDIR/$PREFIX/$f" ]; then
> printf "%s no longer contigent on %%STAGING%%?\n" "$f"
--- Comment #3 from Gerald Pfeifer <[hidden email]> ---
(In reply to Mathieu Arnold from comment #2)
> The files should only be included if opt is enabled.
No. ;-) What happens here is that these files only were generated due to
some patches in the Wine Staging patchset which is enabled via the STAGING
Over time those patches tend to move from Wine Staging into mainline Wine,
at which point they are built by default (without the Staging patchset and
hence option STAGING) and need to be included unconditionally.
> There are many, many, ports that stage all the files but only package
> them if some options are enabled.
Hmm, in that case it becomes a little trickier indeed. Good point.
> Well, it might be an idea to say something, like "this file is installed
> but not packaged" but it must not be either a warning or an error.
That would be lovely. Note, this caused real user issues in case of Wine,
so is worth addressing (and we don't know which other ports may be affected).
Add a new Makefile target check-wine-devel-vs-wine-staging that works
around a deficiency of Mk/Scripts/check-stagedir.sh that does not spot
entries in pkg-plist that move from being enabled only with the STAGING
option (%%STAGING%%foo/bar/file) to being there by default (foo/bar/file).
This has caused actual issues for users, so we need to regularly check
for such cases, which a simple `check-wine-devel-vs-wine-staging` will
now do, provided the staging directory is accessible.