perl-xml-parser: New package
Signed-off-by: Marcel Denia <naoir@gmx.net>
This commit is contained in:
parent
6a5d2a5b96
commit
e87bfa90a9
3 changed files with 7574 additions and 0 deletions
86
lang/perl-xml-parser/Makefile
Normal file
86
lang/perl-xml-parser/Makefile
Normal file
|
@ -0,0 +1,86 @@
|
|||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=perl-xml-parser
|
||||
PKG_VERSION:=2.44
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TO/TODDR/
|
||||
PKG_SOURCE:=XML-Parser-$(PKG_VERSION).tar.gz
|
||||
PKG_MD5SUM:=af4813fe3952362451201ced6fbce379
|
||||
|
||||
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
||||
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/XML-Parser-$(PKG_VERSION)
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/XML-Parser-$(PKG_VERSION)
|
||||
|
||||
HOST_BUILD_DEPENDS:=perl/host expat/host
|
||||
|
||||
EXPAT_LIBPATH:=$(STAGING_DIR)/usr/lib
|
||||
EXPAT_INCPATH=$(STAGING_DIR)/usr/include
|
||||
HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOST)/lib
|
||||
HOST_EXPAT_INCPATH=$(STAGING_DIR_HOST)/include
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include ../perl/perlmod.mk
|
||||
|
||||
define Package/perl-xml-parser
|
||||
SUBMENU:=Perl
|
||||
SECTION:=lang
|
||||
CATEGORY:=Languages
|
||||
TITLE:=Perl XML Parser
|
||||
URL:=http://search.cpan.org/dist/XML-Parser/
|
||||
DEPENDS:=perl +libexpat +perlbase-dynaloader +perlbase-essential
|
||||
endef
|
||||
|
||||
define FixupExpat
|
||||
# Manually reconfigure XML::Parser::Expat, as some overrides we provide will not have any effect otherwise
|
||||
# Force usage of OpenWRT's expat
|
||||
sed \
|
||||
-e 's!%%EXPAT_LIBPATH%%!$(2)!g' \
|
||||
-e 's!%%EXPAT_INCPATH%%!$(3)!g' \
|
||||
-i $(1)/Expat/Makefile.PL
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call perlmod/Configure,EXPATLIBPATH=$(EXPAT_LIBPATH) EXPATINCPATH=$(EXPAT_INCPATH),,)
|
||||
|
||||
$(call FixupExpat,$(PKG_BUILD_DIR),$(EXPAT_LIBPATH),$(EXPAT_INCPATH))
|
||||
$(call perlmod/Configure,,,$(PKG_BUILD_DIR)/Expat)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call perlmod/Compile,,)
|
||||
$(call perlmod/Compile,,,$(PKG_BUILD_DIR)/Expat)
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
$(call perlmod/host/Configure,EXPATLIBPATH=$(HOST_EXPAT_LIBPATH) EXPATINCPATH=$(HOST_EXPAT_INCPATH),,)
|
||||
$(call FixupExpat,$(HOST_BUILD_DIR),$(HOST_EXPAT_LIBPATH),$(HOST_EXPAT_INCPATH))
|
||||
$(call perlmod/host/Configure,,,$(HOST_BUILD_DIR)/Expat)
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(call perlmod/host/Compile,,)
|
||||
$(call perlmod/host/Compile,,,$(HOST_BUILD_DIR)/Expat)
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(call perlmod/host/Install,$(1),)
|
||||
endef
|
||||
|
||||
define Package/perl-xml-parser/install
|
||||
$(call perlmod/Install,$(1),auto/XML XML)
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,perl-xml-parser))
|
||||
$(eval $(call HostBuild))
|
7476
lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h
Normal file
7476
lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,12 @@
|
|||
--- a/Expat/Makefile.PL
|
||||
+++ b/Expat/Makefile.PL
|
||||
@@ -2,6 +2,9 @@ use ExtUtils::MakeMaker;
|
||||
use Config;
|
||||
use English;
|
||||
|
||||
+$expat_libpath = '%%EXPAT_LIBPATH%%';
|
||||
+$expat_incpath = '%%EXPAT_INCPATH%%';
|
||||
+
|
||||
my $libs = "-lexpat";
|
||||
my @extras = ();
|
||||
|
Loading…
Reference in a new issue