treewide: move all perl packages into its own folder

This makes it in sync with Python packages.
Python packages has its own place in /lang/python
Perl does not, so this fixes it.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
This commit is contained in:
Josef Schlehofer
2025-06-17 22:43:38 +02:00
parent 04b7b67e75
commit e9f4aa38ef
97 changed files with 48 additions and 48 deletions

View 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.46
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://www.cpan.org/authors/id/T/TO/TODDR/
PKG_SOURCE:=XML-Parser-$(PKG_VERSION).tar.gz
PKG_HASH:=d331332491c51cccfb4cb94ffc44f9cd73378e618498d4a37df9e043661c515d
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
PKG_LICENSE:=GPL-1.0-or-later Artistic-1.0-Perl
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_LIBPATH:=$(STAGING_DIR)/usr/lib
EXPAT_INCPATH:=$(STAGING_DIR)/usr/include
HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOSTPKG)/lib
HOST_EXPAT_INCPATH:=$(STAGING_DIR_HOSTPKG)/include
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include ../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))

File diff suppressed because it is too large Load Diff

View File

@@ -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 = ();

View File

@@ -0,0 +1,11 @@
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -65,7 +65,7 @@ Expat_Not_Installed;
# exiting before Makefile generation silences CPANTesters reports
# when expat is not available.
- exit 0;
+# exit 0;
}
if ( not $expat_libpath and $] >= 5.006001 and $^O ne 'MSWin32' ) {