Bug 197031 - x11-toolkits/wxgtk30: fix on pre-10.x
Summary: x11-toolkits/wxgtk30: fix on pre-10.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-23 12:55 UTC by Dmitry Marakasov
Modified: 2015-02-03 20:13 UTC (History)
1 user (show)

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


Attachments
Patch (895 bytes, patch)
2015-01-23 12:55 UTC, Dmitry Marakasov
no flags Details | Diff
svn diff accepting Dmitry's proposal, fixing reported error (938 bytes, patch)
2015-01-23 18:50 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer freebsd_triage 2015-01-23 12:55:22 UTC
Created attachment 152054 [details]
Patch

Ports which use wxgtk30 fail with webkit-gtk2 linking errors on pre-10.x:

http://beefy1.isc.freebsd.org/data/93i386-default/2015-01-21_21h05m07s/logs/wxguitar-1.01_6.log
http://beefy1.isc.freebsd.org/data/93i386-default/2015-01-21_21h05m07s/logs/megaglest-3.9.0.4_5.log
http://beefy1.isc.freebsd.org/data/93i386-default/2015-01-21_21h05m07s/logs/golly-2.4_3.log

Seems like webkit-gtk2 is now using c++11, so dependent ports should use it too.

- Add USES=compiler:c++11-lib
- Disable precompiled headers with gcc, is it won't compile

Confirmed fixing some dependent ports, some require compiler=c++11-lib as well
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-23 12:55:22 UTC
Maintainer CC'd
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2015-01-23 12:59:06 UTC
Umm, seems to be duplicate of 196703, still USES=compiler should be unconditional, as it is on webkit-gtk2.
Comment 3 Chris Hutchinson 2015-01-23 15:53:33 UTC
(In reply to Dmitry Marakasov from comment #2)
I'd like to propose the following:

.include <bsd.port.pre.mk>
.if ${OSVERSION} < 1000000
USES+= compiler:c++11-lib
.endif
.if ${COMPILER_TYPE} == "gcc"
CONFIGURE_ARGS=	--disable-precomp-headers
.endif

.include <bsd.port.post.mk>

I chose to make the compiler:c++11-lib a conditional
in an effort to prevent the need to re-visit this for
c++ > 11.

So unless anyone suggests a good reason not to. I'll
submit an svn diff that incorporates this, for a commit.

Thanks, Dmitry, for all your efforts to address this.

--Chris
Comment 4 Dmitry Marakasov freebsd_committer freebsd_triage 2015-01-23 17:06:02 UTC
(In reply to Chris Hutchinson from comment #3)
Why would you need to revisit this for >c++11?

webkit-gtk2 sets compiler:c++11-lib unconditionally as it unconditionally uses c++11. So compile correctly, depends should set the same thing, again unconditionally. The fact that is compiles on 10.x without compiler:c++11-lib is because 10.x by default uses clang which supports c++11 out of box (thus compiler:c++11-lib is essentially a no-op there). However, we doesn't yet use clang on e.g. MIPS, so without compiler:c++11-lib wxgtk won't built there even on 10.x.
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2015-01-23 17:42:48 UTC
(In reply to Chris Hutchinson from comment #3)
The patch is also incorrect in a way that you need at least USES=compiler:features before pre.mk to check for COMPILER_TYPE after it.
Comment 6 Chris Hutchinson 2015-01-23 18:50:12 UTC
Created attachment 152058 [details]
svn diff accepting Dmitry's proposal, fixing reported error

Right you are, on both counts, Dmitry.

This is why I posted a *proposed* change, before accepting, or
submitting a patch/diff outright. I was working till quite late
last night, and as a result, my brain is a bit foggy today.

This svn diff effectively clones your proposal. I simply added
a note for future reference.

Thanks again, Dmitry, foa all attention to this.
Greatly appreciated!

--Chris
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-01-24 02:00:39 UTC
A commit references this bug:

Author: amdmi3
Date: Sat Jan 24 02:00:11 UTC 2015
New revision: 377776
URL: https://svnweb.freebsd.org/changeset/ports/377776

Log:
  - Fix library on < 10.x after webkit-gtk2 update
    Some dependent ports may need USES=compiler:c++11-lib as well

  PR:		196703 [1], 197031 [2]
  Submitted by:	beastie@tardisi.com [1], amdmi3 [2]
  Approved by:	portmaster@bsdforge.com (maintainer)
  MFH:		2015Q1

Changes:
  head/x11-toolkits/wxgtk30/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-02-03 20:13:35 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Feb  3 20:12:57 UTC 2015
New revision: 378372
URL: https://svnweb.freebsd.org/changeset/ports/378372

Log:
  MFH: r377776

  - Fix library on < 10.x after webkit-gtk2 update
    Some dependent ports may need USES=compiler:c++11-lib as well

  PR:		196703 [1], 197031 [2]
  Submitted by:	beastie@tardisi.com [1], amdmi3 [2]
  Approved by:	portmaster@bsdforge.com (maintainer)
  Approved by:	portmgr (antoine)

Changes:
_U  branches/2015Q1/
  branches/2015Q1/x11-toolkits/wxgtk30/Makefile