Bug 222994 - Check for qt depends in LOCALBASE, not PREFIX
Summary: Check for qt depends in LOCALBASE, not PREFIX
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: kde
URL: https://reviews.freebsd.org/D12666
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-13 23:35 UTC by Adam Weinberger
Modified: 2017-10-19 01:07 UTC (History)
3 users (show)

See Also:


Attachments
qt LOCALBASE (905 bytes, patch)
2017-10-13 23:35 UTC, Adam Weinberger
no flags Details | Diff
v2 (619 bytes, patch)
2017-10-14 06:23 UTC, Adam Weinberger
no flags Details | Diff
v3 (10.94 KB, patch)
2017-10-14 17:08 UTC, Adam Weinberger
no flags Details | Diff
v4 (10.82 KB, patch)
2017-10-15 14:35 UTC, Adam Weinberger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Weinberger freebsd_committer 2017-10-13 23:35:50 UTC
Created attachment 187153 [details]
qt LOCALBASE

Dependencies should be checked in LOCALBASE, not PREFIX. I'm not sure what the side effect of changing these variables is, so an exp-run would be elucidative.
Comment 1 Antoine Brodin freebsd_committer 2017-10-14 05:51:13 UTC
The QT_*DIR part is not good,  it is where lots of qt ports do install so it should be PREFIX not LOCALBASE.
Comment 2 Antoine Brodin freebsd_committer 2017-10-14 06:03:57 UTC
Also an exp-run won't show anything,  we run them with PREFIX=LOCALBASE.
Comment 3 Adam Weinberger freebsd_committer 2017-10-14 06:12:27 UTC
(In reply to Antoine Brodin from comment #2)
Ah. I hadn't thought that part through.
Comment 4 Antoine Brodin freebsd_committer 2017-10-14 06:13:47 UTC
May QT_*DIR should be eliminated and only QT_*DIR_REL allowed to solve the LOCALBASE/PREFIX confusion
Comment 5 Adam Weinberger freebsd_committer 2017-10-14 06:23:35 UTC
Created attachment 187157 [details]
v2

Only alter the checked paths, not the actual LIBDIR/BINDIR settings.

While I understand that the exp-run won't show whether it fixes PREFIX!=LOCALBASE, it'd at least be good to verify that it doesn't break anything.
Comment 6 Adam Weinberger freebsd_committer 2017-10-14 06:34:09 UTC
(In reply to Antoine Brodin from comment #4)

Does RUN_DEPENDS handle relative paths? I thought that it did a `which` for anything that doesn't start with a / or have a version specification.
Comment 7 Antoine Brodin freebsd_committer 2017-10-14 06:45:16 UTC
(In reply to Adam Weinberger from comment #6)
I was suggesting using ${PREFIX}${QT_*REL} and ${LOCALBASE}${QT_*REL} everywhere
Comment 8 Adam Weinberger freebsd_committer 2017-10-14 17:08:57 UTC
Created attachment 187170 [details]
v3

Use the correct path for everything (${LOCALBASE}/${QT_*DIR_REL}) rather than subbing things in at the end.
Comment 9 Antoine Brodin freebsd_committer 2017-10-15 10:43:19 UTC
(In reply to Adam Weinberger from comment #8)
The charts_LIB and clucene_LIB lines shouldn't be changed
Comment 10 Adam Weinberger freebsd_committer 2017-10-15 14:35:42 UTC
Created attachment 187195 [details]
v4

(In reply to Antoine Brodin from comment #9)

Good catch! Fixed.
Comment 11 Antoine Brodin freebsd_committer 2017-10-17 05:39:59 UTC
This change looks fine to me.
Comment 12 commit-hook freebsd_committer 2017-10-19 01:04:23 UTC
A commit references this bug:

Author: adamw
Date: Thu Oct 19 01:03:25 UTC 2017
New revision: 452391
URL: https://svnweb.freebsd.org/changeset/ports/452391

Log:
  Check for Qt depends in LOCALBASE, not PREFIX

  Qt has been looking for its dependencies in PREFIX, rather than in
  LOCALBASE. Dependencies are expected to exist in LOCALBASE, but
  PREFIX may be set arbitrarily by the end-user. When PREFIX != LOCALBASE,
  Qt-based ports failed to build.

  PR:		222994
  Reported by:	kargl
  Approved by:	tcberner (kde)
  Exp-run by:	antoine
  MFH:		2017Q4
  Differential Revision:	https://reviews.freebsd.org/D12666

Changes:
  head/Mk/bsd.qt.mk
Comment 13 commit-hook freebsd_committer 2017-10-19 01:06:27 UTC
A commit references this bug:

Author: adamw
Date: Thu Oct 19 01:05:52 UTC 2017
New revision: 452392
URL: https://svnweb.freebsd.org/changeset/ports/452392

Log:
  MFH: r452391

  Check for Qt depends in LOCALBASE, not PREFIX

  Qt has been looking for its dependencies in PREFIX, rather than in
  LOCALBASE. Dependencies are expected to exist in LOCALBASE, but
  PREFIX may be set arbitrarily by the end-user. When PREFIX != LOCALBASE,
  Qt-based ports failed to build.

  PR:		222994
  Reported by:	kargl
  Approved by:	tcberner (kde)
  Exp-run by:	antoine
  Differential Revision:	https://reviews.freebsd.org/D12666

  Approved by:	ports-secteam (blanket, build fix)

Changes:
_U  branches/2017Q4/
  branches/2017Q4/Mk/bsd.qt.mk