summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-08-05 20:11:43 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-08-05 20:11:43 +0200
commit233b75f916c1fdece62bec8a75e7de66afebbe02 (patch)
tree6f74f496e6438c9e3bee809e00252c5790fa3d51
parent328d2dfe246388350da364b3faab846ae4c4b4ec (diff)
add support for target system depends for packages
-rw-r--r--mk/build.mk6
-rw-r--r--package/firefox/Makefile1
-rw-r--r--tools/adk/pkgmaker.c24
3 files changed, 27 insertions, 4 deletions
diff --git a/mk/build.mk b/mk/build.mk
index 78c858f17..f788012ef 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -14,7 +14,7 @@ DEFCONFIG= ADK_DEBUG=n \
ADK_STATIC=n \
ADK_LOCALES=n \
ADK_MAKE_PARALLEL=y \
- ADK_MAKE_JOBS=1 \
+ ADK_MAKE_JOBS=4 \
ADK_USE_CCACHE=n \
ADK_PACKAGE_ALSA_UTILS_WITH_ALSAMIXER=n \
ADK_PACKAGE_GRUB=n \
@@ -555,11 +555,11 @@ bulkallmod:
echo === building $$arch $$system $$libc on $$(date); \
$(GMAKE) prereq && \
$(GMAKE) ARCH=$$arch SYSTEM=$$system LIBC=$$libc FS=archive allmodconfig; \
- $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then touch .exit;fi; \
+ $(GMAKE) VERBOSE=1 all; if [ $$? -ne 0 ]; then echo $$system >.exit; exit 1;fi; \
rm .config; \
) 2>&1 | tee $(TOPDIR)/bin/$${system}_$${arch}_$$libc/build.log; \
done; \
- if [ -f .exit ];then echo "Bulk build failed!"; rm .exit; exit 1;fi \
+ if [ -f .exit ];then echo "Bulk build failed!"; cat .exit;rm .exit; exit 1;fi \
done <${TOPDIR}/target/arch.lst ;\
done
diff --git a/package/firefox/Makefile b/package/firefox/Makefile
index eb6e1255d..0682bc824 100644
--- a/package/firefox/Makefile
+++ b/package/firefox/Makefile
@@ -21,6 +21,7 @@ PKG_NEED_CXX:= 1
PKG_ARCH_DEPENDS:= x86 x86_64 native
PKG_HOST_DEPENDS:= !netbsd !freebsd !openbsd !cygwin
+PKG_SYSTEM_DEPENDS:= ibm-x40
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.source.tar.bz2
WRKDIST= ${WRKDIR}/mozilla-release
diff --git a/tools/adk/pkgmaker.c b/tools/adk/pkgmaker.c
index 7b79bfb72..77bc0d648 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;