diff options
-rwxr-xr-x | bin/ptxdist | 5 | ||||
-rw-r--r-- | rules/post/ptxd_make_world_get.make | 10 | ||||
-rw-r--r-- | rules/project-name.in | 9 | ||||
-rw-r--r-- | scripts/lib/ptxd_lib_dgen.awk | 7 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_get.sh | 12 |
5 files changed, 38 insertions, 5 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index f9cbdeca8..663c41e4d 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -1789,6 +1789,11 @@ EOF fi exit ;; + getdev) + check_premake && + ptxd_make_log getdev + exit + ;; go|images) do_${cmd} exit diff --git a/rules/post/ptxd_make_world_get.make b/rules/post/ptxd_make_world_get.make index 20926d1bf..cbfa3ea5e 100644 --- a/rules/post/ptxd_make_world_get.make +++ b/rules/post/ptxd_make_world_get.make @@ -26,6 +26,11 @@ $(SRCDIR)/%: @$(call targetinfo) @$(call get, $($@)) +ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR)),) +$(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/%-dev.tar.gz: + @$(call targetinfo) + @$(call getdev, $@) +endif $(STATEDIR)/%.get: @$(call targetinfo) @@ -60,4 +65,9 @@ get = \ check_src = \ ptxd_make_check_src "$($(strip $(1))_SOURCE)" "$($(strip $(1))_MD5)" +getdev = \ + ptxd_make_get_nofail=y \ + ptxd_make_get_mirror=$(PTXCONF_PROJECT_DEVMIRROR) \ + ptxd_make_get "$(strip $(1))" "$(call remove_quotes, $(PTXCONF_PROJECT_DEVMIRROR))/$(notdir $(1))" + # vim: syntax=make diff --git a/rules/project-name.in b/rules/project-name.in index ce57364a6..d8bdf9259 100644 --- a/rules/project-name.in +++ b/rules/project-name.in @@ -192,4 +192,13 @@ config PROJECT_DEVPKGDIR This entry defines the path to a directory where pre-build archives are expected. +config PROJECT_DEVMIRROR + string + prompt "Mirror for pre-build archives" + depends on PROJECT_USE_DEVPKGS + help + Enter a URL where *-dev.tar.gz packages can be downloaded + Use: ptxdist getdev + + endmenu diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk index 9bfae53ed..863dda4d0 100644 --- a/scripts/lib/ptxd_lib_dgen.awk +++ b/scripts/lib/ptxd_lib_dgen.awk @@ -241,6 +241,13 @@ function write_deps_pkg_all(this_PKG, this_pkg) { # .get rule # print "$(STATEDIR)/" this_pkg ".get: $(" this_PKG "_SOURCES)" > DGEN_DEPS_POST; + print "ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVMIRROR)),)" > DGEN_DEPS_POST; + print "ifneq ($($(" this_PKG "_DEVPKG)),NO)" > DGEN_DEPS_POST; + print "ifneq ($(" this_PKG "_CFGHASH),)" > DGEN_DEPS_POST; + print "getdev: $(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/$(" this_PKG "_DEVPKG)" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; + print "endif" > DGEN_DEPS_POST; } function write_deps_pkg_active(this_PKG, this_pkg, prefix) { diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh index d8f3236ec..a33aca3cc 100644 --- a/scripts/lib/ptxd_make_get.sh +++ b/scripts/lib/ptxd_make_get.sh @@ -371,10 +371,12 @@ ptxd_make_get() { esac done - echo - echo "Could not download package" - echo "URL: ${orig_argv[@]}" - echo - exit 1 + if [ "${ptxd_make_get_nofail}" != "y" ]; then + echo + echo "Could not download package" + echo "URL: ${orig_argv[@]}" + echo + exit 1 + fi } export -f ptxd_make_get |