ports/net-p2p/linuxdcpp/files/patch-SConstruct
Jeremy Messenger 373429525f - Update it to the lastest version of CVS, at 2006-09-01 in changelog. See in
the changelog for details:

	http://tinyurl.com/b3myl
- Add an entry in UPDATING about that the name of binary, datadir and docsdir
  have been renamed from ldcpp to linuxdcpp by the linuxdcpp developer.
2006-09-02 07:21:00 +00:00

97 lines
2.8 KiB
Text

--- SConstruct.orig Fri Sep 1 16:52:46 2006
+++ SConstruct Fri Sep 1 16:55:38 2006
@@ -23,21 +23,6 @@
context.Result(ret)
return ret
-def CheckCXXVersion(context, name, major, minor):
- context.Message('Checking for %s >= %d.%d...' % (name, major, minor))
- ret = commands.getoutput('%s -dumpversion' % name)
-
- retval = 0
- try:
- if ((string.atoi(ret[0]) == major and string.atoi(ret[2]) >= minor)
- or (string.atoi(ret[0]) > major)):
- retval = 1
- except ValueError:
- print "No C++ compiler found!"
-
- context.Result(retval)
- return retval
-
# ----------------------------------------------------------------------
# Command-line options
@@ -62,24 +47,17 @@
# Initialization
# ----------------------------------------------------------------------
-env = Environment(ENV = os.environ, options = opts)
+env = Environment(ENV = os.environ, options = opts, CC = '%%CC%%', CXX = '%%CXX%%')
conf = Configure(env,
custom_tests =
{
'CheckPKGConfig' : CheckPKGConfig,
- 'CheckPKG' : CheckPKG,
- 'CheckCXXVersion' : CheckCXXVersion
+ 'CheckPKG' : CheckPKG
},
conf_dir = 'build/sconf',
log_file = 'build/sconf/config.log')
-if os.environ.has_key('CXX'):
- env['CXX'] = os.environ['CXX']
-
-if os.environ.has_key('CXXFLAGS'):
- env['CXXFLAGS'] = os.environ['CXXFLAGS'].split()
-
env.SConsignFile('build/sconf/.sconsign')
opts.Save('build/sconf/scache.conf', env)
Help(opts.GenerateHelpText(env))
@@ -89,19 +67,6 @@
# Dependencies
# ----------------------------------------------------------------------
-if not conf.CheckCXXVersion(env['CXX'], 3, 4):
- print 'Compiler version check failed. g++ 3.4 or later is needed'
- Exit(1)
-
-# Add support for compiler caches to speed-up compilation.
-if conf.TryAction(Action('distcc'))[0]:
- env.Prepend(CXX = 'distcc ')
- print 'Enabling distcc...'
-
-if conf.TryAction(Action('ccache'))[0]:
- env.Prepend(CXX = 'ccache ')
- print 'Enabling ccache...'
-
if not conf.CheckPKGConfig():
print 'pkg-config not found.'
Exit(1)
@@ -133,11 +98,6 @@
print 'Can\'t live without it, sorry'
Exit(1)
-if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'c'):
- print 'Did not find the pthread library, exiting!'
- print 'Note: You might have the lib but not the headers'
- Exit(1)
-
if not conf.CheckLibWithHeader('z', 'zlib.h', 'c'):
print 'Did not find the z library (gzip/z compression)'
print 'Can\'t live without it, exiting'
@@ -160,11 +120,11 @@
env.Append(CXXFLAGS = Split('-I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64'))
if env['debug']:
- env.Append(CXXFLAGS = Split('-g -ggdb -D_DEBUG -Wall'))
+ env.Append(CXXFLAGS = Split('%%CXXFLAGS%% -g -ggdb -D_DEBUG -Wall'))
env.Append(LDFLAGS = Split('-g -ggdb'))
if env['release']:
- env.Append(CXXFLAGS = '-O3')
+ env.Append(CXXFLAGS = '%%CXXFLAGS%%')
if env['profile']:
env.Append(CXXFLAGS = '-pg')