Browse Source

lang/perl: Clean up, add comments

Signed-off-by: Marcel Denia <naoir@gmx.net>
lilik-openwrt-22.03
Marcel Denia 10 years ago
parent
commit
2bc4222ffb
2 changed files with 16 additions and 8 deletions
  1. +11
    -7
      lang/perl/Makefile
  2. +5
    -1
      lang/perl/perlmod.mk

+ 11
- 7
lang/perl/Makefile View File

@ -26,20 +26,23 @@ PKG_LICENSE:=GPLv1 ARTISTIC
PKG_LICENSE_FILES:=Copying Artistic README
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
# Build settings
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
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
# Variables used during configuration/build
HOST_PERL_PREFIX:=$(STAGING_DIR_HOST)/usr
ifneq ($(CONFIG_USE_EGLIBC),)
EXTRA_LIBS:=bsd
EXTRA_LIBDIRS:=$(STAGING_DIR)/lib
EXTRA_LIBS:=bsd
EXTRA_LIBDIRS:=$(STAGING_DIR)/lib
endif
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/perl
SUBMENU:=Perl
SECTION:=lang
@ -55,17 +58,17 @@ define Package/perl/description
and is widely used to program web applications of all needs.
endef
HOST_PERL_PREFIX:=$(STAGING_DIR_HOST)/usr
# Static host perl
define Host/Configure
( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Dprefix=$(HOST_PERL_PREFIX) )
endef
define Host/Install
( cd $(HOST_BUILD_DIR); ./miniperl installperl )
#--destdir=$(STAGING_DIR_HOST)
$(CP) $(HOST_BUILD_DIR)/generate_uudmap $(HOST_PERL_PREFIX)/bin/
endef
# Target perl
define Build/Configure
sed \
-e 's!%%CC%%!$(TARGET_CC)!g' \
@ -97,6 +100,7 @@ define Package/perl/install
ln -nsf perl$(PKG_VERSION) $(1)/usr/bin/perl
endef
$(eval $(call RequireCommand,rsync, \
$(PKG_NAME) requires rsync installed on the host-system. \
))


+ 5
- 1
lang/perl/perlmod.mk View File

@ -3,6 +3,10 @@
# Build environment
HOST_PERL_PREFIX:=$(STAGING_DIR_HOST)/usr
ifneq ($(CONFIG_USE_EGLIBC),)
EXTRA_LIBS:=bsd
EXTRA_LIBDIRS:=$(STAGING_DIR)/lib
endif
PERL_CMD:=$(STAGING_DIR_HOST)/usr/bin/perl5.20.0
# Module install prefix
@ -24,7 +28,7 @@ define perlmod/Configure
FULL_AR=$(GNU_TARGET_NAME)-ar \
LD=$(GNU_TARGET_NAME)-gcc \
LDDLFLAGS="-shared $(TARGET_LDFLAGS)" \
LDFLAGS=" " \
LDFLAGS="$(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%) " \
LIBC=" " \
LIB_EXT=.a \
OBJ_EXT=.o \


Loading…
Cancel
Save