1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/Mk/Uses/localbase.mk
Dmitry Marakasov ecf8298ab7 - Use -isystem instead of -I to add ${LOCALBASE}/include to the list of header search paths
First, this prevents ports which use strict -Werror settings from
build failures in third party headers (real life example is
devel/pructl which uses -Werror -Weverything and fails in libedit
header on actually harmless padding warning).

Second, this prevents ports which install headers from picking up
their own headers from LOCALBASE instead of using ones from WRKDIR,
which leads to any kind of problems when upgrading via ports.

PR:		203101
Approved by:	bapt
Differential Revision:	D3618
2015-09-15 21:24:42 +00:00

23 lines
576 B
Makefile

# $FreeBSD$
#
# handle enforcing localbase in path
#
# Feature: localbase
# Usage: USES=localbase
# Valid ARGS: none
#
# MAINTAINER: portmgr@FreeBSD.org
.if !defined(_INCLUDE_USES_LOCALBASE_MK)
_INCLUDE_USES_LOCALBASE_MK= yes
CPPFLAGS+= -isystem ${LOCALBASE}/include
CFLAGS+= -isystem ${LOCALBASE}/include
CXXFLAGS+= -isystem ${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
# Use CONFIGURE_ENV instead of CMAKE_ARGS because devel/cmake itself also needs
# this, and CMAKE_ARGS is not used when bootstrapping CMake.
CONFIGURE_ENV+= CMAKE_PREFIX_PATH="${LOCALBASE}"
.endif