rpms/intellij-idea/devel 0015-Adjust-defaults-for-Fedora.patch, NONE, 1.1 0016-Override-broken-javac-class.patch, NONE, 1.1 0017-Do-not-unnecessarily-delete-compile-output.patch, NONE, 1.1 autoconfig-jdk.pl, NONE, 1.1 intellij-idea-idea, 1.2, 1.3 intellij-idea.spec, 1.3, 1.4 0014-Make-it-build.patch, 1.1, NONE 0015-Look-for-Eclipse-JDT-in-Fedora-location.patch, 1.1, NONE 0016-Disable-update-checks-per-default.patch, 1.1, NONE
Lubomir Rintel
lkundrak at fedoraproject.org
Mon Apr 5 12:54:46 UTC 2010
Author: lkundrak
Update of /cvs/pkgs/rpms/intellij-idea/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv23737
Modified Files:
intellij-idea-idea intellij-idea.spec
Added Files:
0015-Adjust-defaults-for-Fedora.patch
0016-Override-broken-javac-class.patch
0017-Do-not-unnecessarily-delete-compile-output.patch
autoconfig-jdk.pl
Removed Files:
0014-Make-it-build.patch
0015-Look-for-Eclipse-JDT-in-Fedora-location.patch
0016-Disable-update-checks-per-default.patch
Log Message:
Finaly an IDEA build I am not ashamed of
0015-Adjust-defaults-for-Fedora.patch:
java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/eclipse/EclipseCompiler.java | 2 +-
platform/platform-api/src/com/intellij/ide/GeneralSettings.java | 5 ++++-
platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateSettings.java | 2 +-
xml/impl/src/com/intellij/ide/browsers/BrowsersConfiguration.java | 3 +--
4 files changed, 7 insertions(+), 5 deletions(-)
--- NEW FILE 0015-Adjust-defaults-for-Fedora.patch ---
>From 6e70158158186b7ad1baba0d35b63108ad5a9830 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Fri, 2 Apr 2010 16:16:52 +0200
Subject: [PATCH] Adjust defaults for Fedora
* Look for Eclipse JDT in Fedora location
* Disable update checks per default
* A bit saner defaults for web browser configuration
---
.../impl/javaCompiler/eclipse/EclipseCompiler.java | 2 +-
.../src/com/intellij/ide/GeneralSettings.java | 5 ++++-
.../updateSettings/impl/UpdateSettings.java | 2 +-
.../ide/browsers/BrowsersConfiguration.java | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/eclipse/EclipseCompiler.java b/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/eclipse/EclipseCompiler.java
index 34876e2..3c9d634 100644
--- a/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/eclipse/EclipseCompiler.java
+++ b/java/compiler/impl/src/com/intellij/compiler/impl/javaCompiler/eclipse/EclipseCompiler.java
@@ -52,7 +52,7 @@ public class EclipseCompiler extends ExternalCompiler {
@NonNls private static final String PATH_TO_COMPILER_JAR = findJarPah();
private static String findJarPah() {
- File dir = new File(PathManager.getLibPath());
+ File dir = new File("/usr/lib/eclipse/dropins/jdt/plugins");
File[] jars = dir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith("org.eclipse.jdt.core") && name.endsWith(".jar");
diff --git a/platform/platform-api/src/com/intellij/ide/GeneralSettings.java b/platform/platform-api/src/com/intellij/ide/GeneralSettings.java
index 071e547..4a9f310 100644
--- a/platform/platform-api/src/com/intellij/ide/GeneralSettings.java
+++ b/platform/platform-api/src/com/intellij/ide/GeneralSettings.java
@@ -95,6 +95,9 @@ public class GeneralSettings implements NamedJDOMExternalizable, ExportableAppli
else if (SystemInfo.isMac) {
myBrowserPath = "open";
}
+ else if (SystemInfo.isLinux) {
+ myBrowserPath = "xdg-open";
+ }
else {
myBrowserPath = "";
}
@@ -474,4 +477,4 @@ public class GeneralSettings implements NamedJDOMExternalizable, ExportableAppli
}
return oldCharsetSettingsHaveBeenRead;
}
-}
\ No newline at end of file
+}
diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateSettings.java b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateSettings.java
index 06d96d2..dff7959 100644
--- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateSettings.java
+++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateSettings.java
@@ -46,7 +46,7 @@ public class UpdateSettings implements PersistentStateComponent<Element> {
@SuppressWarnings({"WeakerAccess", "CanBeFinal"})
public JDOMExternalizableStringList myKnownUpdateChannels = new JDOMExternalizableStringList();
- public boolean CHECK_NEEDED = true;
+ public boolean CHECK_NEEDED = false;
public String CHECK_PERIOD = UpdateSettingsConfigurable.WEEKLY;
public long LAST_TIME_CHECKED = 0;
diff --git a/xml/impl/src/com/intellij/ide/browsers/BrowsersConfiguration.java b/xml/impl/src/com/intellij/ide/browsers/BrowsersConfiguration.java
index 5aab88c..0aa9588 100644
--- a/xml/impl/src/com/intellij/ide/browsers/BrowsersConfiguration.java
+++ b/xml/impl/src/com/intellij/ide/browsers/BrowsersConfiguration.java
@@ -55,7 +55,7 @@ public class BrowsersConfiguration implements ApplicationComponent, PersistentSt
return new FirefoxSettings();
}
},
- CHROME(XmlBundle.message("browsers.chrome"), "chrome", null, null, IconLoader.getIcon("/xml/browsers/chrome16.png"));
+ CHROME(XmlBundle.message("browsers.chrome"), "chrome", "chromium-browser", null, IconLoader.getIcon("/xml/browsers/chrome16.png"));
private final String myName;
private final String myWindowsPath;
--
1.7.0.1
0016-Override-broken-javac-class.patch:
build/scripts/dist.gant | 1
patches/com/sun/tools/javac/comp/Infer.java | 429 +++++++++++++++++++++++++++-
2 files changed, 429 insertions(+), 1 deletion(-)
--- NEW FILE 0016-Override-broken-javac-class.patch ---
>From 0bb6f1cf50e6e73535dd89ff19294fa349acd9bf Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Mon, 5 Apr 2010 14:25:03 +0200
Subject: [PATCH 2/4] Override broken javac class
https://bugs.openjdk.java.net/show_bug.cgi?id=100135
https://bugs.openjdk.java.net/show_bug.cgi?id=100136
---
build/scripts/dist.gant | 1 +
patches/com/sun/tools/javac/comp/Infer.java | 428 +++++++++++++++++++++++++++
2 files changed, 429 insertions(+), 0 deletions(-)
create mode 100644 patches/com/sun/tools/javac/comp/Infer.java
diff --git a/build/scripts/dist.gant b/build/scripts/dist.gant
index c86653a..a238e93 100644
--- a/build/scripts/dist.gant
+++ b/build/scripts/dist.gant
@@ -50,6 +50,7 @@ target(compile: "Compile project") {
}
project["javac"] = "$jdk/bin/javac"
+ project["javac_args"] = "-J-Xbootclasspath/p:patches:$jdk/lib/tools.jar"
project.targetFolder = "$out/classes"
project.clean()
project.makeProduction()
diff --git a/patches/com/sun/tools/javac/comp/Infer.java b/patches/com/sun/tools/javac/comp/Infer.java
new file mode 100644
index 0000000..a879b98
--- /dev/null
+++ b/patches/com/sun/tools/javac/comp/Infer.java
@@ -0,0 +1,428 @@
+/*
+ * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.tools.javac.comp;
+
+import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.List;
+import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.code.Type.*;
+
+import static com.sun.tools.javac.code.Flags.*;
+import static com.sun.tools.javac.code.Kinds.*;
+import static com.sun.tools.javac.code.TypeTags.*;
+
+/** Helper class for type parameter inference, used by the attribution phase.
+ *
+ * <p><b>This is NOT part of any API supported by Sun Microsystems. If
+ * you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.</b>
+ */
+public class Infer {
+ protected static final Context.Key<Infer> inferKey =
+ new Context.Key<Infer>();
+
+ /** A value for prototypes that admit any type, including polymorphic ones. */
+ public static final Type anyPoly = new Type(NONE, null);
+
+ Symtab syms;
+ Types types;
+
+ public static Infer instance(Context context) {
+ Infer instance = context.get(inferKey);
+ if (instance == null)
+ instance = new Infer(context);
+ return instance;
+ }
+
+ protected Infer(Context context) {
+ context.put(inferKey, this);
+ syms = Symtab.instance(context);
+ types = Types.instance(context);
+ }
+
+ public static class NoInstanceException extends RuntimeException {
+ private static final long serialVersionUID = 0;
+
+ boolean isAmbiguous; // exist several incomparable best instances?
+
+ JCDiagnostic diagnostic;
+
+ NoInstanceException(boolean isAmbiguous) {
+ this.diagnostic = null;
+ this.isAmbiguous = isAmbiguous;
+ }
+ NoInstanceException setMessage(String key) {
+ this.diagnostic = JCDiagnostic.fragment(key);
+ return this;
+ }
+ NoInstanceException setMessage(String key, Object arg1) {
+ this.diagnostic = JCDiagnostic.fragment(key, arg1);
+ return this;
+ }
+ NoInstanceException setMessage(String key, Object arg1, Object arg2) {
+ this.diagnostic = JCDiagnostic.fragment(key, arg1, arg2);
+ return this;
+ }
+ NoInstanceException setMessage(String key, Object arg1, Object arg2, Object arg3) {
+ this.diagnostic = JCDiagnostic.fragment(key, arg1, arg2, arg3);
+ return this;
+ }
+ public JCDiagnostic getDiagnostic() {
+ return diagnostic;
+ }
+ }
+ private final NoInstanceException ambiguousNoInstanceException =
+ new NoInstanceException(true);
+ private final NoInstanceException unambiguousNoInstanceException =
+ new NoInstanceException(false);
+
+/***************************************************************************
+ * Auxiliary type values and classes
+ ***************************************************************************/
+
+ /** A mapping that turns type variables into undetermined type variables.
+ */
+ Mapping fromTypeVarFun = new Mapping("fromTypeVarFun") {
+ public Type apply(Type t) {
+ if (t.tag == TYPEVAR) return new UndetVar(t);
+ else return t.map(this);
+ }
+ };
+
+ /** A mapping that returns its type argument with every UndetVar replaced
+ * by its `inst' field. Throws a NoInstanceException
+ * if this not possible because an `inst' field is null.
+ */
+ Mapping getInstFun = new Mapping("getInstFun") {
+ public Type apply(Type t) {
+ switch (t.tag) {
+ case UNKNOWN:
+ throw ambiguousNoInstanceException
+ .setMessage("undetermined.type");
+ case UNDETVAR:
+ UndetVar that = (UndetVar) t;
+ if (that.inst == null)
+ throw ambiguousNoInstanceException
+ .setMessage("type.variable.has.undetermined.type",
+ that.qtype);
+ return apply(that.inst);
+ default:
+ return t.map(this);
+ }
+ }
+ };
+
+/***************************************************************************
+ * Mini/Maximization of UndetVars
+ ***************************************************************************/
+
+ /** Instantiate undetermined type variable to its minimal upper bound.
+ * Throw a NoInstanceException if this not possible.
+ */
+ void maximizeInst(UndetVar that, Warner warn) throws NoInstanceException {
+ if (that.inst == null) {
+ if (that.hibounds.isEmpty())
+ that.inst = syms.objectType;
+ else if (that.hibounds.tail.isEmpty())
+ that.inst = that.hibounds.head;
+ else {
+ for (List<Type> bs = that.hibounds;
+ bs.nonEmpty() && that.inst == null;
+ bs = bs.tail) {
+ // System.out.println("hibounds = " + that.hibounds);//DEBUG
+ if (isSubClass(bs.head, that.hibounds))
+ that.inst = types.fromUnknownFun.apply(bs.head);
+ }
+ if (that.inst == null) {
+ int classCount = 0, interfaceCount = 0;
+ for (Type t : that.hibounds) {
+ if (t.tag == CLASS) {
+ if (t.isInterface())
+ interfaceCount++;
+ else
+ classCount++;
+ }
+ }
+ if ((that.hibounds.size() == classCount + interfaceCount) && classCount == 1)
+ that.inst = types.makeCompoundType(that.hibounds);
+ }
+ if (that.inst == null || !types.isSubtypeUnchecked(that.inst, that.hibounds, warn))
+ throw ambiguousNoInstanceException
+ .setMessage("no.unique.maximal.instance.exists",
+ that.qtype, that.hibounds);
+ }
+ }
+ }
+ //where
+ private boolean isSubClass(Type t, final List<Type> ts) {
+ t = t.baseType();
+ if (t.tag == TYPEVAR) {
+ List<Type> bounds = types.getBounds((TypeVar)t);
+ for (Type s : ts) {
+ if (!types.isSameType(t, s.baseType())) {
+ for (Type bound : bounds) {
+ if (!isSubClass(bound, List.of(s.baseType())))
+ return false;
+ }
+ }
+ }
+ } else {
+ for (Type s : ts) {
+ if (!t.tsym.isSubClass(s.baseType().tsym, types))
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /** Instaniate undetermined type variable to the lub of all its lower bounds.
+ * Throw a NoInstanceException if this not possible.
+ */
+ void minimizeInst(UndetVar that, Warner warn) throws NoInstanceException {
+ if (that.inst == null) {
+ if (that.lobounds.isEmpty())
+ that.inst = syms.botType;
+ else if (that.lobounds.tail.isEmpty())
+ that.inst = that.lobounds.head;
+ else {
+ that.inst = types.lub(that.lobounds);
+ if (that.inst == null)
+ throw ambiguousNoInstanceException
+ .setMessage("no.unique.minimal.instance.exists",
+ that.qtype, that.lobounds);
+ }
+ // VGJ: sort of inlined maximizeInst() below. Adding
+ // bounds can cause lobounds that are above hibounds.
+ if (that.hibounds.isEmpty())
+ return;
+ Type hb = null;
+ if (that.hibounds.tail.isEmpty())
+ hb = that.hibounds.head;
+ else for (List<Type> bs = that.hibounds;
+ bs.nonEmpty() && hb == null;
+ bs = bs.tail) {
+ if (isSubClass(bs.head, that.hibounds))
+ hb = types.fromUnknownFun.apply(bs.head);
+ }
+ if (hb == null ||
+ !types.isSubtypeUnchecked(hb, that.hibounds, warn) ||
+ !types.isSubtypeUnchecked(that.inst, hb, warn))
+ throw ambiguousNoInstanceException;
+ }
+ }
+
+/***************************************************************************
+ * Exported Methods
+ ***************************************************************************/
+
+ /** Try to instantiate expression type `that' to given type `to'.
+ * If a maximal instantiation exists which makes this type
+ * a subtype of type `to', return the instantiated type.
+ * If no instantiation exists, or if several incomparable
+ * best instantiations exist throw a NoInstanceException.
+ */
+ public Type instantiateExpr(ForAll that,
+ Type to,
+ Warner warn) throws NoInstanceException {
+ List<Type> undetvars = Type.map(that.tvars, fromTypeVarFun);
+ for (List<Type> l = undetvars; l.nonEmpty(); l = l.tail) {
+ UndetVar v = (UndetVar) l.head;
+ ListBuffer<Type> hibounds = new ListBuffer<Type>();
+ for (List<Type> l1 = types.getBounds((TypeVar) v.qtype); l1.nonEmpty(); l1 = l1.tail) {
+ if (!l1.head.containsSome(that.tvars)) {
+ hibounds.append(l1.head);
+ }
+ }
+ v.hibounds = hibounds.toList();
+ }
+ Type qtype1 = types.subst(that.qtype, that.tvars, undetvars);
+ if (!types.isSubtype(qtype1, to)) {
+ throw unambiguousNoInstanceException
+ .setMessage("no.conforming.instance.exists",
+ that.tvars, that.qtype, to);
+ }
+ for (List<Type> l = undetvars; l.nonEmpty(); l = l.tail)
+ maximizeInst((UndetVar) l.head, warn);
+ // System.out.println(" = " + qtype1.map(getInstFun));//DEBUG
+
+ // check bounds
+ List<Type> targs = Type.map(undetvars, getInstFun);
+ targs = types.subst(targs, that.tvars, targs);
+ checkWithinBounds(that.tvars, targs, warn);
+
+ return getInstFun.apply(qtype1);
+ }
+
+ /** Instantiate method type `mt' by finding instantiations of
+ * `tvars' so that method can be applied to `argtypes'.
+ */
+ public Type instantiateMethod(List<Type> tvars,
+ MethodType mt,
+ List<Type> argtypes,
+ boolean allowBoxing,
+ boolean useVarargs,
+ Warner warn) throws NoInstanceException {
+ //-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG
+ List<Type> undetvars = Type.map(tvars, fromTypeVarFun);
+ List<Type> formals = mt.argtypes;
+
+ // instantiate all polymorphic argument types and
+ // set up lower bounds constraints for undetvars
+ Type varargsFormal = useVarargs ? formals.last() : null;
+ while (argtypes.nonEmpty() && formals.head != varargsFormal) {
+ Type ft = formals.head;
+ Type at = argtypes.head.baseType();
+ if (at.tag == FORALL)
+ at = instantiateArg((ForAll) at, ft, tvars, warn);
+ Type sft = types.subst(ft, tvars, undetvars);
+ boolean works = allowBoxing
+ ? types.isConvertible(at, sft, warn)
+ : types.isSubtypeUnchecked(at, sft, warn);
+ if (!works) {
+ throw unambiguousNoInstanceException
+ .setMessage("no.conforming.assignment.exists",
+ tvars, at, ft);
+ }
+ formals = formals.tail;
+ argtypes = argtypes.tail;
+ }
+ if (formals.head != varargsFormal || // not enough args
+ !useVarargs && argtypes.nonEmpty()) { // too many args
+ // argument lists differ in length
+ throw unambiguousNoInstanceException
+ .setMessage("arg.length.mismatch");
+ }
+
+ // for varargs arguments as well
+ if (useVarargs) {
+ Type elt = types.elemtype(varargsFormal);
+ Type sft = types.subst(elt, tvars, undetvars);
+ while (argtypes.nonEmpty()) {
+ Type ft = sft;
+ Type at = argtypes.head.baseType();
+ if (at.tag == FORALL)
+ at = instantiateArg((ForAll) at, ft, tvars, warn);
+ boolean works = types.isConvertible(at, sft, warn);
+ if (!works) {
+ throw unambiguousNoInstanceException
+ .setMessage("no.conforming.assignment.exists",
+ tvars, at, ft);
+ }
+ argtypes = argtypes.tail;
+ }
+ }
+
+ // repeatedly minimize undetvars, and check against bounds
+ // until all type variables are instantiated to non bottom
+ // types or no further progress is made.
+
+ //-System.err.println("undetvars="+undetvars);//DEBUG
+ //-System.err.println("targs="+targs);//DEBUG
+
+ ListBuffer<Type> restvars; // type variables instantiated to bottom
+ ListBuffer<Type> insttypes; // instance types.
+ int restlen = undetvars.length(); // length of restvars
+ int restlen1; // length of restvars in previous iteration
+
+ do {
+ // minimize as yet undetermined type variables
+ for (List<Type> l = undetvars; l.nonEmpty(); l = l.tail) {
+ minimizeInst((UndetVar) l.head, warn);
+ }
+
+ restvars = new ListBuffer<Type>();
+ insttypes = new ListBuffer<Type>();
+ ListBuffer<Type> insttypes1 = new ListBuffer<Type>();
+ // same as insttypes, except that UndetVars replace TypeVars.
+ for (List<Type> l = undetvars; l.nonEmpty(); l = l.tail) {
+ UndetVar uv = (UndetVar) l.head;
+ if (uv.inst.tag == BOT) {
+ restvars.append(uv.qtype);
+ insttypes.append(uv.qtype);
+ insttypes1.append(uv);
+ uv.inst = null;
+ } else {
+ insttypes.append(uv.inst);
+ insttypes1.append(uv.inst);
+ }
+ }
+ checkWithinBounds(tvars, insttypes1.toList(), warn);
+ restlen1 = restlen;
+ restlen = restvars.length();
+ } while (restlen != 0 && restlen != restlen1);
+
+ if (restlen != 0) {
+ // if there are uninstantiated variables,
+ // quantify result type with them
+ mt = new MethodType(mt.argtypes,
+ new ForAll(restvars.toList(), mt.restype),
+ mt.thrown, syms.methodClass);
+ }
+
+ // return instantiated version of method type
+ return types.subst(mt, tvars, insttypes.toList());
+ }
+ //where
+
+ /** Try to instantiate argument type `that' to given type `to'.
+ * If this fails, try to insantiate `that' to `to' where
+ * every occurrence of a type variable in `tvars' is replaced
+ * by an unknown type.
+ */
+ private Type instantiateArg(ForAll that,
+ Type to,
+ List<Type> tvars,
+ Warner warn) throws NoInstanceException {
+ List<Type> targs;
+ try {
+ return instantiateExpr(that, to, warn);
+ } catch (NoInstanceException ex) {
+ Type to1 = to;
+ for (List<Type> l = tvars; l.nonEmpty(); l = l.tail)
+ to1 = types.subst(to1, List.of(l.head), List.of(syms.unknownType));
+ return instantiateExpr(that, to1, warn);
+ }
+ }
+
+ /** check that type parameters are within their bounds.
+ */
+ private void checkWithinBounds(List<Type> tvars,
+ List<Type> arguments,
+ Warner warn)
+ throws NoInstanceException {
+ for (List<Type> tvs = tvars, args = arguments;
+ tvs.nonEmpty();
+ tvs = tvs.tail, args = args.tail) {
+ if (args.head instanceof UndetVar) continue;
+ List<Type> bounds = types.subst(types.getBounds((TypeVar)tvs.head), tvars, arguments);
+ if (!types.isSubtypeUnchecked(args.head, bounds, warn))
+ throw unambiguousNoInstanceException
+ .setMessage("inferred.do.not.conform.to.bounds",
+ arguments, tvars);
+ }
+ }
+}
--
1.7.0.1
0017-Do-not-unnecessarily-delete-compile-output.patch:
dist.gant | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- NEW FILE 0017-Do-not-unnecessarily-delete-compile-output.patch ---
>From 89d3f5e7c4279b732203f4588eee0900f0371377 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Mon, 5 Apr 2010 14:25:51 +0200
Subject: [PATCH 3/4] Do not unnecessarily delete compile output
---
build/scripts/dist.gant | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/build/scripts/dist.gant b/build/scripts/dist.gant
index a238e93..0d5fb45 100644
--- a/build/scripts/dist.gant
+++ b/build/scripts/dist.gant
@@ -38,8 +38,8 @@ def includeFile(String filepath) {
target(compile: "Compile project") {
loadProject()
- project.stage("Cleaning up sandbox folder")
- ant.delete(dir: paths.sandbox)
+ //project.stage("Cleaning up sandbox folder")
+ //ant.delete(dir: paths.sandbox)
[paths.sandbox, paths.distWin, paths.distAll, paths.distUnix, paths.distMac, paths.artifacts].each {
ant.mkdir(dir: it)
@@ -52,7 +52,7 @@ target(compile: "Compile project") {
project["javac"] = "$jdk/bin/javac"
project["javac_args"] = "-J-Xbootclasspath/p:patches:$jdk/lib/tools.jar"
project.targetFolder = "$out/classes"
- project.clean()
+ //project.clean()
project.makeProduction()
}
--
1.7.0.1
--- NEW FILE autoconfig-jdk.pl ---
use strict;
use warnings;
my $jdkconfig = $ENV{HOME}.'/.idea/config/options/jdk.table.xml';
# Default skeleton
my $default = <<EOF;
<?xml version="1.0" encoding="UTF-8"?>
<!-- generated by $0 -->
<application>
<component name="ProjectJdkTable">
</component>
</application>
EOF
# Genrate config skeleton, or read existing config file
sub readconfig {
my $input;
open ($input, '<'.$jdkconfig)
? map { chop; $_ } <$input>
: split (/\n/, $default);
}
# Genrate config skeleton, or read existing config file
sub writeconfig {
my $output;
open ($output, '>'.$jdkconfig) or die $!;
print $output join ("\n", @_);
}
# List of installed JDK roots
sub jdkhomes {
my $alter;
open ($alter, 'alternatives --display javac |');
return grep { not /gcj/ } map { /^(\/\S+)\/bin\/javac/ ? $1 : () } <$alter>;
}
# Craft a nice name for JDK
sub jdkname {
my $jdkhome = shift;
my $jdkname;
my %jdknames = (
'/java-1\.(\d+)\.\d+-openjdk' => 'OpenJDK',
'/java-1\.(\d+)\.\d+-sun' => 'Sun JDK',
'/java-([\.\d]+)-ibm' => 'IBM Java',
'/java-([\.\d]+)-bea' => 'BEA Java',
'/java-([\.\d]+)-gcj' => 'GNU Compiler for Java',
);
foreach (keys %jdknames) {
$jdkhome =~ /$_/ and $jdkname = "$jdknames{$_} $1"
and last;
}
($jdkname) = $jdkhome =~ /([^\/]*)$/ unless $jdkname;
return $jdkname;
}
# Get JDK libraries
# Mocking findClasses (File, boolean) of
# java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaSdkImpl.java
sub jdkcp {
my $jdkhome = shift;
my @jars = map { <$jdkhome/jre/$_/*.jar> } ('lib', 'lib/ext', 'lib/endorsed');
}
# Get JDK version
sub jdkver {
my $jdkhome = shift;
my $version = [ `$jdkhome/bin/java -version 2>&1` ]->[0];
chomp $version;
$version =~ s/\"/"/g;
return $version;
}
# Generate XML config file chunk for a JDK directory
sub jdkconfig
{
my $jdkhome = shift;
return ( map { " $_" }
'<jdk version="2">',
' <name value="'.jdkname ($jdkhome).'" />',
' <type value="JavaSDK" />',
' <version value="'.jdkver ($jdkhome).'" />',
' <homePath value="'.$jdkhome.'" />',
' <roots>',
' <annotationsPath>',
' <root type="composite" />',
' </annotationsPath>',
' <classPath>',
' <root type="composite">',
(map {
' <root type="simple" url="jar://'.$_.'!/" />'
} jdkcp ($jdkhome)),
' </root>',
' </classPath>',
' <javadocPath>',
' <root type="composite" />',
' </javadocPath>',
' <sourcePath>',
' <root type="composite" />',
' </sourcePath>',
' </roots>',
' <additional />',
'</jdk>',
);
}
# Process the configuration and construct a new one
my @sourceconfig = readconfig;
my @targetconfig = ();
my @jdks = ();
my $thisjdk;
my $component = '';
foreach (@sourceconfig) {
if (/<\/jdk/ and defined $thisjdk) {
undef $thisjdk;
next;
}
elsif (defined $thisjdk) {
/<(\w+) value="([^"]*)" \/>/
and $thisjdk->{$1} = $2;
push @{$thisjdk->{lines}}, $_;
next;
}
elsif (/<jdk version="2"/ and $component eq 'ProjectJdkTable') {
$thisjdk = { lines => [] };
push @jdks, $thisjdk;
next;
}
elsif (/<component name="([^"]*)"/) {
$component = $1;
}
elsif (/<\/component/ and $component eq 'ProjectJdkTable') {
push @targetconfig,
# Generated configs for system-wide JVMs
(map { jdkconfig ($_) } jdkhomes),
# Already-defined JVMs, sans system-wide
(map { $_->{homePath} =~ /^\/usr\/lib\/jvm/
? () : @{$_->{lines}} } @jdks);
@jdks = ();
}
push @targetconfig, $_;
}
# Rewrite the configuration
writeconfig (@targetconfig);
Index: intellij-idea-idea
===================================================================
RCS file: /cvs/pkgs/rpms/intellij-idea/devel/intellij-idea-idea,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- intellij-idea-idea 2 Apr 2010 15:02:00 -0000 1.2
+++ intellij-idea-idea 5 Apr 2010 12:54:46 -0000 1.3
@@ -81,7 +81,6 @@ BASE_JARS="$BASE_JARS xml-commons-resolv
BASE_JARS="$BASE_JARS xmlrpc"
BASE_JARS="$BASE_JARS xstream"
BASE_JARS="$BASE_JARS groovy"
-BASE_JARS="$BASE_JARS jcip-annotations"
# XXX
BASE_JARS="$BASE_JARS ../jvm/java/lib/tools"
@@ -91,6 +90,16 @@ BASE_JARS="$BASE_JARS $(echo $ECLIPSE_CO
# Bootstrap
BASE_FLAGS="$BASE_FLAGS -Xbootclasspath/a:$(/usr/bin/build-classpath idea/boot)"
+# Work around slow rendering with EXA enabled,
+# until XRender backed java2d is around
+# (afaik exactly the same thing is done by Sun JDK,
+# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6708580)
+IDEA_OPTS="$IDEA_OPTS -Dsun.java2d.pmoffscreen=false"
+
+# Turn on font AntiAliasing
+# See: https://bugzilla.redhat.com/show_bug.cgi?id=539971
+IDEA_OPTS="$IDEA_OPTS -Dawt.useSystemAAFontSettings=on"
+
# Set parameters
set_jvm
set_classpath $BASE_JARS
@@ -98,59 +107,11 @@ set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $IDEA_OPTS -Didea.home.path="$IDEA_HOME" -Didea.log.path="$HOME/.idea/log" \
-Didea.config.path="$HOME/.idea/config" -Didea.system.path="$HOME/.idea/system"
-# Automatically configure an OpenJDK 6 JVM
+# Automatically configure JDKs
# (is there a wiser way to do this?)
-JDKTABLE="$HOME/.idea/config/options/jdk.table.xml"
-if ! [ -f "$JDKTABLE" ]
-then
- mkdir -p "$(dirname "$JDKTABLE")"
- [ -d /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0 ] && cat >"$JDKTABLE" <<'EOF'
-<?xml version="1.0" encoding="UTF-8"?>
-<application>
- <component name="ProjectJdkTable">
- <jdk version="2">
- <name value="1.6" />
- <type value="JavaSDK" />
- <version value="java version "1.6.0_17"" />
- <homePath value="/usr/lib/jvm/java-1.6.0-openjdk" />
- <roots>
- <annotationsPath>
- <root type="composite" />
- </annotationsPath>
- <classPath>
- <root type="composite">
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/rt.jar!/" />
- <root type="simple" url="jar:///usr/share/java/rhino-1.7.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jce.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/resources.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/about.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/charsets.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jsse.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/management-agent.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/localedata.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/dnsns.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/sunpkcs11.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/gnome-java-bridge.jar!/" />
- <root type="simple" url="jar:///usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/sunjce_provider.jar!/" />
- </root>
- </classPath>
- <javadocPath>
- <root type="composite" />
- </javadocPath>
- <sourcePath>
- <root type="composite" />
- </sourcePath>
- </roots>
- <additional />
- </jdk>
- </component>
-</application>
-EOF
-fi
+mkdir -p "$HOME/.idea/config/options"
+perl "$IDEA_HOME/autoconfig-jdk.pl"
# Let's start
cd $IDEA_HOME
-#CLASSPATH=$(echo ~/src/idea/lib/*.jar |sed 's/ /:/g'):$CLASSPATH
-#CLASSPATH=/home/lkundrak/src/idea/java/compiler/impl/src:$CLASSPATH
run "$@"
Index: intellij-idea.spec
===================================================================
RCS file: /cvs/pkgs/rpms/intellij-idea/devel/intellij-idea.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- intellij-idea.spec 2 Apr 2010 15:02:01 -0000 1.3
+++ intellij-idea.spec 5 Apr 2010 12:54:46 -0000 1.4
@@ -7,7 +7,7 @@
Name: intellij-idea
Version: %{idea_version}.%{idea_build}
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: IntelliJ IDEA Community Edition IDE
Group: Development/Tools
@@ -26,6 +26,7 @@ Source4: intellij-idea-git4idea.s
Source5: intellij-idea-Groovy.sh
Source6: intellij-idea-svn4idea.sh
Source7: intellij-idea-testng.sh
+Source8: autoconfig-jdk.pl
# Used only for bootstrapping
Source10: jps.jar
@@ -45,11 +46,9 @@ Patch10: 0010-Use-system-wide-ins
Patch11: 0011-Chop-out-proxy-support-for-CVS-plugin.patch
Patch12: 0012-Scriptlet-and-rules-to-replace-bundled-jars.patch
Patch13: 0013-Scriptlet-to-disable-certain-modules.patch
-Patch14: 0014-Make-it-build.patch
-Patch15: 0015-Look-for-Eclipse-JDT-in-Fedora-location.patch
-Patch16: 0016-Disable-update-checks-per-default.patch
-
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Patch15: 0015-Adjust-defaults-for-Fedora.patch
+Patch16: 0016-Override-broken-javac-class.patch
+Patch17: 0017-Do-not-unnecessarily-delete-compile-output.patch
%if %without bootstrap
BuildRequires: jps
@@ -142,6 +141,7 @@ Requires: xml-commons-resolver
Requires: xmlrpc
Requires: xstream
Requires: intellij-idea-annotations
+Requires: xdg-utils
# Modules
Requires: trilead-ssh2
@@ -164,6 +164,7 @@ applications - such as IntelliJ IDEA its
Summary: IntelliJ IDEA Community Edition IDE
Group: Development/Tools
URL: http://www.jetbrains.com/idea/features/annotation_java.html
+BuildArch: noarch
%description annotations
This package contains IntelliJ IDEA annotation classes as well as compiler
@@ -197,9 +198,9 @@ unzip -qd eawtstub lib/src/eawtstub_src.
%patch11 -p1
%patch12 -p1
%patch13 -p1
-%patch14 -p1
%patch15 -p1
%patch16 -p1
+%patch17 -p1
%build
@@ -237,16 +238,20 @@ cd ../..
cp -fl native/breakgen/libbreakgen.so bin/linux/libbreakgen.so
cp -fl bin/linux/libbreakgen.so bin/linux/libbreakgen64.so
-%if %with bootstrap
-sed '
- /gant_patches.jar/d
- s|/usr/share/java/idea/javac2.jar|%{SOURCE11}|;
- s|/usr/share/java/jps/jps.jar|%{SOURCE10}|;
-' -i build.xml
-%endif
+# Patch javac :(
+# https://bugs.openjdk.java.net/show_bug.cgi?id=100135
+# https://bugs.openjdk.java.net/show_bug.cgi?id=100136
+cd patches
+find -name '*.java' |xargs javac -classpath /usr/lib/jvm/java/lib/tools.jar
+cd ..
# Fire!
-ant
+%if %with bootstrap
+CLASSPATH=$(build-classpath jgoodies-forms jdom objectweb-asm/asm-commons):%{SOURCE10}:%{SOURCE11} \
+%else
+CLASSPATH=$(build-classpath jgoodies-forms jdom objectweb-asm/asm-commons idea/javac2 jps) \
+%endif
+gant -f build/scripts/dist.gant
%install
@@ -269,6 +274,7 @@ install -p -m644 bin/idea.properties bin
install -p -m755 bin/linux/libbreakgen.so \
$RPM_BUILD_ROOT%{_libdir}/idea/bin
install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/idea
+install -p -m755 %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/idea
# Plugins
cp -a out/dist.all.ce/plugins $RPM_BUILD_ROOT%{_libdir}/idea
@@ -323,6 +329,13 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Apr 05 2010 Lubomir Rintel <lkundrak at v3.sk> - 9.0.1.94.399-9
+- Enable font antialiasing
+- Disable offscreen rendering for java2d, slow on EXA
+- Do not comment out uncompilable code, patch javac
+- Detect installed JVMs on startup
+- Saner defaults for web browsers configuration
+
* Fri Apr 02 2010 Lubomir Rintel <lkundrak at v3.sk> - 9.0.1.94.399-8
- Correct path to Eclipse JDT
- Set up OpenJDK 1.6.0 SDK per default
--- 0014-Make-it-build.patch DELETED ---
--- 0015-Look-for-Eclipse-JDT-in-Fedora-location.patch DELETED ---
--- 0016-Disable-update-checks-per-default.patch DELETED ---
More information about the scm-commits
mailing list