| @@ -1,19 +1,28 @@ | | | @@ -1,19 +1,28 @@ |
1 | $NetBSD: patch-SConstruct,v 1.1.1.1 2012/05/08 09:34:17 imil Exp $ | | 1 | $NetBSD: patch-SConstruct,v 1.2 2013/05/28 19:01:22 joerg Exp $ |
2 | | | 2 | |
3 | Create shared object. | | 3 | Create shared object. |
4 | | | 4 | |
5 | --- SConstruct.orig 2008-04-21 00:05:35.000000000 +0000 | | 5 | --- SConstruct.orig 2008-04-21 00:05:35.000000000 +0000 |
6 | +++ SConstruct | | 6 | +++ SConstruct |
| | | 7 | @@ -5,7 +5,7 @@ tools = ['default'] |
| | | 8 | if os.name == 'nt': |
| | | 9 | tools = ['mingw'] |
| | | 10 | |
| | | 11 | -env = Environment(tools = tools) |
| | | 12 | +env = Environment(tools = tools, ENV = {'PATH': os.environ['PATH']}) |
| | | 13 | |
| | | 14 | options_file = None |
| | | 15 | if sys.platform == 'linux2': |
7 | @@ -22,6 +22,7 @@ opts.Add('CXX', 'The C++ compiler (for t | | 16 | @@ -22,6 +22,7 @@ opts.Add('CXX', 'The C++ compiler (for t |
8 | opts.Add('CCFLAGS', 'Flags for the compiler.', ['-O2', '-Wall']) | | 17 | opts.Add('CCFLAGS', 'Flags for the compiler.', ['-O2', '-Wall']) |
9 | opts.Add('LINK', 'The linker.') | | 18 | opts.Add('LINK', 'The linker.') |
10 | opts.Add('LINKFLAGS', 'Linker flags.', []) | | 19 | opts.Add('LINKFLAGS', 'Linker flags.', []) |
11 | +opts.Add('SONAME', 'Shared library name.') | | 20 | +opts.Add('SONAME', 'Shared library name.') |
12 | opts.Add('no_cygwin', 'Use -mno-cygwin to build using the mingw compiler on cygwin', 0) | | 21 | opts.Add('no_cygwin', 'Use -mno-cygwin to build using the mingw compiler on cygwin', 0) |
13 | opts.Add('LIBS', 'libraries', []) | | 22 | opts.Add('LIBS', 'libraries', []) |
14 | opts.Add('LIBPATH', 'library path', []) | | 23 | opts.Add('LIBPATH', 'library path', []) |
15 | @@ -147,6 +148,8 @@ Files will be installed on <prefix>/bin, | | 24 | @@ -147,6 +148,8 @@ Files will be installed on <prefix>/bin, |
16 | env['CPPPATH'] = '#/include' | | 25 | env['CPPPATH'] = '#/include' |
17 | env['LIBPATH'] = ['#/lib'] + env['LIBPATH'] | | 26 | env['LIBPATH'] = ['#/lib'] + env['LIBPATH'] |
18 | | | 27 | |
19 | +env.Append(SHLINKFLAGS=' -Wl,-soname='+env['SONAME']) | | 28 | +env.Append(SHLINKFLAGS=' -Wl,-soname='+env['SONAME']) |