Bug 223578 - [PATCH] devel/ncurses: do not pollute CFLAGS
Summary: [PATCH] devel/ncurses: do not pollute CFLAGS
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: Steve Wills
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-11-09 23:50 UTC by Jung-uk Kim
Modified: 2019-06-15 08:28 UTC (History)
0 users

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


Attachments
Do not add bogus macros to CFLAGS. (1.33 KB, patch)
2017-11-09 23:50 UTC, Jung-uk Kim
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jung-uk Kim freebsd_committer freebsd_triage 2017-11-09 23:50:18 UTC
Created attachment 187891 [details]
Do not add bogus macros to CFLAGS.

Some ports cannot be built with devel/ncurses because "pkgconf --cflags ncurses" adds "-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600" to CFLAGS via configure scripts.  This may cause conflicts with ports' own CFLAGS and/or CPPFLAGS.  For example, see bug 211973, comment 22.  Actually, I found these flags are archaic from 5.x era and even harmful for all supported releases.  I also verified that it generates the same binaries and works fine without the CFLAGS.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2017-11-10 01:17:50 UTC
I agree with jkim there, it would be nice to upstream that change as well
Note that dragonfly probably deserves the same treatment as freebsd
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-11-10 15:28:07 UTC
A commit references this bug:

Author: swills
Date: Fri Nov 10 15:27:41 UTC 2017
New revision: 453902
URL: https://svnweb.freebsd.org/changeset/ports/453902

Log:
  devel/ncurses: do not pollute CFLAGS

  PR:		223578
  Submitted by:	jkim

Changes:
  head/devel/ncurses/Makefile
  head/devel/ncurses/files/
  head/devel/ncurses/files/patch-configure
Comment 3 Steve Wills freebsd_committer freebsd_triage 2017-11-10 15:30:17 UTC
Committed, thanks!
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-11-10 18:13:26 UTC
It doesn't make sense to leave DragonFly to use -D_XOPEN_SOURCE=* given
https://github.com/DragonFlyBSD/DeltaPorts/commit/6d6268c42e62c700f91cd4840732c5d7d2bc8c8b