2006-07-05 02:11:20 +00:00
|
|
|
#-*- mode: Makefile; tab-width: 4; -*-
|
|
|
|
# ex:ts=4
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# bsd.scons.mk - Python-based SCons build system interface.
|
2006-09-13 03:21:38 +00:00
|
|
|
# Author: Alexander Botero-Lowry <alexbl@FreeBSD.org>
|
2006-07-05 02:11:20 +00:00
|
|
|
#
|
|
|
|
# Please view me with 4 column tabs!
|
|
|
|
|
|
|
|
# Please make sure all changes to this file are passed through the maintainer.
|
2009-08-02 08:08:14 +00:00
|
|
|
SCONS_MAINTAINER= python@FreeBSD.org
|
2006-07-05 02:11:20 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# SCONS_BIN is the location where the scons port installs the scons
|
|
|
|
# executable.
|
|
|
|
#
|
|
|
|
# SCONS_PORT is where the scons port is located in the ports tree.
|
|
|
|
#
|
|
|
|
SCONS_BIN= ${LOCALBASE}/bin/scons
|
|
|
|
SCONS_PORT= ${PORTSDIR}/devel/scons
|
|
|
|
|
2006-07-05 19:53:27 +00:00
|
|
|
#
|
2006-07-05 02:11:20 +00:00
|
|
|
# CCFLAGS is the scons equivalent of CFLAGS. So we should bring in our
|
|
|
|
# FreeBSD CFLAGS.
|
|
|
|
#
|
|
|
|
# LINKFLAGS is equivalent to LDFLAGS in make speak, so we bring in the
|
|
|
|
# FreeBSD default LDFLAGS.
|
|
|
|
#
|
2006-07-05 19:53:27 +00:00
|
|
|
# Some scons projects may honor PKGCONFIGDIR, which tells them where to
|
2006-07-05 02:11:20 +00:00
|
|
|
# look for, and install, pkgconfig files.
|
|
|
|
#
|
2006-07-13 22:10:39 +00:00
|
|
|
# LIBPATH is the search path for libraries. Bring in some safe defaults.
|
|
|
|
#
|
|
|
|
# CPPPATH is the search path for includes, Again, bring in some safe defaults.
|
|
|
|
#
|
2006-07-05 02:11:20 +00:00
|
|
|
CCFLAGS?= ${CFLAGS}
|
|
|
|
LINKFLAGS?= ${LDFLAGS}
|
|
|
|
PKGCONFIGDIR?= ${LOCALBASE}/libdata/pkgconfig
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 17:56:05 +00:00
|
|
|
LIBPATH?= ${LOCALBASE}/lib
|
|
|
|
CPPPATH?= ${LOCALBASE}/include
|
2006-07-05 02:11:20 +00:00
|
|
|
|
2006-07-05 19:53:27 +00:00
|
|
|
#
|
2006-07-05 02:11:20 +00:00
|
|
|
# SCONS_ENV is where we pass all the stuff that should be the
|
|
|
|
# same for any scons port to scons. Things like CCFLAGS, and LINKFLAGS
|
|
|
|
# go here.
|
|
|
|
#
|
2009-08-14 11:34:57 +00:00
|
|
|
# SCONS_ARGS is where you pass port specific scons flags to the scons
|
|
|
|
# environment.
|
2006-07-05 02:11:20 +00:00
|
|
|
#
|
2006-07-05 19:53:27 +00:00
|
|
|
# SCONS_BUILDENV is where you pass variables you want to be in the
|
2009-08-14 11:34:57 +00:00
|
|
|
# System Environment instead of the SCons Environment.
|
2006-07-05 02:11:20 +00:00
|
|
|
#
|
|
|
|
# SCONS_TARGET is the same as MAKE_TARGET it is passed as the last
|
|
|
|
# argument to scons.
|
|
|
|
#
|
|
|
|
SCONS_ENV?= CCFLAGS="${CCFLAGS}" CXXFLAGS="${CXXFLAGS}" \
|
2006-07-13 22:10:39 +00:00
|
|
|
LINKFLAGS="${LINKFLAGS}" PKGCONFIGDIR="${PKGCONFIGDIR}" \
|
|
|
|
CPPPATH="${CPPPATH}" LIBPATH="${LIBPATH}" PREFIX="${PREFIX}" \
|
2006-09-15 08:06:12 +00:00
|
|
|
CC="${CC}" CXX="${CXX}"
|
2006-07-05 19:53:27 +00:00
|
|
|
SCONS_ARGS?=
|
|
|
|
SCONS_BUILDENV?=
|
2006-07-05 02:11:20 +00:00
|
|
|
SCONS_TARGET?=
|
|
|
|
|
|
|
|
#
|
2006-07-05 19:53:27 +00:00
|
|
|
# SCONS_INSTALL_TARGET is the default target to be used when
|
2006-07-05 02:11:20 +00:00
|
|
|
# installing a port using scons.
|
|
|
|
#
|
|
|
|
SCONS_INSTALL_TARGET?= ${INSTALL_TARGET}
|
|
|
|
|
2006-07-05 19:53:27 +00:00
|
|
|
#
|
2006-07-05 02:11:20 +00:00
|
|
|
# Make sure we depend on scons
|
|
|
|
#
|
2006-07-05 19:53:27 +00:00
|
|
|
BUILD_DEPENDS+= ${SCONS_BIN}:${SCONS_PORT}
|
2006-07-05 02:11:20 +00:00
|
|
|
|
|
|
|
.if !target(do-build)
|
|
|
|
do-build:
|
2007-06-05 02:06:10 +00:00
|
|
|
@cd ${BUILD_WRKSRC} && \
|
2009-05-15 12:01:39 +00:00
|
|
|
${SETENV} ${SCONS_BUILDENV} ${SCONS_BIN} ${SCONS_ENV} ${_MAKE_JOBS} \
|
|
|
|
${SCONS_ARGS} ${SCONS_TARGET}
|
2006-07-05 02:11:20 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !target(do-install)
|
|
|
|
do-install:
|
2007-06-05 02:06:10 +00:00
|
|
|
@cd ${INSTALL_WRKSRC} && ${SETENV} ${SCONS_BUILDENV} ${SCONS_BIN} \
|
|
|
|
${SCONS_ENV} ${SCONS_ARGS} ${SCONS_INSTALL_TARGET}
|
2006-07-05 02:11:20 +00:00
|
|
|
.endif
|
|
|
|
|