/[gentoo-x86]/sci-visualization/nonolith-connect/files/1.0.1-cflags-respect.patch
Gentoo

Contents of /sci-visualization/nonolith-connect/files/1.0.1-cflags-respect.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Tue Feb 21 13:41:48 2012 UTC (7 years, 11 months ago) by chainsaw
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-diff
Initial commit. Ebuild by me, build system tamed by Kacper "xarthisius" Kowalik. Please note that you require CEE hardware to use the pixelpulse visualiser. Many thanks to upstream for rolling me a personal tarball.

(Portage version: 2.1.10.48/cvs/Linux x86_64)

1 --- SConstruct
2 +++ SConstruct
3 @@ -1,7 +1,21 @@
4 import sys, os, shutil
5 +import SCons.Util
6
7 env = Environment()
8
9 +if os.environ.has_key('CC'):
10 + env['CC'] = os.environ['CC']
11 +if os.environ.has_key('CFLAGS'):
12 + env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
13 +if os.environ.has_key('CXX'):
14 + env['CXX'] = os.environ['CXX']
15 +if os.environ.has_key('CXXFLAGS'):
16 + env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
17 +if os.environ.has_key('LDFLAGS'):
18 + env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
19 +if "$CCFLAGS" in env['CXXCOM']:
20 + env['CXXCOM'] = env['CXXCOM'].replace("$CCFLAGS","")
21 +
22 opts = Variables()
23 opts.Add(BoolVariable("mingwcross", "Cross-compile with mingw for Win32", 0))
24 opts.Add(BoolVariable("boost_static", "Statically link against Boost", 0))
25 @@ -101,8 +115,7 @@
26 sources = Glob('*.cpp') + ['cee/cee.cpp', 'bootloader/bootloader.cpp']
27
28 json = env.Library('json',
29 - Glob('libjson/Source/*.cpp'),
30 - CCFLAGS = "-c -O3 -ffast-math -fexpensive-optimizations".split()
31 + Glob('libjson/Source/*.cpp')
32 )
33
34 websocketpp = env.Library('websocketpp', ['websocketpp/src/'+i for i in [
35 @@ -113,7 +126,7 @@
36 'websocket_session.cpp',
37 'sha1/sha1.cpp',
38 'base64/base64.cpp'
39 - ]], CCFLAGS=['-g', '-O3'])
40 + ]])
41
42
43 libusb_cflags = []
44 @@ -127,14 +140,21 @@
45 libusb_os = ['os/poll_windows.c', 'os/windows_usb.c', 'os/threads_windows.c']
46 libusb_cflags += ['-D OS_WINDOWS', '-DPOLL_NFDS_TYPE=unsigned int', '-D WINVER=0x0501']
47
48 -libusb = env.Library('libusb_nonolith', ['libusb/libusb/'+i for i in [
49 +env_libusb = env.Clone()
50 +env_libusb.Append(CPPFLAGS=libusb_cflags)
51 +env_libusb.Append(CFLAGS=['-Ilibusb', '-Ilibusb/libusb'])
52 +
53 +libusb = env_libusb.Library('libusb_nonolith', ['libusb/libusb/'+i for i in [
54 'core.c',
55 'descriptor.c',
56 'io.c',
57 'sync.c',
58 - ]+libusb_os], CFLAGS=['-g', '-O3', '-Ilibusb', '-Ilibusb/libusb']+libusb_cflags)
59 -
60 + ]+libusb_os])
61
62 libs += boostlibs
63
64 -env.Program('nonolith-connect', sources, LIBS=libs, CCFLAGS=['-Wall', '-g', '-O3', '-Ilibusb', '-Iwebsocketpp/src', '-shared', "-DVERSION='%s'"%version], FRAMEWORKS=frameworks)
65 +env_main = env.Clone()
66 +env_main.Append(CPPFLAGS=["-DVERSION='%s'"%version])
67 +env_main.Append(CXXFLAGS=['-Ilibusb', '-Iwebsocketpp/src', '-Wall'])
68 +#env_main.Append(LINKFLAGS=['-shared'])
69 +env_main.Program('nonolith-connect', sources, LIBS=libs, FRAMEWORKS=frameworks)

  ViewVC Help
Powered by ViewVC 1.1.20