perl: Add perlmod host rules
authorMarcel Denia <redacted>
Sat, 2 Aug 2014 21:23:41 +0000 (23:23 +0200)
committerMarcel Denia <redacted>
Thu, 14 Aug 2014 15:14:22 +0000 (17:14 +0200)
Signed-off-by: Marcel Denia <redacted>
lang/perl/perlmod.mk

index 05bcc5e74371c2e45ef30701170104de0d7dfc11..3c3d56720a63a6c53e7bacbcbd9c3b80432d1f13 100644 (file)
@@ -12,6 +12,37 @@ PERL_CMD:=$(STAGING_DIR_HOST)/usr/bin/perl5.20.0
 # Module install prefix
 PERL_SITELIB:=/usr/lib/perl5/5.20
 
+define perlmod/host/relink
+       rm -f $(1)/Makefile.aperl
+       $(MAKE) -C $(1) perl
+       $(CP) $(1)/perl $(PERL_CMD)
+       $(CP) $(1)/perl $(STAGING_DIR_HOST)/usr/bin/perl
+endef
+
+define perlmod/host/Configure
+       (cd $(HOST_BUILD_DIR); \
+       PERL_MM_USE_DEFAULT=1 \
+       $(2) \
+       $(PERL_CMD) Makefile.PL \
+               $(1) \
+       );
+endef
+
+define perlmod/host/Compile
+       $(2) \
+       $(MAKE) -C $(HOST_BUILD_DIR) \
+               $(1) \
+               install
+endef
+
+define perlmod/host/Install
+       $(2) \
+       $(MAKE) -C $(HOST_BUILD_DIR) \
+               $(1) \
+               install
+       $(call perlmod/host/relink,$(HOST_BUILD_DIR))
+endef
+
 define perlmod/Configure
        (cd $(PKG_BUILD_DIR); \
        PERL_MM_USE_DEFAULT=1 \
git clone https://git.99rst.org/PROJECT