Gentoo Archives: gentoo-commits

From: "Chris Reffett (creffett)" <creffett@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/glosung/files: glosung-3.6.2-scons-respectflags.patch
Date: Tue, 29 Jan 2013 18:52:08
Message-Id: 20130129185204.99A672171D@flycatcher.gentoo.org
1 creffett 13/01/29 18:52:04
2
3 Added: glosung-3.6.2-scons-respectflags.patch
4 Log:
5 Revision bump, add patch to allow SCons to use environment CC, CFLAGS, and LDFLAGS, remove auto-set CFLAGS such as -g.
6
7 (Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 42618354)
8
9 Revision Changes Path
10 1.1 app-text/glosung/files/glosung-3.6.2-scons-respectflags.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/glosung/files/glosung-3.6.2-scons-respectflags.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/glosung/files/glosung-3.6.2-scons-respectflags.patch?rev=1.1&content-type=text/plain
14
15 Index: glosung-3.6.2-scons-respectflags.patch
16 ===================================================================
17 --- a/SConstruct
18 +++ b/SConstruct
19 @@ -17,6 +17,7 @@
20
21
22 import os
23 +import SCons.Util
24
25 version = '3.6.2'
26
27 @@ -32,14 +33,23 @@
28 (this option is only for packaging)''')
29
30 env = Environment (
31 - LINK = 'gcc',
32 - CC = 'gcc',
33 + CC = '',
34 CPPPATH = '',
35 LINKFLAGS = '',
36 CCFLAGS = '',
37 ENV = os.environ,
38 TARFLAGS = '-c -j')
39
40 +if os.environ.has_key('CC'):
41 + env['CC'] = os.environ['CC']
42 +if os.environ.has_key('CFLAGS'):
43 + env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
44 +if os.environ.has_key('CXX'):
45 + env['CXX'] = os.environ['CXX']
46 +if os.environ.has_key('CXXFLAGS'):
47 + env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
48 +if os.environ.has_key('LDFLAGS'):
49 + env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
50
51 if env['PLATFORM'] == 'win32':
52 prefix = ARGUMENTS.get ('PREFIX', '')
53 @@ -58,7 +68,7 @@
54 BuildDir ('build', 'src')
55
56 cpppath = ['#', '#build']
57 -ccflags = ['-O2', '-std=c99', '-Wall', '-g', '-Wl,--export-dynamic',
58 +ccflags = ['-std=c99',
59 # '-DLIBXML_STATIC',
60 '-DVERSION=\\"' + version + '\\"',
61 '-DGLOSUNG_DATA_DIR=\\"' + data_dir + '\\"',
62 @@ -74,7 +74,7 @@
63 '-DGLOSUNG_DATA_DIR=\\"' + data_dir + '\\"',
64 '-DPACKAGE_PIXMAPS_DIR=\\"' + pixmap_dir + '\\"']
65
66 -linkflags = ['-Wl,--export-dynamic', '-L.']
67 +linkflags = []
68 # -L/usr/lib'
69 # `pkg-config --libs gtk+-2.0 libxml-2.0 gconf-2.0 libcurl`
70
71 @@ -83,9 +83,6 @@
72 ccflags.append ('-pg', '-fprofile-arcs')
73 linkflags.append ('-pg', '-fprofile-arcs')
74
75 -if env['PLATFORM'] != 'win32':
76 - linkflags.append ('-Wl,--as-needed')
77 -
78 #if not (ARGUMENTS.get ('dev')):
79 if (ARGUMENTS.get ('dev')):
80 ccflags += [