Bug 237525

Summary: security/git-crypt: fix build with GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Ashish SHUKLA <ashish>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (ashish)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description Piotr Kubaj freebsd_committer freebsd_triage 2019-04-24 13:32:06 UTC
Created attachment 203964 [details]
patch

Add USES=compiler:c++11-lang to fix build on GCC architectures.

Don't add -L${OPENSSLLIB} unconditionally, do it only when SSL library from ports is used. The reason is that adding -L/usr/lib makes ports GCC want to link to libstdc++ from /usr/lib, not from /usr/local/lib/gcc8.

Tested on powerpc64 and amd64.
Comment 1 Ashish SHUKLA freebsd_committer freebsd_triage 2019-04-25 12:21:50 UTC
(In reply to Piotr Kubaj from comment #0)

Hi,

Thank you for the diff.

I looked at the diff, and doesn't look anything bad to me. I'm AFK from FreeBSD hosts for ~2 weeks, so won't be able to test this diff.

You have my approval for commit, if you are willing to fix any breakage due to this diff.


Thanks in advance

Ashish
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-04-27 08:42:34 UTC
A commit references this bug:

Author: pkubaj
Date: Sat Apr 27 08:41:59 UTC 2019
New revision: 500197
URL: https://svnweb.freebsd.org/changeset/ports/500197

Log:
  security/git-crypt: fix build with GCC-based architectures

  Add USES=compiler:c++11-lang.

  Don't add -L${OPENSSLLIB} unconditionally, do it only when SSL library from ports is used. The reason is that adding -L/usr/lib makes ports GCC want to link to libstdc++ from /usr/lib, not from /usr/local/lib/gcc8. This causes linking errors

  PR:		237525
  Approved by:	ashish (maintainer), tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D20053

Changes:
  head/security/git-crypt/Makefile
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2019-04-27 08:43:45 UTC
Committed, thanks!