Bug 214608 - databases/sqlite3: Improve CFLAGS and CPPFLAGS configuration
Summary: databases/sqlite3: Improve CFLAGS and CPPFLAGS configuration
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: freebsd-ports-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-11-17 15:05 UTC by Pavel Volkov
Modified: 2016-12-26 10:05 UTC (History)
2 users (show)

See Also:
rakuco: merge-quarterly+


Attachments
error into expression (1.65 KB, patch)
2016-11-17 15:05 UTC, Pavel Volkov
pavelivolkov: maintainer-approval+
Details | Diff
portlint log (23.08 KB, text/plain)
2016-11-17 15:07 UTC, Pavel Volkov
no flags Details
build log (18.87 KB, text/plain)
2016-11-17 15:07 UTC, Pavel Volkov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Volkov 2016-11-17 15:05:43 UTC
Created attachment 177115 [details]
error into expression

I corrected the evaluation of the expression in a variable CPPFLAGS. And added a dummy variable for portlint.
Comment 1 Pavel Volkov 2016-11-17 15:07:05 UTC
Created attachment 177116 [details]
portlint log
Comment 2 Pavel Volkov 2016-11-17 15:07:33 UTC
Created attachment 177117 [details]
build log
Comment 3 VK freebsd_triage 2016-11-17 15:22:06 UTC
Thanks for the patch. Please confirm these changes pass QA (portlint, poudriere).
Comment 4 VK freebsd_triage 2016-11-17 15:24:45 UTC
Ah, you did attach the logs, my bad. A verbal confirmation that it builds with poudriere in different FreeBSD versions should suffice.
Comment 5 Pavel Volkov 2016-11-17 17:38:08 UTC
(In reply to Vladimir Krstulja from comment #4)
Hello. I'm sorry . I don't have computer with the poudriere.
Comment 6 Raphael Kubo da Costa freebsd_committer 2016-12-24 18:12:02 UTC
Can you just clarify what was wrong with the CPPFLAGS expression before? Without the patch -DHAVE_STRCHRNUL=1 seems to be passed correctly depending on the FreeBSD version being used.
Comment 7 Pavel Volkov 2016-12-25 08:45:49 UTC
(In reply to Raphael Kubo da Costa from comment #6)

Hello. Yes, It's easy. You may use next Makefile for check. You should execute him on system with support "Variable modifiers :?" (make on FreeBSD 10 and later) and without him (before 10). And see a result.

# --- Makefile ---
.if defined(q)
.warning Test: variable "q" is exist and = ${q}
.else
.warning Test: variable "q" does not exist
.endif

reply=${ ${q}<50 :? "It work and <50 (true)" : "It work and >=50 (false)" }

.if empty(reply)
.warning expression: ":?" not supported
.else
.warning expression: ${reply}
.endif

.warning bmake have version ${MAKE_VERSION}

all:
        @echo ${.TARGET} reply=${reply}
# --- Makefile ---
Comment 8 Raphael Kubo da Costa freebsd_committer 2016-12-25 17:14:02 UTC
Right, so it's a matter of fmake from FreeBSD 9 not supporting that construct (even though the end result is still the desired one). Thanks for the explanation.
Comment 9 commit-hook freebsd_committer 2016-12-25 17:18:22 UTC
A commit references this bug:

Author: rakuco
Date: Sun Dec 25 17:17:36 UTC 2016
New revision: 429442
URL: https://svnweb.freebsd.org/changeset/ports/429442

Log:
  Improve the way CFLAGS and CPPFLAGS are set.

  ":?" is not supported by fmake from FreeBSD 9, so replace it with an explicit
  version check. The end result was still the desired one (-DHAVE_STRCHRNUL=1 was
  not passed on FreeBSD 9).

  While here, also improve the version check by including DragonFly (which
  supports strchrnul(3) according to its online man page) and restricting the
  FreeBSD version check to the revision range after strchrnul(3) was added to
  base.

  Also stop passing -Os when building in debug mode, and set UNICODE61_CPPFLAGS
  to pet portlint.

  PR:		214608
  Submitted by:	Pavel Volkov <pavelivolkov@gmail.com> (maintainer)
  MFH:		2016Q4

Changes:
  head/databases/sqlite3/Makefile
Comment 10 Raphael Kubo da Costa freebsd_committer 2016-12-25 17:18:53 UTC
Committed, thanks!
Comment 11 commit-hook freebsd_committer 2016-12-26 10:05:17 UTC
A commit references this bug:

Author: rakuco
Date: Mon Dec 26 10:04:31 UTC 2016
New revision: 429489
URL: https://svnweb.freebsd.org/changeset/ports/429489

Log:
  MFH: r429442

  Improve the way CFLAGS and CPPFLAGS are set.

  ":?" is not supported by fmake from FreeBSD 9, so replace it with an explicit
  version check. The end result was still the desired one (-DHAVE_STRCHRNUL=1 was
  not passed on FreeBSD 9).

  While here, also improve the version check by including DragonFly (which
  supports strchrnul(3) according to its online man page) and restricting the
  FreeBSD version check to the revision range after strchrnul(3) was added to
  base.

  Also stop passing -Os when building in debug mode, and set UNICODE61_CPPFLAGS
  to pet portlint.

  PR:		214608
  Submitted by:	Pavel Volkov <pavelivolkov@gmail.com> (maintainer)

  Approved by:	ports-secteam (junovitch)

Changes:
_U  branches/2016Q4/
  branches/2016Q4/databases/sqlite3/Makefile