/hg/visualvm: Support both VisualVM 1.2.2 and 1.3.

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Wed Sep 8 07:12:17 PDT 2010


changeset eb52a28e265d in /hg/visualvm
details: http://icedtea.classpath.org/hg/visualvm?cmd=changeset;node=eb52a28e265d
author: Andrew John Hughes <ahughes at redhat.com>
date: Wed Sep 08 15:09:55 2010 +0100

	Support both VisualVM 1.2.2 and 1.3.

	2010-09-08 Andrew John Hughes <ahughes at redhat.com>

	 Support both 1.2.2 and 1.3.
		* Makefile.am: Set URL, source zip and checksum based on
	VisualVM version. (nbplatform): Handle differences between
	1.2.2 and 1.3 through conditional definition. (visualvm):
	Likewise. Fix broken reference to srcdir rather than
	builddir.
		* acinclude.m4: (VV_CHECK_WITH_VISUALVM_VERSION): Provide
		--with-visualvm-version option to allow selection of 1.2.2
	(default) or 1.3.
		* configure.ac: Enable above macro.

	2010-08-06 Tomas Hurka <tomas.hurka at googlemail.com>

	 * Makefile.am: Upgrade to VisualVM 1.3 and NetBeans
	platform 6.9.


diffstat:

4 files changed, 89 insertions(+), 14 deletions(-)
ChangeLog    |   21 ++++++++++++++++++++
Makefile.am  |   60 ++++++++++++++++++++++++++++++++++++++++++++--------------
acinclude.m4 |   21 ++++++++++++++++++++
configure.ac |    1 

diffs (165 lines):

diff -r b1df771a3be3 -r eb52a28e265d ChangeLog
--- a/ChangeLog	Thu Aug 26 18:50:04 2010 +0200
+++ b/ChangeLog	Wed Sep 08 15:09:55 2010 +0100
@@ -1,3 +1,24 @@ 2010-08-26  Matthias Klose  <doko at ubuntu
+2010-09-08  Andrew John Hughes  <ahughes at redhat.com>
+
+	Support both 1.2.2 and 1.3.
+	* Makefile.am:
+	Set URL, source zip and checksum based on
+	VisualVM version.
+	(nbplatform): Handle differences between
+	1.2.2 and 1.3 through conditional definition.
+	(visualvm): Likewise.  Fix broken reference to
+	srcdir rather than builddir.
+	* acinclude.m4:
+	(VV_CHECK_WITH_VISUALVM_VERSION): Provide
+	--with-visualvm-version option to allow selection
+	of 1.2.2 (default) or 1.3.
+	* configure.ac: Enable above macro.
+
+2010-08-06  Tomas Hurka  <tomas.hurka at googlemail.com>
+
+	* Makefile.am: Upgrade to VisualVM 1.3 and
+	NetBeans platform 6.9.
+
 2010-08-26  Matthias Klose  <doko at ubuntu.com>
 
 	* Makefile.am (install-exec-local): Honor DESTDIR.
diff -r b1df771a3be3 -r eb52a28e265d Makefile.am
--- a/Makefile.am	Thu Aug 26 18:50:04 2010 +0200
+++ b/Makefile.am	Wed Sep 08 15:09:55 2010 +0100
@@ -1,12 +1,44 @@ NETBEANS_PROFILER_URL = https://visualvm
-NETBEANS_PROFILER_URL = https://visualvm.dev.java.net/files/documents/7163/149581/
-NETBEANS_PROFILER_SRC_ZIP = netbeans-profiler-visualvm_release68.tar.gz
-NETBEANS_PROFILER_SHA256SUM = d0a52d023973a8987b48b39488ff4c9374dec96536823226abd7abfdabfc136b
+NETBEANS_68_PROFILER_URL = https://visualvm.dev.java.net/files/documents/7163/149581/
+NETBEANS_68_PROFILER_SRC_ZIP = netbeans-profiler-visualvm_release68.tar.gz
+NETBEANS_68_PROFILER_SHA256SUM = d0a52d023973a8987b48b39488ff4c9374dec96536823226abd7abfdabfc136b
 
-VISUALVM_URL = https://visualvm.dev.java.net/files/documents/7163/146746/
-VISUALVM_SRC_ZIP = visualvm_122-src.tar.gz
-VISUALVM_SHA256SUM = 1b1cd77354757d64ca902722bb9481e1292a88c4884ffea8af7bb47f8ae24af5
+NETBEANS_69_PROFILER_URL = https://visualvm.dev.java.net/files/documents/7163/152022/
+NETBEANS_69_PROFILER_SRC_ZIP = netbeans-profiler-visualvm_release69.tar.gz
+NETBEANS_69_PROFILER_SHA256SUM = 201060e9ccb4243f7ff1bb490e66a23f3fb16d450892e15f9adbd0728ec0ec83
+
+VISUALVM_122_URL = https://visualvm.dev.java.net/files/documents/7163/146746/
+VISUALVM_122_SRC_ZIP = visualvm_122-src.tar.gz
+VISUALVM_122_SHA256SUM = 1b1cd77354757d64ca902722bb9481e1292a88c4884ffea8af7bb47f8ae24af5
+
+VISUALVM_13_URL = https://visualvm.dev.java.net/files/documents/7163/151835/
+VISUALVM_13_SRC_ZIP = visualvm_13-src.tar.gz
+VISUALVM_13_SHA256SUM = 18105c1e05347caac04830a8ee940219c573a5447d3cd9b084d6883c9ff07353
 
 NB_PLATFORM = $(shell ls $(SYSTEM_NETBEANS_DIR) | grep platform | tail -n1)
+
+if VVVERSION_13
+  NETBEANS_PROFILER_URL=$(NETBEANS_69_PROFILER_URL)
+  NETBEANS_PROFILER_SRC_ZIP=$(NETBEANS_69_PROFILER_SRC_ZIP)
+  NETBEANS_PROFILER_SHA256SUM=$(NETBEANS_69_PROFILER_SHA256SUM)
+  VISUALVM_URL=$(VISUALVM_13_URL)
+  VISUALVM_SRC_ZIP=$(VISUALVM_13_SRC_ZIP)
+  VISUALVM_SHA256SUM=$(VISUALVM_13_SHA256SUM)
+  NBPLATFORM_DIR=netbeans/nbbuild/netbeans_visualvm/platform
+  NBPLATFORM_DIR_COPY=$(NBPLATFORM_DIR)
+  ADDITIONAL_DIRS=profiler.oql
+  PROFILER=profiler
+else
+  NETBEANS_PROFILER_URL=$(NETBEANS_68_PROFILER_URL)
+  NETBEANS_PROFILER_SRC_ZIP=$(NETBEANS_68_PROFILER_SRC_ZIP)
+  NETBEANS_PROFILER_SHA256SUM=$(NETBEANS_68_PROFILER_SHA256SUM)
+  VISUALVM_URL=$(VISUALVM_122_URL)
+  VISUALVM_SRC_ZIP=$(VISUALVM_122_SRC_ZIP)
+  VISUALVM_SHA256SUM=$(VISUALVM_122_SHA256SUM)
+  NBPLATFORM_DIR=netbeans/nbbuild/netbeans_visualvm
+  NBPLATFORM_DIR_COPY=$(NBPLATFORM_DIR)/$(NB_PLATFORM)
+  NBBUILD_PROPERTIES=-Dpermit.jdk6.builds=true -Dbuildnumber=091221-4fc006d17cb1
+  PROFILER=profiler3
+endif
 
 all: visualvm
 
@@ -110,7 +142,7 @@ stamps/nbplatform.stamp: stamps/extract-
 stamps/nbplatform.stamp: stamps/extract-netbeans-profiler.stamp
 	rm -f netbeans/nbbuild/external/binaries-list 
 	mkdir -p netbeans/nbbuild/netbeans_visualvm/
-	ln -s $(SYSTEM_NETBEANS_DIR)/$(NB_PLATFORM)/ netbeans/nbbuild/netbeans_visualvm
+	ln -s $(SYSTEM_NETBEANS_DIR)/$(NB_PLATFORM)/ $(NBPLATFORM_DIR)
 	ln -s $(SYSTEM_NETBEANS_DIR)/harness/ netbeans/nbbuild/netbeans_visualvm
 	mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk15/linux-amd64
 	mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk16/linux-amd64
@@ -119,9 +151,9 @@ stamps/nbplatform.stamp: stamps/extract-
 	cd netbeans/lib.profiler/native/build && \
 	sed -i -e 's#gcc32#$(CC)#' -e 's#-m64#$(ARCHFLAG)#' buildnative-linux64.sh && \
 	JAVA_HOME_15=$(SYSTEM_JDK_DIR) JAVA_HOME_16=$(SYSTEM_JDK_DIR) ./buildnative-linux64.sh
-	JAVA_HOME=$(SYSTEM_JDK_DIR) $(ANT) -Dpermit.jdk6.builds=true -f netbeans/nbbuild/build.xml bootstrap
-	for dir in lib.profiler lib.profiler.charts lib.profiler.ui lib.profiler.common profiler ; do \
-	  JAVA_HOME=$(SYSTEM_JDK_DIR) $(ANT) -Dpermit.jdk6.builds=true -Dbuildnumber=091221-4fc006d17cb1 \
+	JAVA_HOME=$(SYSTEM_JDK_DIR) $(ANT) $(NBBUILD_PROPERTIES) -f netbeans/nbbuild/build.xml bootstrap
+	for dir in lib.profiler lib.profiler.charts lib.profiler.ui lib.profiler.common profiler $(ADDITIONAL_DIRS); do \
+	  JAVA_HOME=$(SYSTEM_JDK_DIR) $(ANT) $(NBBUILD_PROPERTIES) \
             -Dnetbeans.dest.dir=$(abs_top_builddir)/netbeans/nbbuild/netbeans_visualvm \
 	    -f netbeans/$$dir/build.xml ; \
 	done
@@ -133,7 +165,7 @@ clean-nbplatform:
 	rm -f stamps/nbplatform.stamp
 
 stamps/visualvm.stamp: stamps/extract-visualvm.stamp stamps/nbplatform.stamp
-	ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans_visualvm visualvm/netbeans ; 
+	ln -s $(abs_top_builddir)/netbeans/nbbuild/netbeans_visualvm visualvm/netbeans ; 
 	cd visualvm && JAVA_HOME=$(SYSTEM_JDK_DIR) $(ANT) build
 	mkdir -p stamps
 	touch $@
@@ -153,10 +185,10 @@ install-exec-local:
 	chmod a+x $(DESTDIR)$(bindir)/jvisualvm
 	cp visualvm/launcher/visualvm.conf $(DESTDIR)$(libdir)/visualvm/etc
 	echo visualvm >> $(DESTDIR)$(libdir)/visualvm/etc/visualvm.clusters
-	echo profiler3 >> $(DESTDIR)$(libdir)/visualvm/etc/visualvm.clusters
+	echo $(PROFILER) >> $(DESTDIR)$(libdir)/visualvm/etc/visualvm.clusters
 	cp -r visualvm/build/cluster/* $(DESTDIR)$(libdir)/visualvm/visualvm
-	cp -r netbeans/nbbuild/netbeans_visualvm/$(NB_PLATFORM) $(DESTDIR)$(libdir)/visualvm
-	cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 $(DESTDIR)$(libdir)/visualvm	
+	cp -r $(NBPLATFORM_DIR_COPY) $(DESTDIR)$(libdir)/visualvm
+	cp -r netbeans/nbbuild/netbeans_visualvm/$(PROFILER) $(DESTDIR)$(libdir)/visualvm	
 	cp visualvm.desktop $(DESTDIR)$(datadir)
 
 download-netbeans-profiler: stamps/download-netbeans-profiler.stamp
diff -r b1df771a3be3 -r eb52a28e265d acinclude.m4
--- a/acinclude.m4	Thu Aug 26 18:50:04 2010 +0200
+++ b/acinclude.m4	Wed Sep 08 15:09:55 2010 +0100
@@ -107,3 +107,24 @@ AC_DEFUN([VV_SET_ARCH_SETTINGS],
   esac
   AC_SUBST(ARCHFLAG)
 ])
+
+AC_DEFUN([VV_CHECK_WITH_VISUALVM_VERSION],
+[
+  DEFAULT_VERSION="1.2.2"
+  AC_MSG_CHECKING([which VisualVM version to build])
+  AC_ARG_WITH([visualvm-version],
+	      [AS_HELP_STRING(--with-visualvm-version,the VisualVM version to build (see Makefile.am))],
+  [
+    VVVERSION="${withval}"
+  ],
+  [ 
+    VVVERSION="${DEFAULT_VERSION}"
+  ])
+  if test "x${VVVERSION}" = xyes; then
+	VVVERSION="${DEFAULT_VERSION}"
+  elif test "x${VVVERSION}" = xno; then
+	VVVERSION="${DEFAULT_VERSION}"
+  fi
+  AC_MSG_RESULT([${VVVERSION}])
+  AM_CONDITIONAL([VVVERSION_13], [test "$VVVERSION" = "1.3"])
+])
diff -r b1df771a3be3 -r eb52a28e265d configure.ac
--- a/configure.ac	Thu Aug 26 18:50:04 2010 +0200
+++ b/configure.ac	Wed Sep 08 15:09:55 2010 +0100
@@ -40,5 +40,6 @@ VV_SET_ARCH_SETTINGS
 VV_SET_ARCH_SETTINGS
 VV_WITH_NETBEANS_PROFILER_ZIP
 VV_WITH_VISUALVM_ZIP
+VV_CHECK_WITH_VISUALVM_VERSION
 
 AC_OUTPUT



More information about the distro-pkg-dev mailing list