[DEV/API] update API to use a mximum of accessor instead of variable, some deprecation

This commit is contained in:
Edouard DUPIN 2016-09-08 22:56:16 +02:00
parent 40d2e8eac1
commit 604078f1c0
38 changed files with 173 additions and 117 deletions

View File

@ -753,7 +753,7 @@ class Module:
or self._type == 'BINARY_SHARED' \ or self._type == 'BINARY_SHARED' \
or self._type == 'BINARY_STAND_ALONE': or self._type == 'BINARY_STAND_ALONE':
shared_mode = False shared_mode = False
if target.name == "Android": if "Android" in target.get_type():
debug.warning("Android mode ...") debug.warning("Android mode ...")
# special case for android ... # special case for android ...
for elem in self._sub_heritage_list.src['src']: for elem in self._sub_heritage_list.src['src']:
@ -809,7 +809,7 @@ class Module:
except ValueError: except ValueError:
debug.error(" UN-SUPPORTED link format: '.bin'") debug.error(" UN-SUPPORTED link format: '.bin'")
elif self._type == "PACKAGE": elif self._type == "PACKAGE":
if target.name == "Android": if "Android" in target.get_type():
# special case for android wrapper: # special case for android wrapper:
try: try:
tmp_builder = builder.get_builder_with_output("so"); tmp_builder = builder.get_builder_with_output("so");
@ -879,7 +879,7 @@ class Module:
or self._type == 'PACKAGE': or self._type == 'PACKAGE':
if target.end_generate_package == True: if target.end_generate_package == True:
# generate the package with his properties ... # 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) 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) target.make_package(self._name, self._package_prop, os.path.join(self._origin_path, ".."), self._sub_heritage_list)
else: else:
@ -1260,13 +1260,27 @@ class Module:
self._print_list('export path "' + str(element) + '" ' + str(len(value)), value) 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 ## @brief Set packaging variables
## @param[in] self (handle) Class handle ## @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] 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 ## @param[in] value (string) Value assiciated at the package
## @return None ## @return None
## ##
def pkg_set(self, variable, value): def set_pkg(self, variable, value):
if "COMPAGNY_TYPE" == variable: if "COMPAGNY_TYPE" == variable:
# com : Commercial # com : Commercial
# net : Network?? # net : Network??
@ -1344,22 +1358,25 @@ class Module:
## ##
## @brief set a package config only if the config has not be change ## @brief set a package config only if the config has not be change
## @param[in] self (handle) Class handle ## @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 ## @param[in] value (string) Value assiciated at the package
## @return None ## @return None
## ##
def _pkg_set_if_default(self, variable, value): def _pkg_set_if_default(self, variable, value):
if self._package_prop_default[variable] == True: 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 ## @brief add an element in tha package property
## @param[in] self (handle) Class handle ## @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 ## @param[in] value (string) Value assiciated at the package
## @return None ## @return None
## ##
def pkg_add(self, variable, value): def add_pkg(self, variable, value):
if variable in self._package_prop: if variable in self._package_prop:
self._package_prop[variable].append(value) self._package_prop[variable].append(value)
else: else:

View File

@ -37,6 +37,41 @@ class System:
self._action_on_state={} self._action_on_state={}
self._headers=[] self._headers=[]
self._version=None 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 ## @brief Add source element
## @param[in] self (handle) Class handle ## @param[in] self (handle) Class handle
@ -136,7 +171,7 @@ class System:
clip_path=elem["clip"], clip_path=elem["clip"],
recursive=elem["recursive"]) recursive=elem["recursive"])
if self._version != None: 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"])) debug.verbose("SYSTEM: request: " + str(data["name"]))
if "System" in dir(the_system): if "System" in dir(the_system):
data["system"] = the_system.System(target) data["system"] = the_system.System(target)
data["exist"] = data["system"].valid data["exist"] = data["system"].get_valid()
else: else:
debug.warning("Not find: '" + data["name"] + "' ==> get exception") debug.warning("Not find: '" + data["name"] + "' ==> get exception")
return data["exist"] return data["exist"]

View File

@ -32,16 +32,12 @@ class Target:
## @param[in] arch (string) specific parameter for gcc -arch element ## @param[in] arch (string) specific parameter for gcc -arch element
## ##
def __init__(self, name, config, arch): def __init__(self, name, config, arch):
## configuration of the build
self.config = config self.config = config
#processor type selection (auto/arm/ppc/x86) if self.config["bus-size"] == "auto":
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":
debug.error("system error ==> must generate the default 'bus-size' config") 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.error("system error ==> must generate the default 'bus-size' config")
debug.debug("config=" + str(config)) debug.debug("config=" + str(config))
@ -50,13 +46,12 @@ class Target:
else: else:
self.arch = "" self.arch = ""
# todo : remove this :
self.sumulator = config["simulation"]
self.name = name
self.config_based_on = name
self.end_generate_package = config["generate-package"] self.end_generate_package = config["generate-package"]
# todo : remove this :
self._name = name
self._config_based_on = [name]
debug.info("================================="); 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("================================="); debug.info("=================================");
self.set_cross_base() self.set_cross_base()
@ -70,8 +65,6 @@ class Target:
self.global_libs_ld=[] self.global_libs_ld=[]
self.global_libs_ld_shared=[] self.global_libs_ld_shared=[]
self.global_sysroot=""
self.suffix_cmd_line='.cmd' self.suffix_cmd_line='.cmd'
self.suffix_warning='.warning' self.suffix_warning='.warning'
self.suffix_dependence='.d' self.suffix_dependence='.d'
@ -83,19 +76,19 @@ class Target:
self.suffix_package='.deb' self.suffix_package='.deb'
self.path_generate_code="/generate_header" self.path_generate_code="/generate_header"
self.path_arch="/" + self.name self.path_arch = "/" + self._name
self.add_flag("c", [ self.add_flag("c", [
'-D__TARGET_OS__' + self.name, '-D__TARGET_OS__' + self._name,
'-D__TARGET_ARCH__' + self.select_arch, '-D__TARGET_ARCH__' + self.config["arch"],
'-D__TARGET_ADDR__' + self.select_bus + 'BITS', '-D__TARGET_ADDR__' + self.config["bus-size"] + 'BITS',
'-D_REENTRANT' '-D_REENTRANT'
]) ])
self.add_flag("c", "-nodefaultlibs") self.add_flag("c", "-nodefaultlibs")
self.add_flag("c++", "-nostdlib") self.add_flag("c++", "-nostdlib")
self.add_flag("ar", 'rcs') self.add_flag("ar", 'rcs')
if self.name == "Windows": if self._name == "Windows":
self.add_flag("c++", [ self.add_flag("c++", [
'-static-libgcc', '-static-libgcc',
'-static-libstdc++' '-static-libstdc++'
@ -179,19 +172,40 @@ class Target:
## @return ([string,...]) The current target name and other sub name type (ubuntu ...) ## @return ([string,...]) The current target name and other sub name type (ubuntu ...)
## ##
def get_type(self): def get_type(self):
out = [self.name] return self._config_based_on
if self.name != self.config_based_on:
out.append(self.config_based_on) ##
return out ## @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"] ## @brief Get build mode of the target: ["debug", "release"]
## @param[in] self (handle) Class handle ## @param[in] self (handle) Class handle
## @return The current target build mode. ## @return (string) The current target build mode.
## ##
def get_mode(self): def get_mode(self):
return self.config["mode"] 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 ## @brief Add global target flags
## @param[in] self (handle) Class handle ## @param[in] self (handle) Class handle
@ -208,7 +222,7 @@ class Target:
## @return None ## @return None
## ##
def _update_path_tree(self): 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_final = os.path.join("final", self.config["compilator"])
self.path_staging = os.path.join("staging", self.config["compilator"]) self.path_staging = os.path.join("staging", self.config["compilator"])
self.path_build = os.path.join("build", self.config["compilator"]) self.path_build = os.path.join("build", self.config["compilator"])
@ -561,9 +575,9 @@ class Target:
module.load_module(self, name) module.load_module(self, name)
return True; return True;
# need to import the module (or the system module ...) # 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: if exist == True:
system.load(self, name, self.name) system.load(self, name, self._name)
return True; return True;
# we did not find the module ... # we did not find the module ...
return False; return False;
@ -610,12 +624,12 @@ class Target:
debug.info("build all") debug.info("build all")
self.load_all() self.load_all()
for mod in self.module_list: for mod in self.module_list:
if self.name=="Android": if self._name=="Android":
if mod.type == "PACKAGE": if mod.get_type() == "PACKAGE":
mod.build(self, None) mod.build(self, None)
else: else:
if mod.type == "BINARY" \ if mod.get_type() == "BINARY" \
or mod.type == "PACKAGE": or mod.get_type() == "PACKAGE":
mod.build(self, None) mod.build(self, None)
elif name == "clean": elif name == "clean":
debug.info("clean all") debug.info("clean all")

View File

@ -100,10 +100,6 @@ def link(file, binary, target, depancy, flags, name, basic_path, static = False)
cmd.append(target.sysroot) cmd.append(target.sysroot)
except: except:
pass pass
try:
cmd.append(target.global_sysroot)
except:
pass
try: try:
cmd.append(["-o", file_dst]) cmd.append(["-o", file_dst])
except: except:

View File

@ -97,7 +97,7 @@ def link(file, binary, target, depancy, flags, name, basic_path, static=False):
cmd.append(["-o", file_dst]) cmd.append(["-o", file_dst])
try: try:
cmd.append(target.global_sysroot) cmd.append(target.sysroot)
except: except:
pass pass
try: try:

View File

@ -18,9 +18,9 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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 ... # todo : Check if present ...
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # 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_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) self.add_action("PACKAGE", 10, "admod-auto-wrapper", tool_generate_main_java_class)

View File

@ -18,11 +18,11 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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:
jar_file_path=os.path.join(target.path_sdk, "platforms", "android-" + str(target.board_id), "android.jar") 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 ... # 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: # todo : create a searcher of the presence of the library:
self.add_sources(jar_file_path) self.add_sources(jar_file_path)
self.add_flag("link-lib", "dl") self.add_flag("link-lib", "dl")

View File

@ -18,6 +18,6 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "C: Generic C library" self.set_help("C: Generic C library")
self.valid = True self.set_valid(True)

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "CXX: Generic C++ library" self.set_help("CXX: Generic C++ library")
self.valid = True self.set_valid(True)
if target.config["compilator"] == "clang": if target.config["compilator"] == "clang":
if target.board_id < 21: if target.board_id < 21:
debug.error("Clang work only with the board wersion >= 21 : android 5.x.x") debug.error("Clang work only with the board wersion >= 21 : android 5.x.x")

View File

@ -18,9 +18,9 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # No check ==> on the basic std libs:
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "m") self.add_flag("link-lib", "m")

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "OpenGL: Generic graphic library" self.set_help("OpenGL: Generic graphic library")
self.valid = True self.set_valid(True)
# no check needed ==> just add this: # no check needed ==> just add this:
self.add_depend([ self.add_depend([
'c', 'c',

View File

@ -18,14 +18,14 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
""" """
if not os.path.isfile("/usr/include/pthread.h"): if not os.path.isfile("/usr/include/pthread.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
""" """
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
#self.add_flag("link-lib", "pthread") #self.add_flag("link-lib", "pthread")
self.add_depend([ self.add_depend([

View File

@ -17,12 +17,12 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/zlib.h"): if not os.path.isfile("/usr/include/zlib.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "z") self.add_flag("link-lib", "z")

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help="CoreAudio : Ios interface for audio (all time present, just system interface)" self.set_help("CoreAudio : Ios interface for audio (all time present, just system interface)")
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link", "-framework CoreAudio") self.add_flag("link", "-framework CoreAudio")
self.add_flag("link", "-framework AudioToolbox") self.add_flag("link", "-framework AudioToolbox")

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "CXX: Generic C++ library" self.set_help("CXX: Generic C++ library")
self.valid = True self.set_valid(True)
# no check needed ==> just add this: # no check needed ==> just add this:
self.add_flag("c++", "-D__STDCPP_LLVM__") self.add_flag("c++", "-D__STDCPP_LLVM__")
self.add_flag("c++-remove", "-nostdlib") self.add_flag("c++-remove", "-nostdlib")

View File

@ -18,9 +18,9 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # No check ==> on the basic std libs:
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "m") self.add_flag("link-lib", "m")

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "X11: Basic interface of Linux Graphic interface" self.set_help("X11: Basic interface of Linux Graphic interface")
self.valid = True self.set_valid(True)
# no check needed ==> just add this: # no check needed ==> just add this:
self.add_depend(['c']) self.add_depend(['c'])
self.add_flag('link-lib', 'X11') self.add_flag('link-lib', 'X11')

View File

@ -18,13 +18,13 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/alsa/asoundlib.h") \ if not os.path.isfile("/usr/include/alsa/asoundlib.h") \
and not os.path.isfile("/usr/include/dssi/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) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
if env.get_isolate_system() == False: if env.get_isolate_system() == False:
self.add_flag("link-lib", "asound") self.add_flag("link-lib", "asound")
else: else:

View File

@ -18,13 +18,13 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/arpa/ftp.h"): if not os.path.isfile("/usr/include/arpa/ftp.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
# No check ==> on the basic std libs: # No check ==> on the basic std libs:
self.valid = True self.set_valid(True)
if env.get_isolate_system() == True: if env.get_isolate_system() == True:
#self.add_flag("link-lib", "xns") #self.add_flag("link-lib", "xns")
self.add_header_file([ self.add_header_file([

View File

@ -18,12 +18,12 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/boost/chrono.hpp"): if not os.path.isfile("/usr/include/boost/chrono.hpp"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
if env.get_isolate_system() == False: if env.get_isolate_system() == False:
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", [ self.add_flag("link-lib", [

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "C: Generic C library" self.set_help("C: Generic C library")
self.valid = True self.set_valid(True)
if env.get_isolate_system() == False: if env.get_isolate_system() == False:
# We must have it ... all time # We must have it ... all time
pass pass

View File

@ -19,8 +19,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "CXX: Generic C++ library" self.set_help("CXX: Generic C++ library")
self.valid = True self.set_valid(True)
# no check needed ==> just add this: # no check needed ==> just add this:
self.add_depend([ self.add_depend([
'c', 'c',

View File

@ -18,12 +18,12 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/jack/jack.h"): if not os.path.isfile("/usr/include/jack/jack.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
self.add_depend([ self.add_depend([
'uuid', 'uuid',
'c' 'c'

View File

@ -18,9 +18,9 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # No check ==> on the basic std libs:
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "m") self.add_flag("link-lib", "m")
self.add_depend([ self.add_depend([

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "OpenGL: Generic graphic library" self.set_help("OpenGL: Generic graphic library")
self.valid = True self.set_valid(True)
# no check needed ==> just add this: # no check needed ==> just add this:
self.add_depend([ self.add_depend([
'c', 'c',

View File

@ -18,13 +18,13 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
""" """
if not os.path.isfile("/usr/include/jack/jack.h"): if not os.path.isfile("/usr/include/jack/jack.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "oss") self.add_flag("link-lib", "oss")
""" """

View File

@ -18,12 +18,12 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/pthread.h"): if not os.path.isfile("/usr/include/pthread.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "pthread") self.add_flag("link-lib", "pthread")
self.add_depend([ self.add_depend([

View File

@ -18,7 +18,7 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/pulse/pulseaudio.h"): if not os.path.isfile("/usr/include/pulse/pulseaudio.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # 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") debug.warning("Can not det version of Pulseaudio ... ==> remove it")
return return
self.set_version([int(version),int(version2)]) self.set_version([int(version),int(version2)])
self.valid = True self.set_valid(True)
self.add_depend([ self.add_depend([
'c' 'c'
]) ])

View File

@ -18,9 +18,9 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # No check ==> on the basic std libs:
self.valid = True self.set_valid(True)
self.add_depend([ self.add_depend([
'c' 'c'
]) ])

View File

@ -18,12 +18,12 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help="uuid: Unique ID library" self.set_help("uuid: Unique ID library")
# check if the library exist: # check if the library exist:
if not os.path.isfile("/usr/include/uuid/uuid.h"): if not os.path.isfile("/usr/include/uuid/uuid.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
self.add_depend([ self.add_depend([
'c' 'c'
]) ])

View File

@ -18,12 +18,12 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/include/zlib.h"): if not os.path.isfile("/usr/include/zlib.h"):
# we did not find the library reqiested (just return) (automaticly set at false) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "z") self.add_flag("link-lib", "z")
self.add_depend([ self.add_depend([

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help="CoreAudio : MacOs interface for audio (all time present, just system interface)" self.set_help("CoreAudio : MacOs interface for audio (all time present, just system interface)")
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link", "-framework CoreAudio") self.add_flag("link", "-framework CoreAudio")
self.add_flag("link", "-framework CoreFoundation") self.add_flag("link", "-framework CoreFoundation")

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "CXX: Generic C++ library" self.set_help("CXX: Generic C++ library")
self.valid = True self.set_valid(True)
# no check needed ==> just add this: # no check needed ==> just add this:
self.add_flag("c++","-D__STDCPP_LLVM__") self.add_flag("c++","-D__STDCPP_LLVM__")
self.add_flag("c++-remove","-nostdlib") self.add_flag("c++-remove","-nostdlib")

View File

@ -18,9 +18,9 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # No check ==> on the basic std libs:
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "m") self.add_flag("link-lib", "m")

View File

@ -18,8 +18,8 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # create some HELP:
self.help = "CXX: Generic C++ library" self.set_help("CXX: Generic C++ library")
self.valid = True self.set_valid(True)
# no check needed ==> just add this: # no check needed ==> just add this:
self.add_flag("c++","-D__STDCPP_GNU__") self.add_flag("c++","-D__STDCPP_GNU__")
self.add_flag("c++-remove","-nostdlib") self.add_flag("c++-remove","-nostdlib")

View File

@ -18,12 +18,12 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # check if the library exist:
if not os.path.isfile("/usr/i686-w64-mingw32/include/dsound.h"): 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) # we did not find the library reqiested (just return) (automaticly set at false)
return; return;
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib",[ self.add_flag("link-lib",[
"dsound", "dsound",

View File

@ -18,9 +18,9 @@ class System(system.System):
def __init__(self, target): def __init__(self, target):
system.System.__init__(self) system.System.__init__(self)
# create some HELP: # 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: # No check ==> on the basic std libs:
self.valid = True self.set_valid(True)
# todo : create a searcher of the presence of the library: # todo : create a searcher of the presence of the library:
self.add_flag("link-lib", "m") self.add_flag("link-lib", "m")

View File

@ -151,7 +151,7 @@ class Target(target.Target):
elif self.type_arch == "x86": elif self.type_arch == "x86":
pass 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", [ self.add_flag("c", [
"-D__ARM_ARCH_5__", "-D__ARM_ARCH_5__",
@ -207,12 +207,6 @@ class Target(target.Target):
"-Wa,--noexecstack" "-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): def convert_name_application(self, pkg_name):
value = pkg_name.lower() value = pkg_name.lower()
value = value.replace(' ', '') value = value.replace(' ', '')