@ -27,15 +27,20 @@ PKG_LICENSE_FILES:=Copying Artistic README
PKG_MAINTAINER := Marcel Denia <naoir@gmx.net>
PKG_BUILD_DIR := $( BUILD_DIR) /perl/$( PKG_NAME) -$( PKG_VERSION)
PKG_INSTALL := 1
PKG_BUILD_DEPENDS := perl/host
PKG_BUILD_PARALLEL := 1
HOST_BUILD_PARALLEL := 1
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / h o s t - b u i l d . m k
i f n e q ( $( CONFIG_USE_EGLIBC ) , )
EXTRA_LIBS := bsd
EXTRA_LIBDIRS := $( STAGING_DIR) /lib
e n d i f
d e f i n e P a c k a g e / p e r l / D e f a u l t
d e f i n e P a c k a g e / p e r l
SUBMENU:= Perl
SECTION:= lang
CATEGORY:= Languages
@ -44,75 +49,24 @@ define Package/perl/Default
DEPENDS:= +USE_EGLIBC:libbsd
e n d e f
d e f i n e P a c k a g e / m i c r o p e r l
$( call Package /perl /Default )
TITLE += ( minimal version)
e n d e f
d e f i n e P a c k a g e / m i c r o p e r l / d e s c r i p t i o n
A perl package without operating-specific functions such as readdir.
e n d e f
d e f i n e B u i l d / T e m p l a t e
$(STAMP_CONFIGURED)-$(1) : $( STAMP_PREPARED )
-$( MAKE) -C $( PKG_BUILD_DIR) clean
$( call Build/$( 1) /Configure)
touch $$ @
$(STAMP_BUILT)-$(1) : $( STAMP_CONFIGURED ) -$( 1)
$( call Build/$( 1) /Compile)
touch $$ @
$(STAMP_BUILT) : $( STAMP_BUILT ) -$( 1)
e n d e f
d e f i n e B u i l d / m i c r o p e r l / C o n f i g u r e
e n d e f
d e f i n e B u i l d / m i c r o p e r l / C o m p i l e
+$( MAKE) $( MAKE_J) -C $( PKG_BUILD_DIR) -f Makefile.micro \
CC = "gcc" ugenerate_uudmap
+$( MAKE) $( MAKE_J) -C $( PKG_BUILD_DIR) -f Makefile.micro \
CC = " $( TARGET_CC) " OPTIMIZE = " $( TARGET_CFLAGS) "
$( INSTALL_DIR) $( PKG_INSTALL_DIR) /usr/bin/
$( CP) $( PKG_BUILD_DIR) /microperl $( PKG_INSTALL_DIR) /usr/bin/
e n d e f
d e f i n e P a c k a g e / m i c r o p e r l / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/bin
$( INSTALL_BIN) $( PKG_BUILD_DIR) /microperl $( 1) /usr/bin/
e n d e f
i n c l u d e p e r l m o d . m k
d e f i n e P a c k a g e / p e r l
$( call Package /perl /Default )
e n d e f
d e f i n e P a c k a g e / p e r l / d e s c r i p t i o n
Perl is a stable, cross platform programming language.
It is used for mission critical projects in the public and private sectors
and is widely used to program web applications of all needs.
e n d e f
d e f i n e B u i l d / p e r l / C o n f i g u r e
@echo
@echo "===> Stage 1: Configure host perl"
@echo
mkdir -p $( PKG_BUILD_DIR) /host-perl
( cd $( PKG_BUILD_DIR) /host-perl && sh ../Configure -der -Dmksymlinks -Uusedl -Dotherlibdirs= $( PERL_LIB) )
@echo
@echo "===> Stage 2: Build host perl binary with static extensions"
@echo
+$( MAKE) $( MAKE_J) -C $( PKG_BUILD_DIR) /host-perl miniperl
@echo
@echo "===> Stage 3: Configure target perl"
@echo
-$( MAKE) -C $( PKG_BUILD_DIR) clean
HOST_PERL_DIR := $( STAGING_DIR_HOST) /usr
d e f i n e H o s t / C o n f i g u r e
( cd $( HOST_BUILD_DIR) ; ./Configure -der -Uusedl -Dprefix= $( HOST_PERL_DIR) )
e n d e f
d e f i n e H o s t / I n s t a l l
( cd $( HOST_BUILD_DIR) ; ./miniperl installperl )
#--destdir=$(STAGING_DIR_HOST)
$( CP) $( HOST_BUILD_DIR) /generate_uudmap $( HOST_PERL_DIR) /bin/
e n d e f
d e f i n e B u i l d / C o n f i g u r e
sed \
-e 's!%%CC%%!$(TARGET_CC)!g' \
-e 's!%%CFLAGS%%!$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)!g' \
@ -125,37 +79,16 @@ define Build/perl/Configure
-e 's!%%EXTRA_PERLLIBS%%!$(EXTRA_LIBS:%=-l%)!g' \
-e 's!%%EXTRA_PERLLIBDIRS%%!$(EXTRA_LIBDIRS:%=-L%)!g' \
-e 's!%%IPV6%%!$(if $($(CONFIG_IPV6)),define,undef)!g' \
-e 's!%%HOSTMINIPERL%%!$(PKG_BUILD_DIR)/host-perl/mini perl!g' \
-e 's!%%HOSTGENERATE%%!$(PKG_BUILD_DIR)/host-perl /generate_uudmap!g' \
-e 's!%%HOSTMINIPERL%%!$(HOST_PERL_DIR)/bin/ perl!g' \
-e 's!%%HOSTGENERATE%%!$(HOST_PERL_DIR)/bin /generate_uudmap!g' \
files/config.sh-$( patsubst i386,i486,$( ARCH) ) .in \
> $( PKG_BUILD_DIR) /config.sh
( cd $( PKG_BUILD_DIR) && ./Configure -S)
install -m 0644 $( PKG_BUILD_DIR) /config.h $( PKG_BUILD_DIR) /xconfig.h
e n d e f
d e f i n e B u i l d / p e r l / C o m p i l e
@echo
@echo "===> Stage 4: Build target perl binary"
@echo
install -m 0644 $( PKG_BUILD_DIR) /config.h $( PKG_BUILD_DIR) /xconfig.h
+$( MAKE) $( MAKE_J) -C $( PKG_BUILD_DIR) perl
mkdir -p $( PKG_BUILD_DIR) /target-bin
install -m 0755 $( PKG_BUILD_DIR) /perl $( PKG_BUILD_DIR) /target-bin/
@echo
@echo "===> Stage 5: Build target extensions and utils"
@echo
+$( MAKE) $( MAKE_J) -C $( PKG_BUILD_DIR)
@echo
@echo "===> Stage 6: Install Perl into staging dir"
@echo
( cd $( PKG_BUILD_DIR) && ./miniperl installperl --destdir= $( STAGING_DIR) )
@echo
@echo "===> Stage 7: Install Perl into a temporary root"
@echo
mkdir -p $( PKG_INSTALL_DIR)
( cd $( PKG_BUILD_DIR) && ./miniperl installperl --destdir= $( PKG_INSTALL_DIR) )
d e f i n e B u i l d / C o m p i l e
+$( MAKE) $( PKG_JOBS) -C $( PKG_BUILD_DIR)
e n d e f
d e f i n e P a c k a g e / p e r l / i n s t a l l
@ -164,31 +97,12 @@ define Package/perl/install
ln -nsf perl$( PKG_VERSION) $( 1) /usr/bin/perl
e n d e f
i f n e q ( $( CONFIG_PACKAGE_microperl ) , )
d e f i n e B u i l d / m i c r o p e r l
$( call Build/Template,microperl)
e n d e f
e n d i f
$( eval $ ( Build /microperl ) )
i f n e q ( $( CONFIG_PACKAGE_perl ) , )
d e f i n e B u i l d / p e r l
$( call Build/Template,perl)
e n d e f
e n d i f
$( eval $ ( Build /perl ) )
d e f i n e B u i l d / C o n f i g u r e
e n d e f
d e f i n e B u i l d / C o m p i l e
e n d e f
$( eval $ ( call RequireCommand ,rsync , \
$( PKG_NAME) requires rsync installed on the host-system. \
) )
$( eval $ ( call BuildPackage ,microperl ) )
$( eval $ ( call BuildPackage ,perl ) )
$( eval $ ( call HostBuild ) )
i n c l u d e p e r l m o d . m k
- i n c l u d e p e r l b a s e . m k