diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2007-01-01 03:49:03 -0500 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-01-01 15:41:48 +0000 |
commit | 53d44271720d88220a01b5620a93869665083b01 (patch) | |
tree | 1dad3ec38b4010490e014136342b7211ea4f48c0 /symbian | |
parent | 22735491a787756cfbfdb6b4e8124a882f0abd9a (diff) | |
download | perl-53d44271720d88220a01b5620a93869665083b01.tar.gz |
Symbian port: add Series 90 support
Message-ID: <4599114F.8020307@iki.fi>
p4raw-id: //depot/perl@29650
Diffstat (limited to 'symbian')
-rw-r--r-- | symbian/PerlApp.cpp | 36 | ||||
-rw-r--r-- | symbian/PerlApp.h | 4 | ||||
-rw-r--r-- | symbian/PerlUi.cpp | 40 | ||||
-rw-r--r-- | symbian/PerlUi.h | 16 | ||||
-rw-r--r-- | symbian/config.pl | 55 | ||||
-rw-r--r-- | symbian/config.sh | 2 | ||||
-rw-r--r-- | symbian/cwd.pl | 2 | ||||
-rw-r--r-- | symbian/install.cfg | 10 | ||||
-rw-r--r-- | symbian/makesis.pl | 3 | ||||
-rw-r--r-- | symbian/sdk.pl | 5 | ||||
-rw-r--r-- | symbian/xsbuild.pl | 23 |
11 files changed, 131 insertions, 65 deletions
diff --git a/symbian/PerlApp.cpp b/symbian/PerlApp.cpp index d90cc044ff..ffca7afc52 100644 --- a/symbian/PerlApp.cpp +++ b/symbian/PerlApp.cpp @@ -77,7 +77,7 @@ TUid CPerlAppApplication::AppDllUid() const return KPerlAppUid; } -enum TPerlAppPanic +enum TPerlAppPanic { EPerlAppCommandUnknown = 1 }; @@ -115,12 +115,12 @@ static TBool IsInInbox(TFileName aFileName) static TBool IsPerlModule(TParsePtrC aParsed) { - return aParsed.Ext().CompareF(_L(".pm")) == 0; + return aParsed.Ext().CompareF(_L(".pm")) == 0; } static TBool IsPerlScript(TParsePtrC aParsed) { - return aParsed.Ext().CompareF(_L(".pl")) == 0; + return aParsed.Ext().CompareF(_L(".pl")) == 0; } static void CopyFromInboxL(RFs aFs, const TFileName& aSrc, const TFileName& aDst) @@ -182,7 +182,7 @@ static TBool FindPerlPackageName(TPeekBuffer aPeekBuffer, TInt aOff, TFileName& isALPHA(aPeekBuffer[j])) { while (j < n && isALNUM(aPeekBuffer[j]) && - i < m) + i < m) aFn[i++] = aPeekBuffer[j++]; } } @@ -238,7 +238,7 @@ static TBool InstallStuffL(const TFileName &aSrc, TParse aDrive, TParse aFile, T { TFileName aDst; TPtrC drive = aDrive.Drive(); - TPtrC namext = aFile.NameAndExt(); + TPtrC namext = aFile.NameAndExt(); aDst.Format(_L("%S%S%S"), &drive, &KScriptPrefix, &namext); if (!IsPerlScript(aDst) && !LooksLikePerlL(aPeekBuffer)) { @@ -266,7 +266,7 @@ static TBool RunStuffL(const TFileName& aScriptName, TPeekBuffer aPeekBuffer) if (isModule) message.Format(_L("Really run module %S?"), &aScriptName); - else + else message.Format(_L("Run %S?"), &aScriptName); if (CPerlUi::YesNoDialogL(message)) DoRunScriptL(aScriptName); @@ -435,9 +435,9 @@ void CPerlAppAppUi::DoHandleCommandL(TInt aCommand) { #ifdef __SERIES60__ _LIT(prompt, "Oneliner:"); #endif /* #ifdef __SERIES60__ */ -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) _LIT(prompt, "Code:"); // The title has "Oneliner" already. -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ CPerlAppAppUi* cAppUi = static_cast<CPerlAppAppUi*>(CEikonEnv::Static()->EikAppUi()); if (CPerlUi::TextQueryDialogL(_L("Oneliner"), @@ -450,16 +450,26 @@ void CPerlAppAppUi::DoHandleCommandL(TInt aCommand) { CnvUtfConverter::ConvertFromUnicodeToUtf8(utf8, cAppUi->iOneLiner); CPerlBase* perl = CPerlBase::NewInterpreterLC(); - int argc = 3; - char **argv = (char**) malloc(argc * sizeof(char *)); +#ifdef __SERIES90__ + int argc = 5; +#else + int argc = 3; +#endif + char **argv = (char**) malloc(argc * sizeof(char *)); User::LeaveIfNull(argv); TCleanupItem argvCleanupItem = TCleanupItem(free, argv); CleanupStack::PushL(argvCleanupItem); argv[0] = (char *) "perl"; argv[1] = (char *) "-le"; +#ifdef __SERIES90__ + argv[2] = (char *) "unshift @INC, 'C:/Mydocs';"; + argv[3] = (char *) "-e"; + argv[4] = (char *) utf8.PtrZ(); +#else argv[2] = (char *) utf8.PtrZ(); - perl->ParseAndRun(argc, argv); +#endif + perl->ParseAndRun(argc, argv); CleanupStack::PopAndDestroy(2, perl); } } @@ -497,7 +507,7 @@ void CPerlAppAppUi::DoHandleCommandL(TInt aCommand) { } } -CApaDocument* CPerlAppApplication::CreateDocumentL() +CApaDocument* CPerlAppApplication::CreateDocumentL() { CPerlAppDocument* cDoc = new (ELeave) CPerlAppDocument(*this); return cDoc; @@ -524,7 +534,7 @@ CFileStore* CPerlAppDocument::OpenFileL(TBool aDoOpen, const TDesC& aFileName, R #endif // #ifndef PerlAppMinimal -EXPORT_C CApaApplication* NewApplication() +EXPORT_C CApaApplication* NewApplication() { return new CPerlAppApplication; } diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h index 43f61b60d5..cbf1963cf4 100644 --- a/symbian/PerlApp.h +++ b/symbian/PerlApp.h @@ -73,9 +73,9 @@ class CPerlAppAppUi : public CPerlUiAppUi class CPerlAppAppView : public CPerlUiAppView { public: -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) void HandleCommandL(TInt aCommand); -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ }; #endif // __PerlApp_h__ diff --git a/symbian/PerlUi.cpp b/symbian/PerlUi.cpp index 384148b679..01be136d09 100644 --- a/symbian/PerlUi.cpp +++ b/symbian/PerlUi.cpp @@ -13,14 +13,14 @@ # endif #endif /* #ifdef __SERIES60__ */ -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) # include <eikon.hrh> # include <cknflash.h> # include <ckndgopn.h> # include <ckndgfob.h> # include <eiklabel.h> # include <cknconf.h> -#endif /* #ifdef __SERIES80__ */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */ #ifdef __UIQ__ # include <qikon.hrh> @@ -42,9 +42,9 @@ #include "PerlUi.hrh" #include "PerlUi.rsg" -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) #include "Eikon.rsg" -#endif /* #ifdef __SERIES80__ */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */ #include "EXTERN.h" #include "perl.h" @@ -74,9 +74,9 @@ EXPORT_C TBool CPerlUi::OkCancelDialogL(TDesC& aMessage) dlg->SetTextL(aMessage); return dlg->RunDlgLD() == EAknSoftkeyOk; #endif /* #ifdef __SERIES60__ */ -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) return CCknConfirmationDialog::RunDlgWithDefaultIconLD(aMessage, R_EIK_BUTTONS_CANCEL_OK); -#endif /* #ifdef __SERIES80__ */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */ #ifdef __UIQ__ CEikDialog* dlg = new (ELeave) CEikDialog(); return dlg->ExecuteLD(R_PERLUI_OK_CANCEL_DIALOG) == EEikBidOk; @@ -92,9 +92,9 @@ EXPORT_C TBool CPerlUi::YesNoDialogL(TDesC& aMessage) dlg->SetTextL(aMessage); return dlg->RunDlgLD() == EAknSoftkeyOk; #endif /* #ifdef __SERIES60__ */ -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) return CCknConfirmationDialog::RunDlgWithDefaultIconLD(aMessage, R_EIK_BUTTONS_NO_YES); -#endif /* #ifdef __SERIES80__ */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */ #ifdef __UIQ__ CEikDialog* dlg = new (ELeave) CEikDialog(); return dlg->ExecuteLD(R_PERLUI_YES_NO_DIALOG) == EEikBidOk; @@ -107,9 +107,9 @@ EXPORT_C void CPerlUi::InformationNoteL(TDesC& aMessage) CAknInformationNote* note = new (ELeave) CAknInformationNote; note->ExecuteLD(aMessage); #endif /* #ifdef __SERIES60__ */ -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) CEikonEnv::Static()->InfoMsg(aMessage); -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ } EXPORT_C TInt CPerlUi::WarningNoteL(TDesC& aMessage) @@ -118,13 +118,13 @@ EXPORT_C TInt CPerlUi::WarningNoteL(TDesC& aMessage) CAknWarningNote* note = new (ELeave) CAknWarningNote; return note->ExecuteLD(aMessage); #endif /* #ifdef __SERIES60__ */ -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) CEikonEnv::Static()->AlertWin(aMessage); return ETrue; -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ } -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) CPerlUiTextQueryDialog::CPerlUiTextQueryDialog(HBufC*& aBuffer) : iData(aBuffer) @@ -147,7 +147,7 @@ void CPerlUiTextQueryDialog::PreLayoutDynInitL() /* TODO: OfferKeyEventL() so that newline can be seen as 'OK'. * Or a hotkey for the button? */ -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ EXPORT_C TBool CPerlUi::TextQueryDialogL(const TDesC& aTitle, const TDesC& aPrompt, TDes& aData, const TInt aMaxLength) { @@ -158,7 +158,7 @@ EXPORT_C TBool CPerlUi::TextQueryDialogL(const TDesC& aTitle, const TDesC& aProm dlg->SetMaxLength(aMaxLength); return dlg->ExecuteLD(R_PERLUI_TEXT_QUERY_DIALOG); #endif /* #ifdef __SERIES60__ */ -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) HBufC* data = NULL; CPerlUiTextQueryDialog* dlg = new (ELeave) CPerlUiTextQueryDialog(data); @@ -170,7 +170,7 @@ EXPORT_C TBool CPerlUi::TextQueryDialogL(const TDesC& aTitle, const TDesC& aProm return ETrue; } return EFalse; -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ } EXPORT_C TBool CPerlUi::FileQueryDialogL(TDes& aFilename) @@ -179,7 +179,7 @@ EXPORT_C TBool CPerlUi::FileQueryDialogL(TDes& aFilename) return AknCommonDialogs::RunSelectDlgLD(aFilename, R_PERLUI_FILE_SELECTION_DIALOG); #endif /* #ifdef __SERIES60__ */ -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) if (CCknOpenFileDialog::RunDlgLD(aFilename, CCknFileListDialogBase::EShowAllDrives |CCknFileListDialogBase::EShowSystemFilesAndFolders @@ -194,7 +194,7 @@ EXPORT_C TBool CPerlUi::FileQueryDialogL(TDes& aFilename) CEikonEnv::Static()->InfoMsg(_L("File not found")); } return EFalse; -#endif /* #ifdef __SERIES80__ */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */ #ifdef __UIQ__ return EFalse; // No filesystem access in UIQ 2.x! #endif /* #ifdef __UIQ__ */ @@ -218,7 +218,7 @@ EXPORT_C void CPerlUiAppUi::HandleCommandL(TInt aCommand) #endif /* #ifdef __SERIES60__ */ -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) EXPORT_C void CPerlUiAppView::HandleCommandL(TInt aCommand, CPerlUiAppUi* aAppUi) { aAppUi->DoHandleCommandL(aCommand); @@ -236,7 +236,7 @@ EXPORT_C void CPerlUiAppUi::HandleCommandL(TInt aCommand) { } } -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ CPerlUiAppView* CPerlUiAppView::NewL(const TRect& aRect) { diff --git a/symbian/PerlUi.h b/symbian/PerlUi.h index b6011c82da..9a5002032f 100644 --- a/symbian/PerlUi.h +++ b/symbian/PerlUi.h @@ -11,14 +11,14 @@ # include <akndoc.h> #endif /* #ifdef __SERIES60__ */ -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) # include <eikapp.h> # include <eikappui.h> # include <eikdoc.h> # include <eikbctrl.h> # include <eikgted.h> # include <eikdialg.h> -#endif /* #ifdef __SERIES60__ */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */ #ifdef __UIQ__ # include <qikapplication.h> @@ -38,13 +38,13 @@ # define CgPerlUiAppView CCoeControl #endif /* #ifdef __SERIES60__ */ -#ifdef __SERIES80__ +#if defined(__SERIES80__) || defined(__SERIES90__) # define CgPerlUiDocument CEikDocument # define CgPerlUiApplication CEikApplication # define CgPerlUiAppUi CEikAppUi # define CgPerlUiNoteDialog CCknFlashingDialog # define CgPerlUiAppView CEikBorderedControl -#endif /* #ifdef __SERIES60__ */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */ #ifdef __UIQ__ # define CgPerlUiDocument CEikDocument @@ -80,14 +80,14 @@ class CPerlUiAppView : public CgPerlUiAppView static CPerlUiAppView* NewLC(const TRect& aRect); ~CPerlUiAppView(); void Draw(const TRect& aRect) const; -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) IMPORT_C void HandleCommandL(TInt aCommand, CPerlUiAppUi* aAppUi); -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ private: void ConstructL(const TRect& aRect); }; -#if defined(__SERIES80__) || defined(__UIQ__) +#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) class CPerlUiTextQueryDialog : public CEikDialog { @@ -104,7 +104,7 @@ class CPerlUiTextQueryDialog : public CEikDialog TBool OkToExitL(TInt aKeycode); }; -#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */ +#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ class CPerlUi : public CgPerlUiAppUi { diff --git a/symbian/config.pl b/symbian/config.pl index e23b35992c..52b6e71a67 100644 --- a/symbian/config.pl +++ b/symbian/config.pl @@ -31,6 +31,7 @@ my $WIN = $ENV{WIN} ; # 'wins', 'winscw' (from sdk.pl) my $ARM = 'thumb'; # 'thumb', 'armv5' my $S60SDK = $ENV{S60SDK}; # qw(1.2 2.0 2.1 2.6) (from sdk.pl) my $S80SDK = $ENV{S80SDK}; # qw(2.0) (from sdk.pl) +my $S90SDK = $ENV{S90SDK}; # qw(1.1) (from sdk.pl) my $UIQSDK = $ENV{UIQSDK}; # qw(2.0 2.1) (from sdk.pl) my $UREL = $ENV{UREL}; # from sdk.pl @@ -40,7 +41,7 @@ my $UARM = $ENV{UARM}; # from sdk.pl die "$0: SDK not recognized\n" if !defined($SYMBIAN_VERSION) || !defined($SDK_VERSION) || - (!defined($S60SDK) && !defined($S80SDK) && !defined($UIQSDK)); + (!defined($S60SDK) && !defined($S80SDK) && !defined($S90SDK) && !defined($UIQSDK)); die "$0: does not know which Windows compiler to use\n" unless defined $WIN; @@ -86,6 +87,9 @@ __EOF__ print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./; print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./; } + if ($SDK_VARIANT eq 'S90') { + print $fh "MACRO\t__SERIES90__\n"; + } if ($SDK_VARIANT eq 'UIQ') { print $fh "MACRO\t__UIQ__\n"; print $fh "MACRO\t__UIQ_1X__\n" if $UIQSDK =~ /^1\./; @@ -95,6 +99,7 @@ __EOF__ @c = map { glob } qw(*.c); # Find the .c files. @c = map { lc } @c; # Lowercase the names. @c = grep { !/malloc\.c/ } @c; # Use the system malloc. + @c = grep { !/madly\.c/ } @c; # mad is undef. @c = grep { !/main\.c/ } @c; # main.c must be explicit. push @c, map { lc } @x; @c = map { s:^\.\./::; $_ } @c; # Remove the leading ../ @@ -124,7 +129,7 @@ LIBRARY hal.lib LIBRARY estor.lib __EOF__ } - if ($SDK_VARIANT =~ /^S[68]0$/) { + if ($SDK_VARIANT =~ /^S[689]0$/) { print $fh <<__EOF__; LIBRARY commonengine.lib __EOF__ @@ -135,7 +140,7 @@ LIBRARY avkon.lib LIBRARY commondialogs.lib __EOF__ } - if (defined $S80SDK) { + if ((defined $S80SDK) or (defined $S90SDK)) { print $fh <<__EOF__; LIBRARY eikctl.lib LIBRARY eikcoctl.lib @@ -211,6 +216,7 @@ sub load_config_sh { my ( $var, $val ) = ( $1, $2 ); $val =~ s/x.y.z/$R_V_SV/gi; $val =~ s/thumb/$ARM/gi; + $val = "C:$val" if (defined($S90SDK) and ($val =~ /^(\/|\\\\)system[\/\\]/i)); $val = "'$SYMBIAN_VERSION'" if $var eq 'osvers'; $val = "'$SDK_VERSION'" if $var eq 'sdkvers'; $config{$var} = $val; @@ -265,7 +271,7 @@ __EOF__ sub create_DynaLoader_cpp { print "\text\\DynaLoader\\DynaLoader.cpp\n"; system( -q[perl -Ilib lib\ExtUtils\xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp] +q[xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp] ) == 0 or die "$0: creating DynaLoader.cpp failed: $!\n"; push @unclean, 'ext\DynaLoader\DynaLoader.cpp'; @@ -284,6 +290,10 @@ sub create_symbian_port_h { $S80SDK =~ /^(\d+)\.(\d+)$/; ($sdkmajor, $sdkminor) = ($1, $2); } + if ($SDK_VARIANT eq 'S90') { + $S90SDK =~ /^(\d+)\.(\d+)$/; + ($sdkmajor, $sdkminor) = ($1, $2); + } if ($SDK_VARIANT eq 'UIQ') { $UIQSDK =~ /^(\d+)\.(\d+)$/; ($sdkmajor, $sdkminor) = ($1, $2); @@ -315,7 +325,7 @@ __EOF__ sub create_perlmain_c { print "\tperlmain.c\n"; system( -q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print;print qq[ newXS(\"DynaLoader::boot_DynaLoader\", boot_DynaLoader, file);\n] if /dXSUB_SYS/;print qq[EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);\n] if /Do not delete this line/" miniperlmain.c > perlmain.c] +q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print unless /PERL_UNUSED_CONTEXT/;print qq[ newXS(\"DynaLoader::boot_DynaLoader\", boot_DynaLoader, file);\n] if /dXSUB_SYS/;print qq[EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);\n] if /Do not delete this line/" miniperlmain.c > perlmain.c] ) == 0 or die "$0: Creating perlmain.c failed: $!\n"; push @unclean, 'perlmain.c'; @@ -329,16 +339,18 @@ sub create_PerlApp_pkg { qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] : defined $S80SDK ? qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] : + defined $S90SDK ? +qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] : defined $UIQSDK && $SDK_VERSION =~ /^(\d)\.(\d)$/ ? qq[;Supports UIQ v2.1\n(0x101F617B), $1, $2, 0, {"UIQ21ProductID"}\n] : ";Supports Series NN"; my $APPS = $UREL; - if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK) { # Do only if not in S60 1.2 VC. + if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK || defined $S90SDK) { # Do only if not in S60 1.2 VC. $APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i; } # TODO: in S60 3.0 there will be no more recognizers. my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";]; - my $AIF = $SDK_VARIANT =~ /^S[68]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : ""; + my $AIF = $SDK_VARIANT =~ /^S[689]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : ""; print PERLAPP_PKG <<__EOF__; ; !!!!!! DO NOT EDIT THIS FILE !!!!!! ; This file is built by symbian\\config.pl. @@ -365,7 +377,11 @@ __EOF__ if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) { while (<DEMOS>) { chomp; - print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n]; + if (defined $S90SDK) { + print PERLAPP_PKG qq["$_"-"!:\\Mydocs\\Perl\\$_"\n]; + } else { + print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n]; + } } close(DEMOS); } @@ -438,6 +454,15 @@ LIBRARY eikdlg.lib LIBRARY ckndlg.lib __EOF__ } + if (defined $S90SDK) { + push @MACRO, '__SERIES90__'; + push @LIB, <<__EOF__; +LIBRARY eikctl.lib +LIBRARY eikcoctl.lib +LIBRARY eikdlg.lib +LIBRARY ckndlg.lib +__EOF__ + } if (defined $UIQSDK) { push @MACRO, '__UIQ__'; push @MACRO, '__UIQ_1X__' if $UIQSDK =~ /^1\./; @@ -488,7 +513,7 @@ MACRO $macro __EOF__ } } - if ($SDK_VARIANT =~ /^S[68]0$/) { + if ($SDK_VARIANT =~ /^S[689]0$/) { print PERLAPP_MMP <<__EOF__; AIF PerlApp.aif . PerlAppAif.rss __EOF__ @@ -641,7 +666,17 @@ XSBOPT = --win=\$(WIN) --arm=\$(ARM) lib\\Config.pm: copy symbian\\config.sh config.sh +__EOF__ + if (defined $S90SDK) { + print MAKEFILE <<__EOF__; + perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g; s!='(\\\\\\\\system)!='C:\\1!" config.sh +__EOF__ + } else { + print MAKEFILE <<__EOF__; perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh +__EOF__ + }; + print MAKEFILE <<__EOF__; perl \$(XLIB) configpm --cross=symbian copy xlib\\symbian\\Config.pm lib\\Config.pm perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm @@ -682,7 +717,7 @@ perl${VERSION}lib.sis perllib.sis: \$(PM) perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis perl symbian\\makesis.pl perl${VERSION}ext -EXT = Compress::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attrs +EXT = Compress::Raw::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attrs buildext: perldll symbian\\xsbuild.pl lib\\Config.pm perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT) diff --git a/symbian/config.sh b/symbian/config.sh index 450effb9d2..f58e71357f 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -60,6 +60,8 @@ d_attribute_noreturn='undef' d_attribute_pure='undef' d_attribute_unused='undef' d_attribute_warn_unused_result='undef' +d_builtin_expect='undef' +d_builtin_choose_expr='undef' d_bcmp='undef' d_bcopy='undef' d_bsd='undef' diff --git a/symbian/cwd.pl b/symbian/cwd.pl index d3272d2de5..3ee402be8d 100644 --- a/symbian/cwd.pl +++ b/symbian/cwd.pl @@ -1,6 +1,6 @@ use strict; use Cwd; my $CWD = getcwd(); -$CWD =~ s!^C:!!i; +$CWD =~ s!^[a-z]:!!i; $CWD =~ s!/!\\!g; $CWD; diff --git a/symbian/install.cfg b/symbian/install.cfg index 3ff71e588a..b235ecf1a6 100644 --- a/symbian/install.cfg +++ b/symbian/install.cfg @@ -70,24 +70,29 @@ lib warnings/register.pm # Extensions. # ext attrs -ext Compress/Zlib -zlib-src +ext Compress/Raw/Zlib -zlib-src ext Cwd ext Data/Dumper ext Devel/Peek ext Digest/MD5 +ext Digest/SHA ext Errno ext Fcntl CONST ext File/Glob CONST ext Filter/Util/Call +ext Hash/Util ext IO ext List/Util +ext Math/BigInt/FastCalc ext MIME/Base64 ext PerlIO/scalar ext PerlIO/via ext SDBM_File -sdbm/db?.c -sdbm/util.c ext Socket CONST ext Storable +ext Text/Soundex ext Time/HiRes CONST +ext Time/Piece ext XSLoader # ext B ERROR # ext ByteLoader byterun.c ERROR VERSION @@ -96,6 +101,8 @@ ext XSLoader # ext Encode nonconst Encode/encode.h def_t.c encengine.c # ext I18N/Langinfo PORT # ext IPC/SysV PORT +# ext NDBM_File PORT +# ext ODBM_File PORT # ext Opcode ERROR # ext PerlIO/encoding Encode # ext POSIX CONST USELESS @@ -105,6 +112,7 @@ ext XSLoader # ext threads PORT # ext threads/shared PORT # ext Unicode/Normalize nonconst +# ext Win32 USELESS # ext XS/APItest USELESS # ext XS/Typemap nonconst USELESS diff --git a/symbian/makesis.pl b/symbian/makesis.pl index 8072249785..dbf533ce7b 100644 --- a/symbian/makesis.pl +++ b/symbian/makesis.pl @@ -19,6 +19,7 @@ my %PORT = %{ do "port.pl" }; my $ARM = 'thumb'; # TODO my $S60SDK = $ENV{S60SDK}; # from sdk.pl my $S80SDK = $ENV{S80SDK}; # from sdk.pl +my $S90SDK = $ENV{S90SDK}; # from sdk.pl my $UREL = $ENV{UREL}; # from sdk.pl $UREL =~ s/-ARM-/$ARM/; @@ -160,6 +161,8 @@ for my $target (@target) { qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] : defined $S80SDK ? qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] : + defined $S90SDK ? +qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] : ";Supports Series NN"; open PKG, ">$pkg" or die "$0: failed to create $pkg: $!\n"; diff --git a/symbian/sdk.pl b/symbian/sdk.pl index 71059a9831..0db16ed323 100644 --- a/symbian/sdk.pl +++ b/symbian/sdk.pl @@ -28,6 +28,9 @@ if ($ENV{PATH} =~ m!\\Symbian\\(.+?)\\(.+?)\\Epoc32\\gcc\\bin!i) { } elsif ($SDK_NAME =~ m!S80_DP2_0_SDK!) { $SDK_VARIANT = 'S80'; $SDK_VERSION = $ENV{S80SDK} = '2.0'; + } elsif ($SDK_NAME =~ m!Nokia_7710_SDK!) { + $SDK_VARIANT = 'S90'; + $SDK_VERSION = $ENV{S90SDK} = '1.1'; } } elsif ($ENV{PATH} =~ m!\\Symbian\\UIQ_(\d)(\d)\\Epoc32\\gcc\\bin!i) { $SDK_NAME = 'UIQ'; @@ -45,7 +48,7 @@ if ($ENV{PATH} =~ m!\\Symbian\\(.+?)\\(.+?)\\Epoc32\\gcc\\bin!i) { if (open(GCC, "gcc -v 2>&1 |")) { while (<GCC>) { # print; - if (/Reading specs from ((?:C:)?\\Symbian.+?)\\Epoc32\\/i) { + if (/Reading specs from (.+?)\\Epoc32\\/i) { $SYMBIAN_ROOT = $1; # The S60SDK tells the Series 60 SDK version. if ($ENV{S60SDK}) { diff --git a/symbian/xsbuild.pl b/symbian/xsbuild.pl index b98b4af68c..aee912a1ae 100644 --- a/symbian/xsbuild.pl +++ b/symbian/xsbuild.pl @@ -101,18 +101,18 @@ die "$0: Symbian version undefined\n" unless defined $SymbianVersion; $SymbianVersion =~ s:/:\\:g; -die "$0: Symbian version '$SymbianVersion' not found\n" - unless -d "\\Symbian\\$SymbianVersion"; +#die "$0: Symbian version '$SymbianVersion' not found\n" +# unless -d "\\Symbian\\$SymbianVersion"; die "$0: Perl version undefined\n" unless defined $PerlVersion; +$PERLSDK = "$SYMBIAN_ROOT\\Perl\\$PerlVersion"; + die "$0: Perl version '$PerlVersion' not found\n" - if !$CoreBuild && !-d "\\Symbian\\Perl\\$PerlVersion"; + if !$CoreBuild && !-d $PERLSDK; print "Configuring with Symbian $SymbianVersion and Perl $PerlVersion...\n"; -$PERLSDK = "\\Symbian\\Perl\\$PerlVersion"; - $R_V_SV = $PerlVersion; $VERSION = $PerlVersion unless defined $VERSION; @@ -164,6 +164,7 @@ sub run_PL { } my $cmd; if ($CoreBuild) { + $ENV{PERL_CORE} = 1; # Problem: the Config.pm we have in $BUILDROOT\\lib carries the # version number of the Perl we are building, while the Perl # we are running might have some other version. Solution: @@ -269,6 +270,10 @@ sub write_mmp { push @{ $CONF{MACRO} }, '__SERIES80__' unless grep { $_ eq '__SERIES80__' } @{ $CONF{MACRO} }; } + if ($SDK_VARIANT eq 'S90') { + push @{ $CONF{MACRO} }, '__SERIES90__' + unless grep { $_ eq '__SERIES90__' } @{ $CONF{MACRO} }; + } if ($SDK_VARIANT eq 'UIQ') { push @{ $CONF{MACRO} }, '__UIQ__' unless grep { $_ eq '__UIQ__' } @{ $CONF{MACRO} }; @@ -472,14 +477,14 @@ sub xsconfig { } } if ( my @c = glob("*.c *.cpp */*.c */*.cpp") ) { - @c = grep { ! m:^zlib-src/: } @c if $ext eq 'ext\Compress\Zlib'; + @c = grep { ! m:^zlib-src/: } @c if $ext eq 'ext\Compress\Raw\Zlib'; for my $c (@c) { $c =~ s:/:\\:g; $src{$c}++; } } if ( my @h = glob("*.h */*.h") ) { - @h = grep { ! m:^zlib-src/: } @h if $ext eq 'ext\Compress\Zlib'; + @h = grep { ! m:^zlib-src/: } @h if $ext eq 'ext\Compress\Raw\Zlib'; for my $h (@h) { $h =~ s:/:\\:g; $h = dirname($h); @@ -685,7 +690,7 @@ __EOF__ sub update_cwd { $CWD = getcwd(); - $CWD =~ s!^[CD]:!!i; + $CWD =~ s!^[A-Z]:!!i; $CWD =~ s!/!\\!g; } @@ -901,7 +906,7 @@ __EOF__ or die "$0: make distclean failed\n"; } } - if ( $ext eq "ext\\Compress\\Zlib" ) { + if ( $ext eq "ext\\Compress\\Raw\\Zlib" ) { my @bak; find( sub { push @bak, $File::Find::name if /\.bak$/ }, "." ); unlink(@bak) if @bak; |