| | |
| | | INSTALL_NO_ARCH = $(PERL_VERSIONS:%=$(BUILD_DIR)/$(MACH)-%/.installed) |
| | | |
| | | COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV) |
| | | # Avoid interactive behaviour for Module::AutoInstall |
| | | COMPONENT_CONFIGURE_ENV += PERL_AUTOINSTALL=--skipdeps |
| | | COMPONENT_CONFIGURE_ENV += PERL="$(PERL)" |
| | | $(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep |
| | | ($(RM) -r $(@D) ; $(MKDIR) $(@D)) |
| | |
| | | endif |
| | | |
| | | # test the built source |
| | | $(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built |
| | | $(BUILD_DIR)/%/.tested-and-compared: $(COMPONENT_TEST_DEP) |
| | | $(RM) -rf $(COMPONENT_TEST_BUILD_DIR) |
| | | $(MKDIR) $(COMPONENT_TEST_BUILD_DIR) |
| | | $(COMPONENT_PRE_TEST_ACTION) |
| | |
| | | $(TOUCH) $@ |
| | | |
| | | $(BUILD_DIR)/%/.tested: SHELLOPTS=pipefail |
| | | $(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built |
| | | $(BUILD_DIR)/%/.tested: $(COMPONENT_TEST_DEP) |
| | | $(RM) -rf $(COMPONENT_TEST_BUILD_DIR) |
| | | $(MKDIR) $(COMPONENT_TEST_BUILD_DIR) |
| | | $(COMPONENT_PRE_TEST_ACTION) |
| | |
| | | echo " pkg.debug.depend.path=usr/perl5/\$$(PERLVER)/bin" ; \ |
| | | echo "" ; \ |
| | | echo "\# Automatically generated dependencies based on distribution metadata" ; \ |
| | | $(CAT) $(BUILD_DIR)/META.depend-runtime.res | $(PKGFMT) \ |
| | | $(CAT) $(BUILD_DIR)/META.depend-runtime.res $(MANGLE_DEPEND_RUNTIME) | $(PKGFMT) \ |
| | | ) |
| | | |
| | | # Add build dependencies from metadata to REQUIRED_PACKAGES. |
| | |
| | | # Generate list of TEST_REQUIRED_PACKAGES entries |
| | | REQUIRED_PACKAGES_EXTRA_DEPS += $(BUILD_DIR)/META.depend-test.required |
| | | $(BUILD_DIR)/META.depend-test.required: $(BUILD_DIR)/META.depend-test.res |
| | | $(GSED) -e 's|^depend.*pkg:/\(library/perl-5/.*\)-\$$(PLV).*$$|TEST_REQUIRED_PACKAGES.perl += \1|' < $< > $@ |
| | | $(GSED) -e 's|^depend.*pkg:/\(library/perl-5/.*\)-\$$(PLV).*$$|TEST_REQUIRED_PACKAGES.perl += \1|' \ |
| | | -e '/^TEST_REQUIRED_PACKAGES\.perl/!s/.*/\# TODO: &/' < $< > $@ |
| | | |
| | | # Add META.depend-test.required to the generated list of REQUIRED_PACKAGES |
| | | REQUIRED_PACKAGES_TRANSFORM += -e '$$r $(BUILD_DIR)/META.depend-test.required' |
| | |
| | | | $(PYTHON) -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' \ |
| | | | $(JQ) '{prereqs:{configure:{requires:.configure_requires},build:{requires:.build_requires},runtime:{requires}}}' ; \ |
| | | fi > $@ ; \ |
| | | else \ |
| | | $(TOUCH) $@ ; \ |
| | | fi |
| | | fi ; \ |
| | | $(TOUCH) $@ |
| | | |
| | | $(BUILD_DIR)/%/.depend-build: $(BUILD_DIR)/%/MYMETA.json |
| | | $(WS_TOOLS)/perl-meta-deps $(WS_MACH) $(BUILD_DIR) build $(PERL_VERSION) < $< > $@ |
| | | $(WS_TOOLS)/perl-meta-deps $(WS_MACH) $(BUILD_DIR) configure build $(PERL_VERSION) < $< > $@ |
| | | # Get configure requirements from META.json/META.yml too |
| | | if [ -e $(@D)/META.json ] ; then \ |
| | | $(CAT) $(@D)/META.json ; \ |
| | | elif [ -e $(@D)/META.yml ] ; then \ |
| | | $(CAT) $(@D)/META.yml \ |
| | | | $(PYTHON) -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' \ |
| | | | $(JQ) '{prereqs:{configure:{requires:.configure_requires},build:{requires:.build_requires},runtime:{requires}}}' ; \ |
| | | fi | $(WS_TOOLS)/perl-meta-deps $(WS_MACH) $(BUILD_DIR) configure $(PERL_VERSION) >> $@ ; \ |
| | | $(TOUCH) $@ |
| | | $(BUILD_DIR)/%/.depend-runtime: $(BUILD_DIR)/%/MYMETA.json |
| | | $(WS_TOOLS)/perl-meta-deps $(WS_MACH) $(BUILD_DIR) runtime $(PERL_VERSION) < $< > $@ |
| | | $(BUILD_DIR)/%/.depend-test: $(BUILD_DIR)/%/MYMETA.json |
| | | $(WS_TOOLS)/perl-meta-deps $(WS_MACH) $(BUILD_DIR) test $(PERL_VERSION) < $< > $@ |
| | | $(WS_TOOLS)/perl-meta-deps $(WS_MACH) $(BUILD_DIR) test runtime suggests $(PERL_VERSION) < $< >> $@ |
| | | |
| | | $(BUILD_DIR)/META.depend-build.res: $(BUILD_$(MK_BITS):%.built=%.depend-build) |
| | | $(CAT) $^ | $(SORT) -u > $@ |
| | |
| | | $(BUILD_DIR)/META.depend-test.res: $(BUILD_$(MK_BITS):%.built=%.depend-test) |
| | | $(CAT) $^ | $(SORT) -u > $@ |
| | | |
| | | # jq is needed for perl-meta-deps and to convert META.yml to MYMETA.json |
| | | # jq is needed for perl-meta-deps and to convert META.yml to JSON format |
| | | USERLAND_REQUIRED_PACKAGES += text/jq |
| | | # pyyaml is needed to convert META.yml to MYMETA.json |
| | | USERLAND_REQUIRED_PACKAGES += library/python/pyyaml |