Browse Source

perl-inline-c: New package

Signed-off-by: Marcel Denia <naoir@gmx.net>
lilik-openwrt-22.03
Marcel Denia 9 years ago
parent
commit
13292808a3
3 changed files with 122 additions and 0 deletions
  1. +65
    -0
      lang/perl-inline-c/Makefile
  2. +11
    -0
      lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch
  3. +46
    -0
      lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch

+ 65
- 0
lang/perl-inline-c/Makefile View File

@ -0,0 +1,65 @@
#
# 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-inline-c
PKG_VERSION:=0.76
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY
PKG_SOURCE:=Inline-C-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=c0fbfdd058075c9271a1384c822c9a87
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-C-$(PKG_VERSION)
HOST_BUILD_DEPENDS:=perl/host perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host
PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-C-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include ../perl/perlmod.mk
define Package/perl-inline-c
SUBMENU:=Perl
SECTION:=lang
CATEGORY:=Languages
TITLE:=C Language Support for Inline
URL:=http://search.cpan.org/dist/Inline-C/
DEPENDS:=perl +perl-inline +perl-parse-recdescent +perlbase-config +perlbase-cwd +perlbase-data +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-if
endef
define Host/Configure
$(call perlmod/host/Configure,,,)
endef
define Host/Compile
$(call perlmod/host/Compile,,)
endef
define Host/Install
$(call perlmod/host/Install,$(1),)
endef
define Build/Configure
$(call perlmod/Configure,,)
endef
define Build/Compile
$(call perlmod/Compile,,)
endef
define Package/perl-inline-c/install
$(call perlmod/Install,$(1),Inline auto/Inline)
endef
$(eval $(call BuildPackage,perl-inline-c))
$(eval $(call HostBuild))

+ 11
- 0
lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch View File

@ -0,0 +1,11 @@
--- a/lib/Inline/C.pm
+++ b/lib/Inline/C.pm
@@ -361,7 +361,7 @@ sub build {
$o->call('write_XS', 'Build Glue 1');
$o->call('write_Inline_headers', 'Build Glue 2');
$o->call('write_Makefile_PL', 'Build Glue 3');
- $o->call('compile', 'Build Compile');
+ $o->call('compile', 'Build Compile') unless $ENV{'_INLINE_C_NO_COMPILE_'};
if (IS_WIN32) {
$lockfh->release or die "releasemutex $file: $^E";
}

+ 46
- 0
lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch View File

@ -0,0 +1,46 @@
--- a/lib/Inline/C.pm
+++ b/lib/Inline/C.pm
@@ -438,22 +438,28 @@ sub get_maps {
print STDERR "get_maps Stage\n" if $o->{CONFIG}{BUILD_NOISY};
my $typemap = '';
my $file;
- $file = File::Spec->catfile(
- $Config::Config{installprivlib},
- "ExtUtils",
- "typemap",
- );
- $typemap = $file if -f $file;
- $file = File::Spec->catfile(
- $Config::Config{privlibexp}
- ,"ExtUtils","typemap"
- );
- $typemap = $file
- if (not $typemap and -f $file);
- warn "Can't find the default system typemap file"
- if (not $typemap and $^W);
+
+ unless ($ENV{'_INLINE_C_SYSTEM_TYPEMAP_'}) {
+ $file = File::Spec->catfile(
+ $Config::Config{installprivlib},
+ "ExtUtils",
+ "typemap",
+ );
+ $typemap = $file if -f $file;
+ $file = File::Spec->catfile(
+ $Config::Config{privlibexp}
+ ,"ExtUtils","typemap"
+ );
+ $typemap = $file
+ if (not $typemap and -f $file);
+ warn "Can't find the default system typemap file"
+ if (not $typemap and $^W);
- unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap;
+ unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap;
+ }
+ else {
+ unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $ENV{'_INLINE_C_SYSTEM_TYPEMAP_'});
+ }
if (not $o->UNTAINT) {
require FindBin;

Loading…
Cancel
Save