OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   02-Aug-2008 10:52:04
  Branch: HEAD                             Handle: 2008080209520400

  Added files:
    openpkg-src/yuicompressor
                            yuicompressor.patch
  Modified files:
    openpkg-src/yuicompressor
                            yuicompressor.spec

  Log:
    patch the output

  Summary:
    Revision    Changes     Path
    1.1         +56 -0      openpkg-src/yuicompressor/yuicompressor.patch
    1.6         +26 -4      openpkg-src/yuicompressor/yuicompressor.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/yuicompressor/yuicompressor.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 yuicompressor.patch
  --- /dev/null 2008-08-02 10:51:56 +0200
  +++ yuicompressor.patch       2008-08-02 10:52:04 +0200
  @@ -0,0 +1,56 @@
  +Index: src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java
  +--- src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java.orig     
2008-07-10 14:38:00 +0200
  ++++ src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java  
2008-08-02 10:04:52 +0200
  +@@ -902,7 +902,7 @@
  +                 case Token.VAR:
  + 
  +                     if (mode == BUILDING_SYMBOL_TREE && 
scope.incrementVarCount() > 1) {
  +-                        warn("Try to use a single 'var' statement per 
scope.", true);
  ++                        System.err.println("[INFO] Try to use a single 
'var' statement per scope.");
  +                     }
  + 
  +                     /* FALLSTHROUGH */
  +Index: src/com/yahoo/platform/yui/compressor/YUICompressor.java
  +--- src/com/yahoo/platform/yui/compressor/YUICompressor.java.orig    
2008-07-10 14:38:00 +0200
  ++++ src/com/yahoo/platform/yui/compressor/YUICompressor.java 2008-08-02 
10:04:22 +0200
  +@@ -49,7 +49,7 @@
  +             if (verbose) {
  +                 String jvmVendor = System.getProperty("java.vendor");
  +                 if (!jvmVendor.equalsIgnoreCase("Sun Microsystems Inc.")) {
  +-                    System.err.println("\n[INFO] It is recommended to use 
Sun Microsystems' JVM [java.vendor = " + jvmVendor + "]");
  ++                    System.err.println("[INFO] It is recommended to use Sun 
Microsystems' JVM [java.vendor = " + jvmVendor + "]");
  +                 }
  +             }
  + 
  +@@ -60,7 +60,7 @@
  +                     charset = "UTF-8";
  +                 }
  +                 if (verbose) {
  +-                    System.err.println("\n[INFO] Using charset " + charset);
  ++                    System.err.println("[INFO] Using charset " + charset);
  +                 }
  +             }
  + 
  +@@ -122,18 +122,18 @@
  +                         public void warning(String message, String 
sourceName,
  +                                 int line, String lineSource, int 
lineOffset) {
  +                             if (line < 0) {
  +-                                System.err.println("\n[WARNING] " + 
message);
  ++                                System.err.println("[WARNING] " + message);
  +                             } else {
  +-                                System.err.println("\n[WARNING] " + line + 
':' + lineOffset + ':' + message);
  ++                                System.err.println("[WARNING] " + line + 
':' + lineOffset + ':' + message);
  +                             }
  +                         }
  + 
  +                         public void error(String message, String sourceName,
  +                                 int line, String lineSource, int 
lineOffset) {
  +                             if (line < 0) {
  +-                                System.err.println("\n[ERROR] " + message);
  ++                                System.err.println("[ERROR] " + message);
  +                             } else {
  +-                                System.err.println("\n[ERROR] " + line + 
':' + lineOffset + ':' + message);
  ++                                System.err.println("[ERROR] " + line + ':' 
+ lineOffset + ':' + message);
  +                             }
  +                         }
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/yuicompressor/yuicompressor.spec
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 yuicompressor.spec
  --- openpkg-src/yuicompressor/yuicompressor.spec      27 Jul 2008 07:05:42 
-0000      1.5
  +++ openpkg-src/yuicompressor/yuicompressor.spec      2 Aug 2008 08:52:04 
-0000       1.6
  @@ -32,16 +32,17 @@
   Group:        Language
   License:      BSD
   Version:      2.3.6
  -Release:      20080727
  +Release:      20080802
   
   #   list of sources
   Source0:      
http://www.julienlecomte.net/yuicompressor/yuicompressor-%{version}.zip
   Source1:      yuicompressor.sh
  +Patch0:       yuicompressor.patch
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
  -BuildPreReq:  OpenPKG, openpkg >= 20060823, infozip
  +BuildPreReq:  OpenPKG, openpkg >= 20060823, java, JAVA-JDK, infozip
   PreReq:       OpenPKG, openpkg >= 20060823, java, JAVA-JDK
   AutoReq:      no
   AutoReqProv:  no
  @@ -59,10 +60,31 @@
   
   %prep
       %setup -q -T -c
  -    cd ..
  -    unzip -q -x %{SOURCE0}
  +    ( cd .. && unzip -q -x %{SOURCE0} ) || exit $?
  +    find . -name "*.orig" -print | xargs rm -f
  +    %patch -p0
   
   %build
  +    ( cd src
  +      jar -x <../build/yuicompressor-%{version}.jar
  +      for java in \
  +          org/mozilla/javascript/Token.java \
  +          org/mozilla/javascript/TokenStream.java \
  +          org/mozilla/javascript/Parser.java \
  +          org/mozilla/javascript/Decompiler.java \
  +          com/yahoo/platform/yui/compressor/JavaScriptToken.java \
  +          com/yahoo/platform/yui/compressor/ScriptOrFnScope.java \
  +          com/yahoo/platform/yui/compressor/JavaScriptCompressor.java \
  +          com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java \
  +          com/yahoo/platform/yui/compressor/CssCompressor.java \
  +          com/yahoo/platform/yui/compressor/YUICompressor.java \
  +      ; do
  +          javac -Vsun-jdk -cp . $java || exit $?
  +      done
  +      find . -name "*.orig" -print | xargs rm -f
  +    ) || exit $?
  +    mv src/META-INF .
  +    jar -cfm build/yuicompressor-%{version}.jar META-INF/MANIFEST.MF -C src/ 
.
   
   %install
       rm -rf $RPM_BUILD_ROOT
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to