Bug 202905 - [PATCH] audio/hydrogen: Add USES=libarchive, stop setting LDFLAGS.
Summary: [PATCH] audio/hydrogen: Add USES=libarchive, stop setting LDFLAGS.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks: 202516
  Show dependency treegraph
 
Reported: 2015-09-05 12:01 UTC by Raphael Kubo da Costa
Modified: 2015-09-07 11:14 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (FreeBSD)


Attachments
Proposed patch (3.70 KB, patch)
2015-09-05 12:01 UTC, Raphael Kubo da Costa
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-09-05 12:01:28 UTC
Created attachment 160740 [details]
Proposed patch

The attached patch has two parts:

1. Import a pull request I've just sent upstream that makes FindHelper.cmake behave better and stop using pkg-config's output directly as include and library paths. The consequence is that libraries like libarchive, libsndfile, jack etc are now found with their full path and we can stop setting LDFLAGS in Makefile.

2. Set USES=libarchive. Even though the port does not require any functionality that is only present in libarchive from ports, explicitly depending on a certain version makes things more consistent.
   Additionally, before this patch there would be no dependency on libarchive from ports but since the linker was previously called like this:
       c++ ... -o hydrogen -L/usr/local/lib -larchive -lsndfile ...
   so the port would end up linking against libarchive from ports when it was present (which is always, since devel/cmake depends on it). And with this patch we have
       c++ ... -o hydrogen -larchive /usr/local/lib/libsndfile.so ...
   which does link against libarchive from base, but then fails `make stage-qa', which expects all ports to link against ports libarchive.
Comment 1 Shane 2015-09-06 15:36:46 UTC
The new patch file looks fine to me, just adding a timestamp in the header will keep portlint happy.

Adding USE=libarchive is also waiting as part of a patch in another pr bug #202737
Comment 2 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-09-06 15:58:26 UTC
Thanks. Shall I land this one with the timestamp fix or would you rather take care of the libarchive part in the other bug?
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-09-06 20:20:06 UTC
ping?
Comment 4 Shane 2015-09-07 10:18:16 UTC
You may as well apply this to unblock the cmake update, I will adjust the other to suit.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-09-07 11:13:17 UTC
A commit references this bug:

Author: rakuco
Date: Mon Sep  7 11:12:34 UTC 2015
New revision: 396259
URL: https://svnweb.freebsd.org/changeset/ports/396259

Log:
  Add USES=libarchive, stop setting LDFLAGS.

  1. Import a pull request I've just sent upstream that makes FindHelper.cmake
     behave better and stop using pkg-config's output directly as include and
     library paths. The consequence is that libraries like libarchive,
     libsndfile, jack etc are now found with their full path and we can stop
     setting LDFLAGS in Makefile.

  2. Set USES=libarchive. Even though the port does not require any
     functionality that is only present in libarchive from ports, explicitly
     depending on a certain version makes things more consistent.
     Additionally, before this patch there would be no dependency on
     libarchive from ports but since the linker was previously called like
     this:
        c++ ... -o hydrogen -L/usr/local/lib -larchive -lsndfile ...
     so the port would end up linking against libarchive from ports when it
     was present (which is always, since devel/cmake depends on it). And with
     this patch we have
        c++ ... -o hydrogen -larchive /usr/local/lib/libsndfile.so ...
     which does link against libarchive from base, but then fails `make
     stage-qa', which expects all ports to link against ports libarchive.

  PR:		202905
  Approved by:	FreeBSD@ShaneWare.Biz (maintainer)

Changes:
  head/audio/hydrogen/Makefile
  head/audio/hydrogen/files/patch-cmake__FindHelper.cmake
Comment 6 Raphael Kubo da Costa freebsd_committer freebsd_triage 2015-09-07 11:14:22 UTC
Committed, thanks for reviewing!