Bug 206956 - x11-wm/herbstluftwm: update to 0.7.0
Summary: x11-wm/herbstluftwm: update to 0.7.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Raphael Kubo da Costa
Depends on:
Reported: 2016-02-05 18:38 UTC by Zsolt Udvari
Modified: 2016-02-15 19:47 UTC (History)
1 user (show)

See Also:

patch (2.53 KB, patch)
2016-02-05 18:38 UTC, Zsolt Udvari
uzsolt: maintainer-approval+
Details | Diff
9.3-i386 build failure (36.93 KB, text/plain)
2016-02-15 15:12 UTC, Raphael Kubo da Costa
no flags Details
updated patch (2.77 KB, patch)
2016-02-15 17:51 UTC, Zsolt Udvari
no flags Details | Diff
patch without VERBOSE (2.76 KB, patch)
2016-02-15 18:22 UTC, Zsolt Udvari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zsolt Udvari 2016-02-05 18:38:10 UTC
Created attachment 166623 [details]

Simple update to 0.7.0.
Poudriere log: http://freebsd.uzsolt.hu/logs/herbstluftwm/herbstluftwm-0.7.0.log
Comment 1 Raphael Kubo da Costa freebsd_committer 2016-02-15 15:12:32 UTC
Created attachment 167030 [details]
9.3-i386 build failure

The update fails to build on 9.3: there are a lot of tput-related warnings, and then failures due to -std=c++11 and a few other flags unsupported by base's GCC being passed in the command line.
Comment 2 Zsolt Udvari 2016-02-15 15:30:02 UTC
Do you have any idea about tput warnings? Or are they important?
And maybe it's enough to disable unrecognized command line options? I think the -W* is okay, but what about -std=c++11?
Comment 3 Raphael Kubo da Costa freebsd_committer 2016-02-15 15:54:23 UTC
> Do you have any idea about tput warnings? Or are they important?

The tput warnings likely come from here: https://github.com/herbstluftwm/herbstluftwm/blob/v0.7.0/colors.mk and are just used for decorating the output of non-verbose builds. One quick way to get rid of those warnings is to force a verbose build (i.e. add "VERBOSE=" to MAKE_ARGS).

> And maybe it's enough to disable unrecognized command line options? I think the -W* is okay, but what about -std=c++11?

You are approaching this from the wrong point of view. While it could be possible to remove the unrecognized warnings from the command line, you cannot rewrite the source code in C++98 instead of C++11. Upstream has made a choice to use C++11 in its code, so you need to adapt the port to follow suit.

With that said, that's what we have USES=compiler for. USES=compiler:c++11-lang adds a build-time dependency on a compiler that understands C++11 (and consequently the -std=c++11 flag). It is not enough in this case, though, since the port also uses C++11 features from the standard library (such as the <array> header). This means you need USES=compiler:c++11-lib instead.

Since we're talking about the port anyway, I have a few suggestions for you:
- Instead of doing LDXX=c++ in the Makefile, LDXX=${CXX} is more flexible.
- Keep an eye on what upstream does to the build system in the next releases: I was checking https://github.com/herbstluftwm/herbstluftwm/compare/v0.6.2...v0.7.0 to comment here, and it looks like they've started working on porting their build system away from their home-baked solution to CMake. It's still experimental, but you might want to consider switching to it in the future.
Comment 4 Zsolt Udvari 2016-02-15 17:51:42 UTC
Created attachment 167038 [details]
updated patch

Updated poudriere log: http://freebsd.uzsolt.hu/logs/herbstluftwm/herbstluftwm-0.7.0.log
Comment 5 Zsolt Udvari 2016-02-15 17:54:56 UTC
(In reply to Raphael Kubo da Costa from comment #3)
Thanks for your ideas!

Do you think should I test on older FreeBSDs too (9.3)?
Comment 6 Raphael Kubo da Costa freebsd_committer 2016-02-15 18:06:06 UTC
I've just tested the patch on 9.3-i386 again and it worked now.

I only have one comment this time: setting both VERBOSE and COLOR in MAKE_ARGS is redundant. If you set VERBOSE="", then that colorecho function in colors.mk will not be defined and the COLOR_* variables won't be used at all, so doing COLOR=0 is unnecessary. On the other hand, if you do COLOR=0 without VERBOSE="", you get non-verbose build output without colors, which also solves the tput warnings issue. I think you should decide whether you prefer verbose or non-verbose build output and set one variable or the other based on that.
Comment 7 Zsolt Udvari 2016-02-15 18:22:12 UTC
Created attachment 167041 [details]
patch without VERBOSE

I think VERBOSE will remove.
Comment 8 commit-hook freebsd_committer 2016-02-15 18:38:52 UTC
A commit references this bug:

Author: rakuco
Date: Mon Feb 15 18:37:57 UTC 2016
New revision: 408948
URL: https://svnweb.freebsd.org/changeset/ports/408948

  Update to 0.7.0.

  Release notes: http://herbstluftwm.org/news.html
  Notable porting changes:
  - herbstluftwm has started using C++. In fact, it uses C++11, which makes us
    require a compiler that understands C++11.
  - Set COLOR=0 when building. It disables coloured output during the build,
    but works around a lot of tput warnings on FreeBSD 9.x like this:
        tput: no terminal type specified and no TERM environmental variable.

  PR:		206956
  Submitted by:	Zsolt Udvari <udvzsolt@gmail.com> (maintainer)

Comment 9 Raphael Kubo da Costa freebsd_committer 2016-02-15 18:39:35 UTC
Finally committed. Thanks for responding so quickly to my comments :-)
Comment 10 Zsolt Udvari 2016-02-15 19:47:35 UTC
Thanks for your helping!