[Jpackage-commits] rpms/free/gwt Mozilla.java, NONE, 1.1 WebappClassLoader.java, NONE, 1.1 gwt-benchmarkViewer, NONE, 1.1 gwt-build.patch, NONE, 1.1 gwt-dev-1.6.0.pom, NONE, 1.1 gwt-i18nCreator, NONE, 1.1 gwt-java6.patch, NONE, 1.1 gwt-junitCreator, NONE, 1.1 gwt-mozilla-64.patch, NONE, 1.1 gwt-mozilla-google.patch, NONE, 1.1 gwt-mozilla.patch, NONE, 1.1 gwt-servlet-1.6.0.pom, NONE, 1.1 gwt-tomcat-google.patch, NONE, 1.1 gwt-tomcat.patch, NONE, 1.1 gwt-user-1.6.0.pom, NONE, 1.1 gwt-webAppCreator, NONE, 1.1 gwt.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Sat Feb 28 01:24:45 CET 2009


Update of /home/projects/jpackage/cvs/rpms/free/gwt
In directory ryu.zarb.org:/tmp/shLf8ztYar/rpms/free/gwt

Added Files:
	Mozilla.java WebappClassLoader.java gwt-benchmarkViewer 
	gwt-build.patch gwt-dev-1.6.0.pom gwt-i18nCreator 
	gwt-java6.patch gwt-junitCreator gwt-mozilla-64.patch 
	gwt-mozilla-google.patch gwt-mozilla.patch 
	gwt-servlet-1.6.0.pom gwt-tomcat-google.patch gwt-tomcat.patch 
	gwt-user-1.6.0.pom gwt-webAppCreator gwt.spec 
Log Message:
1.6.0-1.jpp6.fc10

--- NEW FILE: gwt-tomcat.patch ---
--- gwt-1.6.0/dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java.tomcat	2009-01-21 20:07:18.000000000 -0500
+++ gwt-1.6.0/dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java	2009-02-25 12:43:38.283235904 -0500
@@ -24,17 +24,18 @@
 import com.google.gwt.dev.shell.WorkDirs;
 import com.google.gwt.util.tools.Utility;
 
-import org.apache.catalina.Connector;
+import org.apache.catalina.connector.Connector;
 import org.apache.catalina.ContainerEvent;
 import org.apache.catalina.ContainerListener;
 import org.apache.catalina.Engine;
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.Logger;
+import org.apache.catalina.Lifecycle;
+//import org.apache.catalina.Logger;
 import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.startup.Embedded;
 import org.apache.catalina.startup.HostConfig;
-import org.apache.coyote.tomcat5.CoyoteConnector;
+//import org.apache.coyote.tomcat5.CoyoteConnector;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -85,7 +86,7 @@
   // Stop the embedded Tomcat server.
   //
   public static synchronized void stop() {
-    if (sTomcat != null) {
+    if (sTomcat != null && sTomcat.catEmbedded != null) {
       try {
         sTomcat.catEmbedded.stop();
       } catch (LifecycleException e) {
@@ -107,6 +108,7 @@
    * Tomcat with GWT and know exactly what version it is.
    */
   private static int computeLocalPort(Connector connector) {
+/*
     Throwable caught = null;
     try {
       Field phField = CoyoteConnector.class.getDeclaredField("protocolHandler");
@@ -133,6 +135,29 @@
     }
     throw new RuntimeException(
         "Failed to retrieve the startup port from Embedded Tomcat", caught);
+*/
+    return -1;
+  }
+
+  private static int findFreeLocalPort() {
+    ServerSocket socket = null;
+
+    try {
+      socket = new ServerSocket(0);
+      return socket.getLocalPort();
+    } catch (IOException e) {
+
+    } finally {
+      if (socket != null) {
+        try {
+          socket.close();
+        } catch (IOException e) {
+
+        }
+      }
+    }
+
+    return -1;
   }
 
   private Embedded catEmbedded;
@@ -167,9 +192,9 @@
     //
     sTomcat = this;
 
-    // Assume the working directory is simply the user's current directory.
+    // Assume the working directory is simply the user's home directory.
     //
-    File topWorkDir = new File(System.getProperty("user.dir"));
+    File topWorkDir = new File(System.getProperty("user.home"));
 
     // Tell Tomcat its base directory so that it won't complain.
     //
@@ -190,13 +215,13 @@
 
     // And set up an adapter that will work with the Catalina logger family.
     //
-    Logger catalinaLogger = new CatalinaLoggerAdapter(topLogger);
+    //Logger catalinaLogger = new CatalinaLoggerAdapter(topLogger);
 
     // Create an embedded server.
     //
     catEmbedded = new Embedded();
-    catEmbedded.setDebug(0);
-    catEmbedded.setLogger(catalinaLogger);
+    //catEmbedded.setDebug(0);
+    //catEmbedded.setLogger(logger);
 
     // The embedded engine is called "gwt".
     //
@@ -221,7 +246,7 @@
     //
     catHost.addContainerListener(new ContainerListener() {
       public void containerEvent(ContainerEvent event) {
-        if (StandardHost.PRE_INSTALL_EVENT.equals(event.getType())) {
+        if (/*StandardHost.PRE_INSTALL_EVENT*/Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
           StandardContext webapp = (StandardContext) event.getData();
           publishShellLoggerAttribute(logger, topLogger, webapp);
           publishShellWorkDirsAttribute(logger, workDirs, webapp);
@@ -238,13 +263,20 @@
     //
     catEmbedded.addEngine(catEngine);
     InetAddress nullAddr = null;
-    Connector connector = catEmbedded.createConnector(nullAddr, listeningPort,
+
+    if (listeningPort == 0) {
+        port = findFreeLocalPort();
+    } else {
+        port = listeningPort;
+   }
+
+    Connector connector = catEmbedded.createConnector(nullAddr, /*listeningPort*/port,
         false);
     catEmbedded.addConnector(connector);
 
     // start up!
     catEmbedded.start();
-    port = computeLocalPort(connector);
+    //port = computeLocalPort(connector);
 
     if (port != listeningPort) {
       logger.log(TreeLogger.INFO, "HTTP listening on port " + port, null);

--- NEW FILE: gwt-i18nCreator ---
#!/bin/sh
#
# gwt-i18nCreator script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Configuration
MAIN_CLASS="com.google.gwt.i18n.tools.I18NCreator"
BASE_FLAGS=""
BASE_OPTIONS=""
BASE_JARS="gwt-user servlet_2_5_api gwt-dev-linux"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"

--- NEW FILE: gwt-servlet-1.6.0.pom ---
<project>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.google.gwt</groupId>
  <artifactId>gwt-servlet</artifactId>
  <version>1.6.0</version>
  <packaging>jar</packaging>

  <name>GWT Servlet Library 1.6</name>
  <url>http://code.google.com/webtoolkit/</url>
  <description>The GWT Servlet Library supports the server-side components for invoking a GWT-RPC endpoint.</description>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>http://google-web-toolkit.googlecode.com/svn/</url>
  </scm>

</project>

--- NEW FILE: WebappClassLoader.java ---
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package org.apache.catalina.loader;
[...2347 lines suppressed...]

        String files[] = dir.list();
        if (files == null) {
            files = new String[0];
        }
        for (int i = 0; i < files.length; i++) {
            File file = new File(dir, files[i]);
            if (file.isDirectory()) {
                deleteDir(file);
            } else {
                file.delete();
            }
        }
        dir.delete();

    }


}


--- NEW FILE: gwt-benchmarkViewer ---
#!/bin/sh
#
# gwt-benchmarkViewer script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Configuration
MAIN_CLASS="com.google.gwt.dev.GWTShell"
#MAIN_CLASS="com.google.gwt.dev.HostedMode"
BASE_FLAGS="-Dcom.google.gwt.junit.reportPath=$1"
BASE_OPTIONS=""
BASE_JARS="ant gwt-user gwt-dev-linux gwt-benchmark-viewer jcommon jfreechart swt-gtk"
TOMCAT_JARS="jakarta-commons-collections jakarta-commons-logging tomcat6/annotations-api tomcat6/catalina tomcat6/coyote tomcat6-jsp-2.1-api tomcat6-servlet-2.5-api"
CLASSPATH=/usr/share/tomcat6/bin/tomcat-juli.jar
#JETTY_JARS="ant jetty6/core/jetty6 jetty6/core/jetty6-util"
BASE_JARS="${BASE_JARS} ${TOMCAT_JARS}"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
export LD_LIBRARY_PATH=@XULRUNNER_PATH@:@LIBDIR@/swt-gtk:@LIBDIR@/@NAME@
run -port auto com.google.gwt.benchmarks.viewer.ReportViewer/ReportViewer.html?gwt.hybrid

--- NEW FILE: gwt-tomcat-google.patch ---
--- gwt-1.6.0/dev/core/src/org/apache/catalina/loader/WebappClassLoader.java.orig	2009-02-26 17:14:53.240235988 -0500
+++ gwt-1.6.0/dev/core/src/org/apache/catalina/loader/WebappClassLoader.java	2009-02-25 16:20:49.000000000 -0500
@@ -1298,8 +1298,11 @@
 
         // (0.2) Try loading the class with the system class loader, to prevent
         //       the webapp from overriding J2SE classes
+        // GOOGLE: use the bootstrap loader, not the system loader; it breaks
+        //       embedding.
         try {
-            clazz = system.loadClass(name);
+           // clazz = system.loadClass(name);
+            clazz = Class.forName(name, false, null);
             if (clazz != null) {
                 if (resolve)
                     resolveClass(clazz);

--- NEW FILE: gwt-mozilla.patch ---
--- gwt-1.6.0/dev/core/src/com/google/gwt/dev/shell/LowLevel.java.orig	2009-02-23 17:17:49.208362054 -0500
+++ gwt-1.6.0/dev/core/src/com/google/gwt/dev/shell/LowLevel.java	2009-02-23 17:18:14.904237241 -0500
@@ -96,7 +96,7 @@
         } catch (IOException e) {
           // ignore problems, failures will occur when the libs try to load
         }
-        System.load(installPath + '/' + System.mapLibraryName(libName));
+        System.load("@LIBDIR@/@NAME@" + '/' + System.mapLibraryName(libName));
       } catch (UnsatisfiedLinkError e) {
         StringBuffer sb = new StringBuffer();
         sb.append("Unable to load required native library '" + libName
--- gwt-1.6.0/distro-source/linux/src/mozilla-hosted-browser.conf.orig	2009-02-23 17:33:19.997361702 -0500
+++ gwt-1.6.0/distro-source/linux/src/mozilla-hosted-browser.conf	2009-02-23 17:35:06.600648457 -0500
@@ -24,12 +24,13 @@
 #
 # However, this version may not run correctly on your system.  If it doesn't,
 # you can try installing a mozilla 1.7.13 built for your system.
-mozilla-1.7.13
+#mozilla-1.7.13
 
 # This is the default mozilla that ships with GWT.
-mozilla-1.7.12
+#mozilla-1.7.12
 
 # See if there are compatible mozilla distributions already installed.
-/usr/lib/mozilla-1.7.13
-/usr/lib/mozilla-1.7.12
-/usr/lib/mozilla
+#/usr/lib/mozilla-1.7.13
+#/usr/lib/mozilla-1.7.12
+#/usr/lib/mozilla
+ at XULRUNNER_PATH@
--- gwt-1.6.0/dev/linux/src/com/google/gwt/dev/shell/moz/MozillaInstall.java.mozilla	2007-06-18 18:12:51.000000000 -0400
+++ gwt-1.6.0/dev/linux/src/com/google/gwt/dev/shell/moz/MozillaInstall.java	2009-02-24 19:33:21.349236326 -0500
@@ -71,7 +71,7 @@
      * mozilla installation. Return immediately if a suitable one is found.
      */
     try {
-      BufferedReader reader = new BufferedReader(new FileReader(installPath
+      BufferedReader reader = new BufferedReader(new FileReader("@SYSCONFDIR@/@NAME@"
           + "/" + CONFIG_FILENAME));
       try { // make sure we close the reader
         String mozillaDir;
@@ -81,7 +81,7 @@
             continue;
           }
           if (!mozillaDir.startsWith("/")) {
-            mozillaDir = installPath + "/" + mozillaDir;
+            mozillaDir = "@LIBDIR@" + "/" + mozillaDir;
           }
           MozillaInstall mozInstall = new MozillaInstall(mozillaDir);
           if (mozInstall.isAcceptable()) {
--- gwt-1.6.0/jni/linux/mozilla-headers.h.mozilla	2007-05-23 14:45:55.000000000 -0400
+++ gwt-1.6.0/jni/linux/mozilla-headers.h	2009-02-26 10:54:29.117236024 -0500
@@ -15,16 +15,18 @@
  */
 
 // include all of the necessary Mozilla headers.
-#include "mozilla-config.h"
-#include "nsIServiceManagerUtils.h"
-#include "nsComponentManagerUtils.h"
+
+#include "xpcom-config.h"
+
+#include "nsAutoPtr.h"
+#include "nsDOMJSUtils.h"
 #include "nsICategoryManager.h"
+#include "nsIComponentRegistrar.h"
+#include "nsIDOMWindow.h"
+#include "nsIScriptGlobalObject.h"
 #include "nsIScriptNameSpaceManager.h"
 #include "nsIScriptObjectOwner.h"
-#include "nsIScriptGlobalObject.h"
-#include "nsIScriptContext.h"
-#include "nsIDOMWindow.h"
+#include "nsIServiceManager.h"
 #include "nsIXPConnect.h"
-#include "nsIFactory.h"
-#include "nsCOMPtr.h"
-#include "nsAutoPtr.h"
+
+#define NS_REINTERPRET_CAST(a, b) reinterpret_cast<a>(b)
--- gwt-1.6.0/jni/linux/LowLevelMoz.cpp.mozilla	2008-06-10 21:12:18.000000000 -0400
+++ gwt-1.6.0/jni/linux/LowLevelMoz.cpp	2009-02-26 13:44:28.212236357 -0500
@@ -231,7 +231,7 @@
   nsXPIDLString aRetValue;
   PRBool aIsUndefined;
   if (NS_FAILED(scriptContext->EvaluateString(scriptString, scriptWindow, 0,
-      jfile.str(), line, 0, aRetValue, &aIsUndefined))) {
+      jfile.str(), line, 0, &aRetValue, &aIsUndefined))) {
     tracer.setFail("EvaluateString failed");
     return JNI_FALSE;
   }
@@ -352,11 +352,14 @@
   char buf[256];
   sprintf(buf, " jniEnv=%08x, llClass=%08x", (unsigned)env, (unsigned)llClass);
   tracer.log(buf);
-  
+
+  nsCOMPtr<nsIComponentRegistrar> registrar;
+  NS_GetComponentRegistrar(getter_AddRefs(registrar));
+
   // Register "window.external" as our own class
-  if (NS_FAILED(nsComponentManager::RegisterFactory(
+  if (!registrar || NS_FAILED(registrar->RegisterFactory(
       kGwtExternalCID, "externalFactory", GWT_EXTERNAL_CONTRACTID,
-      new nsRpExternalFactory(), PR_TRUE))) {
+      new nsRpExternalFactory()))) {
     tracer.setFail("RegisterFactory failed");
     return JNI_FALSE;
   }
--- gwt-1.6.0/jni/linux/Makefile.mozilla	2008-03-04 20:14:12.000000000 -0500
+++ gwt-1.6.0/jni/linux/Makefile	2009-02-26 17:34:19.473236962 -0500
@@ -16,7 +16,7 @@
 # Target settings
 ##
 #JAVA_HOME
-#JAVA_HOME=/usr/lib/j2sdk1.5-sun
+JAVA_HOME ?= /usr/lib/jvm/java
 
 # set GWT_TOOLS only if it is not already defined
 GWT_TOOLS ?= ../../../tools
@@ -55,7 +55,7 @@
 OBJS    := $(addprefix $(OBJDIR),$(SRCS:.cpp=.o))
 DEPS    := $(addprefix $(OBJDIR),$(SRCS:.cpp=.d))
 
-MOZDIR = $(GWT_TOOLS)/sdk/mozilla-1.7.12
+MOZDIR = @XULRUNNER_SDKDIR@/sdk
 MOZINC = $(MOZDIR)/include
 MOZLIB = $(MOZDIR)/lib
 
@@ -64,8 +64,7 @@
 ##
 SYSINCS := \
     $(JAVA_HOME)/include \
-    $(JAVA_HOME)/include/linux \
-    $(MOZINC) $(MOZINC)/extra
+    $(JAVA_HOME)/include/linux
 
 INCS := $(OBJDIR)
 INCS := $(addprefix -I ,$(INCS)) $(addprefix -isystem ,$(SYSINCS))
@@ -80,8 +79,8 @@
 # for notes on auto-dependency generation, see
 #   http://make.paulandlesley.org/autodep.html
 # -MP obviates the need for sed hackery
-CFLAGS   := -ggdb -m32 -Os -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -D_REENTRANT -MMD -MP -Wno-system-headers $(CFLAGS)
-LDFLAGS  := -ggdb -m32 -s -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -D_REENTRANT -Wl,-shared-gcc $(LDFLAGS)
+CFLAGS   := -ggdb -Os -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -D_REENTRANT -MMD -MP -Wno-system-headers $(CFLAGS) `pkg-config --cflags libxul-unstable` -DMOZILLA_INTERNAL_API $(RPM_OPT_FLAGS)
+LDFLAGS  := -ggdb -s -fPIC -fno-omit-frame-pointer -fno-strict-aliasing -D_REENTRANT -Wl,-shared-gcc $(LDFLAGS)
 
 #-------------------------------------------------------------------------------
 # Rules

--- NEW FILE: gwt-junitCreator ---
#!/bin/sh
#
# gwt-junitCreator script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Configuration
MAIN_CLASS="com.google.gwt.junit.tools.JUnitCreator"
BASE_FLAGS=""
BASE_OPTIONS=""
BASE_JARS="gwt-user servlet_2_5_api gwt-dev-linux"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"

--- NEW FILE: gwt-build.patch ---
--- gwt-1.6.0.orig/common.ant.xml	2009-01-29 12:07:24.000000000 -0500
+++ gwt-1.6.0/common.ant.xml	2009-02-19 11:58:43.863767245 -0500
@@ -204,8 +204,8 @@
       <taskdef name="svninfo"
          classname="com.google.gwt.ant.taskdefs.SvnInfo"
          classpath="${gwt.build.lib}/ant-gwt.jar" />
-      <svninfo directory="${gwt.root}" outputproperty="gwt.svnrev"
-          outputfileproperty="gwt.svnrev.filename" />
+      <!--<svninfo directory="${gwt.root}" outputproperty="gwt.svnrev"
+          outputfileproperty="gwt.svnrev.filename" /> -->
       <!-- Generally, filtering requires a sentinel file so that changes to svn rev will
          be noticed as invalidating the previously-generated filter output.  This property
          names where such a sentinel lives; it is tested with <available/> and created
--- gwt-1.6.0.orig/dev/common.ant.xml	2008-09-10 23:19:19.000000000 -0400
+++ gwt-1.6.0/dev/common.ant.xml	2009-02-19 12:01:10.210767414 -0500
@@ -27,7 +27,7 @@
       <fileset dir="${gwt.core.root}/super" excludes="**/package.html" />
       <fileset dir="${javac.out}" />
       <fileset dir="${gwt.core.build}/bin" />
-      <zipfileset src="${gwt.tools.lib}/eclipse/${gwt.dev.swt.jar}" />
+      <!-- <zipfileset src="${gwt.tools.lib}/eclipse/${gwt.dev.swt.jar}" /> -->
       <zipfileset src="${gwt.core.build}/alldeps.jar" />
       <manifest>
         <attribute name="Main-Class" value="com.google.gwt.dev.GWTMain" />
--- gwt-1.6.0.orig/dev/core/build.xml	2009-01-15 21:52:12.000000000 -0500
+++ gwt-1.6.0/dev/core/build.xml	2009-02-19 11:36:40.579184558 -0500
@@ -23,6 +23,7 @@
   <target name="build.alldeps.jar" description="Merges all dependency jars into a single jar">
     <mkdir dir="${project.build}" />
     <gwt.jar destfile="${alldeps.jar}">
+<!--
       <zipfileset src="${gwt.tools.lib}/apache/tapestry-util-text-4.0.2.jar" />
       <zipfileset src="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
       <zipfileset src="${gwt.tools.lib}/eclipse/jdt-3.4.2.jar" />
@@ -54,6 +55,7 @@
       <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-http11-1.0.jar" />
       <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-jk2-2.1.jar" />
       <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-util-5.1.jar" />
+-->
     </gwt.jar>
   </target>
 
--- gwt-1.6.0.orig/distro-source/linux/build.xml	2009-01-13 14:16:35.000000000 -0500
+++ gwt-1.6.0/distro-source/linux/build.xml	2009-02-19 12:28:00.468766992 -0500
@@ -16,9 +16,9 @@
 
       <!-- jni libs-->
       <tarfileset dir="${gwt.build.jni}/${dist.platform}" prefix="${project.distname}" />
-      <tarfileset dir="${gwt.tools.lib}/eclipse" prefix="${project.distname}">
+      <!--<tarfileset dir="${gwt.tools.lib}/eclipse" prefix="${project.distname}">
         <include name="libswt-*gtk-3235.so" />
-      </tarfileset>
+      </tarfileset>-->
 
       <!-- raw files -->
       <tarfileset dir="${dist.resources}" prefix="${project.distname}" mode="755">
@@ -53,7 +53,7 @@
         <include name="*/*" />
       </tarfileset>
 
-      <includetar src="${gwt.tools.redist}/mozilla/mozilla-1.7.12.tar.gz" compression="gzip" prefix="${project.distname}" />
+      <!--<includetar src="${gwt.tools.redist}/mozilla/mozilla-1.7.12.tar.gz" compression="gzip" prefix="${project.distname}" />-->
     </gwt.tgz.cat>
 
     <if>
--- gwt-1.6.0.orig/platforms.ant.xml	2008-08-22 12:09:01.000000000 -0400
+++ gwt-1.6.0/platforms.ant.xml	2009-02-19 12:04:19.383767560 -0500
@@ -21,7 +21,7 @@
     <gwt.ant dir="mac" />
   </target>
 
-  <target name="-do" depends="linux, windows, mac" description="Run all platforms" />
+  <target name="-do" depends="linux" description="Run Linux platform" />
 
   <target name="build" description="Build each platforms">
     <antcall target="-do">
--- gwt-1.6.0.orig/user/build.xml	2009-01-29 12:07:24.000000000 -0500
+++ gwt-1.6.0/user/build.xml	2009-02-19 12:06:43.646893431 -0500
@@ -66,7 +66,7 @@
       <fileset dir="src" excludes="**/package.html" />
       <fileset dir="super" excludes="**/package.html" />
       <fileset dir="${javac.out}" />
-      <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
+      <!--<zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />-->
     </gwt.jar>
   </target>
 
--- gwt-1.6.0/tools/benchmark-viewer/build.xml.orig	2009-02-19 18:38:38.837768899 -0500
+++ gwt-1.6.0/tools/benchmark-viewer/build.xml	2009-02-19 18:39:04.178893847 -0500
@@ -71,9 +71,11 @@
       <fileset dir="src" excludes="**/package.html" />
       <fileset dir="${javac.out}" />
                         <fileset dir="${tools.build}/www-new" />
+<!--
                         <zipfileset src="${gwt.tools.lib}/jfreechart/itext-1.4.6.jar"/>
                         <zipfileset src="${gwt.tools.lib}/jfreechart/jcommon-1.0.6.jar"/>
                         <zipfileset src="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar"/>
+-->
     </gwt.jar>
   </target>
 
--- gwt-1.6.0/doc/build.xml.build	2009-02-03 13:40:07.000000000 -0500
+++ gwt-1.6.0/doc/build.xml	2009-02-24 18:59:16.359805046 -0500
@@ -34,6 +34,7 @@
   </path>
 
   <path id="USER_CLASS_PATH">
+    <pathelement path="${java.class.path}" />
     <pathelement location="${gwt.user.jar}" />
     <pathelement location="${gwt.dev.jar}" />
     <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
@@ -83,6 +84,10 @@
           <arg value="1.5" />
           <arg value="-windowtitle" />
           <arg value="Google Web Toolkit Javadoc" />
+          <arg value="-link" />
+          <arg value="/usr/share/javadoc/junit" />
+          <arg value="-link" />
+          <arg value="/usr/share/javadoc/jboss-javaee" />
           <arg value="-encoding"/>
           <arg value="UTF-8"/>
           <arg value="-d" />
@@ -120,7 +125,7 @@
           <arg value="-classpath" />
           <arg pathref="USER_CLASS_PATH" />
           <arg value="-sourcepath" />
-          <arg path="${gwt.root}/user/super/com/google/gwt/emul" />
+          <arg path="${gwt.root}/user/super/com/google/gwt/emul:${gwt.root}/dev/core/super/com/google/gwt/dev/jjs/intrinsic" />
           <arg value="-packages" />
           <arg value="${LANG_PKGS}" />
         </java>

--- NEW FILE: Mozilla.java ---
/*******************************************************************************
 * Copyright (c) 2003, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.browser;

import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
[...3143 lines suppressed...]
			case 4: mouseEvent.stateMask |= SWT.BUTTON4; break;
			case 5: mouseEvent.stateMask |= SWT.BUTTON5; break;
		}
	}

	browser.notifyListeners (mouseEvent.type, mouseEvent);
	if (browser.isDisposed ()) return XPCOM.NS_OK;
	if (aDetail[0] == 2 && XPCOM.DOMEVENT_MOUSEDOWN.equals (typeString)) {
		mouseEvent = new Event ();
		mouseEvent.widget = browser;
		mouseEvent.x = aClientX[0]; mouseEvent.y = aClientY[0];
		mouseEvent.stateMask = (aAltKey[0] != 0 ? SWT.ALT : 0) | (aCtrlKey[0] != 0 ? SWT.CTRL : 0) | (aShiftKey[0] != 0 ? SWT.SHIFT : 0) | (aMetaKey[0] != 0 ? SWT.COMMAND : 0);
		mouseEvent.type = SWT.MouseDoubleClick;
		mouseEvent.button = aButton[0] + 1;
		mouseEvent.count = aDetail[0];
		browser.notifyListeners (mouseEvent.type, mouseEvent);	
	}
	return XPCOM.NS_OK;
}
}

--- NEW FILE: gwt-java6.patch ---
--- gwt-1.6.0.orig/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java	2008-12-11 21:59:42.000000000 -0500
+++ gwt-1.6.0/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java	2009-02-19 11:35:46.686769138 -0500
@@ -91,7 +91,7 @@
       ArtifactSet artifacts) throws UnableToCompleteException {
     ArtifactSet toReturn = new ArtifactSet(artifacts);
 
-    for (CompilationResult compilation : toReturn.find(CompilationResult.class)) {
+    for (CompilationResult compilation : toReturn.<CompilationResult,CompilationResult>find(CompilationResult.class)) {
       toReturn.add(doEmitCompilation(logger, context, compilation));
     }
 
@@ -204,7 +204,7 @@
     // Add external dependencies
     startPos = selectionScript.indexOf("// __MODULE_STYLES_END__");
     if (startPos != -1) {
-      for (StylesheetReference resource : artifacts.find(StylesheetReference.class)) {
+      for (StylesheetReference resource : artifacts.<StylesheetReference,StylesheetReference>find(StylesheetReference.class)) {
         String text = generateStylesheetInjector(resource.getSrc());
         selectionScript.insert(startPos, text);
         startPos += text.length();
@@ -213,7 +213,7 @@
 
     startPos = selectionScript.indexOf("// __MODULE_SCRIPTS_END__");
     if (startPos != -1) {
-      for (ScriptReference resource : artifacts.find(ScriptReference.class)) {
+      for (ScriptReference resource : artifacts.<ScriptReference,ScriptReference>find(ScriptReference.class)) {
         String text = generateScriptInjector(resource.getSrc());
         selectionScript.insert(startPos, text);
         startPos += text.length();
--- gwt-1.6.0.orig/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java	2008-12-10 21:00:54.000000000 -0500
+++ gwt-1.6.0/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardLinkerContext.java	2009-02-19 11:35:07.747800735 -0500
@@ -433,7 +433,7 @@
     logger = logger.branch(TreeLogger.TRACE, "Linking compilation into "
         + outputPath.getPath(), null);
 
-    for (EmittedArtifact artifact : artifacts.find(EmittedArtifact.class)) {
+    for (EmittedArtifact artifact : artifacts.<EmittedArtifact,EmittedArtifact>find(EmittedArtifact.class)) {
       TreeLogger artifactLogger = logger.branch(TreeLogger.DEBUG,
           "Emitting resource " + artifact.getPartialPath(), null);
 
--- gwt-1.6.0.orig/dev/core/src/com/google/gwt/dev/GWTShell.java	2009-01-30 18:17:23.000000000 -0500
+++ gwt-1.6.0/dev/core/src/com/google/gwt/dev/GWTShell.java	2009-02-19 11:35:07.792766865 -0500
@@ -202,7 +202,7 @@
          * Copied from StandardLinkerContext.produceOutputDirectory() for legacy
          * GWTShellServlet support.
          */
-        for (EmittedArtifact artifact : artifacts.find(EmittedArtifact.class)) {
+        for (EmittedArtifact artifact : artifacts.<EmittedArtifact,EmittedArtifact>find(EmittedArtifact.class)) {
           if (!artifact.isPrivate()) {
             File outFile = new File(options.getShellPublicGenDir(module),
                 artifact.getPartialPath());

--- NEW FILE: gwt-mozilla-google.patch ---
--- gwt-1.6.0/dev/linux/src/org/eclipse/swt/browser/Mozilla.java.orig	2009-02-26 17:10:28.872235198 -0500
+++ gwt-1.6.0/dev/linux/src/org/eclipse/swt/browser/Mozilla.java	2009-02-26 17:12:55.798361149 -0500
@@ -8,8 +8,11 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
+// Modified by Google
 package org.eclipse.swt.browser;
 
+import com.google.gwt.dev.shell.moz.LowLevelMoz; // GOOGLE
+
 import java.io.*;
 import java.lang.reflect.*;
 import java.util.*;
@@ -167,7 +170,18 @@
 			Initialized = true;
 		}
 
-		String mozillaPath = System.getProperty (XULRUNNER_PATH);
+		/*
+		* GOOGLE: We ship our own bundled version of Mozilla; the
+		* bootstrap process stores the path of the one we loaded in
+		* the system property swt.mozilla.path, so we get it from
+		* there rather than using SWT's normal process to find it.
+		*/
+		String mozillaPath = System.getProperty("swt.mozilla.path");
+
+		if (mozillaPath == null) {
+			mozillaPath = System.getProperty (XULRUNNER_PATH);
+		}
+
 		/*
 		* Browser clients that ship XULRunner in a plug-in must have an opportunity 
 		* to set the org.eclipse.swt.browser.XULRunnerPath system property to point
@@ -912,6 +926,13 @@
 		componentManager.Release ();
 
 		Initialized = true;
+
+		/*
+		* GOOGLE: If we don't force LowLevel into existence during this narrow
+		* window of opportunity, registering our "window.external" handler seems
+		* to have no effect.
+		*/
+		LowLevelMoz.init();
 	}
 
 	if (display.getData (DISPOSE_LISTENER_HOOKED) == null) {

--- NEW FILE: gwt-mozilla-64.patch ---
--- gwt-1.6.0/dev/linux/src/org/eclipse/swt/browser/Mozilla.java.orig	2008-06-05 13:31:50.000000000 -0700
+++ gwt-1.6.0/dev/linux/src/org/eclipse/swt/browser/Mozilla.java	2008-06-17 20:55:54.000000000 -0700
@@ -21,7 +21,7 @@
 import org.eclipse.swt.layout.*;
 
 class Mozilla extends WebBrowser {
-	int /*long*/ embedHandle;
+	long /*int*/ embedHandle;
 	nsIWebBrowser webBrowser;
 	Object webBrowserObject;
 	MozillaDelegate delegate;
@@ -41,7 +41,7 @@
 	XPCOMObject domEventListener;
 	int chromeFlags = nsIWebBrowserChrome.CHROME_DEFAULT;
 	int refCount, lastKeyCode, lastCharCode;
-	int /*long*/ request;
+	long /*int*/ request;
 	Point location, size;
 	boolean visible, isChild, ignoreDispose, awaitingNavigate;
[...1261 lines suppressed...]
@@ -14,7 +14,7 @@
  * Signature: (Ljava/lang/Object;)I
  */
 JNIEXPORT jint JNICALL Java_com_google_gwt_dev_shell_LowLevel__1newGlobalRefInt(JNIEnv* env, jclass, jobject o) {
-	return reinterpret_cast<int>(env->NewGlobalRef(o));
+	return reinterpret_cast<long>(env->NewGlobalRef(o));
 }
 /*
  * Class:     com_google_gwt_dev_shell_LowLevel
--- gwt-1.6.0/jni/linux/LowLevelMoz.cpp.mozilla-64	2009-02-27 12:08:59.623021750 -0500
+++ gwt-1.6.0/jni/linux/LowLevelMoz.cpp	2009-02-27 12:19:04.476023482 -0500
@@ -350,7 +350,7 @@
   Tracer tracer("LowLevelMoz._registerExternalFactoryHandler");
 
   char buf[256];
-  sprintf(buf, " jniEnv=%08x, llClass=%08x", (unsigned)env, (unsigned)llClass);
+  sprintf(buf, " jniEnv=%08x, llClass=%08x", (long)env, (long)llClass);
   tracer.log(buf);
 
   nsCOMPtr<nsIComponentRegistrar> registrar;

--- NEW FILE: gwt-webAppCreator ---
#!/bin/sh
#
# gwt-webAppCreator script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Configuration
MAIN_CLASS="com.google.gwt.user.tools.WebAppCreator"
BASE_FLAGS=""
BASE_OPTIONS=""
BASE_JARS="gwt-user servlet_2_5_api gwt-dev-linux"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"

--- NEW FILE: gwt-user-1.6.0.pom ---
<project>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.google.gwt</groupId>
  <artifactId>gwt-user</artifactId>
  <version>1.6.0</version>
  <packaging>jar</packaging>

  <name>GWT User Library 1.6</name>
  <url>http://code.google.com/webtoolkit/</url>
  <description>The GWT User Library supports the client-side components for building AJAX apps in the Java language using the Google Web Toolkit.</description>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>http://google-web-toolkit.googlecode.com/svn/</url>
  </scm>

</project>

--- NEW FILE: gwt.spec ---
# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define with()          %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()       %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with()    %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

%bcond_with             bootstrap

%define svnrev          4796M
%define gcj_support     %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
%define section         free

Name:           gwt
Version:        1.6.0
Release:        1%{?dist}
Epoch:          0
Summary:        Google Web Toolkit
License:        ASL 2.0
Group:          Development/Libraries/Java
URL:            http://code.google.com/webtoolkit/
# svn -q export http://google-web-toolkit.googlecode.com/svn/tags/1.6.0/ gwt-1.6.0 && tar cjf gwt-1.6.0.tar.bz2 gwt-1.6.0
Source0:        gwt-1.6.0.tar.bz2
Source2:        http://mirrors.ibiblio.org/pub/mirrors/maven2/com/google/gwt/gwt-dev/1.6.0/gwt-dev-1.6.0.pom
Source3:        http://mirrors.ibiblio.org/pub/mirrors/maven2/com/google/gwt/gwt-servlet/1.6.0/gwt-servlet-1.6.0.pom
Source4:        http://mirrors.ibiblio.org/pub/mirrors/maven2/com/google/gwt/gwt-user/1.6.0/gwt-user-1.6.0.pom
Source5:        Mozilla.java
Source6:        WebappClassLoader.java
Source7:        gwt-benchmarkViewer
Source8:        gwt-i18nCreator
Source9:        gwt-junitCreator
Source10:       gwt-webAppCreator
Patch0:         gwt-build.patch
Patch1:         gwt-java6.patch
Patch2:         gwt-tomcat.patch
Patch3:         gwt-mozilla.patch
Patch4:         gwt-mozilla-64.patch
Patch5:         gwt-mozilla-google.patch
Patch6:         gwt-tomcat-google.patch
Requires(post): jpackage-utils >= 0:1.7.3
Requires(postun): jpackage-utils >= 0:1.7.3
Requires:       ant
Requires:       jcommon
Requires:       jetty6
Requires:       jfreechart
Requires:       jpackage-utils >= 0:1.7.3
Requires:       swt-gtk
Requires:       servlet_2_5_api
Requires:       tomcat6-lib
BuildRequires:  ant
BuildRequires:  ant-contrib
BuildRequires:  checkstyle
BuildRequires:  ecj
BuildRequires:  jakarta-commons-collections
BuildRequires:  jakarta-commons-logging
BuildRequires:  jboss-javaee-javadoc
BuildRequires:  jboss-servlet-2.5-api
BuildRequires:  jetty6
BuildRequires:  jfreechart
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  jpackage-utils >= 0:1.7.3
BuildRequires:  junit
BuildRequires:  junit-javadoc
BuildRequires:  swt-gtk
BuildRequires:  openqa-selenium-rc-java-client-driver
BuildRequires:  tapestry
BuildRequires:  tomcat6
BuildRequires:  tomcat6-lib
BuildRequires:  xulrunner-devel-unstable
%if %{gcj_support}
BuildRequires:  java-gcj-compat-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
Writing web apps today is a tedious and error-prone process.
Developers can spend 90% of their time working around browser
quirks. In addition, building, reusing, and maintaining large
JavaScript code bases and AJAX components can be difficult and
fragile. Google Web Toolkit (GWT) eases this burden by allowing
developers to quickly build and maintain complex yet highly
performant JavaScript front-end applications in the Java
programming language.

%package javadoc
Group:          Development/Documentation
Summary:        Javadoc for %{name}

%description javadoc
Javadoc for %{name}.

%package demo
Group:          Development/Libraries/Java
Summary:        Samples for %{name}

%description demo
Samples for %{name}.

%prep
%setup -q
%{_bindir}/find -type f \( -name "*.jar" -o -name "*.so" \) | %{_bindir}/xargs -t %{__rm}

%{__rm} dev/linux/src/org/eclipse/swt/browser/Browser.java
%{__rm} dev/linux/src/org/eclipse/swt/internal/Library.java
%{__cp} -p %{SOURCE5} dev/linux/src/org/eclipse/swt/browser/Mozilla.java

%{__rm} dev/core/src/com/google/gwt/dev/shell/tomcat/CatalinaLoggerAdapter.java
%{__rm} dev/core/src/org/apache/catalina/loader/WebappClassLoader.java
%{__cp} -p %{SOURCE6} dev/core/src/org/apache/catalina/loader/WebappClassLoader.java

%patch0 -p1 -b .build
%patch1 -p1 -b .java6
%patch2 -p1 -b .tomcat
%patch3 -p1 -b .mozilla
%ifarch x86_64
%patch4 -p1 -b .mozilla-64
%endif
%patch5 -p1 -b .mozilla-google
%patch6 -p1 -b .tomcat-google

XULRUNNER_PATH=`%{_bindir}/pkg-config --variable=libdir libxul`
XULRUNNER_SDKDIR=`%{_bindir}/pkg-config --variable=sdkdir libxul`
%{__perl} -pi -e "s|\@XULRUNNER_PATH\@|"${XULRUNNER_PATH}"|g;" \
              -e "s|\@XULRUNNER_SDKDIR\@|"${XULRUNNER_SDKDIR}"|g;" \
              -e "s|\@LIBDIR\@|%{_libdir}|g;" \
              -e "s|\@NAME\@|%{name}|g;" \
              -e "s|\@SYSCONFDIR\@|%{_sysconfdir}|g;" \
  dev/core/src/com/google/gwt/dev/shell/LowLevel.java \
  dev/linux/src/com/google/gwt/dev/shell/moz/MozillaInstall.java \
  distro-source/linux/src/mozilla-hosted-browser.conf \
  jni/linux/Makefile

%{__mkdir_p} tools

%build
export CLASSPATH=$(build-classpath ant-contrib antlr checkstyle ecj jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-logging jetty6/core/jetty6 jetty6/core/jetty6-util jcommon jfreechart junit selenium-java-client-driver servlet_2_5_api swt-gtk tapestry/tapestry tomcat6/catalina tomcat6/naming-resources tomcat6/tomcat-util):%{_datadir}/tomcat6/bin/tomcat-juli.jar
export CLASSPATH=${CLASSPATH}:`%{_bindir}/find $(pwd)/tools/ -type f -name "*.jar" | tr '\n' ':'`
export OPT_JAR_LIST=:
export GWT_TOOLS=`pwd`/tools
export GWT_VERSION=%{version}
%{ant} -Dbuild.sysclasspath=first -Dgwt.svnrev=@%{svnrev} -Dgwt.svnrev.filename=%{svnrev}

pushd jni/linux
%{__make} STRIP=: RPM_OPT_FLAGS="%{optflags}" clean all
popd

%install
%{__rm} -rf %{buildroot}
%{__rm} -rf gwt-linux-%{version}

%{__tar} xjf build/dist/gwt-linux-%{version}.tar.bz2

pushd gwt-linux-%{version}

%{__cp} -p ../build/jni/linux/libgwt-ll.so libgwt-ll.so

# jar
%{__mkdir_p} %{buildroot}%{_javadir}/%{name}
for jar in *.jar; do
    newjar=`echo $(basename ${jar} .jar) | sed 's/gwt-//'`
    %{__cp} -p ${jar} %{buildroot}%{_javadir}/%{name}/${newjar}-%{version}.jar
    %{__ln_s} %{name}/${newjar}-%{version}.jar %{buildroot}%{_javadir}/%{name}-${newjar}-%{version}.jar
done
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
(cd %{buildroot}%{_javadir}/%{name} && for jar in *-%{version}*; do %{__ln_s} ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# jni
%{__mkdir_p} %{buildroot}%{_libdir}/%{name}
%{__cp} -p libgwt-ll.so %{buildroot}%{_libdir}/%{name}/libgwt-ll.so

# javadoc
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__cp} -pr doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}

# demo
%{__mkdir} %{buildroot}%{_datadir}/%{name}
%{__cp} -pr samples/ %{buildroot}%{_datadir}/%{name}/
%{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name}
%{__cp} -p mozilla-hosted-browser.conf %{buildroot}%{_sysconfdir}/%{name}/mozilla-hosted-browser.conf

# bin
%{__mkdir_p} %{buildroot}%{_bindir}
%{__cp} -p %{SOURCE7} %{buildroot}%{_bindir}/%{name}-benchmarkViewer
%{__cp} -p %{SOURCE8} %{buildroot}%{_bindir}/%{name}-i18nCreator
%{__cp} -p %{SOURCE9} %{buildroot}%{_bindir}/%{name}-junitCreator
%{__cp} -p %{SOURCE10} %{buildroot}%{_bindir}/%{name}-webAppCreator

XULRUNNER_PATH=`%{_bindir}/pkg-config --variable=libdir libxul`
%{__perl} -pi -e "s|\@XULRUNNER_PATH\@|"${XULRUNNER_PATH}"|g;" \
              -e "s|\@LIBDIR\@|%{_libdir}|g;" \
              -e "s|\@NAME\@|%{name}|g;" \
              -e "s|\@SYSCONFDIR\@|%{_sysconfdir}|g;" \
    %{buildroot}%{_bindir}/%{name}-benchmarkViewer \
    %{buildroot}%{_bindir}/%{name}-i18nCreator \
    %{buildroot}%{_bindir}/%{name}-junitCreator \
    %{buildroot}%{_bindir}/%{name}-webAppCreator

%if 0
for script in benchmarkViewer i18nCreator junitCreator webAppCreator; do %{__cp} -p ${script} %{buildroot}%{_datadir}/%{name}/${script}; done
%endif
popd

# maven
%{__mkdir_p} %{buildroot}%{_datadir}/maven2/poms
%{__cp} -p %{SOURCE2} %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-dev-linux.pom
%{__perl} -pi -e 's/gwt-dev/gwt-dev-linux/g' %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-dev-linux.pom
%add_to_maven_depmap com.google.gwt gwt-dev-linux %{version} JPP/%{name} dev-linux
%{__cp} -p %{SOURCE3} %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-servlet.pom
%add_to_maven_depmap com.google.gwt gwt-servlet %{version} JPP/%{name} servlet
%{__cp} -p %{SOURCE4} %{buildroot}%{_datadir}/maven2/poms/JPP.%{name}-user.pom
%add_to_maven_depmap com.google.gwt gwt-user %{version} JPP/%{name} user

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
%{__rm} -rf %{buildroot}

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(0644,root,root,0755)
%doc gwt-linux-%{version}/{COPYING,COPYING.html,about.html,about.txt,gwt-module.dtd,index.html,release_notes.html}
%attr(0755,root,root) %{_bindir}/%{name}-benchmarkViewer
%attr(0755,root,root) %{_bindir}/%{name}-i18nCreator
%attr(0755,root,root) %{_bindir}/%{name}-junitCreator
%attr(0755,root,root) %{_bindir}/%{name}-webAppCreator
%{_javadir}/%{name}-api-checker-%{version}.jar
%{_javadir}/%{name}-api-checker.jar
%{_javadir}/%{name}-benchmark-viewer-%{version}.jar
%{_javadir}/%{name}-benchmark-viewer.jar
%{_javadir}/%{name}-dev-linux-%{version}.jar
%{_javadir}/%{name}-dev-linux.jar
%{_javadir}/%{name}-servlet-%{version}.jar
%{_javadir}/%{name}-servlet.jar
%{_javadir}/%{name}-user-%{version}.jar
%{_javadir}/%{name}-user.jar
%{_javadir}/%{name}/api-checker-%{version}.jar
%{_javadir}/%{name}/api-checker.jar
%{_javadir}/%{name}/benchmark-viewer-%{version}.jar
%{_javadir}/%{name}/benchmark-viewer.jar
%{_javadir}/%{name}/dev-linux-%{version}.jar
%{_javadir}/%{name}/dev-linux.jar
%{_javadir}/%{name}/servlet-%{version}.jar
%{_javadir}/%{name}/servlet.jar
%{_javadir}/%{name}/user-%{version}.jar
%{_javadir}/%{name}/user.jar
%dir %{_libdir}/%{name}
%attr(-,root,root) %{_libdir}/%{name}/libgwt-ll.so
%{_datadir}/maven2/poms/JPP.%{name}-dev-linux.pom
%{_datadir}/maven2/poms/JPP.%{name}-servlet.pom
%{_datadir}/maven2/poms/JPP.%{name}-user.pom
%{_mavendepmapfragdir}/%{name}
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/*
%endif
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/mozilla-hosted-browser.conf

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}

%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}/samples

%changelog
* Thu Feb 19 2009 David Walluck <dwalluck at redhat.com> 0:1.6.0-1
- release

--- NEW FILE: gwt-dev-1.6.0.pom ---
<project>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.google.gwt</groupId>
  <artifactId>gwt-dev</artifactId>
  <version>1.6.0</version>
  <packaging>jar</packaging>

  <name>GWT Development Library 1.6</name>
  <url>http://code.google.com/webtoolkit/</url>
  <description>The GWT Development Library supports the Java to javascript compiler and the hosted mode runtime.</description>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>http://google-web-toolkit.googlecode.com/svn/</url>
  </scm>

</project>




More information about the JPackage-commits mailing list