r46934 - in /trunk/libalien-wxwidgets-perl: ./ debian/ inc/My/Build/ lib/Alien/ patches/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon Nov 9 00:32:29 UTC 2009


Author: jawnsy-guest
Date: Mon Nov  9 00:32:22 2009
New Revision: 46934

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46934
Log:
NO RELEASE NECESSARY
This version adds support for wxWidgets 0.29 (not in Debian)

Added:
    trunk/libalien-wxwidgets-perl/patches/data-2.8.10
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/data-2.8.10
    trunk/libalien-wxwidgets-perl/patches/data-2.9.0
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/data-2.9.0
    trunk/libalien-wxwidgets-perl/patches/wxMSW-2.9.0-config.patch
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/wxMSW-2.9.0-config.patch
    trunk/libalien-wxwidgets-perl/patches/wxMSW-2.9.0-makefiles.patch
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/wxMSW-2.9.0-makefiles.patch
    trunk/libalien-wxwidgets-perl/patches/wxMSW-2.9.0-setup.patch
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/wxMSW-2.9.0-setup.patch
    trunk/libalien-wxwidgets-perl/patches/wxMac-2.9.0-textctrl.patch
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/wxMac-2.9.0-textctrl.patch
    trunk/libalien-wxwidgets-perl/patches/wxWidgets-2.8.10-gsocket.patch
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/wxWidgets-2.8.10-gsocket.patch
    trunk/libalien-wxwidgets-perl/patches/wxWidgets-2.9.0-magic.patch
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/wxWidgets-2.9.0-magic.patch
    trunk/libalien-wxwidgets-perl/patches/wxWidgets-2.9.0-msgdlg.patch
      - copied unchanged from r46933, branches/upstream/libalien-wxwidgets-perl/current/patches/wxWidgets-2.9.0-msgdlg.patch
Removed:
    trunk/libalien-wxwidgets-perl/patches/data
Modified:
    trunk/libalien-wxwidgets-perl/Build.PL
    trunk/libalien-wxwidgets-perl/Changes
    trunk/libalien-wxwidgets-perl/MANIFEST
    trunk/libalien-wxwidgets-perl/META.yml
    trunk/libalien-wxwidgets-perl/Makefile.PL
    trunk/libalien-wxwidgets-perl/debian/changelog
    trunk/libalien-wxwidgets-perl/inc/My/Build/Any_wx_config.pm
    trunk/libalien-wxwidgets-perl/inc/My/Build/MacOSX_wx_config.pm
    trunk/libalien-wxwidgets-perl/lib/Alien/wxWidgets.pm

Modified: trunk/libalien-wxwidgets-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/Build.PL?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/Build.PL (original)
+++ trunk/libalien-wxwidgets-perl/Build.PL Mon Nov  9 00:32:22 2009
@@ -7,6 +7,12 @@
 use My::Build;
 
 our( $TYPE, $URL );
+
+my %VERSIONS =
+  ( '2.8.10'        => 'patches/data-2.8.10',
+    '2.9.0'         => 'patches/data-2.9.0',
+    );
+my $DEFAULT_VERSION = '2.8.10';
 
 # new_from_context is broken: it does not restore
 # @INC set in Build.PL before trying to load a base class not
@@ -37,9 +43,11 @@
                          'wxWidgets-monolithic'    => { type => '!' },
                          'wxWidgets-universal'     => { type => '!' },
                          'wxWidgets-build'         => { type => '!' },
-                         'wxWidgets-portable'      => { type => '!' },
+                         'wxWidgets-portable'      => { type => '!',
+                                                        default => $^O eq 'MSWin32' },
                          'wxWidgets-build-opengl'  => { type => '!' },
                          'wxWidgets-source'        => { type => '=s' },
+                         'wxWidgets-version'       => { type => '=s' },
                          },
     create_makefile_pl => 'passthrough',
   );
@@ -99,18 +107,25 @@
 chomp $build_prompt;
 my $build_wx = _askyn( $build, 'wxWidgets-build',
                        $build_prompt, $build_wx_dflt );
+my $wx_version;
 $build->notes( 'build_wx' => $build_wx );
 $build->notes( 'mk_portable' => $build->args('wxWidgets-portable') );
 if( $build_wx ) {
+    $wx_version = _askmulti( $build, 'wxWidgets-version',
+                             'Which wxWidgets version?',
+                             [ sort keys %VERSIONS ], $DEFAULT_VERSION );
     $TYPE = _ask( $build, 'wxWidgets-source', 'Which archive type?', 'tar.gz' );
     $URL = $ENV{AWX_URL};
-    $build->notes( 'build_data' => do 'patches/data' );
+    $build->notes( 'build_data' => do $VERSIONS{$wx_version} );
 }
-if( $build_wx ) {
+if( $build_wx && $wx_version !~ /^2\.9/ ) {
     my $build_wx_unicode = _askyn( $build, 'wxWidgets-unicode',
                                    'Do you want to enable Unicode support',
                                    'yes' );
     $build->notes( 'build_wx_unicode' => $build_wx_unicode );
+} elsif( $build_wx ) {
+    # Unicode-only for 2.9.x and higher
+    $build->notes( 'build_wx_unicode' => 1 );
 }
 if( $build_wx ) {
     my $build_wx_opengl = _askyn( $build, 'wxWidgets-build-opengl',
@@ -121,13 +136,33 @@
 
 $build->create_build_script;
 
+sub _is_yes {
+    return lc( $_[0] ) eq 'y' || lc( $_[0] ) eq 'yes';
+}
+
 sub _askyn {
     my( $build, $arg, $question, $default ) = @_;
+    my $res =
+      defined $build->args( $arg ) ? _is_yes( $build->args( $arg ) ) :
+      exists $ENV{"AWX_\U$arg"}    ? _is_yes( $ENV{"AWX_\U$arg"} ) :
+      $accept_defaults             ? _is_yes( $default ) :
+                                     $build->y_n( $question, $default );
+
+    return $res
+}
+
+sub _askmulti {
+    my( $build, $arg, $question, $options, $default ) = @_;
+    $question .= " (" . join( ', ', @$options ) . ")";
     my $res =
       defined $build->args( $arg ) ? $build->args( $arg ) :
       exists $ENV{"AWX_\U$arg"}    ? $ENV{"AWX_\U$arg"} :
       $accept_defaults             ? $default :
-                                     $build->y_n( $question, $default );
+                                     $build->prompt( $question, $default );
+
+    die "Invalid value '$res' for option '$arg': must be one of ",
+        join( ', ', map "'$_'", @$options ), "\n"
+        unless grep $_ eq $res, @$options;
 
     return $res
 }

Modified: trunk/libalien-wxwidgets-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/Changes?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/Changes (original)
+++ trunk/libalien-wxwidgets-perl/Changes Mon Nov  9 00:32:22 2009
@@ -1,4 +1,14 @@
 Revision history for Perl extension Alien::wxWidgets.
+
+0.46  Sun Nov  8 16:25:02 CET 2009
+	- Allow choosing the wxWidgets version to build (defaults to
+	  the latest stable release when building from the CPAN shell).
+	- Add a build configuration for wxWidgets 2.9.0.
+	- On Snow Leopard, build wxCocoa when building wxWidgets 2.9.0
+	  with a 64 bit Perl.
+	- On Windows, enable the 'portable' option by default (finds the
+	  wxWidgets libraries relative to the Alien::wxWidgets installation
+	  directory).
 
 0.45  Wed Oct 14 22:54:35 CEST 2009
 	- On Snow Leopard, abort wxWidgets build if Perl is 64 bit.

Modified: trunk/libalien-wxwidgets-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/MANIFEST?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/MANIFEST (original)
+++ trunk/libalien-wxwidgets-perl/MANIFEST Mon Nov  9 00:32:22 2009
@@ -35,13 +35,21 @@
 inc/version/vpp.pm
 lib/Alien/wxWidgets.pm
 lib/Alien/wxWidgets/Utility.pm
-patches/data
+patches/data-2.8.10
+patches/data-2.9.0
 patches/wxMSW-2.8.0-makefiles.patch
 patches/wxMSW-2.8.0-setup.patch
 patches/wxMSW-2.8.0-setup_u.patch
 patches/wxMSW-2.8.10-config.patch
+patches/wxMSW-2.9.0-config.patch
+patches/wxMSW-2.9.0-makefiles.patch
+patches/wxMSW-2.9.0-setup.patch
 patches/wxMac-2.8.3-brokengcc.patch
+patches/wxMac-2.9.0-textctrl.patch
 patches/wxWidgets-2.8.0-magic.patch
+patches/wxWidgets-2.8.10-gsocket.patch
+patches/wxWidgets-2.9.0-magic.patch
+patches/wxWidgets-2.9.0-msgdlg.patch
 script/make_ppm.pl
 t/01_load.t
 t/zy_pod_coverage.t

Modified: trunk/libalien-wxwidgets-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/META.yml?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/META.yml (original)
+++ trunk/libalien-wxwidgets-perl/META.yml Mon Nov  9 00:32:22 2009
@@ -1,6 +1,6 @@
 ---
 name: Alien-wxWidgets
-version: 0.45
+version: 0.46
 author:
   - 'Mattia Barbon <mbarbon at cpan.org>'
 abstract: 'building, finding and using wxWidgets binaries'
@@ -18,10 +18,10 @@
 provides:
   Alien::wxWidgets:
     file: lib/Alien/wxWidgets.pm
-    version: 0.45
+    version: 0.46
   Alien::wxWidgets::Utility:
     file: lib/Alien/wxWidgets/Utility.pm
-generated_by: Module::Build version 0.34
+generated_by: Module::Build version 0.35
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
   version: 1.4

Modified: trunk/libalien-wxwidgets-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/Makefile.PL?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/Makefile.PL (original)
+++ trunk/libalien-wxwidgets-perl/Makefile.PL Mon Nov  9 00:32:22 2009
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.34
+# Note: this file was auto-generated by Module::Build::Compat version 0.35
 require 5.006;
     
     unless (eval "use Module::Build::Compat 0.02; 1" ) {

Modified: trunk/libalien-wxwidgets-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/debian/changelog?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/debian/changelog (original)
+++ trunk/libalien-wxwidgets-perl/debian/changelog Mon Nov  9 00:32:22 2009
@@ -1,6 +1,7 @@
-libalien-wxwidgets-perl (0.45+dfsg-1) UNRELEASED; urgency=low
+libalien-wxwidgets-perl (0.46+dfsg-1) UNRELEASED; urgency=low
 
-  NO RELEASE NECESSARY. Fixes for MacOS
+  NO RELEASE NECESSARY
+  This version adds support for wxWidgets 0.29 (not in Debian)
   IGNORE-VERSION: 0.45+dfsg-1
 
   [ Jonathan Yu ]
@@ -16,7 +17,7 @@
   * debian/control: Changed: (build-)depend on perl instead of perl-
     modules.
 
- -- Jonathan Yu <jawnsy at cpan.org>  Sat, 31 Oct 2009 19:04:46 -0400
+ -- Jonathan Yu <jawnsy at cpan.org>  Sun, 08 Nov 2009 16:01:40 -0500
 
 libalien-wxwidgets-perl (0.44+dfsg-1) unstable; urgency=low
 

Modified: trunk/libalien-wxwidgets-perl/inc/My/Build/Any_wx_config.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/inc/My/Build/Any_wx_config.pm?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/inc/My/Build/Any_wx_config.pm (original)
+++ trunk/libalien-wxwidgets-perl/inc/My/Build/Any_wx_config.pm Mon Nov  9 00:32:22 2009
@@ -201,21 +201,12 @@
     return $key;
 }
 
+sub wxwidgets_configure_extra_flags { '' }
+
 sub build_wxwidgets {
     my $self = shift;
 
-    my $extra_flags = '';
-
-    # on Snow Leopard, force wxWidgets 2.8.x builds to be 32-bit
-    if(    $Config{osname} =~ /darwin/
-         && `uname -r` =~ /^10\./
-         && `sysctl hw.cpu64bit_capable` =~ /^hw.cpu64bit_capable: 1/ ) {
-        print "Forcing wxWidgets build to 32 bit\n";
-        $extra_flags = join ' ', map { qq{$_="-arch i386"} }
-                                     qw(CFLAGS CXXFLAGS LDFLAGS
-                                        OBJCFLAGS OBJCXXFLAGS);
-    }
-
+    my $extra_flags = $self->wxwidgets_configure_extra_flags;
     my $prefix_dir = $self->_key;
     my $prefix = awx_install_arch_dir( $self, $prefix_dir );
     my $opengl = $self->notes( 'build_wx_opengl' );
@@ -241,8 +232,10 @@
     # print $cmd, "\n";
     $self->_system( $cmd ) unless -f 'Makefile';
     $self->_system( 'make all' );
-    chdir 'contrib/src/stc';
-    $self->_system( 'make all' );
+    if( $self->notes( 'build_data' )->{data}{version} !~ /^2.9/ ) {
+        chdir 'contrib/src/stc';
+        $self->_system( 'make all' );
+    }
 
     chdir $old_dir;
 }
@@ -281,8 +274,10 @@
 
     chdir 'bld';
     $self->_system( 'make install' . $destdir );
-    chdir 'contrib/src/stc';
-    $self->_system( 'make install' . $destdir );
+    if( $self->notes( 'build_data' )->{data}{version} !~ /^2.9/ ) {
+        chdir 'contrib/src/stc';
+        $self->_system( 'make install' . $destdir );
+    }
 
     chdir $old_dir;
 }

Modified: trunk/libalien-wxwidgets-perl/inc/My/Build/MacOSX_wx_config.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/inc/My/Build/MacOSX_wx_config.pm?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/inc/My/Build/MacOSX_wx_config.pm (original)
+++ trunk/libalien-wxwidgets-perl/inc/My/Build/MacOSX_wx_config.pm Mon Nov  9 00:32:22 2009
@@ -36,7 +36,38 @@
     return %config;
 }
 
-sub awx_build_toolkit { 'mac' }
+sub wxwidgets_configure_extra_flags {
+    my( $self ) = @_;
+    my $extra_flags = '';
+
+    # on Snow Leopard, force wxWidgets 2.8.x builds to be 32-bit;
+    if(    $self->notes( 'build_data' )->{data}{version} =~ /^2.8/
+        && `uname -r` =~ /^10\./
+        && `sysctl hw.cpu64bit_capable` =~ /^hw.cpu64bit_capable: 1/ ) {
+        print "Forcing wxWidgets build to 32 bit\n";
+        $extra_flags = join ' ', map { qq{$_="-arch i386"} }
+                                     qw(CFLAGS CXXFLAGS LDFLAGS
+                                        OBJCFLAGS OBJCXXFLAGS);
+    }
+    # build fix for 2.9.0 on Snow Leopard
+    if(    `uname -r` =~ /^10\./
+        && $self->notes( 'build_data' )->{data}{version} eq '2.9.0' ) {
+        $extra_flags .= ' --with-macosx-version-min=10.5';
+    }
+
+    return $extra_flags;
+}
+
+sub awx_build_toolkit {
+    # use Cocoa for OS X wxWidgets builds with 64 bit Perl
+    if(    $Config{osname} =~ /darwin/
+        && $Config{ptrsize} == 8 ) {
+        return 'osx_cocoa';
+    } else {
+        return 'mac';
+    }
+}
+
 sub awx_dlext { 'dylib' }
 
 sub build_wxwidgets {
@@ -46,10 +77,12 @@
     if(    $Config{ptrsize} == 8
         && $self->notes( 'build_data' )->{data}{version} =~ /^2.8/ ) {
         print <<EOT;
-======================================================================
-Can't build wxWidgets 2.8.x to work with a 64-bit Perl, you will need
-to recompile your Perl as a 32-bit binary.
-======================================================================
+=======================================================================
+The 2.8.x wxWidgets for OS X does not support 64-bit. In order to build
+wxPerl you will need to either recompile Perl as a 32-bit binary or (if
+using the Apple-provided Perl) force it to run in 32-bit mode (see "man
+perl").  Alpha 64-bit wx for OS X is in 2.9.x, but untested in wxPerl.
+=======================================================================
 EOT
         exit 1;
     }

Modified: trunk/libalien-wxwidgets-perl/lib/Alien/wxWidgets.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalien-wxwidgets-perl/lib/Alien/wxWidgets.pm?rev=46934&op=diff
==============================================================================
--- trunk/libalien-wxwidgets-perl/lib/Alien/wxWidgets.pm (original)
+++ trunk/libalien-wxwidgets-perl/lib/Alien/wxWidgets.pm Mon Nov  9 00:32:22 2009
@@ -43,7 +43,7 @@
                       instantiate   => 'config';
 
 our $AUTOLOAD;
-our $VERSION = '0.45';
+our $VERSION = '0.46';
 our %VALUES;
 our $dont_remap;
 




More information about the Pkg-perl-cvs-commits mailing list