diff --git a/bin/lutin b/bin/lutin index 1b601f6..aa0ea41 100755 --- a/bin/lutin +++ b/bin/lutin @@ -37,6 +37,7 @@ myArgs.add(arguments.ArgDefine("d", "depth", haveParam=True, desc="Depth of the myArgs.add(arguments.ArgDefine("s", "force-strip", desc="Force the stripping of the compile elements")) myArgs.add(arguments.ArgDefine("o", "force-optimisation", desc="Force optimisation of the build")) myArgs.add(arguments.ArgDefine("w", "warning", desc="Store warning in a file build file")) +myArgs.add(arguments.ArgDefine("i", "isolate-system", desc="Isolate system build (copy header of c and c++ system lib to not include unneeded external libs) EXPERIMENTAL (archlinux)")) myArgs.add_section("properties", "keep in the sequency of the cible") myArgs.add(arguments.ArgDefine("t", "target", haveParam=True, desc="Select a target (by default the platform is the computer that compile this) To know list : 'lutin.py --list-target'")) @@ -237,6 +238,13 @@ def parseGenericArg(argument, active): else: env.set_force_optimisation(False) return True + elif argument.get_option_name() == "isolate-system": + if active==True: + if check_boolean(argument.get_arg()) == True: + env.set_isolate_system(True) + else: + env.set_isolate_system(False) + return True elif argument.get_option_name() == "force-strip": if active==True: if check_boolean(argument.get_arg()) == True: @@ -262,34 +270,46 @@ if os.path.isfile(config_file) == True: debug.debug("Find basic configuration file: '" + config_file + "'") # the file exist, we can open it and get the initial configuration: configuration_file = __import__(config_file_name[:-3]) + if "get_exclude_path" in dir(configuration_file): data = configuration_file.get_exclude_path() debug.debug(" get default config 'get_exclude_path' val='" + str(data) + "'") env.set_exclude_search_path(data) + if "get_parsing_depth" in dir(configuration_file): data = configuration_file.get_parsing_depth() debug.debug(" get default config 'get_parsing_depth' val='" + str(data) + "'") parseGenericArg(arguments.ArgElement("depth", str(data)), True) - + if "get_default_jobs" in dir(configuration_file): data = configuration_file.get_default_jobs() debug.debug(" get default config 'get_default_jobs' val='" + str(data) + "'") parseGenericArg(arguments.ArgElement("jobs", str(data)), True) - + if "get_default_color" in dir(configuration_file): data = configuration_file.get_default_color() debug.debug(" get default config 'get_default_color' val='" + str(data) + "'") parseGenericArg(arguments.ArgElement("color", str(data)), True) - + if "get_default_debug_level" in dir(configuration_file): data = configuration_file.get_default_debug_level() debug.debug(" get default config 'get_default_debug_level' val='" + str(data) + "'") parseGenericArg(arguments.ArgElement("verbose", str(data)), True) - + if "get_default_print_pretty" in dir(configuration_file): data = configuration_file.get_default_print_pretty() debug.debug(" get default config 'get_default_print_pretty' val='" + str(data) + "'") parseGenericArg(arguments.ArgElement("pretty", str(data)), True) + + if "get_default_force_optimisation" in dir(configuration_file): + data = configuration_file.get_default_force_optimisation() + debug.debug(" get default config 'get_default_force_optimisation' val='" + str(data) + "'") + parseGenericArg(arguments.ArgElement("force-optimisation", str(data)), True) + + if "get_default_isolate_system" in dir(configuration_file): + data = configuration_file.get_default_isolate_system() + debug.debug(" get default config 'get_default_isolate_system' val='" + str(data) + "'") + parseGenericArg(arguments.ArgElement("isolate-system", str(data)), True) diff --git a/lutin/env.py b/lutin/env.py index f3efb90..5079565 100644 --- a/lutin/env.py +++ b/lutin/env.py @@ -39,6 +39,19 @@ def get_force_optimisation(): global force_optimisation return force_optimisation +isolate_system=False + +def set_isolate_system(val): + global isolate_system + if val==1: + isolate_system = 1 + else: + isolate_system = 0 + +def get_isolate_system(): + global isolate_system + return isolate_system + parse_depth = 9999999 def set_parse_depth(val): diff --git a/lutin/z_system/lutinSystem_Android_ADMOD.py b/lutin/z_system/lutinSystem_Android_ADMOD.py index dd1b9b8..4b7382b 100644 --- a/lutin/z_system/lutinSystem_Android_ADMOD.py +++ b/lutin/z_system/lutinSystem_Android_ADMOD.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Android_SDK.py b/lutin/z_system/lutinSystem_Android_SDK.py index 5c281e5..329938a 100644 --- a/lutin/z_system/lutinSystem_Android_SDK.py +++ b/lutin/z_system/lutinSystem_Android_SDK.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Android_c.py b/lutin/z_system/lutinSystem_Android_c.py index 24da96d..39250e0 100644 --- a/lutin/z_system/lutinSystem_Android_c.py +++ b/lutin/z_system/lutinSystem_Android_c.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Android_cxx.py b/lutin/z_system/lutinSystem_Android_cxx.py index aed7b5b..e29504d 100644 --- a/lutin/z_system/lutinSystem_Android_cxx.py +++ b/lutin/z_system/lutinSystem_Android_cxx.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Android_m.py b/lutin/z_system/lutinSystem_Android_m.py index a7c9383..b72825e 100644 --- a/lutin/z_system/lutinSystem_Android_m.py +++ b/lutin/z_system/lutinSystem_Android_m.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Android_opengl.py b/lutin/z_system/lutinSystem_Android_opengl.py index 3876bd8..cc1aeeb 100644 --- a/lutin/z_system/lutinSystem_Android_opengl.py +++ b/lutin/z_system/lutinSystem_Android_opengl.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Android_pthread.py b/lutin/z_system/lutinSystem_Android_pthread.py index 08247c9..f8b1a1d 100644 --- a/lutin/z_system/lutinSystem_Android_pthread.py +++ b/lutin/z_system/lutinSystem_Android_pthread.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Android_z.py b/lutin/z_system/lutinSystem_Android_z.py index 9f8e949..b4c1f3c 100644 --- a/lutin/z_system/lutinSystem_Android_z.py +++ b/lutin/z_system/lutinSystem_Android_z.py @@ -10,6 +10,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_IOs_CoreAudio.py b/lutin/z_system/lutinSystem_IOs_CoreAudio.py index 4069431..4c6e517 100644 --- a/lutin/z_system/lutinSystem_IOs_CoreAudio.py +++ b/lutin/z_system/lutinSystem_IOs_CoreAudio.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_IOs_cxx.py b/lutin/z_system/lutinSystem_IOs_cxx.py index 750f985..82bfa61 100644 --- a/lutin/z_system/lutinSystem_IOs_cxx.py +++ b/lutin/z_system/lutinSystem_IOs_cxx.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_IOs_m.py b/lutin/z_system/lutinSystem_IOs_m.py index a7c9383..b72825e 100644 --- a/lutin/z_system/lutinSystem_IOs_m.py +++ b/lutin/z_system/lutinSystem_IOs_m.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Linux_X11.py b/lutin/z_system/lutinSystem_Linux_X11.py index baf4835..038e9bd 100644 --- a/lutin/z_system/lutinSystem_Linux_X11.py +++ b/lutin/z_system/lutinSystem_Linux_X11.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -21,13 +22,12 @@ class System(system.System): self.valid = True # no check needed ==> just add this: self.add_module_depend(['c']) - - self.add_header_file([ - "/usr/include/X11/*" - ], - destination_path="X11", - recursive=True) - self.add_export_flag('link-lib', 'X11') + if env.get_isolate_system() == False: + self.add_header_file([ + "/usr/include/X11/*" + ], + destination_path="X11", + recursive=True) diff --git a/lutin/z_system/lutinSystem_Linux_alsa.py b/lutin/z_system/lutinSystem_Linux_alsa.py index 9ac530b..5f027b3 100644 --- a/lutin/z_system/lutinSystem_Linux_alsa.py +++ b/lutin/z_system/lutinSystem_Linux_alsa.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -24,20 +25,22 @@ class System(system.System): # we did not find the library reqiested (just return) (automaticly set at false) return; self.valid = True - # todo : create a searcher of the presence of the library: - self.add_export_flag("link-lib", "asound") - self.add_header_file([ - "/usr/include/alsa/*", - ], - destination_path="alsa", - recursive=True) - self.add_header_file([ - "/usr/include/dssi/*", - ], - destination_path="dssi", - recursive=True) - self.add_module_depend([ - 'c' - ]) + if env.get_isolate_system() == False: + self.add_export_flag("link-lib", "asound") + else: + self.add_export_flag("link-lib", "asound") + self.add_header_file([ + "/usr/include/alsa/*", + ], + destination_path="alsa", + recursive=True) + self.add_header_file([ + "/usr/include/dssi/*", + ], + destination_path="dssi", + recursive=True) + self.add_module_depend([ + 'c' + ]) diff --git a/lutin/z_system/lutinSystem_Linux_arpa.py b/lutin/z_system/lutinSystem_Linux_arpa.py index 0ca966b..3b1359f 100644 --- a/lutin/z_system/lutinSystem_Linux_arpa.py +++ b/lutin/z_system/lutinSystem_Linux_arpa.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -18,18 +19,22 @@ class System(system.System): system.System.__init__(self) # create some HELP: self.help="rpc : generic RPC library (developed by oracle)" + # check if the library exist: + if not os.path.isfile("/usr/include/arpa/ftp.h"): + # we did not find the library reqiested (just return) (automaticly set at false) + return; # No check ==> on the basic std libs: self.valid = True - # todo : create a searcher of the presence of the library: - #self.add_export_flag("link-lib", "xns") - self.add_header_file([ - "/usr/include/arpa/*" - ], - destination_path="arpa", - recursive=True) - self.add_module_depend([ - 'c' - ]) + if env.get_isolate_system() == True: + #self.add_export_flag("link-lib", "xns") + self.add_header_file([ + "/usr/include/arpa/*" + ], + destination_path="arpa", + recursive=True) + self.add_module_depend([ + 'c' + ]) diff --git a/lutin/z_system/lutinSystem_Linux_boost.py b/lutin/z_system/lutinSystem_Linux_boost.py index ae8a828..0553fe4 100644 --- a/lutin/z_system/lutinSystem_Linux_boost.py +++ b/lutin/z_system/lutinSystem_Linux_boost.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -23,12 +24,22 @@ class System(system.System): # we did not find the library reqiested (just return) (automaticly set at false) return; self.valid = True - # todo : create a searcher of the presence of the library: - self.add_export_flag("link-lib", [ - "boost_system", - "boost_thread", - "boost_chrono" - ]) + if env.get_isolate_system() == False: + # todo : create a searcher of the presence of the library: + self.add_export_flag("link-lib", [ + "boost_system", + "boost_thread", + "boost_chrono" + ]) + else: + self.add_header_file([ + "/usr/include/boost/*" + ], + destination_path="boost", + recursive=True) + self.add_module_depend([ + 'cxx' + ]) diff --git a/lutin/z_system/lutinSystem_Linux_c.py b/lutin/z_system/lutinSystem_Linux_c.py index 77f9718..6b6a29f 100644 --- a/lutin/z_system/lutinSystem_Linux_c.py +++ b/lutin/z_system/lutinSystem_Linux_c.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -19,155 +20,156 @@ class System(system.System): # create some HELP: self.help = "C: Generic C library" self.valid = True - # no check needed ==> just add this: - #self.add_export_flag("c", "-D__STDCPP_GNU__") - #self.add_export_flag("c++", "-nodefaultlibs") - # grep "This file is part of the GNU C Library" /usr/include/* - self.add_header_file([ - '/usr/include/aio.h', - '/usr/include/aliases.h', - '/usr/include/alloca.h', - '/usr/include/ansidecl.h', - '/usr/include/argp.h', - '/usr/include/argz.h', - '/usr/include/ar.h', - '/usr/include/assert.h', - '/usr/include/byteswap.h', - '/usr/include/complex.h', - '/usr/include/cpio.h', - '/usr/include/ctype.h', - '/usr/include/dirent.h', - '/usr/include/dlfcn.h', - '/usr/include/elf.h', - '/usr/include/endian.h', - '/usr/include/envz.h', - '/usr/include/err.h', - '/usr/include/errno.h', - '/usr/include/error.h', - '/usr/include/execinfo.h', - '/usr/include/fcntl.h', - '/usr/include/features.h', - '/usr/include/fenv.h', - '/usr/include/fmtmsg.h', - '/usr/include/fnmatch.h', - '/usr/include/fpu_control.h', - '/usr/include/fts.h', - '/usr/include/ftw.h', - '/usr/include/gconv.h', - '/usr/include/getopt.h', - '/usr/include/glob.h', - '/usr/include/gnu-versions.h', - '/usr/include/grp.h', - '/usr/include/gshadow.h', - '/usr/include/iconv.h', - '/usr/include/ieee754.h', - '/usr/include/ifaddrs.h', - '/usr/include/inttypes.h', - '/usr/include/langinfo.h', - '/usr/include/libgen.h', - '/usr/include/libintl.h', - '/usr/include/libio.h', - '/usr/include/limits.h', - '/usr/include/link.h', - '/usr/include/locale.h', - '/usr/include/malloc.h', - '/usr/include/mcheck.h', - '/usr/include/memory.h', - '/usr/include/mntent.h', - '/usr/include/monetary.h', - '/usr/include/mqueue.h', - '/usr/include/netdb.h', - '/usr/include/nl_types.h', - '/usr/include/nss.h', - '/usr/include/obstack.h', - '/usr/include/printf.h', - '/usr/include/pthread.h', - '/usr/include/pty.h', - '/usr/include/pwd.h', - '/usr/include/re_comp.h', - '/usr/include/regex.h', - '/usr/include/regexp.h', - '/usr/include/sched.h', - '/usr/include/search.h', - '/usr/include/semaphore.h', - '/usr/include/setjmp.h', - '/usr/include/sgtty.h', - '/usr/include/shadow.h', - '/usr/include/signal.h', - '/usr/include/spawn.h', - '/usr/include/stdc-predef.h', - '/usr/include/stdint.h', - '/usr/include/stdio_ext.h', - '/usr/include/stdio.h', - '/usr/include/stdlib.h', - '/usr/include/string.h', - '/usr/include/strings.h', - '/usr/include/stropts.h', - '/usr/include/tar.h', - '/usr/include/termios.h', - '/usr/include/tgmath.h', - '/usr/include/thread_db.h', - '/usr/include/time.h', - '/usr/include/uchar.h', - '/usr/include/ucontext.h', - '/usr/include/ulimit.h', - '/usr/include/unistd.h', - '/usr/include/utime.h', - '/usr/include/utmp.h', - '/usr/include/utmpx.h', - '/usr/include/values.h', - '/usr/include/wchar.h', - '/usr/include/wctype.h', - '/usr/include/wordexp.h', - '/usr/include/xlocale.h', - ], - destination_path="") - self.add_header_file([ - '/usr/include/poll.h', - '/usr/include/unistdio.h', - '/usr/include/syslog.h', - '/usr/include/_G_config.h', - ], - destination_path="") - self.add_header_file([ - "/usr/include/sys/*", - ], - destination_path="sys", - recursive=True) - self.add_header_file([ - "/usr/include/bits/*", - ], - destination_path="bits", - recursive=True) - self.add_header_file([ - "/usr/include/gnu/*", - ], - destination_path="gnu", - recursive=True) - self.add_header_file([ - "/usr/include/linux/*", - ], - destination_path="linux", - recursive=True) - self.add_header_file([ - "/usr/include/asm/*", - ], - destination_path="asm", - recursive=True) - self.add_header_file([ - "/usr/include/asm-generic/*", - ], - destination_path="asm-generic", - recursive=True) - self.add_header_file([ - "/usr/include/netinet/*", - ], - destination_path="netinet", - recursive=True) - self.add_header_file([ - "/usr/include/net/*", - ], - destination_path="net", - recursive=True) - self.add_export_flag("link", "-B/usr/lib") + if env.get_isolate_system() == False: + # We must have it ... all time + pass + else: + # grep "This file is part of the GNU C Library" /usr/include/* + self.add_header_file([ + '/usr/include/aio.h*', + '/usr/include/aliases.h*', + '/usr/include/alloca.h*', + '/usr/include/ansidecl.h*', + '/usr/include/argp.h*', + '/usr/include/argz.h*', + '/usr/include/ar.h*', + '/usr/include/assert.h*', + '/usr/include/byteswap.h*', + '/usr/include/complex.h*', + '/usr/include/cpio.h*', + '/usr/include/ctype.h*', + '/usr/include/dirent.h*', + '/usr/include/dlfcn.h*', + '/usr/include/elf.h*', + '/usr/include/endian.h*', + '/usr/include/envz.h*', + '/usr/include/err.h*', + '/usr/include/errno.h*', + '/usr/include/error.h*', + '/usr/include/execinfo.h*', + '/usr/include/fcntl.h*', + '/usr/include/features.h*', + '/usr/include/fenv.h*', + '/usr/include/fmtmsg.h*', + '/usr/include/fnmatch.h*', + '/usr/include/fpu_control.h*', + '/usr/include/fts.h*', + '/usr/include/ftw.h*', + '/usr/include/gconv.h*', + '/usr/include/getopt.h*', + '/usr/include/glob.h*', + '/usr/include/gnu-versions.h*', + '/usr/include/grp.h*', + '/usr/include/gshadow.h*', + '/usr/include/iconv.h*', + '/usr/include/ieee754.h*', + '/usr/include/ifaddrs.h*', + '/usr/include/inttypes.h*', + '/usr/include/langinfo.h*', + '/usr/include/libgen.h*', + '/usr/include/libintl.h*', + '/usr/include/libio.h*', + '/usr/include/limits.h*', + '/usr/include/link.h*', + '/usr/include/locale.h*', + '/usr/include/malloc.h*', + '/usr/include/mcheck.h*', + '/usr/include/memory.h*', + '/usr/include/mntent.h*', + '/usr/include/monetary.h*', + '/usr/include/mqueue.h*', + '/usr/include/netdb.h*', + '/usr/include/nl_types.h*', + '/usr/include/nss.h*', + '/usr/include/obstack.h*', + '/usr/include/printf.h*', + '/usr/include/pthread.h*', + '/usr/include/pty.h*', + '/usr/include/pwd.h*', + '/usr/include/re_comp.h*', + '/usr/include/regex.h*', + '/usr/include/regexp.h*', + '/usr/include/sched.h*', + '/usr/include/search.h*', + '/usr/include/semaphore.h*', + '/usr/include/setjmp.h*', + '/usr/include/sgtty.h*', + '/usr/include/shadow.h*', + '/usr/include/signal.h*', + '/usr/include/spawn.h*', + '/usr/include/stdc-predef.h*', + '/usr/include/stdint.h*', + '/usr/include/stdio_ext.h*', + '/usr/include/stdio.h*', + '/usr/include/stdlib.h*', + '/usr/include/string.h*', + '/usr/include/strings.h*', + '/usr/include/stropts.h*', + '/usr/include/tar.h*', + '/usr/include/termios.h*', + '/usr/include/tgmath.h*', + '/usr/include/thread_db.h*', + '/usr/include/time.h*', + '/usr/include/uchar.h*', + '/usr/include/ucontext.h*', + '/usr/include/ulimit.h*', + '/usr/include/unistd.h*', + '/usr/include/utime.h*', + '/usr/include/utmp.h*', + '/usr/include/utmpx.h*', + '/usr/include/values.h*', + '/usr/include/wchar.h*', + '/usr/include/wctype.h*', + '/usr/include/wordexp.h*', + '/usr/include/xlocale.h*', + ], + destination_path="") + self.add_header_file([ + '/usr/include/poll.h*', + '/usr/include/unistdio.h*', + '/usr/include/syslog.h*', + '/usr/include/_G_config.h*', + ], + destination_path="") + self.add_header_file([ + "/usr/include/sys/*", + ], + destination_path="sys", + recursive=True) + self.add_header_file([ + "/usr/include/bits/*", + ], + destination_path="bits", + recursive=True) + self.add_header_file([ + "/usr/include/gnu/*", + ], + destination_path="gnu", + recursive=True) + self.add_header_file([ + "/usr/include/linux/*", + ], + destination_path="linux", + recursive=True) + self.add_header_file([ + "/usr/include/asm/*", + ], + destination_path="asm", + recursive=True) + self.add_header_file([ + "/usr/include/asm-generic/*", + ], + destination_path="asm-generic", + recursive=True) + self.add_header_file([ + "/usr/include/netinet/*", + ], + destination_path="netinet", + recursive=True) + self.add_header_file([ + "/usr/include/net/*", + ], + destination_path="net", + recursive=True) + self.add_export_flag("link", "-B/usr/lib") diff --git a/lutin/z_system/lutinSystem_Linux_cxx.py b/lutin/z_system/lutinSystem_Linux_cxx.py index 6eed3dd..7d91b1a 100644 --- a/lutin/z_system/lutinSystem_Linux_cxx.py +++ b/lutin/z_system/lutinSystem_Linux_cxx.py @@ -11,6 +11,8 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import multiprocess +from lutin import env import os class System(system.System): @@ -26,12 +28,23 @@ class System(system.System): 'pthread' ]) self.add_export_flag("c++", "-D__STDCPP_GNU__") - #self.add_export_flag("c++-remove", "-nostdlib") - #self.add_export_flag("need-libstdc++", True) - self.add_export_flag("link-lib", "stdc++") - self.add_header_file([ - "/usr/include/c++/6.1.1/*" - ], - recursive=True) + if env.get_isolate_system() == False: + self.add_export_flag("c++-remove", "-nostdlib") + self.add_export_flag("need-libstdc++", True) + else: + self.add_export_flag("link-lib", "stdc++") + compilator_gcc = "g++" + if target.config["compilator-version"] != "": + compilator_gcc = compilator_gcc + "-" + target.config["compilator-version"] + + #get g++ compilation version : + version_cpp = multiprocess.run_command_direct(compilator_gcc + " -dumpversion"); + if version_cpp == False: + debug.error("Can not get the g++ version ...") + + self.add_header_file([ + "/usr/include/c++/" + version_cpp + "/*" + ], + recursive=True) diff --git a/lutin/z_system/lutinSystem_Linux_jack.py b/lutin/z_system/lutinSystem_Linux_jack.py index 6903632..4eee1ab 100644 --- a/lutin/z_system/lutinSystem_Linux_jack.py +++ b/lutin/z_system/lutinSystem_Linux_jack.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -23,16 +24,16 @@ class System(system.System): # we did not find the library reqiested (just return) (automaticly set at false) return; self.valid = True - # todo : create a searcher of the presence of the library: - self.add_export_flag("link-lib", "jack") self.add_module_depend([ 'uuid', 'c' ]) - self.add_header_file([ - "/usr/include/jack/*", - ], - destination_path="jack", - recursive=True) + self.add_export_flag("link-lib", "jack") + if env.get_isolate_system() == True: + self.add_header_file([ + "/usr/include/jack/*", + ], + destination_path="jack", + recursive=True) diff --git a/lutin/z_system/lutinSystem_Linux_m.py b/lutin/z_system/lutinSystem_Linux_m.py index d9c5443..3739ed9 100644 --- a/lutin/z_system/lutinSystem_Linux_m.py +++ b/lutin/z_system/lutinSystem_Linux_m.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -25,11 +26,12 @@ class System(system.System): self.add_module_depend([ 'c' ]) - self.add_header_file([ - "/usr/include/math.h" - ], - clip_path="/usr/include", - recursive=False) + if env.get_isolate_system() == True: + self.add_header_file([ + "/usr/include/math.h" + ], + clip_path="/usr/include", + recursive=False) diff --git a/lutin/z_system/lutinSystem_Linux_opengl.py b/lutin/z_system/lutinSystem_Linux_opengl.py index cf481e9..1a9f059 100644 --- a/lutin/z_system/lutinSystem_Linux_opengl.py +++ b/lutin/z_system/lutinSystem_Linux_opengl.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -24,14 +25,14 @@ class System(system.System): 'c', 'X11' ]) - - self.add_header_file([ - "/usr/include/GL/*" - ], - destination_path="GL", - recursive=True) - self.add_export_flag('link-lib', 'GL') + if env.get_isolate_system() == True: + self.add_header_file([ + "/usr/include/GL/*" + ], + destination_path="GL", + recursive=True) + """ if target.name=="Linux": diff --git a/lutin/z_system/lutinSystem_Linux_oss.py b/lutin/z_system/lutinSystem_Linux_oss.py index e48ab2f..c198709 100644 --- a/lutin/z_system/lutinSystem_Linux_oss.py +++ b/lutin/z_system/lutinSystem_Linux_oss.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Linux_pthread.py b/lutin/z_system/lutinSystem_Linux_pthread.py index 1a4ae0e..3c0c477 100644 --- a/lutin/z_system/lutinSystem_Linux_pthread.py +++ b/lutin/z_system/lutinSystem_Linux_pthread.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -25,13 +26,14 @@ class System(system.System): self.valid = True # todo : create a searcher of the presence of the library: self.add_export_flag("link-lib", "pthread") - self.add_header_file([ - "/usr/include/sched.h", - "/usr/include/pthread.h" - ], - clip_path="/usr/include/") self.add_module_depend([ 'c' ]) + if env.get_isolate_system() == True: + self.add_header_file([ + "/usr/include/sched.h", + "/usr/include/pthread.h" + ], + clip_path="/usr/include/") diff --git a/lutin/z_system/lutinSystem_Linux_pulse.py b/lutin/z_system/lutinSystem_Linux_pulse.py index e9a4021..6bad1dd 100644 --- a/lutin/z_system/lutinSystem_Linux_pulse.py +++ b/lutin/z_system/lutinSystem_Linux_pulse.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -41,18 +42,24 @@ class System(system.System): self.add_module_depend([ 'c' ]) - # todo : create a searcher of the presence of the library: - self.add_export_flag("link-lib", [ - "pulsecommon-" + version + ".0", - "pulse-mainloop-glib", - "pulse-simple", - "pulse" - ]) - self.add_export_flag("link", "-L/usr/lib/pulseaudio") - self.add_header_file([ - "/usr/include/pulse/*", - ], - destination_path="pulse", - recursive=True) + if env.get_isolate_system() == False: + self.add_export_flag("link-lib", [ + "pulse-simple", + "pulse" + ]) + else: + # todo : create a searcher of the presence of the library: + self.add_export_flag("link-lib", [ + "pulsecommon-" + version + ".0", + "pulse-mainloop-glib", + "pulse-simple", + "pulse" + ]) + self.add_export_flag("link", "-L/usr/lib/pulseaudio") + self.add_header_file([ + "/usr/include/pulse/*", + ], + destination_path="pulse", + recursive=True) diff --git a/lutin/z_system/lutinSystem_Linux_rpc.py b/lutin/z_system/lutinSystem_Linux_rpc.py index c54b3f6..1959531 100644 --- a/lutin/z_system/lutinSystem_Linux_rpc.py +++ b/lutin/z_system/lutinSystem_Linux_rpc.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -25,11 +26,12 @@ class System(system.System): ]) # todo : create a searcher of the presence of the library: self.add_export_flag("link-lib", "rpcsvc") - self.add_header_file([ - "/usr/include/rpc/*" - ], - destination_path="rpc", - recursive=True) + if env.get_isolate_system() == False: + self.add_header_file([ + "/usr/include/rpc/*" + ], + destination_path="rpc", + recursive=True) diff --git a/lutin/z_system/lutinSystem_Linux_uuid.py b/lutin/z_system/lutinSystem_Linux_uuid.py index fb1e107..d0a2e21 100644 --- a/lutin/z_system/lutinSystem_Linux_uuid.py +++ b/lutin/z_system/lutinSystem_Linux_uuid.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -28,10 +29,11 @@ class System(system.System): ]) # todo : create a searcher of the presence of the library: self.add_export_flag("link-lib", "uuid") - self.add_header_file([ - "/usr/include/uuid/*", - ], - destination_path="uuid", - recursive=True) + if env.get_isolate_system() == False: + self.add_header_file([ + "/usr/include/uuid/*", + ], + destination_path="uuid", + recursive=True) diff --git a/lutin/z_system/lutinSystem_Linux_z.py b/lutin/z_system/lutinSystem_Linux_z.py index 9b7df51..302da69 100644 --- a/lutin/z_system/lutinSystem_Linux_z.py +++ b/lutin/z_system/lutinSystem_Linux_z.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): @@ -28,9 +29,11 @@ class System(system.System): self.add_module_depend([ 'c' ]) - self.add_header_file([ - "/usr/include/zlib.h" - ], - destination_path="") + + if env.get_isolate_system() == False: + self.add_header_file([ + "/usr/include/zlib.h" + ], + destination_path="") diff --git a/lutin/z_system/lutinSystem_MacOs_CoreAudio.py b/lutin/z_system/lutinSystem_MacOs_CoreAudio.py index 4f217ad..52df831 100644 --- a/lutin/z_system/lutinSystem_MacOs_CoreAudio.py +++ b/lutin/z_system/lutinSystem_MacOs_CoreAudio.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_MacOs_cxx.py b/lutin/z_system/lutinSystem_MacOs_cxx.py index 0148c31..5fe5e0e 100644 --- a/lutin/z_system/lutinSystem_MacOs_cxx.py +++ b/lutin/z_system/lutinSystem_MacOs_cxx.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_MacOs_m.py b/lutin/z_system/lutinSystem_MacOs_m.py index a7c9383..b72825e 100644 --- a/lutin/z_system/lutinSystem_MacOs_m.py +++ b/lutin/z_system/lutinSystem_MacOs_m.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Windows_cxx.py b/lutin/z_system/lutinSystem_Windows_cxx.py index edab219..89b5f0d 100644 --- a/lutin/z_system/lutinSystem_Windows_cxx.py +++ b/lutin/z_system/lutinSystem_Windows_cxx.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Windows_ds.py b/lutin/z_system/lutinSystem_Windows_ds.py index 227397e..42c6587 100644 --- a/lutin/z_system/lutinSystem_Windows_ds.py +++ b/lutin/z_system/lutinSystem_Windows_ds.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_system/lutinSystem_Windows_m.py b/lutin/z_system/lutinSystem_Windows_m.py index a7c9383..b72825e 100644 --- a/lutin/z_system/lutinSystem_Windows_m.py +++ b/lutin/z_system/lutinSystem_Windows_m.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import system from lutin import tools +from lutin import env import os class System(system.System): diff --git a/lutin/z_target/lutinTarget_Linux.py b/lutin/z_target/lutinTarget_Linux.py index 91b7214..86729b3 100644 --- a/lutin/z_target/lutinTarget_Linux.py +++ b/lutin/z_target/lutinTarget_Linux.py @@ -11,6 +11,7 @@ from lutin import debug from lutin import target from lutin import tools +from lutin import env import os import stat import re @@ -41,8 +42,9 @@ class Target(target.Target): self.pkg_path_bin = "bin" self.pkg_path_lib = "lib" self.pkg_path_license = "license" - - self.sysroot = "--sysroot=/aDirectoryThatDoesNotExist/" + # disable sysroot when generate build in isolated mode + if env.get_isolate_system() == True: + self.sysroot = "--sysroot=/aDirectoryThatDoesNotExist/" """ diff --git a/setup.py b/setup.py index 85d3573..9694e5e 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ def readme(): # https://pypi.python.org/pypi?%3Aaction=list_classifiers setup(name='lutin', - version='1.2.4', + version='1.2.5', description='Lutin generic builder (might replace makefile, CMake ...)', long_description=readme(), url='http://github.com/HeeroYui/lutin',