perl: add host variant
authorFrancois Perrad <fperrad@gmail.com>
Sat, 11 Oct 2014 06:36:43 +0000 (08:36 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 17 Oct 2014 12:17:48 +0000 (14:17 +0200)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/perl/perl.mk

index 1816a9e2bf19483d1353647ea4e64eab6329e138..16a8d68dd2f80ef91f7c2564ac07eba7cff063cc 100644 (file)
@@ -126,7 +126,25 @@ endef
 
 PERL_POST_INSTALL_STAGING_HOOKS += PERL_ADD_CORE_H
 
+HOST_PERL_CONF_OPTS = \
+       -des \
+       -Dprefix="$(HOST_DIR)/usr" \
+       -Dcc="$(HOSTCC)"
+
+define HOST_PERL_CONFIGURE_CMDS
+       (cd $(@D); HOSTCC='$(HOSTCC_NOCACHE)' ./Configure $(HOST_PERL_CONF_OPTS))
+endef
+
+define HOST_PERL_BUILD_CMDS
+       $(MAKE) -C $(@D)
+endef
+
+define HOST_PERL_INSTALL_CMDS
+       $(MAKE) -C $(@D) INSTALL_DEPENDENCE='' install
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))
 
 define PERL_FINALIZE_TARGET
        rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod