summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-08-14 12:18:58 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-08-14 12:18:58 +0200
commit47ba3ba77f0a108450c5536daf77271125953966 (patch)
tree867abd596176015303d79c670728d1f52db22503
parent76ca709e69bf386a9e011fae588fe3f5d09b834c (diff)
add support for PKG_LIBC_DEPENDS to pkgmaker
-rw-r--r--package/bcm2835-vc/Makefile1
-rw-r--r--tools/adk/pkgmaker.c24
2 files changed, 24 insertions, 1 deletions
diff --git a/package/bcm2835-vc/Makefile b/package/bcm2835-vc/Makefile
index bf78120a8..8df9cb6bb 100644
--- a/package/bcm2835-vc/Makefile
+++ b/package/bcm2835-vc/Makefile
@@ -11,6 +11,7 @@ PKG_DESCR:= vc tools for raspberry pi (bcm2835)
PKG_SECTION:= base
PKG_SITES:= http://openadk.org/distfiles/
+PKG_LIBC_DEPENDS:= eglibc glibc
PKG_SYSTEM_DEPENDS:= raspberry-pi
PKG_SUBPKGS:= BCM2835_VC BCM2835_VC_DEV
diff --git a/tools/adk/pkgmaker.c b/tools/adk/pkgmaker.c
index 77bc0d648..e83c581a8 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;