Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Dec 2016 17:17:36 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r429442 - head/databases/sqlite3
Message-ID:  <201612251717.uBPHHaET019435@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Sun Dec 25 17:17:36 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

Modified:
  head/databases/sqlite3/Makefile

Modified: head/databases/sqlite3/Makefile
==============================================================================
--- head/databases/sqlite3/Makefile	Sun Dec 25 17:15:50 2016	(r429441)
+++ head/databases/sqlite3/Makefile	Sun Dec 25 17:17:36 2016	(r429442)
@@ -18,11 +18,6 @@ USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
 
-# Platform Configuration
-CFLAGS+=	-Os
-CPPFLAGS+=	-DHAVE_ISNAN=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_USLEEP=1
-CPPFLAGS+=	${OSVERSION<1000000:?:-DHAVE_STRCHRNUL=1}
-
 MAKE_JOBS_UNSAFE=	yes
 
 # Compilation Options For SQLite https://www.sqlite.org/compile.html
@@ -174,6 +169,7 @@ ICU_LIB_DEPENDS=	libicudata.so:devel/icu
 ICU_CPPFLAGS=	`${LOCALBASE}/bin/icu-config --cppflags` -DSQLITE_ENABLE_ICU=1
 ICU_LIBS=	`${LOCALBASE}/bin/icu-config --ldflags`
 
+UNICODE61_CPPFLAGS=	""
 UNICODE61_CPPFLAGS_OFF=	-DSQLITE_DISABLE_FTS3_UNICODE=1
 
 READLINES_CONFIGURE_ON=	--enable-readline
@@ -197,6 +193,15 @@ UNKNOWN_SQL_CPPFLAGS=	-DSQLITE_ENABLE_UN
 
 .include <bsd.port.options.mk>
 
+# Platform Configuration
+.if !defined(WITH_DEBUG)
+CFLAGS+=	-Os
+.endif
+CPPFLAGS+=	-DHAVE_ISNAN=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_USLEEP=1
+.if ${OPSYS} == DragonFly || (${OPSYS} == FreeBSD && ${OSVERSION} >= 1000029)
+CPPFLAGS+=	-DHAVE_STRCHRNUL=1
+.endif
+
 post-configure:
 	@${ECHO_MSG} "===> CONFIGURE_ARGS=${CONFIGURE_ARGS}"
 	@${ECHO_MSG} "===> CPPFLAGS=${CPPFLAGS}"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612251717.uBPHHaET019435>