Lines 3-20
Link Here
|
3 |
# handle enforcing localbase in path |
3 |
# handle enforcing localbase in path |
4 |
# |
4 |
# |
5 |
# Feature: localbase |
5 |
# Feature: localbase |
6 |
# Usage: USES=localbase |
6 |
# Usage: USES=localbase or USES=localbase:args |
7 |
# Valid ARGS: none |
7 |
# Valid ARGS: ldflags Set LDFLAGS instead of LIBS |
8 |
# |
8 |
# |
9 |
# MAINTAINER: portmgr@FreeBSD.org |
9 |
# MAINTAINER: portmgr@FreeBSD.org |
10 |
|
10 |
|
11 |
.if !defined(_INCLUDE_USES_LOCALBASE_MK) |
11 |
.if !defined(_INCLUDE_USES_LOCALBASE_MK) |
12 |
_INCLUDE_USES_LOCALBASE_MK= yes |
12 |
_INCLUDE_USES_LOCALBASE_MK= yes |
|
|
13 |
_USES_POST+= localbase |
14 |
.endif |
15 |
|
16 |
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LOCALBASE_POST_MK) |
17 |
_INCLUDE_USES_LOCALBASE_POST_MK=yes |
13 |
|
18 |
|
14 |
CPPFLAGS+= -isystem ${LOCALBASE}/include |
19 |
CPPFLAGS+= -isystem ${LOCALBASE}/include |
15 |
CFLAGS+= -isystem ${LOCALBASE}/include |
20 |
CFLAGS+= -isystem ${LOCALBASE}/include |
16 |
CXXFLAGS+= -isystem ${LOCALBASE}/include |
21 |
CXXFLAGS+= -isystem ${LOCALBASE}/include |
|
|
22 |
.if ${localbase_ARGS:Mldflags} |
17 |
LDFLAGS+= -L${LOCALBASE}/lib |
23 |
LDFLAGS+= -L${LOCALBASE}/lib |
|
|
24 |
.else |
25 |
LIBS+= -L${LOCALBASE}/lib |
26 |
.endif |
18 |
|
27 |
|
19 |
# Use CONFIGURE_ENV instead of CMAKE_ARGS because devel/cmake itself also needs |
28 |
# Use CONFIGURE_ENV instead of CMAKE_ARGS because devel/cmake itself also needs |
20 |
# this, and CMAKE_ARGS is not used when bootstrapping CMake. |
29 |
# this, and CMAKE_ARGS is not used when bootstrapping CMake. |