Simplify scons mangle: fully preserve environment, add CPPPATH/LIBPATH
correctly. Fixes build with cwrappers.
This commit is contained in:
parent
abe4d35515
commit
fa9be95d75
3 changed files with 31 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.17 2014/11/07 19:39:33 adam Exp $
|
||||
# $NetBSD: Makefile,v 1.18 2015/01/21 15:19:31 joerg Exp $
|
||||
|
||||
DISTNAME= pingus-0.7.3
|
||||
PKGREVISION= 12
|
||||
|
@ -13,14 +13,7 @@ COMMENT= Lemmings(TM) Clone
|
|||
BUILD_DEPENDS+= scons>=0.96:../../devel/scons
|
||||
USE_LANGUAGES+= c c++
|
||||
|
||||
SUBST_CLASSES+= fix-prefix
|
||||
SUBST_STAGE.fix-prefix= post-patch
|
||||
SUBST_MESSAGE.fix-prefix= Fixing buildlink prefix
|
||||
SUBST_FILES.fix-prefix= SConstruct
|
||||
SUBST_SED.fix-prefix= -e 's,BUILDLINK_DIR,${BUILDLINK_DIR},'
|
||||
|
||||
MAKE_JOBS?= 1
|
||||
|
||||
.include "../../mk/compiler.mk"
|
||||
.if !empty(PKGSRC_COMPILER:Mclang)
|
||||
SCONS_CXX= ${CXX} -std=c++11
|
||||
|
@ -28,11 +21,9 @@ SCONS_CXX= ${CXX} -std=c++11
|
|||
SCONS_CXX= ${CXX}
|
||||
.endif
|
||||
|
||||
MAKE_ENV+= CPPPATH=${BUILDLINK_DIR}/include LIBPATH=${BUILDLINK_DIR}/lib
|
||||
|
||||
do-configure:
|
||||
cd ${WRKSRC} && \
|
||||
${PKGSRC_SETENV} ${MAKE_ENV} scons configure CXX=${SCONS_CXX:Q}
|
||||
${PKGSRC_SETENV} ${MAKE_ENV} scons configure CXX=${SCONS_CXX:Q} CPPPATH=${PREFIX}/include LIBPATH=${PREFIX}/lib
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && \
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
$NetBSD: distinfo,v 1.6 2013/02/16 11:21:25 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.7 2015/01/21 15:19:31 joerg Exp $
|
||||
|
||||
SHA1 (pingus-0.7.3.tar.bz2) = ca7fe5cea65fb3392d1e81056a879831925502f2
|
||||
RMD160 (pingus-0.7.3.tar.bz2) = 664d259a98a172d10480be9aa4ec87a424ecd6f1
|
||||
Size (pingus-0.7.3.tar.bz2) = 11127278 bytes
|
||||
SHA1 (patch-aa) = 172661a0f8dfbc53bf941796b1ec9c0ea98285ab
|
||||
SHA1 (patch-aa) = ab9b2c2da878ec75ef0db438bdd38dbf40ed0563
|
||||
SHA1 (patch-ab) = 2f897472e0c006e6fa325c17eda34b05d0ba6a01
|
||||
SHA1 (patch-ac) = f0c357e4b5d5b71eacac243c15792b3a78a146ec
|
||||
SHA1 (patch-src_font.cpp) = 2bf0b3c31e18aae94269c09c92fa632cbf1c8070
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
$NetBSD: patch-aa,v 1.4 2013/02/16 11:21:25 wiz Exp $
|
||||
$NetBSD: patch-aa,v 1.5 2015/01/21 15:19:31 joerg Exp $
|
||||
|
||||
NetBSD config & path fixes
|
||||
|
||||
--- SConstruct.orig 2010-03-18 15:34:15.000000000 +0200
|
||||
+++ SConstruct 2011-01-19 20:02:53.000000000 +0200
|
||||
--- SConstruct.orig 2010-03-18 13:34:15.000000000 +0000
|
||||
+++ SConstruct
|
||||
@@ -19,7 +19,7 @@
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
@ -13,7 +13,7 @@ NetBSD config & path fixes
|
|||
import SCons.Util
|
||||
|
||||
pingus_sources = [
|
||||
@@ -348,7 +348,10 @@
|
||||
@@ -348,7 +348,10 @@ def DefineOptions(filename, args):
|
||||
|
||||
opts.Add(BoolVariable('with_xinput', 'Build with Xinput support', False))
|
||||
opts.Add(BoolVariable('with_linuxusbmouse', 'Build with Linux USB mouse support', True))
|
||||
|
@ -25,7 +25,7 @@ NetBSD config & path fixes
|
|||
opts.Add(BoolVariable('with_wiimote', 'Build with Wiimote support', False))
|
||||
opts.Add(BoolVariable('ignore_errors', 'Ignore any fatal configuration errors', False))
|
||||
opts.Add('optional_sources', 'Additional source files', [])
|
||||
@@ -383,7 +386,10 @@
|
||||
@@ -383,7 +386,10 @@ int main() {
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
|
@ -37,14 +37,30 @@ NetBSD config & path fixes
|
|||
context.Message('Check how to call iconv...')
|
||||
|
||||
for i in ['', 'const']:
|
||||
@@ -539,7 +545,9 @@
|
||||
@@ -408,7 +414,7 @@ if ('configure' in COMMAND_LINE_TARGETS)
|
||||
not (os.path.exists('config.py') and os.path.exists('config.h')) and \
|
||||
not GetOption('clean'):
|
||||
opts = DefineOptions(None, ARGUMENTS)
|
||||
- env = Environment(options = opts)
|
||||
+ env = Environment(options = opts, ENV=os.environ)
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
opts.Update(env)
|
||||
@@ -421,7 +427,7 @@ if ('configure' in COMMAND_LINE_TARGETS)
|
||||
if os.environ.has_key('PKG_CONFIG_PATH'):
|
||||
env['ENV']['PKG_CONFIG_PATH'] = os.environ['PKG_CONFIG_PATH']
|
||||
|
||||
- env['CPPPATH'] += ['.', 'src/']
|
||||
+ env['CPPPATH'] += ['.', 'src/', 'BUILDLINK_DIR/include']
|
||||
+ env['LIBPATH'] += ['BUILDLINK_DIR/lib', '/usr/lib/i18n']
|
||||
+ env['ENV']['PATH'] = os.environ['PATH']
|
||||
Default(env.Program('pingus', pingus_sources + env['optional_sources']))
|
||||
Clean('pingus', ['config.py', 'config.h'])
|
||||
+ env['CPPPATH'] += '.:src/'
|
||||
|
||||
config_h_defines = []
|
||||
|
||||
@@ -535,7 +541,7 @@ if not ('configure' in COMMAND_LINE_TARG
|
||||
os.sys.exit(1)
|
||||
|
||||
opts = DefineOptions("config.py", {})
|
||||
- env = Environment(options = opts)
|
||||
+ env = Environment(options = opts, ENV=os.environ)
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
opts.Update(env)
|
||||
|
|
Loading…
Reference in a new issue