ICU-20774 Add option to icupkg to allow missing deps between resource files.
diff --git a/icu4c/source/tools/icupkg/icupkg.cpp b/icu4c/source/tools/icupkg/icupkg.cpp
index ea7be4a..3970794 100644
--- a/icu4c/source/tools/icupkg/icupkg.cpp
+++ b/icu4c/source/tools/icupkg/icupkg.cpp
@@ -59,6 +59,7 @@
             "%csage: %s [-h|-?|--help ] [-tl|-tb|-te] [-c] [-C comment]\n"
             "\t[-a list] [-r list] [-x list] [-l [-o outputListFileName]]\n"
             "\t[-s path] [-d path] [-w] [-m mode]\n"
+            "\t[--ignore-deps]\n"
             "\t[--auto_toc_prefix] [--auto_toc_prefix_with_type] [--toc_prefix]\n"
             "\tinfilename [outfilename]\n",
             isHelp ? 'U' : 'u', pname);
@@ -121,6 +122,10 @@
             "\t        noslash: the '*' wildcard does not match the '/' tree separator\n");
         fprintf(where,
             "\n"
+            "\t--ignore-deps     Do not fail if not all resource dependencies are met. Use this\n"
+            "\t                  option if the missing resources come from another source.");
+        fprintf(where,
+            "\n"
             "\tIn the .dat package, the Table of Contents (ToC) contains an entry\n"
             "\tfor each item of the form prefix/tree/itemname .\n"
             "\tThe prefix normally matches the package basename, and icupkg checks that,\n"
@@ -198,6 +203,8 @@
 
     UOPTION_DEF("matchmode", 'm', UOPT_REQUIRES_ARG),
 
+    UOPTION_DEF("ignore-deps", '\1', UOPT_NO_ARG),
+
     UOPTION_DEF("add", 'a', UOPT_REQUIRES_ARG),
     UOPTION_DEF("remove", 'r', UOPT_REQUIRES_ARG),
     UOPTION_DEF("extract", 'x', UOPT_REQUIRES_ARG),
@@ -225,6 +232,8 @@
 
     OPT_MATCHMODE,
 
+    OPT_IGNORE_DEPS,
+
     OPT_ADD_LIST,
     OPT_REMOVE_LIST,
     OPT_EXTRACT_LIST,
@@ -501,7 +510,7 @@
     }
 
     /* check dependencies between items */
-    if(!pkg->checkDependencies()) {
+    if(!options[OPT_IGNORE_DEPS].doesOccur && !pkg->checkDependencies()) {
         /* some dependencies are not fulfilled */
         return U_MISSING_RESOURCE_ERROR;
     }