mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-11 02:50:24 +00:00
c2f4f3626c
When USE'ing localbase.mk, make sure CMake is also aware that it is supposed to give preference to ${LOCALBASE} when looking for files and libraries. This is going to be a requirement once CMake is updated to 3.3.x, as starting with this version it will by default use the PATH environment variable (stripping the "/bin" or "/sbin" parts of each entry) to determine where to find files and libraries. Since in most cases /usr will come before /usr/local, it will find base's libarchive and fail at the configuration stage on older FreeBSD releases. Approved by: portmgr (antoine) Differential Revision: https://reviews.freebsd.org/D3361
23 lines
555 B
Makefile
23 lines
555 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+= -I${LOCALBASE}/include
|
|
CFLAGS+= -I${LOCALBASE}/include
|
|
CXXFLAGS+= -I${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
|