Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12378/Win32-GUI-Scintilla

Modified Files:
        Makefile.PL Scintilla.PL ScintillaRC.PL TODO 
Log Message:
Fix cygwin and mingw builds

Index: ScintillaRC.PL
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/ScintillaRC.PL,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ScintillaRC.PL      11 Jun 2006 16:51:48 -0000      1.1
--- ScintillaRC.PL      11 Jun 2006 21:00:16 -0000      1.2
***************
*** 48,52 ****
      BLOCK "040904E4"
      {
!       VALUE "Comments"         , "Win32::GUI::Scintilla, part of the perl 
Win32::GUI module."
        VALUE "CompanyName"      , "perl-win32-gui.sourceforge.net"
        VALUE "FileDescription"  , "Win32::GUI::Scintilla perl extension"
--- 48,52 ----
      BLOCK "040904E4"
      {
!       VALUE "Comments"         , "Win32::GUI::Scintilla, part of the perl 
Win32::GUI module. Includes code from the Scintilla project 
http://www.scintilla.org/";
        VALUE "CompanyName"      , "perl-win32-gui.sourceforge.net"
        VALUE "FileDescription"  , "Win32::GUI::Scintilla perl extension"

Index: TODO
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/TODO,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TODO        11 Jun 2006 16:51:48 -0000      1.1
--- TODO        11 Jun 2006 21:00:16 -0000      1.2
***************
*** 3,6 ****
    - Generate the majority of Scintilla.pod from scintilla.iface
    - More subclasses for syntax high-lighting other languages
-   - use Scintilla; should fail gracefully if we fail to load SciLexer.dll
    - find a way to make Scintilla (SciLexer.dll) play nicely with PAR
--- 3,5 ----

Index: Makefile.PL
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/Makefile.PL,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.PL 11 Jun 2006 16:51:44 -0000      1.2
--- Makefile.PL 11 Jun 2006 21:00:16 -0000      1.3
***************
*** 1,5 ****
  #!perl -w
  use strict;
! use warnings;
  
  # Makefile.PL for Win32::GUI::Scintilla
--- 1,5 ----
  #!perl -w
  use strict;
! #use warnings;
  
  # Makefile.PL for Win32::GUI::Scintilla
***************
*** 44,47 ****
--- 44,53 ----
  package MY;
  
+ sub special_targets {
+     my $inherited = shift->SUPER::special_targets(@_);
+     $inherited =~ s/^(.SUFFIXES.*)$/$1 .rc .res/m;
+     return $inherited;
+ }
+ 
  # Add rule for .rc to .res conversion
  # Add rules to install demo scripts

Index: Scintilla.PL
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/Scintilla.PL,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Scintilla.PL        11 Jun 2006 16:51:45 -0000      1.1
--- Scintilla.PL        11 Jun 2006 21:00:16 -0000      1.2
***************
*** 7,21 ****
  # $Id$
  
  # MakeMaker provides the output filename as the first argument on the
  # command line, we need to ensure the directory exists before opening
  # the file:
  if ( @ARGV > 0 ) {
!       my $file = $ARGV[0];
!       my $path = dirname($file);
!       unless (-d $path) {
!               mkpath($path, 1) or die qq(Failed to create '$path': $!);
!       }
!       open(my $fh, '>', $file) or die qq(Failed to open '$file': $!);
!       select $fh;
  }
  
--- 7,23 ----
  # $Id$
  
+ my $iface_file = "Include/Scintilla.iface";
+ 
  # MakeMaker provides the output filename as the first argument on the
  # command line, we need to ensure the directory exists before opening
  # the file:
  if ( @ARGV > 0 ) {
!     my $file = $ARGV[0];
!     my $path = dirname($file);
!     unless (-d $path) {
!         mkpath($path, 1) or die qq(Failed to create '$path': $!);
!     }
!     open(my $fh, '>', $file) or die qq(Failed to open '$file': $!);
!     select $fh;
  }
  
***************
*** 56,67 ****
  my $SCILEXER_PATH;
  for my $path (@INC) {
!       $SCILEXER_PATH = $path . '\auto\Win32\GUI\Scintilla\SciLexer.dll';
!       last if -f $SCILEXER_PATH;
!       undef $SCILEXER_PATH;
  }
  my $SCINTILLA_DLL = Win32::GUI::LoadLibrary($SCILEXER_PATH) if $SCILEXER_PATH;
  $SCINTILLA_DLL = Win32::GUI::LoadLibrary('SciLexer') unless $SCINTILLA_DLL;
! 
! #TODO: Fail is we fail to load SciLexer.dll
  
  Win32::GUI::Scintilla::_Initialise();
--- 58,71 ----
  my $SCILEXER_PATH;
  for my $path (@INC) {
!     my $lexer_file = $path . '/auto/Win32/GUI/Scintilla/SciLexer.dll';
!     if (-f $lexer_file) {
!         $lexer_file =~ s|/|\\|g; # LoadLibrary doesn't like unix path 
seperators
!         $SCILEXER_PATH = $lexer_file;
!         last;
!     }
  }
  my $SCINTILLA_DLL = Win32::GUI::LoadLibrary($SCILEXER_PATH) if $SCILEXER_PATH;
  $SCINTILLA_DLL = Win32::GUI::LoadLibrary('SciLexer') unless $SCINTILLA_DLL;
! die "Failed to load 'SciLexer.dll'" unless $SCINTILLA_DLL;
  
  Win32::GUI::Scintilla::_Initialise();
***************
*** 259,266 ****
  
  # Build Scintilla interface
! open my $fh, "<" , "Include/Scintilla.iface" or die "Failed to open 
'Include/Scintilla.iface' for reading: $!";
  
  while ( <$fh> )
  {
      #--- Constant ---
      if (/^val (.*)=(.*)$/) {
--- 263,275 ----
  
  # Build Scintilla interface
! 
! # The 'crlf' perlio layer ensures that on cygwin we don't get thrown by
! # windows line endings
! open my $fh, "<:crlf" , $iface_file or die "Failed to open '$iface_file' for 
reading: $!";
  
  while ( <$fh> )
  {
+     chomp;
+ 
      #--- Constant ---
      if (/^val (.*)=(.*)$/) {
***************
*** 415,419 ****
          print 'sub TargetAsUTF8 {', "\n";
          print '  my $self  = shift;', "\n";
!       print '  my $len   = $self->SendMessage(2447,0,0);',"\n";
          print '  my $text   = " " x $len;', "\n\n";
  
--- 424,428 ----
          print 'sub TargetAsUTF8 {', "\n";
          print '  my $self  = shift;', "\n";
!         print '  my $len   = $self->SendMessage(2447,0,0);',"\n";
          print '  my $text   = " " x $len;', "\n\n";
  
***************
*** 430,434 ****
          print 'sub EncodedFromUTF8 {', "\n";
          print '  my ($self, $src)  = @_;', "\n";
!       print '  my $len   = $self->SendMessagePN(2449,$src,0);',"\n";
          print '  my $text   = " " x $len;', "\n\n";
  
--- 439,443 ----
          print 'sub EncodedFromUTF8 {', "\n";
          print '  my ($self, $src)  = @_;', "\n";
!         print '  my $len   = $self->SendMessagePN(2449,$src,0);',"\n";
          print '  my $text   = " " x $len;', "\n\n";
  


Reply via email to