gentoo/dev-python/cgkit/files/cgkit-2.0.0-fix-build-system.patch
David Seifert c1ec4fe569
dev-python/cgkit: Add py3.5 support
* EAPI 6
* Call distutils-r1_python_prepare_all
* Fix compiling in C++14 mode with GCC 6

Bug: https://bugs.gentoo.org/show_bug.cgi?id=611774
Package-Manager: Portage-2.3.4, Repoman-2.3.2
2017-03-11 01:11:06 +01:00

41 lines
1.2 KiB
Diff

Make scons respect user variables
--- a/setup.py
+++ b/setup.py
@@ -214,7 +214,7 @@
# The following variables are used to customize the compile process
-INC_DIRS = []
+INC_DIRS = ['/usr/include']
LIB_DIRS = []
LIBS = []
CC_ARGS = []
--- a/supportlib/SConstruct
+++ b/supportlib/SConstruct
@@ -30,19 +30,11 @@
# Add the local 'include' directory...
env.Append(CPPPATH = ["include"])
-# Do platform specific stuff...
-if sys.platform=="win32":
- env.Append(CCFLAGS = ["/GX", "/GR", "/MD", "/W3"])
- env.Append(CPPDEFINES = ["WIN32", "_LIB"])
-elif sys.platform=="darwin":
- env.Append(CCFLAGS = ["-arch", "x86_64"])
- env.Append(CCFLAGS = ["-arch", "i386"])
-# env.Append(CCFLAGS = ["-arch", "ppc"])
- env.Append(CPPPATH = ["/opt/local/include"])
- env.Append(CCFLAGS = ["-fPIC"])
-else:
- env.Append(CPPPATH = ["/opt/local/include"])
- env.Append(CCFLAGS = ["-fPIC"])
+env.Append(CPPPATH = ['/usr/include'])
+env['AR'] = os.environ.get('AR', 'ar')
+env['CXX'] = os.environ.get('CXX', 'g++')
+env['CXXFLAGS'] = os.environ.get('CXXFLAGS', '-fPIC')
+env['CPPFLAGS'] = os.environ.get('CPPFLAGS', '')
# Setup the help message
Help(vars.GenerateHelpText(env))