summaryrefslogtreecommitdiff
path: root/data/perl
diff options
context:
space:
mode:
Diffstat (limited to 'data/perl')
-rw-r--r--data/perl/IO.diff19
-rw-r--r--data/perl/_metadata/description1
-rw-r--r--data/perl/_metadata/in.550.580
-rw-r--r--data/perl/_metadata/license248
l---------data/perl/_metadata/maintainer1
-rw-r--r--data/perl/_metadata/name1
-rw-r--r--data/perl/_metadata/priority1
-rw-r--r--data/perl/_metadata/role1
-rw-r--r--data/perl/_metadata/section1
-rw-r--r--data/perl/_metadata/tags1
-rw-r--r--data/perl/_metadata/version1
-rw-r--r--data/perl/locale.diff411
-rw-r--r--data/perl/make.sh10
-rw-r--r--data/perl/perl-5.28.0.tar.gzbin0 -> 17914739 bytes
-rw-r--r--data/perl/perl-cross-1.2.tar.gzbin0 -> 102302 bytes
-rw-r--r--data/perl/perl-cross.diff324
-rw-r--r--data/perl/perl5.diff66
17 files changed, 1086 insertions, 0 deletions
diff --git a/data/perl/IO.diff b/data/perl/IO.diff
new file mode 100644
index 000000000..55ba21167
--- /dev/null
+++ b/data/perl/IO.diff
@@ -0,0 +1,19 @@
+diff -ur perl-5.28.0/dist/IO/poll.h perl-5.28.0+iPhone/dist/IO/poll.h
+--- perl-5.28.0/dist/IO/poll.h 2018-05-20 22:41:35.000000000 -1000
++++ perl-5.28.0+iPhone/dist/IO/poll.h 2018-08-16 22:30:35.000000000 -1000
+@@ -10,6 +10,8 @@
+ #ifndef POLL_H
+ # define POLL_H
+
++#include <sys/poll.h>
++#if 0
+ #if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND)
+ # include <poll.h>
+ #elif (defined(HAS_POLL) && defined(I_SYS_POLL))
+@@ -58,5 +60,5 @@
+
+ #endif /* I_POLL */
+
++#endif /* 0 */
+ #endif /* POLL_H */
+-
diff --git a/data/perl/_metadata/description b/data/perl/_metadata/description
new file mode 100644
index 000000000..9852c2138
--- /dev/null
+++ b/data/perl/_metadata/description
@@ -0,0 +1 @@
+awesome combination of sed and awk
diff --git a/data/perl/_metadata/in.550.58 b/data/perl/_metadata/in.550.58
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/data/perl/_metadata/in.550.58
diff --git a/data/perl/_metadata/license b/data/perl/_metadata/license
new file mode 100644
index 000000000..43cd72c3e
--- /dev/null
+++ b/data/perl/_metadata/license
@@ -0,0 +1,248 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 1, February 1989
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The license agreements of most software companies try to keep users
+at the mercy of those companies. By contrast, our General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. The
+General Public License applies to the Free Software Foundation's
+software and to any other program whose authors commit to using it.
+You can use it for your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Specifically, the General Public License is designed to make
+sure that you have the freedom to give away or sell copies of free
+software, that you receive source code or can get it if you want it,
+that you can change the software or use pieces of it in new free
+programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of a such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must tell them their rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any program or other work which
+contains a notice placed by the copyright holder saying it may be
+distributed under the terms of this General Public License. The
+"Program", below, refers to any such program or work, and a "work based
+on the Program" means either the Program or any work containing the
+Program or a portion of it, either verbatim or with modifications. Each
+licensee is addressed as "you".
+
+ 1. You may copy and distribute verbatim copies of the Program's source
+code as you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this
+General Public License and to the absence of any warranty; and give any
+other recipients of the Program a copy of this General Public License
+along with the Program. You may charge a fee for the physical act of
+transferring a copy.
+
+ 2. You may modify your copy or copies of the Program or any portion of
+it, and copy and distribute such modifications under the terms of Paragraph
+1 above, provided that you also do the following:
+
+ a) cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change; and
+
+ b) cause the whole of any work that you distribute or publish, that
+ in whole or in part contains the Program or any part thereof, either
+ with or without modifications, to be licensed at no charge to all
+ third parties under the terms of this General Public License (except
+ that you may choose to grant warranty protection to some or all
+ third parties, at your option).
+
+ c) If the modified program normally reads commands interactively when
+ run, you must cause it, when started running for such interactive use
+ in the simplest and most usual way, to print or display an
+ announcement including an appropriate copyright notice and a notice
+ that there is no warranty (or else, saying that you provide a
+ warranty) and that users may redistribute the program under these
+ conditions, and telling the user how to view a copy of this General
+ Public License.
+
+ d) You may charge a fee for the physical act of transferring a
+ copy, and you may at your option offer warranty protection in
+ exchange for a fee.
+
+Mere aggregation of another independent work with the Program (or its
+derivative) on a volume of a storage or distribution medium does not bring
+the other work under the scope of these terms.
+
+ 3. You may copy and distribute the Program (or a portion or derivative of
+it, under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 1 and 2 above provided that you also do one of the following:
+
+ a) accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ b) accompany it with a written offer, valid for at least three
+ years, to give any third party free (except for a nominal charge
+ for the cost of distribution) a complete machine-readable copy of the
+ corresponding source code, to be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ c) accompany it with the information you received as to where the
+ corresponding source code may be obtained. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form alone.)
+
+Source code for a work means the preferred form of the work for making
+modifications to it. For an executable file, complete source code means
+all the source code for all modules it contains; but, as a special
+exception, it need not include source code for modules which are standard
+libraries that accompany the operating system on which the executable
+file runs, or for standard header files or definitions files that
+accompany that operating system.
+
+ 4. You may not copy, modify, sublicense, distribute or transfer the
+Program except as expressly provided under this General Public License.
+Any attempt otherwise to copy, modify, sublicense, distribute or transfer
+the Program is void, and will automatically terminate your rights to use
+the Program under this License. However, parties who have received
+copies, or rights to use copies, from you under this General Public
+License will not have their licenses terminated so long as such parties
+remain in full compliance.
+
+ 5. By copying, distributing or modifying the Program (or any work based
+on the Program) you indicate your acceptance of this license to do so,
+and all its terms and conditions.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the original
+licensor to copy, distribute or modify the Program subject to these
+terms and conditions. You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein.
+
+ 7. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of the license which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+the license, you may choose any version ever published by the Free Software
+Foundation.
+
+ 8. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to humanity, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+ To do so, attach the following notices to the program. It is safest to
+attach them to the start of each source file to most effectively convey
+the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19xx name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than `show w' and `show
+c'; they could even be mouse-clicks or menu items--whatever suits your
+program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ program `Gnomovision' (a program to direct compilers to make passes
+ at assemblers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/data/perl/_metadata/maintainer b/data/perl/_metadata/maintainer
new file mode 120000
index 000000000..573d7ebef
--- /dev/null
+++ b/data/perl/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/sbingner \ No newline at end of file
diff --git a/data/perl/_metadata/name b/data/perl/_metadata/name
new file mode 100644
index 000000000..04da5320c
--- /dev/null
+++ b/data/perl/_metadata/name
@@ -0,0 +1 @@
+Perl
diff --git a/data/perl/_metadata/priority b/data/perl/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/perl/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/perl/_metadata/role b/data/perl/_metadata/role
new file mode 100644
index 000000000..52b4d7301
--- /dev/null
+++ b/data/perl/_metadata/role
@@ -0,0 +1 @@
+hacker
diff --git a/data/perl/_metadata/section b/data/perl/_metadata/section
new file mode 100644
index 000000000..ddc7f1fd8
--- /dev/null
+++ b/data/perl/_metadata/section
@@ -0,0 +1 @@
+Scripting
diff --git a/data/perl/_metadata/tags b/data/perl/_metadata/tags
new file mode 100644
index 000000000..ad5d50831
--- /dev/null
+++ b/data/perl/_metadata/tags
@@ -0,0 +1 @@
+purpose::console
diff --git a/data/perl/_metadata/version b/data/perl/_metadata/version
new file mode 100644
index 000000000..e8902c36f
--- /dev/null
+++ b/data/perl/_metadata/version
@@ -0,0 +1 @@
+5.28.0
diff --git a/data/perl/locale.diff b/data/perl/locale.diff
new file mode 100644
index 000000000..ea8a41d8f
--- /dev/null
+++ b/data/perl/locale.diff
@@ -0,0 +1,411 @@
+From d36adde059ed1c4f7af210b4f9fc3a7bd2d7d343 Mon Sep 17 00:00:00 2001
+From: Karl Williamson <khw@cpan.org>
+Date: Wed, 23 May 2018 15:32:47 -0600
+Subject: [PATCH] Fix to compile under -DNO_LOCALE
+
+Several problems with this compile option were not caught before 5.28
+was frozen.
+---
+ embed.fnc | 2 ++
+ embed.h | 6 ++---
+ locale.c | 73 ++++++++++++++++++++++++++++++++++++--------------
+ makedef.pl | 6 +++++
+ perl.h | 3 +++
+ proto.h | 6 ++---
+ sv.c | 5 ++++
+ t/lib/warnings/regexec | 20 ++++++++------
+ 8 files changed, 87 insertions(+), 34 deletions(-)
+
+diff --git a/embed.fnc b/embed.fnc
+index 0f06e38024..36f9f974f5 100644
+--- a/embed.fnc
++++ b/embed.fnc
+@@ -2765,9 +2765,11 @@ s |bool |isa_lookup |NN HV *stash|NN const char * const name \
+ #endif
+
+ #if defined(PERL_IN_LOCALE_C)
++# ifdef USE_LOCALE
+ sn |const char*|category_name |const int category
+ s |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale
+ s |void |restore_switched_locale|const int category|NULLOK const char * const original_locale
++# endif
+ # ifdef HAS_NL_LANGINFO
+ sn |const char*|my_nl_langinfo|const nl_item item|bool toggle
+ # else
+diff --git a/embed.h b/embed.h
+index cf3ad9e154..fb66c260b7 100644
+--- a/embed.h
++++ b/embed.h
+@@ -1724,16 +1724,16 @@
+ #define unshare_hek_or_pvn(a,b,c,d) S_unshare_hek_or_pvn(aTHX_ a,b,c,d)
+ # endif
+ # if defined(PERL_IN_LOCALE_C)
+-#define category_name S_category_name
+-#define restore_switched_locale(a,b) S_restore_switched_locale(aTHX_ a,b)
+ #define save_to_buffer S_save_to_buffer
+-#define switch_category_locale_to_template(a,b,c) S_switch_category_locale_to_template(aTHX_ a,b,c)
+ # if defined(USE_LOCALE)
++#define category_name S_category_name
+ #define new_collate(a) S_new_collate(aTHX_ a)
+ #define new_ctype(a) S_new_ctype(aTHX_ a)
+ #define new_numeric(a) S_new_numeric(aTHX_ a)
++#define restore_switched_locale(a,b) S_restore_switched_locale(aTHX_ a,b)
+ #define set_numeric_radix(a) S_set_numeric_radix(aTHX_ a)
+ #define stdize_locale(a) S_stdize_locale(aTHX_ a)
++#define switch_category_locale_to_template(a,b,c) S_switch_category_locale_to_template(aTHX_ a,b,c)
+ # if defined(USE_POSIX_2008_LOCALE)
+ #define emulate_setlocale S_emulate_setlocale
+ # endif
+diff --git a/locale.c b/locale.c
+index 7653340477..f8f77fb3d0 100644
+--- a/locale.c
++++ b/locale.c
+@@ -1264,6 +1264,7 @@ S_locking_setlocale(pTHX_
+ }
+
+ #endif
++#ifdef USE_LOCALE
+
+ STATIC void
+ S_set_numeric_radix(pTHX_ const bool use_locale)
+@@ -1299,6 +1300,10 @@ S_set_numeric_radix(pTHX_ const bool use_locale)
+ }
+
+ # endif
++#else
++
++ PERL_UNUSED_ARG(use_locale);
++
+ #endif /* USE_LOCALE_NUMERIC and can find the radix char */
+
+ }
+@@ -1481,7 +1486,6 @@ S_new_ctype(pTHX_ const char *newctype)
+
+ #ifndef USE_LOCALE_CTYPE
+
+- PERL_ARGS_ASSERT_NEW_CTYPE;
+ PERL_UNUSED_ARG(newctype);
+ PERL_UNUSED_CONTEXT;
+
+@@ -1994,6 +1998,8 @@ S_new_collate(pTHX_ const char *newcoll)
+
+ }
+
++#endif
++
+ #ifdef WIN32
+
+ STATIC char *
+@@ -2139,11 +2145,20 @@ Perl_setlocale(const int category, const char * locale)
+ {
+ /* This wraps POSIX::setlocale() */
+
++#ifdef NO_LOCALE
++
++ PERL_UNUSED_ARG(category);
++ PERL_UNUSED_ARG(locale);
++
++ return "C";
++
++#else
++
+ const char * retval;
+ const char * newlocale;
+ dSAVEDERRNO;
+- DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
+ dTHX;
++ DECLARATION_FOR_LC_NUMERIC_MANIPULATION;
+
+ #ifdef USE_LOCALE_NUMERIC
+
+@@ -2262,6 +2277,8 @@ Perl_setlocale(const int category, const char * locale)
+
+ return retval;
+
++#endif
++
+ }
+
+ PERL_STATIC_INLINE const char *
+@@ -2414,13 +2431,16 @@ S_my_nl_langinfo(const int item, bool toggle)
+ dTHX;
+ const char * retval;
+
++#ifdef USE_LOCALE_NUMERIC
++
+ /* We only need to toggle into the underlying LC_NUMERIC locale for these
+ * two items, and only if not already there */
+ if (toggle && (( item != RADIXCHAR && item != THOUSEP)
+ || PL_numeric_underlying))
+- {
++
++#endif /* No toggling needed if not using LC_NUMERIC */
++
+ toggle = FALSE;
+- }
+
+ #if defined(HAS_NL_LANGINFO) /* nl_langinfo() is available. */
+ # if ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \
+@@ -2468,6 +2488,8 @@ S_my_nl_langinfo(const int item, bool toggle)
+ do_free = TRUE;
+ }
+
++# ifdef USE_LOCALE_NUMERIC
++
+ if (toggle) {
+ if (PL_underlying_numeric_obj) {
+ cur = PL_underlying_numeric_obj;
+@@ -2478,6 +2500,8 @@ S_my_nl_langinfo(const int item, bool toggle)
+ }
+ }
+
++# endif
++
+ /* We have to save it to a buffer, because the freelocale() just below
+ * can invalidate the internal one */
+ retval = save_to_buffer(nl_langinfo_l(item, cur),
+@@ -5169,9 +5193,7 @@ Perl_my_strerror(pTHX_ const int errnum)
+ LOCALE_UNLOCK;
+
+ # endif /* End of doesn't have strerror_l */
+-#endif /* End of does have locale messages */
+-
+-#ifdef DEBUGGING
++# ifdef DEBUGGING
+
+ if (DEBUG_Lv_TEST) {
+ PerlIO_printf(Perl_debug_log, "Strerror returned; saving a copy: '");
+@@ -5179,7 +5201,8 @@ Perl_my_strerror(pTHX_ const int errnum)
+ PerlIO_printf(Perl_debug_log, "'\n");
+ }
+
+-#endif
++# endif
++#endif /* End of does have locale messages */
+
+ SAVEFREEPV(errstr);
+ return errstr;
+@@ -5301,10 +5324,17 @@ L<C<Perl_switch_to_global_locale>|perlapi/switch_to_global_locale>.
+ bool
+ Perl_sync_locale()
+ {
++
++#ifndef USE_LOCALE
++
++ return TRUE;
++
++#else
++
+ const char * newlocale;
+ dTHX;
+
+-#ifdef USE_POSIX_2008_LOCALE
++# ifdef USE_POSIX_2008_LOCALE
+
+ bool was_in_global_locale = FALSE;
+ locale_t cur_obj = uselocale((locale_t) 0);
+@@ -5316,11 +5346,11 @@ Perl_sync_locale()
+ * will affect the */
+ if (cur_obj == LC_GLOBAL_LOCALE) {
+
+-# ifdef HAS_QUERY_LOCALE
++# ifdef HAS_QUERY_LOCALE
+
+ do_setlocale_c(LC_ALL, setlocale(LC_ALL, NULL));
+
+-# else
++# else
+
+ unsigned int i;
+
+@@ -5330,17 +5360,17 @@ Perl_sync_locale()
+ do_setlocale_r(categories[i], setlocale(categories[i], NULL));
+ }
+
+-# endif
++# endif
+
+ was_in_global_locale = TRUE;
+ }
+
+-#else
++# else
+
+ bool was_in_global_locale = TRUE;
+
+-#endif
+-#ifdef USE_LOCALE_CTYPE
++# endif
++# ifdef USE_LOCALE_CTYPE
+
+ newlocale = savepv(do_setlocale_c(LC_CTYPE, NULL));
+ DEBUG_Lv(PerlIO_printf(Perl_debug_log,
+@@ -5349,8 +5379,8 @@ Perl_sync_locale()
+ new_ctype(newlocale);
+ Safefree(newlocale);
+
+-#endif /* USE_LOCALE_CTYPE */
+-#ifdef USE_LOCALE_COLLATE
++# endif /* USE_LOCALE_CTYPE */
++# ifdef USE_LOCALE_COLLATE
+
+ newlocale = savepv(do_setlocale_c(LC_COLLATE, NULL));
+ DEBUG_Lv(PerlIO_printf(Perl_debug_log,
+@@ -5359,8 +5389,8 @@ Perl_sync_locale()
+ new_collate(newlocale);
+ Safefree(newlocale);
+
+-#endif
+-#ifdef USE_LOCALE_NUMERIC
++# endif
++# ifdef USE_LOCALE_NUMERIC
+
+ newlocale = savepv(do_setlocale_c(LC_NUMERIC, NULL));
+ DEBUG_Lv(PerlIO_printf(Perl_debug_log,
+@@ -5369,9 +5399,12 @@ Perl_sync_locale()
+ new_numeric(newlocale);
+ Safefree(newlocale);
+
+-#endif /* USE_LOCALE_NUMERIC */
++# endif /* USE_LOCALE_NUMERIC */
+
+ return was_in_global_locale;
++
++#endif
++
+ }
+
+ #if defined(DEBUGGING) && defined(USE_LOCALE)
+diff --git a/makedef.pl b/makedef.pl
+index dbd756d713..661b71de7e 100644
+--- a/makedef.pl
++++ b/makedef.pl
+@@ -574,6 +574,9 @@ unless ($define{USE_LOCALE_COLLATE}) {
+ PL_collxfrm_mult
+ Perl_sv_collxfrm
+ Perl_sv_collxfrm_flags
++ PL_strxfrm_NUL_replacement
++ PL_strxfrm_is_behaved
++ PL_strxfrm_max_cp
+ );
+ }
+
+@@ -583,6 +586,9 @@ unless ($define{USE_LOCALE_NUMERIC}) {
+ PL_numeric_name
+ PL_numeric_radix_sv
+ PL_numeric_standard
++ PL_numeric_underlying
++ PL_numeric_underlying_is_standard
++ PL_underlying_numeric_obj
+ );
+ }
+
+diff --git a/perl.h b/perl.h
+index 3e1f6cd571..d457776f9c 100644
+--- a/perl.h
++++ b/perl.h
+@@ -5657,6 +5657,9 @@ typedef struct am_table_short AMTS;
+ # define IN_LC_COMPILETIME(category) 0
+ # define IN_LC_RUNTIME(category) 0
+ # define IN_LC(category) 0
++# define _CHECK_AND_WARN_PROBLEMATIC_LOCALE
++# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send)
++# define _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(c)
+ #endif
+
+
+diff --git a/proto.h b/proto.h
+index 3e027ab2db..558c33aca6 100644
+--- a/proto.h
++++ b/proto.h
+@@ -4669,8 +4669,6 @@ PERL_CALLCONV SV* Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp);
+ assert(hv); assert(indexp)
+ #endif
+ #if defined(PERL_IN_LOCALE_C)
+-STATIC const char* S_category_name(const int category);
+-STATIC void S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
+ #ifndef PERL_NO_INLINE_FUNCTIONS
+ PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset)
+ __attribute__warn_unused_result__;
+@@ -4678,17 +4676,19 @@ PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf
+ assert(buf_size)
+ #endif
+
+-STATIC const char* S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
+ # if defined(USE_LOCALE)
++STATIC const char* S_category_name(const int category);
+ STATIC void S_new_collate(pTHX_ const char* newcoll);
+ STATIC void S_new_ctype(pTHX_ const char* newctype);
+ #define PERL_ARGS_ASSERT_NEW_CTYPE \
+ assert(newctype)
+ STATIC void S_new_numeric(pTHX_ const char* newnum);
++STATIC void S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
+ STATIC void S_set_numeric_radix(pTHX_ const bool use_locale);
+ STATIC char* S_stdize_locale(pTHX_ char* locs);
+ #define PERL_ARGS_ASSERT_STDIZE_LOCALE \
+ assert(locs)
++STATIC const char* S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
+ # if defined(USE_POSIX_2008_LOCALE)
+ STATIC const char* S_emulate_setlocale(const int category, const char* locale, unsigned int index, const bool is_index_valid);
+ # endif
+diff --git a/sv.c b/sv.c
+index 07865bb2c1..81223ca30c 100644
+--- a/sv.c
++++ b/sv.c
+@@ -13330,10 +13330,15 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
+
+ SvTAINT(sv);
+
++#ifdef USE_LOCALE_NUMERIC
++
+ if (lc_numeric_set) {
+ RESTORE_LC_NUMERIC(); /* Done outside loop, so don't have to
+ save/restore each iteration. */
+ }
++
++#endif
++
+ }
+
+ /* =========================================================================
+diff --git a/t/lib/warnings/regexec b/t/lib/warnings/regexec
+index 900dd6ee7f..b9e53c9808 100644
+--- a/t/lib/warnings/regexec
++++ b/t/lib/warnings/regexec
+@@ -215,6 +215,10 @@ Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at -
+ Use of \b{} or \B{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 17.
+ ########
+ # NAME (?[ ]) in non-UTF-8 locale
++require '../loc_tools.pl';
++unless (locales_enabled()) {
++ print("SKIPPED\n# locales not available\n"),exit;
++}
+ eval { require POSIX; POSIX->import("locale_h") };
+ if ($@) {
+ print("SKIPPED\n# no POSIX\n"),exit;
+@@ -229,14 +233,14 @@ setlocale(&POSIX::LC_CTYPE, "C");
+ ":" =~ /(?[ \: ])/;
+ no warnings 'locale';
+ EXPECT
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 9.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 10.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 11.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12.
+-Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 12.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 13.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 13.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 14.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 14.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 15.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 15.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16.
++Use of (?[ ]) for non-UTF-8 locale is wrong. Assuming a UTF-8 locale at - line 16.
+ ########
+ # NAME (?[ ]) in UTF-8 locale
+ require '../loc_tools.pl';
+--
+2.15.1-424-g9478a660812
+
diff --git a/data/perl/make.sh b/data/perl/make.sh
new file mode 100644
index 000000000..53655708e
--- /dev/null
+++ b/data/perl/make.sh
@@ -0,0 +1,10 @@
+pkg:extract
+VERSION="$(cat "${PKG_DATA}/_metadata/version")"
+cp -af perl-cross*/. perl-5*/
+cd perl-5*/
+pkg:patch
+PREFIX="$(cat "${PKG_BASE}/arch/${PKG_ARCH}/${PKG_CFTARG}/prefix")"
+CFLAGS='-DPERL_DARWIN' ./configure --build="$(${PKG_BASE}/util/config.guess)" --target="${PKG_TARG}" --prefix="${PREFIX}" -Duseshrplib -Dusevendorprefix --vendorprefix="${PREFIX}" -Dusethreads \
+ -Dvendorlib="${PREFIX}/share/perl5" -Dvendorarch="${PREFIX}/lib/perl5/${VERSION}"
+make -j16
+make install.perl DESTDIR="${PKG_DEST}"
diff --git a/data/perl/perl-5.28.0.tar.gz b/data/perl/perl-5.28.0.tar.gz
new file mode 100644
index 000000000..0ecbe3d54
--- /dev/null
+++ b/data/perl/perl-5.28.0.tar.gz
Binary files differ
diff --git a/data/perl/perl-cross-1.2.tar.gz b/data/perl/perl-cross-1.2.tar.gz
new file mode 100644
index 000000000..d1a0ebedd
--- /dev/null
+++ b/data/perl/perl-cross-1.2.tar.gz
Binary files differ
diff --git a/data/perl/perl-cross.diff b/data/perl/perl-cross.diff
new file mode 100644
index 000000000..a1a9d57e5
--- /dev/null
+++ b/data/perl/perl-cross.diff
@@ -0,0 +1,324 @@
+diff -uNr perl-cross-1.2/Makefile perl-cross-1.2+iPhone/Makefile
+--- perl-cross-1.2/Makefile 2018-04-16 21:22:36.000000000 -1000
++++ perl-cross-1.2+iPhone/Makefile 2018-08-16 22:14:41.000000000 -1000
+@@ -135,7 +135,7 @@
+ perl$x: LDFLAGS += -Wl,-rpath,$(archlib)/CORE
+ endif
+ endif # or should it be "else"?
+-perl$x: LDFLAGS += -Wl,-E
++#perl$x: LDFLAGS += -Wl,-E
+
+ perl$x: perlmain$o $(LIBPERL) $(static_tgt) static.list ext.libs
+ $(eval extlibs=$(shell cat ext.libs))
+@@ -180,7 +180,7 @@
+
+ ifeq ($(useshrplib),true)
+ $(LIBPERL):
+- $(CC) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS)
++ $(CC) $(LDDLFLAGS) -install_name $(archlib)/CORE/$@ -o $@ $(filter %$o,$^) $(LIBS)
+ else
+ $(LIBPERL):
+ $(AR) cru $@ $(filter %$o,$^)
+@@ -211,7 +211,7 @@
+ # The rules below replace make_ext script used in the original
+ # perl build chain. Some host-specific functionality is lost.
+ # Check miniperl_top to see how it works.
+-$(nonxs_tgt) $(disabled_nonxs_tgt): %/pm_to_blib: | %/Makefile
++$(nonxs_tgt) $(disabled_nonxs_tgt): %/pm_to_blib: | %/Makefile dynaloader
+ $(MAKE) -C $(dir $@) all PERL_CORE=1 LIBPERL=$(LIBPERL)
+
+ DynaLoader$o: | ext/DynaLoader/pm_to_blib
+@@ -226,7 +226,7 @@
+ $(static_tgt): %/pm_to_blib: | %/Makefile $(nonxs_tgt)
+ $(MAKE) -C $(dir $@) all PERL_CORE=1 LIBPERL=$(LIBPERL) LINKTYPE=static static
+
+-$(dynamic_tgt) $(disabled_dynamic_tgt): %/pm_to_blib: | %/Makefile
++$(dynamic_tgt) $(disabled_dynamic_tgt): %/pm_to_blib: | %/Makefile dynaloader
+ $(MAKE) -C $(dir $@) all PERL_CORE=1 LIBPERL=$(LIBPERL) LINKTYPE=dynamic
+
+ lib/re.pm: ext/re/re.pm
+@@ -282,7 +282,7 @@
+
+ # mktables does not touch the files unless they need to be rebuilt,
+ # which confuses make.
+-lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)
++lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM) utilities
+ ./miniperl_top lib/unicore/mktables -w -C lib/unicore -P pod -maketest -makelist -p
+
+ # The following rules ensure that modules listed in mkppport.lst get
+diff -uNr perl-cross-1.2/Makefile.config.SH perl-cross-1.2+iPhone/Makefile.config.SH
+--- perl-cross-1.2/Makefile.config.SH 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/Makefile.config.SH 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ if [ ! -f config.sh ]; then
+ echo "config.sh not found" >&2
+diff -uNr perl-cross-1.2/cnf/config.guess perl-cross-1.2+iPhone/cnf/config.guess
+--- perl-cross-1.2/cnf/config.guess 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/config.guess 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/bash
+ # Attempt to guess a canonical system name.
+ # Copyright 1992-2016 Free Software Foundation, Inc.
+
+@@ -925,7 +925,7 @@
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+- objdump --private-headers /bin/sh | grep -q ld.so.1
++ objdump --private-headers /bin/bash | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+diff -uNr perl-cross-1.2/cnf/config.sub perl-cross-1.2+iPhone/cnf/config.sub
+--- perl-cross-1.2/cnf/config.sub 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/config.sub 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/bash
+ # Configuration validation subroutine script.
+ # Copyright 1992-2016 Free Software Foundation, Inc.
+
+@@ -1407,7 +1407,7 @@
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+- | -onefs* | -tirtos* | -phoenix*)
++ | -onefs* | -tirtos* | -phoenix* | -iphoneos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+diff -uNr perl-cross-1.2/cnf/configure perl-cross-1.2+iPhone/cnf/configure
+--- perl-cross-1.2/cnf/configure 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ base=${0%/*}; test -z "$base" && base=.
+
+@@ -8,7 +8,7 @@
+ appendlog() { cat "$cfglog" >> "$1"; rm -f "$cfglog"; cfglog="$1"; }
+
+ config="config.sh.$$"
+-echo "#!/bin/sh" > $config
++echo "#!/bin/bash" > $config
+ echo "" >> $config
+ setconfig() { mv "$config" "$1"; config="$1"; }
+ delconfig() { rm "$config"; }
+diff -uNr perl-cross-1.2/cnf/configure__f.sh perl-cross-1.2+iPhone/cnf/configure__f.sh
+--- perl-cross-1.2/cnf/configure__f.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure__f.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -254,10 +254,10 @@
+ try_link_libs $libs $*
+ }
+
+-try_readelf() {
+- require 'readelf'
++try_nm() {
++ require 'nm'
+ require '_o'
+- run $readelf $* try$_o
++ run $nm $* try$_o
+ }
+
+ try_objdump() {
+diff -uNr perl-cross-1.2/cnf/configure_func.sh perl-cross-1.2+iPhone/cnf/configure_func.sh
+--- perl-cross-1.2/cnf/configure_func.sh 2018-04-21 11:28:00.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_func.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -7,7 +7,7 @@
+ try_start
+ funcincludes "$3" "$4" "$includes"
+ try_add "int main(void) { $2($3); return 0; }"
+- try_link -O0 -fno-builtin
++ try_link -O0 -fno-builtin -Wno-error=implicit-function-declaration
+ resdef $1 'found' 'missing'
+ fi
+ }
+diff -uNr perl-cross-1.2/cnf/configure_misc.sh perl-cross-1.2+iPhone/cnf/configure_misc.sh
+--- perl-cross-1.2/cnf/configure_misc.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_misc.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -92,7 +92,7 @@
+ define extras ''
+
+ # These are important but we don't test them
+-define startsh '#!/bin/sh'
++define startsh '#!/bin/bash'
+ define spitshell 'cat'
+ define d_Gconvert 'sprintf((b),"%.*g",(n),(x))'
+ define d_modfl_pow32_bug 'undef'
+@@ -287,7 +287,7 @@
+ define runnm false # unused
+ define sed sed # unused
+ define sendmail
+-define sh /bin/sh
++define sh /bin/bash
+ define shar # unused
+ define sleep # unused
+ define smail # unused
+@@ -335,7 +335,7 @@
+ define mallocobj
+ define mallocsrc
+ define mistrustnm
+-define n '-n'
++#define n '-n'
+ define orderlib
+ define perl
+ define perl5
+diff -uNr perl-cross-1.2/cnf/configure_path.sh perl-cross-1.2+iPhone/cnf/configure_path.sh
+--- perl-cross-1.2/cnf/configure_path.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_path.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -108,7 +108,7 @@
+ define privlibexp "$privlib"
+ define binexp "$bin"
+
+-define libpth "/lib /usr/lib /usr/local/lib"
++define libpth ""
+ define glibpth "$libpth"
+ define plibpth
+
+diff -uNr perl-cross-1.2/cnf/configure_tool.sh perl-cross-1.2+iPhone/cnf/configure_tool.sh
+--- perl-cross-1.2/cnf/configure_tool.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_tool.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -2,7 +2,16 @@
+
+ tryprog() {
+ log "trying $1=$2"
+- if command -v "$2" 1>/dev/null 2>/dev/null; then
++ if echo $2 | grep -q xcrun; then
++ if $2 -f $3 1>/dev/null 2>/dev/null; then
++ define "$1" "$2$3"
++ result "$2$3"
++ return 0
++ else
++ return 1
++ fi
++ fi
++ if command -v $2 1>/dev/null 2>/dev/null; then
+ define "$1" "$2"
+ result "$2"
+ return 0
+@@ -75,7 +84,12 @@
+ fi
+
+ # Finally, try $target-gcc
+- test -n "$toolsprefix" && tryprog $1 "$toolsprefix$3" && return 0
++ mstart "trying $toolsprefix$3"
++ if echo $toolsprefix | grep -q xcrun; then
++ test -n "$toolsprefix" && tryprog $1 "$toolsprefix" $3 && return 0
++ else
++ test -n "$toolsprefix" && tryprog $1 "$toolsprefix$3" && return 0
++ fi
+ test -n "$target" && tryprog $1 "$target-$3" && return 0
+ test -n "$targetarch" && tryprog $1 "$targetarch-$3" && return 0
+
+@@ -86,9 +100,8 @@
+ whichprog cc CC gcc || whichprog cc CC cc || die "No C compiler found"
+ #whichprog ld LD ld # while correct, this breaks MM library test
+ whichprog ar AR ar || die "Cannot find ar"
+-whichprog nm NM nm
++whichprog nm NM nm || die "Cannot find nm"
+ whichprog ranlib RANLIB ranlib
+-whichprog readelf READELF readelf || die "Cannot find readelf"
+ whichprog objdump OBJDUMP objdump || die "Cannot find objdump"
+
+ # XXX: this looks wrong, but the usemmldlt code depends on $ld being able
+@@ -154,7 +167,7 @@
+
+ # Used only for modules
+ define cccdlflags '-fPIC -Wno-unused-function'
+-define ccdlflags '-Wl,-E'
++#define ccdlflags '-Wl,-E'
+
+ # Misc flags setup
+ predef lddlflags "-shared" # modules
+@@ -262,6 +275,14 @@
+ define osname "linux"
+ result "Linux"
+ ;;
++ *-darwin*)
++ define osname "darwin"
++ result "Darwin"
++ ;;
++ *-iphoneos*)
++ define osname "iphoneos"
++ result "iPhoneOS"
++ ;;
+ *-bsd*)
+ define osname "bsd"
+ result "BSD"
+diff -uNr perl-cross-1.2/cnf/configure_type.sh perl-cross-1.2+iPhone/cnf/configure_type.sh
+--- perl-cross-1.2/cnf/configure_type.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_type.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -38,13 +38,13 @@
+ return
+ fi
+
+- if not try_readelf -s > try.out 2>>$cfglog; then
++ if not try_nm -g > try.out 2>>$cfglog; then
+ result 'unknown'
+ die "Cannot determine sizeof($2), use -D${1}size="
+ return
+ fi
+
+- result=`grep foo try.out | sed -r -e 's/.*: [0-9]+ +//' -e 's/ .*//'`
++ result=`grep foo try.out | sed -e s/' .*'// -e s/^0*//`
+ if [ -z "$result" -o "$result" -le 0 ]; then
+ result "unknown"
+ die "Cannot determine sizeof($2)"
+diff -uNr perl-cross-1.2/cnf/configure_type_sel.sh perl-cross-1.2+iPhone/cnf/configure_type_sel.sh
+--- perl-cross-1.2/cnf/configure_type_sel.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_type_sel.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -114,7 +114,7 @@
+ fi
+
+ # Most targets use .data but PowerPC has .sdata instead
+- if try_compile && try_objdump -j .data -j .sdata -s; then
++ if try_compile && try_objdump -s ; then
+ bo=`grep '11' try.out | grep '44' | sed -e 's/ .*//' -e 's/[^1-8]//g' -e 's/\([1-8]\)\1/\1/g'`
+ else
+ bo=''
+diff -uNr perl-cross-1.2/cnf/diffs/dedup.px perl-cross-1.2+iPhone/cnf/diffs/dedup.px
+--- perl-cross-1.2/cnf/diffs/dedup.px 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/diffs/dedup.px 2018-08-16 20:31:19.000000000 -1000
+@@ -2,7 +2,7 @@
+
+ @files = (ls("perl*/*.patch"), ls("cperl*/*.patch"));
+
+-print "#!/bin/sh\n\n";
++print "#!/bin/bash\n\n";
+
+ %map = ( );
+
+diff -uNr perl-cross-1.2/cnf/hints/darwin perl-cross-1.2+iPhone/cnf/hints/darwin
+--- perl-cross-1.2/cnf/hints/darwin 1969-12-31 14:00:00.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/hints/darwin 2018-08-16 20:33:20.000000000 -1000
+@@ -0,0 +1,7 @@
++# Linux syscalls
++d_voidsig='undef'
++d_nanosleep='define'
++d_clock_gettime='define'
++d_clock_getres='define'
++d_clock_nanosleep='undef'
++d_clock='define'
+diff -uNr perl-cross-1.2/configure perl-cross-1.2+iPhone/configure
+--- perl-cross-1.2/configure 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/configure 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ earlydie() { echo "$@" >&2; exit 1; }
+
+diff -uNr perl-cross-1.2/miniperl_top perl-cross-1.2+iPhone/miniperl_top
+--- perl-cross-1.2/miniperl_top 2018-04-17 06:07:31.000000000 -1000
++++ perl-cross-1.2+iPhone/miniperl_top 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ # This script can be used to run Makefile.PL
+ # Note that is relies on $0 to tell where lib/ is; typically
diff --git a/data/perl/perl5.diff b/data/perl/perl5.diff
new file mode 100644
index 000000000..952126d8a
--- /dev/null
+++ b/data/perl/perl5.diff
@@ -0,0 +1,66 @@
+diff --git a/Configure b/Configure
+index bdcfaf17ef..d7d16e9332 100755
+--- a/Configure
++++ b/Configure
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/bash
+ #
+ # If these # comments don't work, trim them. Don't worry about any other
+ # shell scripts, Configure will trim # comments from them for you.
+diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+index 66a24d7838..7fa2983c20 100644
+--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
++++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+@@ -32,6 +32,7 @@ BEGIN {
+ $Is{Interix} = $^O eq 'interix';
+ $Is{SunOS4} = $^O eq 'sunos';
+ $Is{Solaris} = $^O eq 'solaris';
++ $Is{Darwin} = $^O eq 'darwin';
+ $Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
+ $Is{BSD} = ($^O =~ /^(?:free|net|open)bsd$/ or
+ grep( $^O eq $_, qw(bsdos interix dragonfly) )
+@@ -1022,7 +1023,7 @@ sub xs_make_dynamic_lib {
+ push(@m," \$(RM_F) \$\@\n");
+
+ my $libs = '$(LDLOADLIBS)';
+- if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
++ if (($Is{NetBSD} || $Is{Interix} || $Is{Android} || $Is{Darwin} || $Is{iPhoneOS}) && $Config{'useshrplib'} eq 'true') {
+ # Use nothing on static perl platforms, and to the flags needed
+ # to link against the shared libperl library on shared perl
+ # platforms. We peek at lddlflags to see if we need -Wl,-R
+@@ -1031,8 +1032,8 @@ sub xs_make_dynamic_lib {
+ $libs .= ' "-L$(PERL_INC)" "-Wl,-R$(INSTALLARCHLIB)/CORE" "-Wl,-R$(PERL_ARCHLIB)/CORE" -lperl';
+ } elsif ($Config{'lddlflags'} =~ /-R/) {
+ $libs .= ' "-L$(PERL_INC)" "-R$(INSTALLARCHLIB)/CORE" "-R$(PERL_ARCHLIB)/CORE" -lperl';
+- } elsif ( $Is{Android} ) {
+- # The Android linker will not recognize symbols from
++ } elsif ( $Is{Android} || $Is{Darwin} || $Is{iPhoneOS} ) {
++ # The Android and darwin linker will not recognize symbols from
+ # libperl unless the module explicitly depends on it.
+ $libs .= ' "-L$(PERL_INC)" -lperl';
+ }
+diff --git a/dist/PathTools/Cwd.xs b/dist/PathTools/Cwd.xs
+index c6c600b6ae..027f266152 100644
+--- a/dist/PathTools/Cwd.xs
++++ b/dist/PathTools/Cwd.xs
+@@ -9,7 +9,6 @@
+ #include "XSUB.h"
+ #define NEED_my_strlcpy
+ #define NEED_my_strlcat
+-#include "ppport.h"
+
+ #ifdef I_UNISTD
+ # include <unistd.h>
+diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
+index d345e98042..85b9da7ded 100644
+--- a/ext/Errno/Errno_pm.PL
++++ b/ext/Errno/Errno_pm.PL
+@@ -105,6 +105,7 @@ sub default_cpp {
+ and -f $upup_cppstdin
+ and -x $upup_cppstdin);
+ $cppstdin = $upup_cppstdin if $cppstdin_is_wrapper;
++ $cppstdin =~ s/-P//;
+ }
+ return "$cppstdin $Config{cppflags} $Config{cppminus}";
+ }