Lines 3-23
Link Here
|
3 |
# Provide support to use the scons |
3 |
# Provide support to use the scons |
4 |
# |
4 |
# |
5 |
# Feature: scons |
5 |
# Feature: scons |
6 |
# Usage: USES=scons |
6 |
# Usage: USES=scons:ARGS |
|
|
7 |
# Valid ARGS: py27 py36 |
7 |
# |
8 |
# |
|
|
9 |
# py27: Use python2.7 to run scons. |
10 |
# py36: Use python3.6 to run scons. |
11 |
# |
8 |
# MAINTAINER: python@FreeBSD.org |
12 |
# MAINTAINER: python@FreeBSD.org |
9 |
|
13 |
|
10 |
.if !defined(_INCLUDE_USES_SCONS_MK) |
14 |
.if !defined(_INCLUDE_USES_SCONS_MK) |
11 |
_INCLUDE_USES_SCONS_MK= yes |
15 |
_INCLUDE_USES_SCONS_MK= yes |
12 |
|
16 |
|
13 |
.if !empty(scons_ARGS) |
17 |
.undef _SCONS_PYTHON_VER |
14 |
IGNORE= Incorrect 'USES+= scons:${scons_ARGS}' scons takes no arguments |
18 |
_SCONS_PYTHON_FLAVOR= py27 |
|
|
19 |
_SCONS_PYTHON_VER= 2.7 |
20 |
|
21 |
_SCONS_ARGS= ${scons_ARGS:S/,/ /g} |
22 |
.if ${_SCONS_ARGS:Mpy36} |
23 |
_SCONS_PYTHON_FLAVOR= py36 |
24 |
_SCONS_PYTHON_VER= 3.6 |
25 |
_SCONS_ARGS:= ${_SCONS_ARGS:Npy36} |
15 |
.endif |
26 |
.endif |
16 |
|
27 |
|
17 |
SCONS= ${LOCALBASE}/bin/scons |
28 |
.if !empty(_SCONS_ARGS) |
|
|
29 |
IGNORE= Incorrect 'USES+= scons:${_SCONS_ARGS}' unknown argument |
30 |
.endif |
18 |
|
31 |
|
19 |
BUILD_DEPENDS+= ${SCONS}:devel/scons |
32 |
SCONS= ${LOCALBASE}/bin/scons-${PYTHON_VER} |
20 |
|
33 |
|
|
|
34 |
BUILD_DEPENDS+= ${SCONS}:devel/scons@${_SCONS_PYTHON_FLAVOR} |
35 |
|
21 |
ALL_TARGET= # |
36 |
ALL_TARGET= # |
22 |
CCFLAGS?= ${CFLAGS} |
37 |
CCFLAGS?= ${CFLAGS} |
23 |
CPPPATH?= ${LOCALBASE}/include |
38 |
CPPPATH?= ${LOCALBASE}/include |