Browse Source

add the Perl APIs to the Javascript OO library Prototype

Ralf S. Engelschall 20 years ago
parent
commit
b535fe440d
2 changed files with 114 additions and 5 deletions
  1. 91 3
      perl-xml/perl-xml.patch
  2. 23 2
      perl-xml/perl-xml.spec

+ 91 - 3
perl-xml/perl-xml.patch

@@ -1,6 +1,94 @@
-Index: LibXML.xs
---- LibXML.xs.orig	2004-03-25 00:06:14 +0100
-+++ LibXML.xs	2004-11-10 16:43:46 +0100
+Index: HTML-Prototype-1.35/Makefile.PL
+--- HTML-Prototype-1.35/Makefile.PL.orig	2005-10-31 15:21:51 +0100
++++ HTML-Prototype-1.35/Makefile.PL	2005-10-31 15:23:36 +0100
+@@ -1,31 +1,9 @@
+-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+-    
+-    unless (eval "use Module::Build::Compat 0.02; 1" ) {
+-      print "This module requires Module::Build to install itself.\n";
+-      
+-      require ExtUtils::MakeMaker;
+-      my $yn = ExtUtils::MakeMaker::prompt
+-	('  Install Module::Build now from CPAN?', 'y');
+-      
+-      unless ($yn =~ /^y/i) {
+-	die " *** Cannot install without Module::Build.  Exiting ...\n";
+-      }
+-      
+-      require Cwd;
+-      require File::Spec;
+-      require CPAN;
+-      
+-      # Save this 'cause CPAN will chdir all over the place.
+-      my $cwd = Cwd::cwd();
+-      my $makefile = File::Spec->rel2abs($0);
+-      
+-      CPAN::Shell->install('Module::Build::Compat')
+-	or die " *** Cannot install without Module::Build.  Exiting ...\n";
+-      
+-      chdir $cwd or die "Cannot chdir() back to $cwd: $!";
+-    }
+-    eval "use Module::Build::Compat 0.02; 1" or die $@;
+-    use lib '_build/lib';
+-    Module::Build::Compat->run_build_pl(args => \@ARGV);
+-    require Module::Build;
+-    Module::Build::Compat->write_makefile(build_class => 'Module::Build');
++
++require 5.006;
++use strict;
++use ExtUtils::MakeMaker;
++
++WriteMakefile(
++    NAME => 'HTML::Prototype',
++);
++
+Index: HTML-Prototype-Useful-0.04/Makefile.PL
+--- HTML-Prototype-Useful-0.04/Makefile.PL.orig	2005-10-31 15:24:37 +0100
++++ HTML-Prototype-Useful-0.04/Makefile.PL	2005-10-31 15:24:50 +0100
+@@ -1,31 +1,9 @@
+-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+-    
+-    unless (eval "use Module::Build::Compat 0.02; 1" ) {
+-      print "This module requires Module::Build to install itself.\n";
+-      
+-      require ExtUtils::MakeMaker;
+-      my $yn = ExtUtils::MakeMaker::prompt
+-	('  Install Module::Build now from CPAN?', 'y');
+-      
+-      unless ($yn =~ /^y/i) {
+-	die " *** Cannot install without Module::Build.  Exiting ...\n";
+-      }
+-      
+-      require Cwd;
+-      require File::Spec;
+-      require CPAN;
+-      
+-      # Save this 'cause CPAN will chdir all over the place.
+-      my $cwd = Cwd::cwd();
+-      my $makefile = File::Spec->rel2abs($0);
+-      
+-      CPAN::Shell->install('Module::Build::Compat')
+-	or die " *** Cannot install without Module::Build.  Exiting ...\n";
+-      
+-      chdir $cwd or die "Cannot chdir() back to $cwd: $!";
+-    }
+-    eval "use Module::Build::Compat 0.02; 1" or die $@;
+-    use lib '_build/lib';
+-    Module::Build::Compat->run_build_pl(args => \@ARGV);
+-    require Module::Build;
+-    Module::Build::Compat->write_makefile(build_class => 'Module::Build');
++
++require 5.006;
++use strict;
++use ExtUtils::MakeMaker;
++
++WriteMakefile(
++    NAME => 'HTML::Prototype::Useful',
++);
++
+Index: XML-LibXML-1.58_1/LibXML.xs
+--- XML-LibXML-1.58_1/LibXML.xs.orig	2004-03-25 00:06:14 +0100
++++ XML-LibXML-1.58_1/LibXML.xs	2005-10-31 15:21:12 +0100
 @@ -622,7 +622,7 @@
      HV* real_obj = NULL;
      SV** item    = NULL;

+ 23 - 2
perl-xml/perl-xml.spec

@@ -33,6 +33,8 @@
 %define       V_html_template           2.7
 %define       V_html_template_extension 0.25
 %define       V_html_email_obfuscate    0.02
+%define       V_html_prototype          1.35
+%define       V_html_prototype_useful   0.04
 %define       V_css                     1.07
 %define       V_css_tiny                1.11
 %define       V_xml_dom                 1.44
@@ -81,7 +83,7 @@ Class:        BASE
 Group:        Language
 License:      GPL/Artistic
 Version:      %{V_perl}
-Release:      20051027
+Release:      20051031
 
 #   package options
 %option       with_libxml            no
@@ -144,6 +146,8 @@ Source41:     http://www.cpan.org/modules/by-module/HTML/HTML-Email-Obfuscate-%{
 Source42:     http://www.cpan.org/modules/by-module/XML/XML-Stream-%{V_xml_stream}.tar.gz
 Source43:     http://www.cpan.org/modules/by-module/XML/XML-DT-%{V_xml_dt}.tar.gz
 Source44:     http://www.cpan.org/modules/by-module/SVG/SVG-%{V_svg}.tar.gz
+Source45:     http://www.cpan.org/modules/by-module/HTML/HTML-Prototype-%{V_html_prototype}.tar.gz
+Source46:     http://www.cpan.org/modules/by-module/HTML/HTML-Prototype-Useful-%{V_html_prototype_useful}.tar.gz
 Patch0:       perl-xml.patch
 
 #   build information
@@ -220,6 +224,8 @@ AutoReqProv:  no
     - HTML::Template (%{V_html_template})
     - HTML::Template::Extension (%{V_html_template_extension})
     - HTML::Email::Obfuscate (%{V_html_email_obfuscate})
+    - HTML::Prototype (%{V_html_prototype})
+    - HTML::Prototype::Useful (%{V_html_prototype_useful})
     - CSS (%{V_css})
     - CSS::Tiny (%{V_css_tiny})
     - SVG (%{V_svg})
@@ -450,6 +456,16 @@ AutoReqProv:  no
         url       = http://www.cpan.org/modules/by-module/SVG/
         regex     = SVG-(__VER__)\.tar\.gz
     }
+    prog perl-xml:HTML-Prototype = {
+        version   = %{V_html_prototype}
+        url       = http://www.cpan.org/modules/by-module/HTML/
+        regex     = HTML-Prototype-(__VER__)\.tar\.gz
+    }
+    prog perl-xml:HTML-Prototype-Useful = {
+        version   = %{V_html_prototype_useful}
+        url       = http://www.cpan.org/modules/by-module/HTML/
+        regex     = HTML-Prototype-Useful-(__VER__)\.tar\.gz
+    }
 
 %prep
     %setup -q -c
@@ -497,7 +513,10 @@ AutoReqProv:  no
     %setup -q -T -D -a 42
     %setup -q -T -D -a 43
     %setup -q -T -D -a 44
-    %patch -p0 -d XML-LibXML-%{V_xml_libxml}
+    %setup -q -T -D -a 45
+    %setup -q -T -D -a 46
+    %patch -p0
+    rm -f HTML-Prototype*/Build.PL
 
 %build
 
@@ -560,6 +579,8 @@ AutoReqProv:  no
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE43} configure build install
 %endif
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE44} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE45} configure build install
+    %{l_prefix}/bin/perl-openpkg -d %{SOURCE46} configure build install
 
     #   pre-activate the XML::SAX parsers
     eval `%{l_prefix}/bin/perl -V:installvendorlib`