summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-08-05 18:11:43 (GMT)
committerWaldemar Brodkorb <wbx@openadk.org>2011-08-05 18:11:43 (GMT)
commit233b75f916c1fdece62bec8a75e7de66afebbe02 (patch)
tree6f74f496e6438c9e3bee809e00252c5790fa3d51 /tools
parent328d2dfe246388350da364b3faab846ae4c4b4ec (diff)
add support for target system depends for packages
Diffstat (limited to 'tools')
-rw-r--r--tools/adk/pkgmaker.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/tools/adk/pkgmaker.c b/tools/adk/pkgmaker.c
index 7b79bfb..77bc0d6 100644
--- a/tools/adk/pkgmaker.c
+++ b/tools/adk/pkgmaker.c
@@ -271,7 +271,7 @@ int main() {
char *pkg_name, *pkg_depends, *pkg_section, *pkg_descr, *pkg_url;
char *pkg_cxx, *pkg_subpkgs, *pkg_cfline, *pkg_dflt, *pkg_multi;
char *pkg_need_cxx, *pkg_need_java, *pkgname;
- char *pkg_host_depends, *pkg_arch_depends, *pkg_flavours, *pkg_flavours_string, *pkg_choices, *pseudo_name;
+ char *pkg_host_depends, *pkg_system_depends, *pkg_arch_depends, *pkg_flavours, *pkg_flavours_string, *pkg_choices, *pseudo_name;
char *packages, *pkg_name_u, *pkgs;
char *saveptr, *p_ptr, *s_ptr;
int result;
@@ -287,6 +287,7 @@ int main() {
pkg_choices = NULL;
pkg_subpkgs = NULL;
pkg_arch_depends = NULL;
+ pkg_system_depends = NULL;
pkg_host_depends = NULL;
pkg_cxx = NULL;
pkg_dflt = NULL;
@@ -397,6 +398,8 @@ int main() {
continue;
if ((parse_var(buf, "PKG_ARCH_DEPENDS", NULL, &pkg_arch_depends)) == 0)
continue;
+ if ((parse_var(buf, "PKG_SYSTEM_DEPENDS", NULL, &pkg_system_depends)) == 0)
+ continue;
if ((parse_var(buf, "PKG_DESCR", NULL, &pkg_descr)) == 0)
continue;
if ((parse_var(buf, "PKG_SECTION", NULL, &pkg_section)) == 0)
@@ -609,6 +612,23 @@ int main() {
}
memset(hkey, 0, MAXVAR);
+ /* create package target system dependency information */
+ if (pkg_system_depends != NULL) {
+ token = strtok(pkg_system_depends, " ");
+ fprintf(cfg, "\tdepends on ");
+ sp = "";
+ while (token != NULL) {
+ if(strncmp(token, "!", 1) == 0) {
+ fprintf(cfg, "%s!ADK_TARGET_SYSTEM%s", sp, toupperstr(token));
+ sp = " && ";
+ } else {
+ fprintf(cfg, "%sADK_TARGET_SYSTEM_%s", sp, toupperstr(token));
+ sp = " || ";
+ }
+ token = strtok(NULL, " ");
+ }
+ fprintf(cfg, "\n");
+ }
/* create package host dependency information */
if (pkg_host_depends != NULL) {
token = strtok(pkg_host_depends, " ");
@@ -880,6 +900,7 @@ int main() {
free(pkg_choices);
free(pkg_subpkgs);
free(pkg_arch_depends);
+ free(pkg_system_depends);
free(pkg_host_depends);
free(pkg_cxx);
free(pkg_dflt);
@@ -895,6 +916,7 @@ int main() {
pkg_choices = NULL;
pkg_subpkgs = NULL;
pkg_arch_depends = NULL;
+ pkg_system_depends = NULL;
pkg_host_depends = NULL;
pkg_cxx = NULL;
pkg_dflt = NULL;