Bug 239740

Summary: factor out hardcoding of "clangXYZ" in devel/qt5-qdoc
Product: Ports & Packages Reporter: Mark Linimon <linimon>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Some People CC: adridg
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 239736    
Attachments:
Description Flags
patch to devel/qt5-doc/Makefile none

Description Mark Linimon freebsd_committer freebsd_triage 2019-08-09 10:43:46 UTC
Created attachment 206392 [details]
patch to devel/qt5-doc/Makefile

There are a number of places in the ports tree where the string "clang<version" is called out.  When doing the work to identify stale versions of clang tree-wide, these instances cause extra work.

Refactor this usage into LLVM_VER.

Note: this refactoring causes portlint to complain but IMHO this complication is worth tolerating to help ease maintainability.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2019-08-09 10:50:57 UTC
Perhaps the second time is the charm in terms of getting the portname correct.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-08-11 17:38:23 UTC
A commit references this bug:

Author: adridg
Date: Sun Aug 11 17:37:58 UTC 2019
New revision: 508658
URL: https://svnweb.freebsd.org/changeset/ports/508658

Log:
  Make devel/qt5-qdoc use LLVM_DEFAULT instead of hard-coded version

  Having the version hard-coded makes it hard to chase LLVM updates;
  having a different LLVM version from the rest of the stack -- in particular
  from what mesa uses -- means building an extra LLVM just for parsing
  documentation from Qt modules.

  linimon@ suggests using an easily-spotted variable in PR 239740
  but we can go one better and just use the LLVM that's there.

  PR:		239740
  Submitted by:	linimon

Changes:
  head/devel/qt5-qdoc/Makefile
Comment 3 Adriaan de Groot freebsd_committer freebsd_triage 2019-08-11 17:53:19 UTC
Let's just use LLVM_DEFAULT like sensible people (to avoid building an extra, different, compiler alongside the one that mesa needs anyway). Thanks for reporting!
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2019-08-12 09:29:19 UTC
(In reply to Adriaan de Groot from comment #3)

> Let's just use LLVM_DEFAULT

I didn't ask for that because I haven't finished testing it yet :-)

It's taking some time to run all the changes from 239736.
Comment 5 Adriaan de Groot freebsd_committer freebsd_triage 2019-08-12 10:41:25 UTC
> I didn't ask for that because I haven't finished testing it yet :-)

Now it's on my hat, not yours, and AFAICT qdoc is fine with it (also Qt upstream said it's ok, on IRC). So we're good (and 239736 is ever-so-slightly-smaller).