summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-08-14 10:18:58 (GMT)
committerWaldemar Brodkorb <wbx@openadk.org>2013-08-14 10:18:58 (GMT)
commit47ba3ba77f0a108450c5536daf77271125953966 (patch)
tree867abd596176015303d79c670728d1f52db22503 /tools
parent76ca709e69bf386a9e011fae588fe3f5d09b834c (diff)
add support for PKG_LIBC_DEPENDS to pkgmaker
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 77bc0d6..e83c581 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_system_depends, *pkg_arch_depends, *pkg_flavours, *pkg_flavours_string, *pkg_choices, *pseudo_name;
+ char *pkg_libc_depends, *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;
@@ -289,6 +289,7 @@ int main() {
pkg_arch_depends = NULL;
pkg_system_depends = NULL;
pkg_host_depends = NULL;
+ pkg_libc_depends = NULL;
pkg_cxx = NULL;
pkg_dflt = NULL;
pkg_cfline = NULL;
@@ -394,6 +395,8 @@ int main() {
snprintf(variable, MAXVAR, "PKG_DFLT_%s", pkg_name_u);
if ((parse_var(buf, variable, NULL, &pkg_dflt)) == 0)
continue;
+ if ((parse_var(buf, "PKG_LIBC_DEPENDS", NULL, &pkg_libc_depends)) == 0)
+ continue;
if ((parse_var(buf, "PKG_HOST_DEPENDS", NULL, &pkg_host_depends)) == 0)
continue;
if ((parse_var(buf, "PKG_ARCH_DEPENDS", NULL, &pkg_arch_depends)) == 0)
@@ -647,6 +650,23 @@ int main() {
fprintf(cfg, "\n");
}
+ /* create package libc dependency information */
+ if (pkg_libc_depends != NULL) {
+ token = strtok(pkg_libc_depends, " ");
+ fprintf(cfg, "\tdepends on ");
+ sp = "";
+ while (token != NULL) {
+ if(strncmp(token, "!", 1) == 0) {
+ fprintf(cfg, "%s!ADK_TARGET_LIB_%s", sp, toupperstr(token));
+ sp = " && ";
+ } else {
+ fprintf(cfg, "%sADK_TARGET_LIB_%s", sp, toupperstr(token));
+ sp = " || ";
+ }
+ token = strtok(NULL, " ");
+ }
+ fprintf(cfg, "\n");
+ }
/* create package target architecture dependency information */
if (pkg_arch_depends != NULL) {
token = strtok(pkg_arch_depends, " ");
@@ -902,6 +922,7 @@ int main() {
free(pkg_arch_depends);
free(pkg_system_depends);
free(pkg_host_depends);
+ free(pkg_libc_depends);
free(pkg_cxx);
free(pkg_dflt);
free(pkg_cfline);
@@ -918,6 +939,7 @@ int main() {
pkg_arch_depends = NULL;
pkg_system_depends = NULL;
pkg_host_depends = NULL;
+ pkg_libc_depends = NULL;
pkg_cxx = NULL;
pkg_dflt = NULL;
pkg_cfline = NULL;