[DEV/API] update API to use a mximum of accessor instead of variable, some deprecation
This commit is contained in:
parent
40d2e8eac1
commit
604078f1c0
@ -753,7 +753,7 @@ class Module:
|
||||
or self._type == 'BINARY_SHARED' \
|
||||
or self._type == 'BINARY_STAND_ALONE':
|
||||
shared_mode = False
|
||||
if target.name == "Android":
|
||||
if "Android" in target.get_type():
|
||||
debug.warning("Android mode ...")
|
||||
# special case for android ...
|
||||
for elem in self._sub_heritage_list.src['src']:
|
||||
@ -809,7 +809,7 @@ class Module:
|
||||
except ValueError:
|
||||
debug.error(" UN-SUPPORTED link format: '.bin'")
|
||||
elif self._type == "PACKAGE":
|
||||
if target.name == "Android":
|
||||
if "Android" in target.get_type():
|
||||
# special case for android wrapper:
|
||||
try:
|
||||
tmp_builder = builder.get_builder_with_output("so");
|
||||
@ -879,7 +879,7 @@ class Module:
|
||||
or self._type == 'PACKAGE':
|
||||
if target.end_generate_package == True:
|
||||
# generate the package with his properties ...
|
||||
if target.name=="Android":
|
||||
if "Android" in target.get_type():
|
||||
self._sub_heritage_list.add_heritage(self._local_heritage)
|
||||
target.make_package(self._name, self._package_prop, os.path.join(self._origin_path, ".."), self._sub_heritage_list)
|
||||
else:
|
||||
@ -1260,13 +1260,27 @@ class Module:
|
||||
self._print_list('export path "' + str(element) + '" ' + str(len(value)), value)
|
||||
|
||||
##
|
||||
## @brief Get packaging property variable
|
||||
## @param[in] self (handle) Class handle
|
||||
## @param[in] name (string) Variable to get: "COMPAGNY_TYPE", "COMPAGNY_NAME", "ICON", "MAINTAINER", "SECTION", "PRIORITY", "DESCRIPTION", "VERSION", "VERSION_CODE", "NAME", "ANDROID_MANIFEST", "ANDROID_JAVA_FILES", "RIGHT", "ANDROID_RESOURCES", "ANDROID_APPL_TYPE", "ADMOD_ID", "APPLE_APPLICATION_IOS_ID", "LICENSE", "ANDROID_SIGN", "ADMOD_POSITION"
|
||||
## @return (string) Value assiciated at the package
|
||||
##
|
||||
def get_pkg(self, name):
|
||||
if name in self._package_prop:
|
||||
return copy.deepcopy(self._package_prop[name])
|
||||
return None
|
||||
|
||||
def pkg_set(self, variable, value):
|
||||
debug.warning("[" + self._name + "] DEPRECATED : pkg_set(...) replaced by set_pkg(...)")
|
||||
self.set_pkg(variable, value)
|
||||
##
|
||||
## @brief Set packaging variables
|
||||
## @param[in] self (handle) Class handle
|
||||
## @param[in] variable (string) Variable to set: "COMPAGNY_TYPE", "COMPAGNY_NAME", "ICON", "MAINTAINER", "SECTION", "PRIORITY", "DESCRIPTION", "VERSION", "VERSION_CODE", "NAME", "ANDROID_MANIFEST", "ANDROID_JAVA_FILES", "RIGHT", "ANDROID_RESOURCES", "ANDROID_APPL_TYPE", "ADMOD_ID", "APPLE_APPLICATION_IOS_ID", "LICENSE", "ANDROID_SIGN", "ADMOD_POSITION"
|
||||
## @param[in] value (string) Value assiciated at the package
|
||||
## @return None
|
||||
##
|
||||
def pkg_set(self, variable, value):
|
||||
def set_pkg(self, variable, value):
|
||||
if "COMPAGNY_TYPE" == variable:
|
||||
# com : Commercial
|
||||
# net : Network??
|
||||
@ -1344,22 +1358,25 @@ class Module:
|
||||
##
|
||||
## @brief set a package config only if the config has not be change
|
||||
## @param[in] self (handle) Class handle
|
||||
## @param[in] variable (string) Variable to set: show @ref pkg_set
|
||||
## @param[in] variable (string) Variable to set: show @ref set_pkg
|
||||
## @param[in] value (string) Value assiciated at the package
|
||||
## @return None
|
||||
##
|
||||
def _pkg_set_if_default(self, variable, value):
|
||||
if self._package_prop_default[variable] == True:
|
||||
self.pkg_set(variable, value)
|
||||
self.set_pkg(variable, value)
|
||||
|
||||
def pkg_add(self, variable, value):
|
||||
debug.warning("[" + self._name + "] DEPRECATED : pkg_add(...) replaced by add_pkg(...)")
|
||||
self.add_pkg(variable, value)
|
||||
##
|
||||
## @brief add an element in tha package property
|
||||
## @param[in] self (handle) Class handle
|
||||
## @param[in] variable (string) Variable to set: show @ref pkg_set
|
||||
## @param[in] variable (string) Variable to set: show @ref set_pkg
|
||||
## @param[in] value (string) Value assiciated at the package
|
||||
## @return None
|
||||
##
|
||||
def pkg_add(self, variable, value):
|
||||
def add_pkg(self, variable, value):
|
||||
if variable in self._package_prop:
|
||||
self._package_prop[variable].append(value)
|
||||
else:
|
||||
|
@ -37,6 +37,41 @@ class System:
|
||||
self._action_on_state={}
|
||||
self._headers=[]
|
||||
self._version=None
|
||||
|
||||
##
|
||||
## @brief Set the help of this system Module
|
||||
## @param[in] self (handle) Class handle
|
||||
## @param[in] help (string) Help for the user
|
||||
## @return None
|
||||
##
|
||||
def set_help(self, help):
|
||||
self._help = help;
|
||||
|
||||
##
|
||||
## @brief Get the help of this system Module
|
||||
## @param[in] self (handle) Class handle
|
||||
## @return (string) Help for the user
|
||||
##
|
||||
def get_help(self):
|
||||
return self._help;
|
||||
|
||||
##
|
||||
## @brief Set validity state of the system Module
|
||||
## @param[in] self (handle) Class handle
|
||||
## @param[in] state (bool) New valididty state of the system module
|
||||
## @return None
|
||||
##
|
||||
def set_valid(self, state):
|
||||
self._valid = state
|
||||
|
||||
##
|
||||
## @brief Get validity state of the system Module
|
||||
## @param[in] self (handle) Class handle
|
||||
## @return (bool) New valididty state of the system module
|
||||
##
|
||||
def get_valid(self):
|
||||
return self._valid
|
||||
|
||||
##
|
||||
## @brief Add source element
|
||||
## @param[in] self (handle) Class handle
|
||||
@ -136,7 +171,7 @@ class System:
|
||||
clip_path=elem["clip"],
|
||||
recursive=elem["recursive"])
|
||||
if self._version != None:
|
||||
module.pkg_set("VERSION", self._version);
|
||||
module.set_pkg("VERSION", self._version);
|
||||
|
||||
|
||||
|
||||
@ -236,7 +271,7 @@ def exist(lib_name, target_name, target) :
|
||||
debug.verbose("SYSTEM: request: " + str(data["name"]))
|
||||
if "System" in dir(the_system):
|
||||
data["system"] = the_system.System(target)
|
||||
data["exist"] = data["system"].valid
|
||||
data["exist"] = data["system"].get_valid()
|
||||
else:
|
||||
debug.warning("Not find: '" + data["name"] + "' ==> get exception")
|
||||
return data["exist"]
|
||||
|
@ -32,16 +32,12 @@ class Target:
|
||||
## @param[in] arch (string) specific parameter for gcc -arch element
|
||||
##
|
||||
def __init__(self, name, config, arch):
|
||||
## configuration of the build
|
||||
self.config = config
|
||||
|
||||
#processor type selection (auto/arm/ppc/x86)
|
||||
self.select_arch = config["arch"]; # TODO : Remove THIS ...
|
||||
#bus size selection (auto/32/64)
|
||||
self.select_bus = config["bus-size"]; # TODO : Remove THIS ...
|
||||
|
||||
if config["bus-size"] == "auto":
|
||||
if self.config["bus-size"] == "auto":
|
||||
debug.error("system error ==> must generate the default 'bus-size' config")
|
||||
if config["arch"] == "auto":
|
||||
if self.config["arch"] == "auto":
|
||||
debug.error("system error ==> must generate the default 'bus-size' config")
|
||||
|
||||
debug.debug("config=" + str(config))
|
||||
@ -50,13 +46,12 @@ class Target:
|
||||
else:
|
||||
self.arch = ""
|
||||
|
||||
# todo : remove this :
|
||||
self.sumulator = config["simulation"]
|
||||
self.name = name
|
||||
self.config_based_on = name
|
||||
self.end_generate_package = config["generate-package"]
|
||||
# todo : remove this :
|
||||
self._name = name
|
||||
self._config_based_on = [name]
|
||||
debug.info("=================================");
|
||||
debug.info("== Target='" + self.name + "' " + config["bus-size"] + " bits for arch '" + config["arch"] + "'");
|
||||
debug.info("== Target='" + self._name + "' " + self.config["bus-size"] + " bits for arch '" + self.config["arch"] + "'");
|
||||
debug.info("=================================");
|
||||
|
||||
self.set_cross_base()
|
||||
@ -70,8 +65,6 @@ class Target:
|
||||
self.global_libs_ld=[]
|
||||
self.global_libs_ld_shared=[]
|
||||
|
||||
self.global_sysroot=""
|
||||
|
||||
self.suffix_cmd_line='.cmd'
|
||||
self.suffix_warning='.warning'
|
||||
self.suffix_dependence='.d'
|
||||
@ -83,19 +76,19 @@ class Target:
|
||||
self.suffix_package='.deb'
|
||||
|
||||
self.path_generate_code="/generate_header"
|
||||
self.path_arch="/" + self.name
|
||||
self.path_arch = "/" + self._name
|
||||
|
||||
self.add_flag("c", [
|
||||
'-D__TARGET_OS__' + self.name,
|
||||
'-D__TARGET_ARCH__' + self.select_arch,
|
||||
'-D__TARGET_ADDR__' + self.select_bus + 'BITS',
|
||||
'-D__TARGET_OS__' + self._name,
|
||||
'-D__TARGET_ARCH__' + self.config["arch"],
|
||||
'-D__TARGET_ADDR__' + self.config["bus-size"] + 'BITS',
|
||||
'-D_REENTRANT'
|
||||
])
|
||||
self.add_flag("c", "-nodefaultlibs")
|
||||
self.add_flag("c++", "-nostdlib")
|
||||
self.add_flag("ar", 'rcs')
|
||||
|
||||
if self.name == "Windows":
|
||||
if self._name == "Windows":
|
||||
self.add_flag("c++", [
|
||||
'-static-libgcc',
|
||||
'-static-libstdc++'
|
||||
@ -179,19 +172,40 @@ class Target:
|
||||
## @return ([string,...]) The current target name and other sub name type (ubuntu ...)
|
||||
##
|
||||
def get_type(self):
|
||||
out = [self.name]
|
||||
if self.name != self.config_based_on:
|
||||
out.append(self.config_based_on)
|
||||
return out
|
||||
return self._config_based_on
|
||||
|
||||
##
|
||||
## @brief Add a type that the model is based on
|
||||
## @param[in] self (handle) Class handle
|
||||
## @param[in] name (string) Name of that the element is based on ...
|
||||
##
|
||||
def add_type(self, name):
|
||||
self._config_based_on.append(name)
|
||||
|
||||
##
|
||||
## @brief Get the name of the target: Linux, Windows, ...
|
||||
## @param[in] self (handle) Class handle
|
||||
## @return (string) Name of the target
|
||||
##
|
||||
def get_name(self):
|
||||
return self._name
|
||||
|
||||
##
|
||||
## @brief Get build mode of the target: ["debug", "release"]
|
||||
## @param[in] self (handle) Class handle
|
||||
## @return The current target build mode.
|
||||
## @return (string) The current target build mode.
|
||||
##
|
||||
def get_mode(self):
|
||||
return self.config["mode"]
|
||||
|
||||
##
|
||||
## @brief Get build for a simulator (Ios and Android for example)
|
||||
## @param[in] self (handle) Class handle
|
||||
## @return (bool) sumulation requested
|
||||
##
|
||||
def get_simulation(self):
|
||||
return self.config["simulation"]
|
||||
|
||||
##
|
||||
## @brief Add global target flags
|
||||
## @param[in] self (handle) Class handle
|
||||
@ -208,7 +222,7 @@ class Target:
|
||||
## @return None
|
||||
##
|
||||
def _update_path_tree(self):
|
||||
self.path_out = os.path.join("out", self.name + "_" + self.config["arch"] + "_" + self.config["bus-size"], self.config["mode"])
|
||||
self.path_out = os.path.join("out", self._name + "_" + self.config["arch"] + "_" + self.config["bus-size"], self.config["mode"])
|
||||
self.path_final = os.path.join("final", self.config["compilator"])
|
||||
self.path_staging = os.path.join("staging", self.config["compilator"])
|
||||
self.path_build = os.path.join("build", self.config["compilator"])
|
||||
@ -561,9 +575,9 @@ class Target:
|
||||
module.load_module(self, name)
|
||||
return True;
|
||||
# need to import the module (or the system module ...)
|
||||
exist = system.exist(name, self.name, self)
|
||||
exist = system.exist(name, self._name, self)
|
||||
if exist == True:
|
||||
system.load(self, name, self.name)
|
||||
system.load(self, name, self._name)
|
||||
return True;
|
||||
# we did not find the module ...
|
||||
return False;
|
||||
@ -610,12 +624,12 @@ class Target:
|
||||
debug.info("build all")
|
||||
self.load_all()
|
||||
for mod in self.module_list:
|
||||
if self.name=="Android":
|
||||
if mod.type == "PACKAGE":
|
||||
if self._name=="Android":
|
||||
if mod.get_type() == "PACKAGE":
|
||||
mod.build(self, None)
|
||||
else:
|
||||
if mod.type == "BINARY" \
|
||||
or mod.type == "PACKAGE":
|
||||
if mod.get_type() == "BINARY" \
|
||||
or mod.get_type() == "PACKAGE":
|
||||
mod.build(self, None)
|
||||
elif name == "clean":
|
||||
debug.info("clean all")
|
||||
|
@ -100,10 +100,6 @@ def link(file, binary, target, depancy, flags, name, basic_path, static = False)
|
||||
cmd.append(target.sysroot)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(target.global_sysroot)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
cmd.append(["-o", file_dst])
|
||||
except:
|
||||
|
@ -97,7 +97,7 @@ def link(file, binary, target, depancy, flags, name, basic_path, static=False):
|
||||
|
||||
cmd.append(["-o", file_dst])
|
||||
try:
|
||||
cmd.append(target.global_sysroot)
|
||||
cmd.append(target.sysroot)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
|
@ -18,9 +18,9 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="ADMOD: Android SDK ad-mod interface (auto-create interface for admod)\n"
|
||||
self.set_help("ADMOD: Android SDK ad-mod interface (auto-create interface for admod)\n")
|
||||
# todo : Check if present ...
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_sources(target.path_sdk + "/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar")
|
||||
self.add_action("PACKAGE", 10, "admod-auto-wrapper", tool_generate_main_java_class)
|
||||
|
@ -18,11 +18,11 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="SDK: Android SDK basic interface java\n"
|
||||
self.set_help("SDK: Android SDK basic interface java")
|
||||
# jar file:
|
||||
jar_file_path=os.path.join(target.path_sdk, "platforms", "android-" + str(target.board_id), "android.jar")
|
||||
# TODO : Check if the android sdk android.jar is present ...
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_sources(jar_file_path)
|
||||
self.add_flag("link-lib", "dl")
|
||||
|
@ -18,6 +18,6 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "C: Generic C library"
|
||||
self.valid = True
|
||||
self.set_help("C: Generic C library")
|
||||
self.set_valid(True)
|
||||
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "CXX: Generic C++ library"
|
||||
self.valid = True
|
||||
self.set_help("CXX: Generic C++ library")
|
||||
self.set_valid(True)
|
||||
if target.config["compilator"] == "clang":
|
||||
if target.board_id < 21:
|
||||
debug.error("Clang work only with the board wersion >= 21 : android 5.x.x")
|
||||
|
@ -18,9 +18,9 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
|
||||
self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic")
|
||||
# No check ==> on the basic std libs:
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "m")
|
||||
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "OpenGL: Generic graphic library"
|
||||
self.valid = True
|
||||
self.set_help("OpenGL: Generic graphic library")
|
||||
self.set_valid(True)
|
||||
# no check needed ==> just add this:
|
||||
self.add_depend([
|
||||
'c',
|
||||
|
@ -18,14 +18,14 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev"
|
||||
self.set_help("pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev")
|
||||
# check if the library exist:
|
||||
"""
|
||||
if not os.path.isfile("/usr/include/pthread.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
"""
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
#self.add_flag("link-lib", "pthread")
|
||||
self.add_depend([
|
||||
|
@ -17,12 +17,12 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="Z : z library \n Can be install with the package:\n - zlib1g-dev"
|
||||
self.set_help("Z : z library \n Can be install with the package:\n - zlib1g-dev")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/zlib.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "z")
|
||||
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="CoreAudio : Ios interface for audio (all time present, just system interface)"
|
||||
self.valid = True
|
||||
self.set_help("CoreAudio : Ios interface for audio (all time present, just system interface)")
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link", "-framework CoreAudio")
|
||||
self.add_flag("link", "-framework AudioToolbox")
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "CXX: Generic C++ library"
|
||||
self.valid = True
|
||||
self.set_help("CXX: Generic C++ library")
|
||||
self.set_valid(True)
|
||||
# no check needed ==> just add this:
|
||||
self.add_flag("c++", "-D__STDCPP_LLVM__")
|
||||
self.add_flag("c++-remove", "-nostdlib")
|
||||
|
@ -18,9 +18,9 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
|
||||
self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic")
|
||||
# No check ==> on the basic std libs:
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "m")
|
||||
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "X11: Basic interface of Linux Graphic interface"
|
||||
self.valid = True
|
||||
self.set_help("X11: Basic interface of Linux Graphic interface")
|
||||
self.set_valid(True)
|
||||
# no check needed ==> just add this:
|
||||
self.add_depend(['c'])
|
||||
self.add_flag('link-lib', 'X11')
|
||||
|
@ -18,13 +18,13 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="ALSA : Advanced Linux Sound Architecture\n Can be install with the package:\n - libasound2-dev"
|
||||
self.set_help("ALSA : Advanced Linux Sound Architecture\n Can be install with the package:\n - libasound2-dev")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/alsa/asoundlib.h") \
|
||||
and not os.path.isfile("/usr/include/dssi/alsa/asoundlib.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
if env.get_isolate_system() == False:
|
||||
self.add_flag("link-lib", "asound")
|
||||
else:
|
||||
|
@ -18,13 +18,13 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="rpc : generic RPC library (developed by oracle)"
|
||||
self.set_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
|
||||
self.set_valid(True)
|
||||
if env.get_isolate_system() == True:
|
||||
#self.add_flag("link-lib", "xns")
|
||||
self.add_header_file([
|
||||
|
@ -18,12 +18,12 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="BOOST : Boost interface (need when we have not all c++ feature\n Can be install with the package:\n - libboost-all-dev"
|
||||
self.set_help("BOOST : Boost interface (need when we have not all c++ feature\n Can be install with the package:\n - libboost-all-dev")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/boost/chrono.hpp"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
if env.get_isolate_system() == False:
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", [
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "C: Generic C library"
|
||||
self.valid = True
|
||||
self.set_help("C: Generic C library")
|
||||
self.set_valid(True)
|
||||
if env.get_isolate_system() == False:
|
||||
# We must have it ... all time
|
||||
pass
|
||||
|
@ -19,8 +19,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "CXX: Generic C++ library"
|
||||
self.valid = True
|
||||
self.set_help("CXX: Generic C++ library")
|
||||
self.set_valid(True)
|
||||
# no check needed ==> just add this:
|
||||
self.add_depend([
|
||||
'c',
|
||||
|
@ -18,12 +18,12 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="JACK : Jack Low-Latency Audio Server\n Can be install with the package:\n - libjack-jackd2-dev (new)\n - libjack-dev (old)"
|
||||
self.set_help("JACK : Jack Low-Latency Audio Server\n Can be install with the package:\n - libjack-jackd2-dev (new)\n - libjack-dev (old)")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/jack/jack.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
self.add_depend([
|
||||
'uuid',
|
||||
'c'
|
||||
|
@ -18,9 +18,9 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
|
||||
self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic")
|
||||
# No check ==> on the basic std libs:
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "m")
|
||||
self.add_depend([
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "OpenGL: Generic graphic library"
|
||||
self.valid = True
|
||||
self.set_help("OpenGL: Generic graphic library")
|
||||
self.set_valid(True)
|
||||
# no check needed ==> just add this:
|
||||
self.add_depend([
|
||||
'c',
|
||||
|
@ -18,13 +18,13 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="OSS : Linux Open Sound System\n Can be install with the package:\n - ... TODO ..."
|
||||
self.set_help("OSS : Linux Open Sound System\n Can be install with the package:\n - ... TODO ...")
|
||||
# check if the library exist:
|
||||
"""
|
||||
if not os.path.isfile("/usr/include/jack/jack.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "oss")
|
||||
"""
|
||||
|
@ -18,12 +18,12 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev"
|
||||
self.set_help("pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/pthread.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "pthread")
|
||||
self.add_depend([
|
||||
|
@ -18,7 +18,7 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="PULSE : The Linux PulseAudio\n Can be install with the package:\n - libpulse-dev"
|
||||
self.set_help("PULSE : The Linux PulseAudio\n Can be install with the package:\n - libpulse-dev")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/pulse/pulseaudio.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
@ -38,7 +38,7 @@ class System(system.System):
|
||||
debug.warning("Can not det version of Pulseaudio ... ==> remove it")
|
||||
return
|
||||
self.set_version([int(version),int(version2)])
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
self.add_depend([
|
||||
'c'
|
||||
])
|
||||
|
@ -18,9 +18,9 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="rpc : generic RPC library (developed by oracle)"
|
||||
self.set_help("rpc : generic RPC library (developed by oracle)")
|
||||
# No check ==> on the basic std libs:
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
self.add_depend([
|
||||
'c'
|
||||
])
|
||||
|
@ -18,12 +18,12 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="uuid: Unique ID library"
|
||||
self.set_help("uuid: Unique ID library")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/uuid/uuid.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
self.add_depend([
|
||||
'c'
|
||||
])
|
||||
|
@ -18,12 +18,12 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="Z : z library \n Can be install with the package:\n - zlib1g-dev"
|
||||
self.set_help("Z : z library \n Can be install with the package:\n - zlib1g-dev")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/include/zlib.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "z")
|
||||
self.add_depend([
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="CoreAudio : MacOs interface for audio (all time present, just system interface)"
|
||||
self.valid = True
|
||||
self.set_help("CoreAudio : MacOs interface for audio (all time present, just system interface)")
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link", "-framework CoreAudio")
|
||||
self.add_flag("link", "-framework CoreFoundation")
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "CXX: Generic C++ library"
|
||||
self.valid = True
|
||||
self.set_help("CXX: Generic C++ library")
|
||||
self.set_valid(True)
|
||||
# no check needed ==> just add this:
|
||||
self.add_flag("c++","-D__STDCPP_LLVM__")
|
||||
self.add_flag("c++-remove","-nostdlib")
|
||||
|
@ -18,9 +18,9 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
|
||||
self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic")
|
||||
# No check ==> on the basic std libs:
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "m")
|
||||
|
||||
|
@ -18,8 +18,8 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help = "CXX: Generic C++ library"
|
||||
self.valid = True
|
||||
self.set_help("CXX: Generic C++ library")
|
||||
self.set_valid(True)
|
||||
# no check needed ==> just add this:
|
||||
self.add_flag("c++","-D__STDCPP_GNU__")
|
||||
self.add_flag("c++-remove","-nostdlib")
|
||||
|
@ -18,12 +18,12 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="DirectSound : Direct sound API for windows audio interface"
|
||||
self.set_help("DirectSound : Direct sound API for windows audio interface")
|
||||
# check if the library exist:
|
||||
if not os.path.isfile("/usr/i686-w64-mingw32/include/dsound.h"):
|
||||
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||
return;
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib",[
|
||||
"dsound",
|
||||
|
@ -18,9 +18,9 @@ class System(system.System):
|
||||
def __init__(self, target):
|
||||
system.System.__init__(self)
|
||||
# create some HELP:
|
||||
self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic"
|
||||
self.set_help("M : m library \n base of std libs (availlagle in GNU C lib and bionic")
|
||||
# No check ==> on the basic std libs:
|
||||
self.valid = True
|
||||
self.set_valid(True)
|
||||
# todo : create a searcher of the presence of the library:
|
||||
self.add_flag("link-lib", "m")
|
||||
|
||||
|
@ -151,7 +151,7 @@ class Target(target.Target):
|
||||
elif self.type_arch == "x86":
|
||||
pass
|
||||
|
||||
self.global_sysroot = "--sysroot=" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-arm")
|
||||
self.sysroot = "--sysroot=" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-arm")
|
||||
|
||||
self.add_flag("c", [
|
||||
"-D__ARM_ARCH_5__",
|
||||
@ -207,12 +207,6 @@ class Target(target.Target):
|
||||
"-Wa,--noexecstack"
|
||||
])
|
||||
|
||||
def check_right_package(self, pkg_properties, value):
|
||||
for val in pkg_properties["RIGHT"]:
|
||||
if value == val:
|
||||
return True
|
||||
return False
|
||||
|
||||
def convert_name_application(self, pkg_name):
|
||||
value = pkg_name.lower()
|
||||
value = value.replace(' ', '')
|
||||
|
Loading…
Reference in New Issue
Block a user