Bug 226009 - multimedia/libbluray: Fix environment variable clash with portmaster
Summary: multimedia/libbluray: Fix environment variable clash with portmaster
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-18 20:30 UTC by Martin Birgmeier
Modified: 2019-05-24 09:15 UTC (History)
5 users (show)

See Also:
koobs: merge-quarterly+


Attachments
patch to resolve the clash of the PACKAGES variable between libbluray and portmaster (2.09 KB, patch)
2018-02-18 20:30 UTC, Martin Birgmeier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2018-02-18 20:30:54 UTC
Created attachment 190754 [details]
patch to resolve the clash of the PACKAGES variable between libbluray and portmaster

The latest libbluray 1.0.2,1 use the variable $PACKAGES in its configure scripts in order to accumulate the names of packages it depends on. This clashes with the usage and setting of $PACKAGES by portmaster, resulting in a corrupted installed /usr/local/libdata/pkgconfig/libbluray.pc.

Fix this by renaming the offending variable.

-- Martin
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2018-02-18 20:55:54 UTC
Assign to portmaster maintainer so he can have a look first.  Maybe portmaster can rename its variable PM_PACKAGES or something.
Comment 2 Martin Birgmeier 2018-02-18 21:08:33 UTC
Renaming the variable in portmaster would break backwards compatibility in .portmasterrc.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2019-04-07 16:58:01 UTC
--- multimedia/libbluray/Makefile.orig
+++ multimedia/libbluray/Makefile
@@ -25,6 +25,7 @@
 
 GNU_CONFIGURE= yes
 CONFIGURE_ARGS=        --disable-static
+CONFIGURE_ENV= PACKAGES=""
 INSTALL_TARGET=        install-strip
 
 .include "Makefile.include"
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2019-04-07 17:23:40 UTC
(In reply to VVD from comment #3)
Added last commiter's of multimedia/libbluray and MAINTAINER's emails to CC.

And repeat 1-line suggested patch:
--- multimedia/libbluray/Makefile.orig
+++ multimedia/libbluray/Makefile
@@ -25,6 +25,7 @@
 
 GNU_CONFIGURE= yes
 CONFIGURE_ARGS=        --disable-static
+CONFIGURE_ENV= PACKAGES=""
 INSTALL_TARGET=        install-strip
 
 .include "Makefile.include"
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2019-04-17 17:19:47 UTC
How to set maintainer timeout?
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-21 10:25:44 UTC
Confirming issue:

Installing multimedia/libbluray with portmaster results in:

/usr/local/libdata/pkgconfig/libbluray.pc:
...
Requires.private: /usr/home/koobs/repos/freebsd/ports/packages libxml-2.0 freetype2 fontconfig
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-21 10:27:50 UTC
Assignee timeout: > 1 year (better to CC people or use feedback flags instead of assign them for general feedback)

@VVD, Please include any proposed changes (patches) as attachments, rather than pasting them in comments, as they can otherwise get lost.
Comment 8 commit-hook freebsd_committer freebsd_triage 2019-04-21 10:44:43 UTC
A commit references this bug:

Author: koobs
Date: Sun Apr 21 10:44:28 UTC 2019
New revision: 499532
URL: https://svnweb.freebsd.org/changeset/ports/499532

Log:
  multimedia/libbluray: Fix environment variable conflict with portmaster

  libbluray (> 1.0.2,1) uses the PACKAGES variable in its configure scripts
  that contains the names of packages it depends on. Portmaster also uses the
  PACKAGES environment variable.

  Using portmaster to install libbluray results in a corrupted libbluray
  pkgconfig file containing portmasters PACKAGES path:

    Requires.private: /usr/home/koobs/repos/freebsd/ports/packages libxml-2.0 freetype2 fontconfig

  This breaks libbluray consumers such as ffmpeg.

  This change nulls out the PACKAGES variable during the configure stage of
  the build to prevent the issue. [1]

  While I'm here,

    - Sort JAVA_* and USE_* entries.

  PR:		226009
  Reported by:	Martin Birgmeier <d8zNeCFG aon at> [1]
  Submitted by:	VVD <vvd unislabs com> [1]
  Approved by:	portmgr (unmaintained port)
  MFH:		2019Q2 (blanket: runtime bugfix)

Changes:
  head/multimedia/libbluray/Makefile
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2019-04-29 10:23:07 UTC
Time to close it?
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-29 10:32:39 UTC
(In reply to VVD from comment #9)

Pending my merge to the quarterly branch, thank you for the reminder
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-05-24 09:15:40 UTC
A commit references this bug:

Author: koobs
Date: Fri May 24 09:14:42 UTC 2019
New revision: 502435
URL: https://svnweb.freebsd.org/changeset/ports/502435

Log:
  MFH: multimedia/libbluray: r498276 r499532

  Update to upstream release 1.1.1

  While on it:
  - Pet portlint
  - Fix missing USES=gnome

  multimedia/libbluray: Fix environment variable conflict with portmaster

  libbluray (> 1.0.2,1) uses the PACKAGES variable in its configure scripts
  that contains the names of packages it depends on. Portmaster also uses the
  PACKAGES environment variable.

  Using portmaster to install libbluray results in a corrupted libbluray
  pkgconfig file containing portmasters PACKAGES path:

    Requires.private: /usr/home/koobs/repos/freebsd/ports/packages libxml-2.0 freetype2 fontconfig

  This breaks libbluray consumers such as ffmpeg.

  This change nulls out the PACKAGES variable during the configure stage of
  the build to prevent the issue. [1]

  While I'm here,

    - Sort JAVA_* and USE_* entries.

  PR:		226009
  Reported by:	Martin Birgmeier <d8zNeCFG aon at> [1]
  Submitted by:	VVD <vvd unislabs com> [1]
  Approved by:	portmgr (unmaintained port)

  Approved by:	ports-secteam (blanket: bugfix release(s), runtime bugfix, missing dependencies)

Changes:
_U  branches/2019Q2/
  branches/2019Q2/multimedia/libbluray/Makefile
  branches/2019Q2/multimedia/libbluray/distinfo
  branches/2019Q2/multimedia/libbluray/pkg-plist