Bug 205512 - [maintainer] x11/lemonbar: fix build on FreeBSD 9.x
Summary: [maintainer] x11/lemonbar: fix build on FreeBSD 9.x
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: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-22 14:19 UTC by evgeni.dimitrov
Modified: 2015-12-22 16:22 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.54 KB, patch)
2015-12-22 14:19 UTC, evgeni.dimitrov
no flags Details | Diff
Updated patch (1.58 KB, patch)
2015-12-22 16:14 UTC, evgeni.dimitrov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description evgeni.dimitrov 2015-12-22 14:19:09 UTC
Created attachment 164498 [details]
patch

The attached patch forces the port to compile with c11 capable compiler. I also tidied up the Makefile.

http://beefy2.nyi.freebsd.org/data/93amd64-default/404198/logs/lemonbar-1.1.log
http://beefy1.nyi.freebsd.org/data/93i386-default/404198/logs/lemonbar-1.1.log
Comment 1 John Marino freebsd_committer freebsd_triage 2015-12-22 14:50:19 UTC
does this really need bumping?

For FreeBSD 9 it has never built, and for FreeBSD10+, there's no change to the package.

correct?
Comment 2 evgeni.dimitrov 2015-12-22 15:04:05 UTC
Well, the content of the man page changed. The previous version was still calling it bar-aint-recursive. It's not a huge deal and if you think it's pointless just remove the bump :)
Comment 3 John Marino freebsd_committer freebsd_triage 2015-12-22 15:05:39 UTC
okay, good point.  we keep the bump.
Comment 4 John Marino freebsd_committer freebsd_triage 2015-12-22 15:08:43 UTC
one more question: why did you add USES=localbase?
Comment 5 John Marino freebsd_committer freebsd_triage 2015-12-22 15:10:32 UTC
removing CFLAGS= -DVERSION=${DISTVERSION} is incorrect
Comment 6 evgeni.dimitrov 2015-12-22 15:27:27 UTC
An year ago when I made the port, they had CFLAGS=... in their Makefile. So I just deleted that with sed. Now they switched to CFLAGS+= and they define -DVERSION and other flags correctly. About USES=localbase, I think it's nicer than manually overriding CFLAGS and friends :)
Comment 7 John Marino freebsd_committer freebsd_triage 2015-12-22 15:30:07 UTC
(In reply to evgeni.dimitrov from comment #6)

using localbase is not correct here, you need to remove it and return the CFLAGS and LDFLAGS.  We do NOT want -isystem passed.

VERSION is NOT defined.  That's why I had to add it.  It's only defined if you build it from a git repository, which we aren't.

So can you:

1) remove USES=localbase
2) revert the CFLAGS/LDFLAGS change
Comment 8 evgeni.dimitrov 2015-12-22 16:01:37 UTC
I disagree. Looking at Mk/Uses/localbase.mk I noticed the last commit (r397026) that touched it. It explains the reasoning behind -isystem ${LOCALBASE} vs. -I${LOCALBASE}.

You had to define VERSION because in the previous version of the port I was removing CFLAGS= from the packaged Makefile. This version removes only one flag (-Os) instead of the whole line and keeps everything else, including the version - see https://github.com/LemonBoy/bar/blob/master/Makefile lines 2 and 10.
Comment 9 John Marino freebsd_committer freebsd_triage 2015-12-22 16:06:09 UTC
(In reply to evgeni.dimitrov from comment #8)

I missed line 2 before, so I accept leaving off -DVERSION if you don't cull the cflags.

However, I won't take USES=localbase.  That is for a particular case e.g. libedit and frankly it's created a lot of contraversy.  It is DEFINITELY not intended to save defining CFLAGS and LDFLAGS to set to $LOCALBASE versions.

Please humor me and remove USES=localbase and restore CFLAGS, LDFLAGS which very well may be required on compilers that do not search $LOCALBASE by default.
Comment 10 evgeni.dimitrov 2015-12-22 16:14:27 UTC
Created attachment 164502 [details]
Updated patch

As you wish :)
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-12-22 16:22:31 UTC
A commit references this bug:

Author: marino
Date: Tue Dec 22 16:21:33 UTC 2015
New revision: 404248
URL: https://svnweb.freebsd.org/changeset/ports/404248

Log:
  x11/lemonbar: Fix man page, steamline makefile, fix build for FreeBSD 9

  PR:		205512
  Submitted by:	maintainer

Changes:
  head/x11/lemonbar/Makefile
Comment 12 John Marino freebsd_committer freebsd_triage 2015-12-22 16:22:49 UTC
thanks!