/
usr
/
share
/
perl5
/
pod
/
/usr/share/perl5/pod
mkdir
upload
Name
Size
Mode
Actions
perl.pod
16270
0644
edit
dl
rm
perl56delta.pod
107201
0644
edit
dl
rm
perl58delta.pod
115165
0644
edit
dl
rm
perl561delta.pod
124713
0644
edit
dl
rm
perl581delta.pod
38061
0644
edit
dl
rm
perl582delta.pod
4470
0644
edit
dl
rm
perl583delta.pod
6335
0644
edit
dl
rm
perl584delta.pod
7363
0644
edit
dl
rm
perl585delta.pod
5889
0644
edit
dl
rm
perl586delta.pod
4651
0644
edit
dl
rm
perl587delta.pod
8357
0644
edit
dl
rm
perl588delta.pod
25272
0644
edit
dl
rm
perl589delta.pod
53900
0644
edit
dl
rm
perl5004delta.pod
56240
0644
edit
dl
rm
perl5005delta.pod
34283
0644
edit
dl
rm
perl5100delta.pod
55535
0644
edit
dl
rm
perl5101delta.pod
43888
0644
edit
dl
rm
perl5120delta.pod
89272
0644
edit
dl
rm
perl5121delta.pod
10141
0644
edit
dl
rm
perl5122delta.pod
9603
0644
edit
dl
rm
perl5123delta.pod
4100
0644
edit
dl
rm
perl5124delta.pod
3672
0644
edit
dl
rm
perl5125delta.pod
7683
0644
edit
dl
rm
perl5140delta.pod
144324
0644
edit
dl
rm
perl5141delta.pod
7966
0644
edit
dl
rm
perl5142delta.pod
6892
0644
edit
dl
rm
perl5143delta.pod
7760
0644
edit
dl
rm
perl5144delta.pod
6327
0644
edit
dl
rm
perl5160delta.pod
133651
0644
edit
dl
rm
perl5161delta.pod
6142
0644
edit
dl
rm
perl5162delta.pod
3594
0644
edit
dl
rm
perl5163delta.pod
4085
0644
edit
dl
rm
perl5180delta.pod
119431
0644
edit
dl
rm
perl5181delta.pod
6595
0644
edit
dl
rm
perl5182delta.pod
5335
0644
edit
dl
rm
perl5184delta.pod
4642
0644
edit
dl
rm
perl5200delta.pod
115699
0644
edit
dl
rm
perl5201delta.pod
10899
0644
edit
dl
rm
perl5202delta.pod
12509
0644
edit
dl
rm
perl5203delta.pod
9392
0644
edit
dl
rm
perl5220delta.pod
130963
0644
edit
dl
rm
perl5221delta.pod
10767
0644
edit
dl
rm
perl5222delta.pod
12629
0644
edit
dl
rm
perl5223delta.pod
8456
0644
edit
dl
rm
perl5224delta.pod
4460
0644
edit
dl
rm
perl5240delta.pod
64927
0644
edit
dl
rm
perl5241delta.pod
8215
0644
edit
dl
rm
perl5242delta.pod
4113
0644
edit
dl
rm
perl5243delta.pod
11428
0644
edit
dl
rm
perl5244delta.pod
4510
0644
edit
dl
rm
perl5260delta.pod
101836
0644
edit
dl
rm
perl5261delta.pod
7927
0644
edit
dl
rm
perl5262delta.pod
7880
0644
edit
dl
rm
perl5263delta.pod
7063
0644
edit
dl
rm
perl5280delta.pod
72113
0644
edit
dl
rm
perlaix.pod
20437
0644
edit
dl
rm
perlamiga.pod
5749
0644
edit
dl
rm
perlandroid.pod
7871
0644
edit
dl
rm
perlapi.pod
443535
0644
edit
dl
rm
perlapio.pod
19285
0644
edit
dl
rm
perlartistic.pod
7010
0644
edit
dl
rm
perlbook.pod
8338
0644
edit
dl
rm
perlboot.pod
294
0644
edit
dl
rm
perlbot.pod
304
0644
edit
dl
rm
perlbs2000.pod
8058
0644
edit
dl
rm
perlcall.pod
56706
0644
edit
dl
rm
perlce.pod
14602
0644
edit
dl
rm
perlcheat.pod
4481
0644
edit
dl
rm
perlclib.pod
9619
0644
edit
dl
rm
perlcn.pod
4691
0644
edit
dl
rm
perlcommunity.pod
7217
0644
edit
dl
rm
perlcygwin.pod
27199
0644
edit
dl
rm
perldata.pod
46743
0644
edit
dl
rm
perldbmfilter.pod
4981
0644
edit
dl
rm
perldebguts.pod
38535
0644
edit
dl
rm
perldebtut.pod
22152
0644
edit
dl
rm
perldebug.pod
39258
0644
edit
dl
rm
perldelta.pod
7063
0644
edit
dl
rm
perldeprecation.pod
18169
0644
edit
dl
rm
perldiag.pod
284572
0644
edit
dl
rm
perldos.pod
10522
0644
edit
dl
rm
perldsc.pod
25614
0644
edit
dl
rm
perldtrace.pod
7958
0644
edit
dl
rm
perlebcdic.pod
84233
0644
edit
dl
rm
perlembed.pod
37196
0644
edit
dl
rm
perlexperiment.pod
7195
0644
edit
dl
rm
perlfork.pod
13355
0644
edit
dl
rm
perlform.pod
16608
0644
edit
dl
rm
perlfreebsd.pod
1610
0644
edit
dl
rm
perlfunc.pod
392957
0644
edit
dl
rm
perlgit.pod
33509
0644
edit
dl
rm
perlgpl.pod
13815
0644
edit
dl
rm
perlguts.pod
139329
0644
edit
dl
rm
perlhack.pod
40445
0644
edit
dl
rm
perlhacktips.pod
55509
0644
edit
dl
rm
perlhacktut.pod
6153
0644
edit
dl
rm
perlhaiku.pod
1508
0644
edit
dl
rm
perlhist.pod
53546
0644
edit
dl
rm
perlhpux.pod
30509
0644
edit
dl
rm
perlhurd.pod
1993
0644
edit
dl
rm
perlintern.pod
54572
0644
edit
dl
rm
perlinterp.pod
33687
0644
edit
dl
rm
perlintro.pod
22119
0644
edit
dl
rm
perliol.pod
34185
0644
edit
dl
rm
perlipc.pod
70829
0644
edit
dl
rm
perlirix.pod
4395
0644
edit
dl
rm
perljp.pod
7521
0644
edit
dl
rm
perlko.pod
12259
0644
edit
dl
rm
perllexwarn.pod
355
0644
edit
dl
rm
perllinux.pod
1488
0644
edit
dl
rm
perllocale.pod
68678
0644
edit
dl
rm
perllol.pod
9580
0644
edit
dl
rm
perlmacos.pod
1001
0644
edit
dl
rm
perlmacosx.pod
12060
0644
edit
dl
rm
perlmod.pod
26250
0644
edit
dl
rm
perlmodinstall.pod
12792
0644
edit
dl
rm
perlmodlib.pod
76482
0644
edit
dl
rm
perlmodstyle.pod
22575
0644
edit
dl
rm
perlmroapi.pod
3212
0644
edit
dl
rm
perlnetware.pod
6648
0644
edit
dl
rm
perlnewmod.pod
11036
0644
edit
dl
rm
perlnumber.pod
8353
0644
edit
dl
rm
perlobj.pod
35537
0644
edit
dl
rm
perlootut.pod
26783
0644
edit
dl
rm
perlop.pod
136252
0644
edit
dl
rm
perlopenbsd.pod
1204
0644
edit
dl
rm
perlopentut.pod
9455
0644
edit
dl
rm
perlos2.pod
93351
0644
edit
dl
rm
perlos390.pod
15674
0644
edit
dl
rm
perlos400.pod
4768
0644
edit
dl
rm
perlpacktut.pod
51282
0644
edit
dl
rm
perlperf.pod
49881
0644
edit
dl
rm
perlplan9.pod
5125
0644
edit
dl
rm
perlpod.pod
22196
0644
edit
dl
rm
perlpodspec.pod
68476
0644
edit
dl
rm
perlpolicy.pod
25629
0644
edit
dl
rm
perlport.pod
87602
0644
edit
dl
rm
perlpragma.pod
5176
0644
edit
dl
rm
perlqnx.pod
6673
0644
edit
dl
rm
perlre.pod
120901
0644
edit
dl
rm
perlreapi.pod
30334
0644
edit
dl
rm
perlrebackslash.pod
31817
0644
edit
dl
rm
perlrecharclass.pod
49029
0644
edit
dl
rm
perlref.pod
35304
0644
edit
dl
rm
perlreftut.pod
18790
0644
edit
dl
rm
perlreguts.pod
38328
0644
edit
dl
rm
perlrepository.pod
509
0644
edit
dl
rm
perlrequick.pod
18497
0644
edit
dl
rm
perlreref.pod
14744
0644
edit
dl
rm
perlretut.pod
121257
0644
edit
dl
rm
perlriscos.pod
1529
0644
edit
dl
rm
perlrun.pod
53550
0644
edit
dl
rm
perlsec.pod
26184
0644
edit
dl
rm
perlsolaris.pod
29822
0644
edit
dl
rm
perlsource.pod
6876
0644
edit
dl
rm
perlstyle.pod
8630
0644
edit
dl
rm
perlsub.pod
72967
0644
edit
dl
rm
perlsymbian.pod
15359
0644
edit
dl
rm
perlsyn.pod
44512
0644
edit
dl
rm
perlsynology.pod
7778
0644
edit
dl
rm
perlthrtut.pod
46459
0644
edit
dl
rm
perltie.pod
38607
0644
edit
dl
rm
perltoc.pod
694171
0644
edit
dl
rm
perltodo.pod
376
0644
edit
dl
rm
perltooc.pod
294
0644
edit
dl
rm
perltoot.pod
294
0644
edit
dl
rm
perltrap.pod
10620
0644
edit
dl
rm
perltru64.pod
8492
0644
edit
dl
rm
perltw.pod
4477
0644
edit
dl
rm
perlunicode.pod
82491
0644
edit
dl
rm
perlunicook.pod
25488
0644
edit
dl
rm
perlunifaq.pod
13647
0644
edit
dl
rm
perluniintro.pod
38340
0644
edit
dl
rm
perluniprops.pod
285306
0644
edit
dl
rm
perlunitut.pod
7951
0644
edit
dl
rm
perlutil.pod
7640
0644
edit
dl
rm
perlvar.pod
78364
0644
edit
dl
rm
perlvms.pod
50823
0644
edit
dl
rm
perlvos.pod
3843
0644
edit
dl
rm
perlwin32.pod
39298
0644
edit
dl
rm
perlxs.pod
78920
0644
edit
dl
rm
perlxstut.pod
50095
0644
edit
dl
rm
perlxstypemap.pod
24001
0644
edit
dl
rm
Edit:
/usr/share/perl5/pod/perlandroid.pod
(7871B)
If you read this file _as_is_, just ignore the funny characters you see. It is written in the POD format (see pod/perlpod.pod) which is specially designed to be readable as is. =head1 NAME perlandroid - Perl under Android =head1 SYNOPSIS The first portions of this documents contains instructions to cross-compile Perl for Android 2.0 and later, using the binaries provided by Google. The latter portion describes how to build perl native using one of the toolchains available on the Play Store. =head1 DESCRIPTION This document describes how to set up your host environment when attempting to build Perl for Android. =head1 Cross-compilation These instructions assume an Unixish build environment on your host system; they've been tested on Linux and OS X, and may work on Cygwin and MSYS. While Google also provides an NDK for Windows, these steps won't work native there, although it may be possible to cross-compile through different means. If your host system's architecture is 32 bits, remember to change the C<x86_64>'s below to C<x86>'s. On a similar vein, the examples below use the 4.8 toolchain; if you want to use something older or newer (for example, the 4.4.3 toolchain included in the 8th revision of the NDK), just change those to the relevant version. =head2 Get the Android Native Development Kit (NDK) You can download the NDK from L<https://developer.android.com/tools/sdk/ndk/index.html>. You'll want the normal, non-legacy version. =head2 Determine the architecture you'll be cross-compiling for There's three possible options: arm-linux-androideabi for ARM, mipsel-linux-android for MIPS, and simply x86 for x86. As of 2014, most Android devices run on ARM, so that is generally a safe bet. With those two in hand, you should add $ANDROID_NDK/toolchains/$TARGETARCH-4.8/prebuilt/`uname | tr '[A-Z]' '[a-z]'`-x86_64/bin to your C<PATH>, where C<$ANDROID_NDK> is the location where you unpacked the NDK, and C<$TARGETARCH> is your target's architecture. =head2 Set up a standalone toolchain This creates a working sysroot that we can feed to Configure later. $ export ANDROID_TOOLCHAIN=/tmp/my-toolchain-$TARGETARCH $ export SYSROOT=$ANDROID_TOOLCHAIN/sysroot $ $ANDROID_NDK/build/tools/make-standalone-toolchain.sh \ --platform=android-9 \ --install-dir=$ANDROID_TOOLCHAIN \ --system=`uname | tr '[A-Z]' '[a-z]'`-x86_64 \ --toolchain=$TARGETARCH-4.8 =head2 adb or ssh? adb is the Android Debug Bridge. For our purposes, it's basically a way of establishing an ssh connection to an Android device without having to install anything on the device itself, as long as the device is either on the same local network as the host, or it is connected to the host through USB. Perl can be cross-compiled using either adb or a normal ssh connection; in general, if you can connect your device to the host using a USB port, or if you don't feel like installing an sshd app on your device, you may want to use adb, although you may be forced to switch to ssh if your device is not rooted and you're unlucky -- more on that later. Alternatively, if you're cross-compiling to an emulator, you'll have to use adb. =head3 adb To use adb, download the Android SDK from L<https://developer.android.com/sdk/index.html>. The "SDK Tools Only" version should suffice -- if you downloaded the ADT Bundle, you can find the sdk under F<$ADT_BUNDLE/sdk/>. Add F<$ANDROID_SDK/platform-tools> to your C<PATH>, which should give you access to adb. You'll now have to find your device's name using C<adb devices>, and later pass that to Configure through C<-Dtargethost=$DEVICE>. However, before calling Configure, you need to check if using adb is a viable choice in the first place. Because Android doesn't have a F</tmp>, nor does it allow executables in the sdcard, we need to find somewhere in the device for Configure to put some files in, as well as for the tests to run in. If your device is rooted, then you're good. Try running these: $ export TARGETDIR=/mnt/asec/perl $ adb -s $DEVICE shell "echo sh -c '\"mkdir $TARGETDIR\"' | su --" Which will create the directory we need, and you can move on to the next step. F</mnt/asec> is mounted as a tmpfs in Android, but it's only accessible to root. If your device is not rooted, you may still be in luck. Try running this: $ export TARGETDIR=/data/local/tmp/perl $ adb -s $DEVICE shell "mkdir $TARGETDIR" If the command works, you can move to the next step, but beware: B<You'll have to remove the directory from the device once you are done! Unlike F</mnt/asec>, F</data/local/tmp> may not get automatically garbage collected once you shut off the phone>. If neither of those work, then you can't use adb to cross-compile to your device. Either try rooting it, or go for the ssh route. =head3 ssh To use ssh, you'll need to install and run a sshd app and set it up properly. There are several paid and free apps that do this rather easily, so you should be able to spot one on the store. Remember that Perl requires a passwordless connection, so set up a public key. Note that several apps spew crap to stderr every time you connect, which can throw off Configure. You may need to monkeypatch the part of Configure that creates C<run-ssh> to have it discard stderr. Since you're using ssh, you'll have to pass some extra arguments to Configure: -Dtargetrun=ssh -Dtargethost=$TARGETHOST -Dtargetuser=$TARGETUSER -Dtargetport=$TARGETPORT =head2 Configure and beyond With all of the previous done, you're now ready to call Configure. If using adb, a "basic" Configure line will look like this: $ ./Configure -des -Dusedevel -Dusecrosscompile -Dtargetrun=adb \ -Dcc=$TARGETARCH-gcc \ -Dsysroot=$SYSROOT \ -Dtargetdir=$TARGETDIR \ -Dtargethost=$DEVICE If using ssh, it's not too different -- we just change targetrun to ssh, and pass in targetuser and targetport. It ends up looking like this: $ ./Configure -des -Dusedevel -Dusecrosscompile -Dtargetrun=ssh \ -Dcc=$TARGETARCH-gcc \ -Dsysroot=$SYSROOT \ -Dtargetdir=$TARGETDIR \ -Dtargethost="$TARGETHOST" \ -Dtargetuser=$TARGETUSER \ -Dtargetport=$TARGETPORT Now you're ready to run C<make> and C<make test>! As a final word of warning, if you're using adb, C<make test> may appear to hang; this is because it doesn't output anything until it finishes running all tests. You can check its progress by logging into the device, moving to F<$TARGETDIR>, and looking at the file F<output.stdout>. =head3 Notes =over =item * If you are targetting x86 Android, you will have to change C<$TARGETARCH-gcc> to C<i686-linux-android-gcc>. =item * On some older low-end devices -- think early 2.2 era -- some tests, particularly F<t/re/uniprops.t>, may crash the phone, causing it to turn itself off once, and then back on again. =back =head1 Native Builds While Google doesn't provide a native toolchain for Android, you can still get one from the Play Store; for example, there's the CCTools app which you can get for free. Keep in mind that you want a full toolchain; some apps tend to default to installing only a barebones version without some important utilities, like ar or nm. Once you have the toolchain set up properly, the only remaining hurdle is actually locating where in the device it was installed in. For example, CCTools installs its toolchain in F</data/data/com.pdaxrom.cctools/root/cctools>. With the path in hand, compiling perl is little more than: export SYSROOT=<location of the native toolchain> export LD_LIBRARY_PATH="$SYSROOT/lib:`pwd`:`pwd`/lib:`pwd`/lib/auto:$LD_LIBRARY_PATH" sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" =head1 AUTHOR Brian Fraser <fraserbn@gmail.com> =cut
Save
cmd:
run