From a37c6bc6123082e7872096345651bd2d2c404945 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Sun, 23 Jun 2013 23:37:56 +0100 Subject: [PATCH] Patch to allow building against ant 1.9 --- visualvm-ant-1.9.patch | 434 +++++++++++++++++++++++++++++++++++++++++ visualvm.spec | 18 +- 2 files changed, 450 insertions(+), 2 deletions(-) create mode 100644 visualvm-ant-1.9.patch diff --git a/visualvm-ant-1.9.patch b/visualvm-ant-1.9.patch new file mode 100644 index 0000000..4a2557f --- /dev/null +++ b/visualvm-ant-1.9.patch @@ -0,0 +1,434 @@ +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/CheckModuleConfigs.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/CheckModuleConfigs.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/CheckModuleConfigs.java 2011-04-18 17:20:50.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/CheckModuleConfigs.java 2013-06-23 21:19:00.485397000 +0100 +@@ -94,7 +94,7 @@ + } + File clusterPropertiesFile = new File(nbroot, "nbbuild" + File.separatorChar + "cluster.properties"); + @SuppressWarnings("unchecked") +- Map properties = getProject().getProperties(); ++ Map properties = getProject().getProperties(); + Map> clusters = loadModuleClusters(properties, clusterPropertiesFile); + Set allClusterModules = new TreeSet(); + for (Set s : clusters.values()) { +@@ -119,12 +119,12 @@ + // Verify sorting and overlaps: + Pattern clusterNamePat = Pattern.compile("nb\\.cluster\\.([^.]+)"); + Map> allClusters = new HashMap>(); +- for (Map.Entry clusterDef : properties.entrySet()) { ++ for (Map.Entry clusterDef : properties.entrySet()) { + Matcher m = clusterNamePat.matcher(clusterDef.getKey()); + if (!m.matches()) { + continue; + } +- allClusters.put(m.group(1), splitToList(clusterDef.getValue(), clusterDef.getKey())); ++ allClusters.put(m.group(1), splitToList(clusterDef.getValue().toString(), clusterDef.getKey())); + } + allClusters.get("experimental").removeAll(allClusters.get("stableuc")); // intentionally a superset + for (Map.Entry> entry : allClusters.entrySet()) { +@@ -176,19 +176,19 @@ + return set; + } + +- private Map> loadModuleClusters(Map clusterProperties, File clusterPropertiesFile) { ++ private Map> loadModuleClusters(Map clusterProperties, File clusterPropertiesFile) { + String fullConfig = "clusters.config.full.list"; +- String l = clusterProperties.get(fullConfig); ++ Object l = clusterProperties.get(fullConfig); + if (l == null) { + throw new BuildException(clusterPropertiesFile + ": no definition for clusters.config.full.list"); + } + Map> clusters = new TreeMap>(); +- for (String cluster : splitToSet(l, fullConfig)) { ++ for (String cluster : splitToSet(l.toString(), fullConfig)) { + l = clusterProperties.get(cluster); + if (l == null) { + throw new BuildException(clusterPropertiesFile + ": no definition for " + cluster); + } +- clusters.put(cluster, new TreeSet(splitToSet(l, fullConfig))); ++ clusters.put(cluster, new TreeSet(splitToSet(l.toString(), fullConfig))); + } + return clusters; + } +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ExportedAPICondition.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ExportedAPICondition.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ExportedAPICondition.java 2011-04-18 17:20:50.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ExportedAPICondition.java 2013-06-23 21:10:35.014079000 +0100 +@@ -61,12 +61,12 @@ + + public boolean eval() throws BuildException { + @SuppressWarnings("unchecked") +- Hashtable props = getProject().getProperties(); ++ Hashtable props = getProject().getProperties(); + if (props.get("public.packages").equals("-")) { + log("No exported packages", Project.MSG_VERBOSE); + return false; + } +- String friends = props.get("friends"); ++ Object friends = props.get("friends"); + if (friends == null) { + log("Public API", Project.MSG_VERBOSE); + return true; +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/InsertModuleAllTargets.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/InsertModuleAllTargets.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/InsertModuleAllTargets.java 2011-04-18 17:20:50.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/InsertModuleAllTargets.java 2013-06-23 21:20:54.103914000 +0100 +@@ -97,19 +97,19 @@ + return; + } + @SuppressWarnings("unchecked") +- Hashtable props = prj.getProperties(); ++ Hashtable props = prj.getProperties(); + + if (checkModules) { + boolean missingModules = false; +- String[] clusters = props.get("nb.clusters.list").split(", *"); +- String nb_all = props.get("nb_all"); ++ String[] clusters = props.get("nb.clusters.list").toString().split(", *"); ++ Object nb_all = props.get("nb_all"); + if (nb_all == null) + throw new BuildException("Can't file 'nb_all' property, probably not in the NetBeans build system"); +- File nbRoot = new File(nb_all); ++ File nbRoot = new File(nb_all.toString()); + for( String cluster: clusters) { + if (props.get(cluster) == null) + throw new BuildException("Cluster '"+cluster+"' has got empty list of modules. Check configuration of that cluster.",getLocation()); +- String[] clusterModules = props.get(cluster).split(", *"); ++ String[] clusterModules = props.get(cluster).toString().split(", *"); + for( String module: clusterModules) { + File moduleBuild = new File(nbRoot, module + File.separator + "build.xml"); + if (!moduleBuild.exists() || !moduleBuild.isFile()) { +@@ -119,18 +119,18 @@ + } + } + if (missingModules) { +- String clusterConfig = props.get("cluster.config"); +- throw new BuildException("Some modules according your cluster config '" + clusterConfig + "' are missing from checkout, see messages above.",getLocation()); ++ Object clusterConfig = props.get("cluster.config"); ++ throw new BuildException("Some modules according your cluster config '" + clusterConfig.toString() + "' are missing from checkout, see messages above.",getLocation()); + } + } + + Map clustersOfModules = new HashMap(); +- for (Map.Entry pair : props.entrySet()) { ++ for (Map.Entry pair : props.entrySet()) { + String cluster = pair.getKey(); + if (!cluster.startsWith("nb.cluster.") || cluster.endsWith(".depends") || cluster.endsWith(".dir")) { + continue; + } +- for (String module : pair.getValue().split(", *")) { ++ for (String module : pair.getValue().toString().split(", *")) { + clustersOfModules.put(module, cluster); + } + } +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/LayerIndex.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/LayerIndex.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/LayerIndex.java 2011-08-01 08:57:48.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/LayerIndex.java 2013-06-23 21:11:57.545457000 +0100 +@@ -73,12 +73,15 @@ + import java.util.zip.ZipEntry; + import java.util.zip.ZipException; + import java.util.zip.ZipFile; ++ + import javax.xml.parsers.SAXParserFactory; ++ + import org.apache.tools.ant.BuildException; + import org.apache.tools.ant.DirectoryScanner; + import org.apache.tools.ant.Project; + import org.apache.tools.ant.Task; + import org.apache.tools.ant.types.FileSet; ++import org.apache.tools.ant.types.Resource; + import org.apache.tools.ant.types.ResourceCollection; + import org.apache.tools.ant.types.resources.ZipResource; + import org.xml.sax.Attributes; +@@ -111,7 +114,7 @@ + } + + private String resourceId; +- private List resources; ++ private List resources; + /** If this parameter is provided, then this tasks creates a resource + * composed from all the layerfiles and makes it accessible under this refId + * @param id the refId to associate the collection with +@@ -361,7 +364,7 @@ + } + } + +- private static final class ZipArray extends ArrayList ++ private static final class ZipArray extends ArrayList + implements ResourceCollection { + public boolean isFilesystemOnly() { + return false; +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java 2011-10-20 13:43:27.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java 2013-06-23 22:03:14.246264000 +0100 +@@ -116,28 +116,29 @@ + /** + * Find all NBM projects in a root, possibly from cache. + */ +- private static Map scanNetBeansOrgSources(File root, Map properties, Project project) throws IOException { ++ private static Map scanNetBeansOrgSources(File root, Map properties, Project project) throws IOException { + Map entries = SOURCE_SCAN_CACHE.get(root); + if (entries == null) { + // Similar to #62221: if just invoked from a module in standard clusters, only scan those clusters (faster): + Set standardModules = new HashSet(); + boolean doFastScan = false; +- String basedir = properties.get("basedir"); ++ Object basedir = properties.get("basedir"); + if (basedir != null) { +- File basedirF = new File(basedir); +- String clusterList = properties.get("nb.clusters.list"); +- if (clusterList == null) { +- String config = properties.get("cluster.config"); ++ File basedirF = new File(basedir.toString()); ++ Object clusterListObj = properties.get("nb.clusters.list"); ++ if (clusterListObj == null) { ++ Object config = properties.get("cluster.config"); + if (config != null) { +- clusterList = properties.get("clusters.config." + config + ".list"); ++ clusterListObj = properties.get("clusters.config." + config.toString() + ".list"); + } + } +- if (clusterList != null) { +- StringTokenizer tok = new StringTokenizer(clusterList, ", "); ++ if (clusterListObj != null) { ++ StringTokenizer tok = new StringTokenizer(clusterListObj.toString(), ", "); + while (tok.hasMoreTokens()) { + String clusterName = tok.nextToken(); +- String moduleList = properties.get(clusterName); +- if (moduleList != null) { ++ Object moduleListObj = properties.get(clusterName); ++ if (moduleListObj != null) { ++ String moduleList = moduleListObj.toString(); + // Hack to treat libs.junit4 as if it were in platform for purposes of building, yet build to another cluster. + if (clusterName.equals("nb.cluster.platform")) { + moduleList += ",libs.junit4"; +@@ -278,7 +279,7 @@ + /** + * Check a single dir to see if it is an NBM project, and if so, register it. + */ +- private static boolean scanPossibleProject(File dir, Map entries, Map properties, ++ private static boolean scanPossibleProject(File dir, Map entries, Map properties, + String path, ModuleType moduleType, Project project, Map timestampsAndSizes) throws IOException { + File nbproject = new File(dir, "nbproject"); + File projectxml = new File(nbproject, "project.xml"); +@@ -374,18 +375,21 @@ + assert path != null; + // Find the associated cluster. + // first try direct mapping in nbbuild/netbeans/moduleCluster.properties +- String clusterDir = properties.get(path + ".dir"); +- if (clusterDir != null) { ++ Object clusterDirObj = properties.get(path + ".dir"); ++ String clusterDir = null; ++ if (clusterDirObj != null) { ++ clusterDir = clusterDirObj.toString(); + clusterDir = clusterDir.substring(clusterDir.lastIndexOf('/') + 1); + } else { + // not found, try indirect nbbuild/cluster.properties +- for (Map.Entry entry : properties.entrySet()) { +- String val = entry.getValue(); ++ for (Map.Entry entry : properties.entrySet()) { ++ String val = entry.getValue().toString(); + String[] modules = val.split(", *"); + if (Arrays.asList(modules).contains(path)) { + String key = entry.getKey(); +- clusterDir = properties.get(key + ".dir"); +- if (clusterDir != null) { ++ clusterDirObj = properties.get(key + ".dir"); ++ if (clusterDirObj != null) { ++ clusterDir = clusterDirObj.toString(); + faketask.setName("cluster.dir"); + faketask.setValue(clusterDir); + faketask.execute(); +@@ -440,10 +444,10 @@ + File origBin = null; + if (binaryOrigin != null) { + String reltext = XMLUtil.findText(binaryOrigin); +- String nball = properties.get("nb_all"); ++ Object nball = properties.get("nb_all"); + if (nball != null) { + faketask.setName("nb_all"); +- faketask.setValue(nball); ++ faketask.setValue(nball.toString()); + faketask.execute(); + } + fakeproj.setBaseDir(dir); +@@ -630,13 +634,13 @@ + } + } + +- private static Map scanSuiteSources(Map properties, Project project) throws IOException { +- File basedir = new File(properties.get("basedir")); +- String suiteDir = properties.get("suite.dir"); ++ private static Map scanSuiteSources(Map properties, Project project) throws IOException { ++ File basedir = new File(properties.get("basedir").toString()); ++ Object suiteDir = properties.get("suite.dir"); + if (suiteDir == null) { + throw new IOException("No definition of suite.dir in " + basedir); + } +- File suite = FileUtils.getFileUtils().resolveFile(basedir, suiteDir); ++ File suite = FileUtils.getFileUtils().resolveFile(basedir, suiteDir.toString()); + if (!suite.isDirectory()) { + throw new IOException("No such suite " + suite); + } +@@ -655,7 +659,7 @@ + return entries; + } + +- private static void doScanSuite(Map entries, File suite, Map properties, Project project) throws IOException { ++ private static void doScanSuite(Map entries, File suite, Map properties, Project project) throws IOException { + Project fakeproj = new Project(); + fakeproj.setBaseDir(suite); // in case ${basedir} is used somewhere + Property faketask = new Property(); +@@ -680,9 +684,9 @@ + } + } + +- private static Entry scanStandaloneSource(Map properties, Project project) throws IOException { ++ private static Entry scanStandaloneSource(Map properties, Project project) throws IOException { + if (properties.get("project") == null) return null; //Not a standalone module +- File basedir = new File(properties.get("project")); ++ File basedir = new File(properties.get("project").toString()); + Entry entry = STANDALONE_SCAN_CACHE.get(basedir); + if (entry == null) { + Map entries = new HashMap(); +@@ -717,16 +721,16 @@ + * @param type the type of project + * @param project a project ref, only for logging (may be null with no loss of semantics) + */ +- public ModuleListParser(Map properties, ModuleType type, Project project) throws IOException { +- String nball = properties.get("nb_all"); +- File basedir = new File(properties.get("basedir")); ++ public ModuleListParser(Map properties, ModuleType type, Project project) throws IOException { ++ Object nball = properties.get("nb_all"); ++ File basedir = new File(properties.get("basedir").toString()); + final FileUtils fu = FileUtils.getFileUtils(); + + if (type != ModuleType.NB_ORG) { + // add extra clusters +- String suiteDirS = properties.get("suite.dir"); +- boolean hasSuiteDir = suiteDirS != null && suiteDirS.length() > 0; +- String clusterPath = properties.get("cluster.path.final"); ++ Object suiteDirS = properties.get("suite.dir"); ++ boolean hasSuiteDir = suiteDirS != null && suiteDirS.toString().length() > 0; ++ Object clusterPath = properties.get("cluster.path.final"); + File[] clusters = null; + + if (clusterPath != null) { +@@ -734,10 +738,10 @@ + if (hasSuiteDir) { + // resolve suite modules against fake suite project + Project fakeproj = new Project(); +- fakeproj.setBaseDir(new File(suiteDirS)); +- clustersS = Path.translatePath(fakeproj, clusterPath); ++ fakeproj.setBaseDir(new File(suiteDirS.toString())); ++ clustersS = Path.translatePath(fakeproj, clusterPath.toString()); + } else { +- clustersS = Path.translatePath(project, clusterPath); ++ clustersS = Path.translatePath(project, clusterPath.toString()); + } + clusters = new File[clustersS.length]; + if (clustersS != null && clustersS.length > 0) { +@@ -768,17 +772,17 @@ + } + } else { + // netbeans.org module. +- String buildS = properties.get("netbeans.dest.dir"); ++ Object buildS = properties.get("netbeans.dest.dir"); + if (buildS == null) { + throw new IOException("No definition of netbeans.dest.dir in " + basedir); + } + // Resolve against basedir, and normalize ../ sequences and so on in case they are used. + // Neither operation is likely to be needed, but just in case. +- File build = fu.normalize(fu.resolveFile(basedir, buildS).getAbsolutePath()); ++ File build = fu.normalize(fu.resolveFile(basedir, buildS.toString()).getAbsolutePath()); + if (nball == null) { +- throw new IOException("You must declare either or for an external module in " + new File(properties.get("basedir"))); ++ throw new IOException("You must declare either or for an external module in " + new File(properties.get("basedir").toString())); + } +- if (!build.equals(new File(new File(nball, "nbbuild"), "netbeans"))) { ++ if (!build.equals(new File(new File(nball.toString(), "nbbuild"), "netbeans"))) { + // Potentially orphaned module to be built against specific binaries, plus perhaps other source deps. + if (!build.isDirectory()) { + throw new IOException("No such netbeans.dest.dir: " + build); +@@ -794,9 +798,9 @@ + if (e != null) { + entries.put(e.getCnb(), e); + } +- entries.putAll(scanNetBeansOrgSources(new File(nball), properties, project)); ++ entries.putAll(scanNetBeansOrgSources(new File(nball.toString()), properties, project)); + } else { +- entries = scanNetBeansOrgSources(new File(nball), properties, project); ++ entries = scanNetBeansOrgSources(new File(nball.toString()), properties, project); + } + } + } +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ModuleTestDependencies.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ModuleTestDependencies.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ModuleTestDependencies.java 2011-10-20 13:43:27.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ModuleTestDependencies.java 2013-06-23 21:12:52.349708000 +0100 +@@ -91,11 +91,11 @@ + public @Override void execute() throws BuildException { + try { + @SuppressWarnings("unchecked") +- Hashtable props = getProject().getProperties(); ++ Hashtable props = getProject().getProperties(); + ModuleListParser mlp = new ModuleListParser(props, ModuleType.NB_ORG, getProject()); + SortedMap> deps = new TreeMap>(); + SortedMap> reverseDeps = reverseOutput != null ? new TreeMap>() : null; +- File nball = new File(props.get("nb_all")); ++ File nball = new File(props.get("nb_all").toString()); + for (ModuleListParser.Entry entry : mlp.findAll()) { + String myCnb = entry.getCnb(); + String myCluster = entry.getClusterName(); +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java 2011-10-20 13:43:27.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java 2013-06-23 21:15:31.877440000 +0100 +@@ -447,7 +447,7 @@ + moduleRunClassPathProperty != null || + testTypes.size() > 0) { + @SuppressWarnings("unchecked") +- Hashtable properties = getProject().getProperties(); ++ Hashtable properties = getProject().getProperties(); + properties.put("project", moduleProject.getAbsolutePath()); + modules = new ModuleListParser(properties, getModuleType(pDoc), getProject()); + ModuleListParser.Entry myself = modules.findByCodeNameBase(cnb); +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/RefreshDependencyVersions.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/RefreshDependencyVersions.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/RefreshDependencyVersions.java 2011-04-18 17:20:50.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/RefreshDependencyVersions.java 2013-06-23 21:13:34.633902000 +0100 +@@ -121,7 +121,7 @@ + + validateInjectedDependencies(injectDeps); + +- @SuppressWarnings("unchecked") Map properties = getProject().getProperties(); ++ @SuppressWarnings("unchecked") Map properties = getProject().getProperties(); + ModuleListParser listParser; + try { + listParser = new ModuleListParser(properties, ModuleType.NB_ORG, getProject()); +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java 2011-05-16 18:42:27.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java 2013-06-23 21:13:44.672948000 +0100 +@@ -183,7 +183,7 @@ + + // copy extra unit.test.properties + @SuppressWarnings("unchecked") +- Map properties = getProject().getProperties(); ++ Map properties = getProject().getProperties(); + StringBuffer outProp = new StringBuffer(); + for (String name : properties.keySet()) { + if (name.matches("test-(unit|qa-functional)-sys-prop\\..+")) { +diff -ur netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/Sigtest.java netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/Sigtest.java +--- netbeans-profiler-visualvm_release701/nbbuild/antsrc/org/netbeans/nbbuild/Sigtest.java 2011-04-18 17:20:50.000000000 +0100 ++++ netbeans-profiler-visualvm_release701-patched/nbbuild/antsrc/org/netbeans/nbbuild/Sigtest.java 2013-06-23 21:14:22.257121000 +0100 +@@ -51,6 +51,7 @@ + import java.net.URLClassLoader; + import java.util.StringTokenizer; + import java.util.zip.ZipFile; ++ + import org.apache.tools.ant.BuildException; + import org.apache.tools.ant.Project; + import org.apache.tools.ant.Task; +@@ -296,7 +297,7 @@ + setM(task, "setPackages", String.class, packages); + setM(task, "setVersion", String.class, version); + +- Class actionType = url.loadClass("org.netbeans.apitest.Sigtest$ActionType"); ++ Class actionType = (Class) url.loadClass("org.netbeans.apitest.Sigtest$ActionType"); + setM(task, "setAction", EnumeratedAttribute.getInstance(actionType, action.getValue())); + + Path path = getM(task, "createClasspath", Path.class); diff --git a/visualvm.spec b/visualvm.spec index ccd8b34..3436fad 100644 --- a/visualvm.spec +++ b/visualvm.spec @@ -3,7 +3,7 @@ Name: visualvm Version: 1.3.3 -Release: %{visualvmharnessver}.6%{?dist} +Release: %{visualvmharnessver}.7%{?dist} Summary: Lightweight profiler that integrates many command-line JDK tools Group: Development/Tools @@ -13,6 +13,7 @@ Source0: %{dwnldurl}/visualvm_harness-%{visualvmharnessver}.tar.gz Source1: %{dwnldurl}/visualvm_133-src.tar.gz Source2: %{dwnldurl}/netbeans-profiler-visualvm_release701.tar.gz Patch0: visualvm-1.3.3-icons.patch +Patch1: visualvm-ant-1.9.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -44,16 +45,26 @@ performance analysis for the Java SE platform. %setup -q -n visualvm_harness-%{visualvmharnessver} %patch0 -p1 +# Patch profiler to build against ant 1.9 +mkdir netbeans && tar xzf %{SOURCE2} -C netbeans +pushd netbeans +%patch1 -p1 -b.orig +popd + %build autoreconf -i -f ./configure --prefix=/usr \ --with-visualvm-zip=%{SOURCE1} \ - --with-netbeans-profiler-zip=%{SOURCE2} \ --with-visualvm-version=%{version} \ --sysconfdir=/etc \ --libdir=%{_libdir} \ --datadir=%{_datadir} +# We patched the profiler, so touch file to prevent checksum failure +mkdir -p stamps +touch stamps/download-netbeans-profiler.stamp +touch stamps/extract-netbeans-profiler.stamp + make %install @@ -96,6 +107,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Jun 23 2013 Mat Booth - 1.3.3-1.3.7 +- Patch to allow building against ant 1.9 + * Sun Jun 23 2013 Mat Booth - 1.3.3-1.3.6 - Correct upstream URL - Fix mixed use of spaces and tabs