perl: define $sysroot for extensions
authorAlexander Ryzhov <redacted>
Thu, 26 Sep 2019 12:51:13 +0000 (15:51 +0300)
committerRosen Penev <redacted>
Sun, 9 Feb 2020 07:08:58 +0000 (23:08 -0800)
Signed-off-by: Alexander Ryzhov <redacted>
Signed-off-by: Rosen Penev <redacted>
lang/perl/Makefile
lang/perl/files/base.config
lang/perl/patches/998-Errno_errno.h_path.patch [new file with mode: 0644]

index d0606a962f9d3b948e2a4ffb7950a16f27fa8da8..84d256d2d8c682f18670a4cbae0a48e3333fb222 100644 (file)
@@ -11,7 +11,7 @@ include perlver.mk
 
 PKG_NAME:=perl
 PKG_VERSION:=$(PERL_VERSION)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=\
                https://cpan.metacpan.org/src/5.0 \
@@ -105,6 +105,7 @@ define Build/Configure
                                        -Dowrt:threads=$(if $(CONFIG_PERL_THREADS),yes,no) \
                                        -Dowrt:staging_dir='$(STAGING_DIR)' \
                                        -Dowrt:host_perl_prefix='$(HOST_PERL_PREFIX)' \
+                                       -Dsysroot='$(TOOLCHAIN_DIR)' \
                                        files/version.config \
                                        files/base.config \
                                        files/$(patsubst i386,i486,$(ARCH)).config \
index 90a2cfbf682b185e2cd8603a8cdb6db649fb3811..f2d18f547061f25ee93d0bda0937d9190042e441 100644 (file)
@@ -938,7 +938,6 @@ stdio_ptr='((fp)->_ptr)'
 stdio_stream_array=''
 submit=''
 sysman='/usr/share/man/man1'
-sysroot=''
 tail=''
 tar=''
 targetdir=''
diff --git a/lang/perl/patches/998-Errno_errno.h_path.patch b/lang/perl/patches/998-Errno_errno.h_path.patch
new file mode 100644 (file)
index 0000000..f221dd9
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/ext/Errno/Errno_pm.PL
++++ b/ext/Errno/Errno_pm.PL
+@@ -133,7 +133,7 @@
+       # Some Linuxes have weird errno.hs which generate
+       # no #file or #line directives
+       my ($linux_errno_h) = grep { -e $_ } map { "$_/errno.h" }
+-          "$sysroot/usr/include", "$sysroot/usr/local/include",
++          "$sysroot/usr/include", "$sysroot/usr/local/include", "$sysroot/include",
+           split / / => $Config{locincpth} or
+               die "Cannot find errno.h";
+       $file{$linux_errno_h} = 1;
git clone https://git.99rst.org/PROJECT