[visualvm] 01/07: Build without the IcedTea harness

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon May 5 22:05:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository visualvm.

commit a853d9805f3c4d40d99802965349eb39a239bb6f
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon May 5 16:12:58 2014 +0200

    Build without the IcedTea harness
---
 debian/README.source                    |  2 +-
 debian/changelog                        |  2 +-
 debian/control                          |  1 +
 debian/libvisualvm-jni.install          |  2 +
 debian/patches/01-inject-patches.patch  | 24 ----------
 debian/patches/series                   |  1 -
 debian/patches/series.netbeans-profiler |  1 -
 debian/rules                            | 80 +++++++++++++++++++++++++--------
 debian/visualvm.install                 |  7 ++-
 9 files changed, 71 insertions(+), 49 deletions(-)

diff --git a/debian/README.source b/debian/README.source
index d63a803..fbe14c5 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -35,7 +35,7 @@ Here are the steps to create a new upstream tarball:
 4) Update the constants in debian/rules.
 
 5) Adjust the version of the NetBeans platform used
-   (there are references in debian/control and debian/visualvm.links)
+   (there are references in debian/control, debian/rules and debian/visualvm.links)
 
 
 Applying patches
diff --git a/debian/changelog b/debian/changelog
index 82a9389..6449b2f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,8 @@ visualvm (1.3.7-1) UNRELEASED; urgency=medium
   * New upstream release (Closes: #702052, #718786)
     - Removed the Ant compatibility patch
     - Depend on libnb-platform18-java instead of libnb-platform13-java
-    - Updated the constants in debian/rules
     - The license validation window is no longer displayed (Closes: #721178)
+  * The IcedTea build harness is no longer used
   * Added an architecture specific package containing the native libraries
   * Install the application files in /usr/share/visualvm
     instead of /usr/lib/visualvm
diff --git a/debian/control b/debian/control
index fe001c8..1be4e89 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.or
 Uploaders: Matthias Klose <doko at ubuntu.com>, Emmanuel Bourg <ebourg at apache.org>
 Build-Depends: debhelper (>= 9),
  default-jdk,
+ ant,
  ant-optional,
  hardening-wrapper,
  libnb-platform-devel-java (>= 7.0),
diff --git a/debian/libvisualvm-jni.install b/debian/libvisualvm-jni.install
new file mode 100644
index 0000000..aeb246d
--- /dev/null
+++ b/debian/libvisualvm-jni.install
@@ -0,0 +1,2 @@
+netbeans/lib.profiler/release/lib/deployed/jdk15/linux-amd64/libprofilerinterface-jdk15.so usr/lib/jni/
+netbeans/lib.profiler/release/lib/deployed/jdk16/linux-amd64/libprofilerinterface-jdk16.so usr/lib/jni/
diff --git a/debian/patches/01-inject-patches.patch b/debian/patches/01-inject-patches.patch
deleted file mode 100644
index a4b4015..0000000
--- a/debian/patches/01-inject-patches.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Description: Tweaks the makefile to apply patches after extracting the sources
-Author: Emmanuel Bourg <ebourg at apache.org>
-Forwarded: no
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -246,6 +246,9 @@
- 	mkdir -p stamps
- 	touch $@
- 
-+patch-netbeans-profiler: stamps/extract-netbeans-profiler.stamp
-+	QUILT_PATCHES=debian/patches;QUILT_SERIES=debian/patches/series.netbeans-profiler quilt push -a
-+
- stamps/extract-visualvm.stamp: stamps/download-visualvm.stamp
- 	set -e ; \
- 	if ! test -d visualvm ; \
-@@ -265,7 +268,7 @@
- 
- # VisualVM
- 
--stamps/nbplatform.stamp: stamps/extract-netbeans-profiler.stamp
-+stamps/nbplatform.stamp: patch-netbeans-profiler
- 	rm -f netbeans/nbbuild/external/binaries-list 
- 	mkdir -p netbeans/nbbuild/netbeans_visualvm/
- 	ln -s $(SYSTEM_NETBEANS_DIR)/$(NB_PLATFORM) $(NBPLATFORM_DIR)
diff --git a/debian/patches/series b/debian/patches/series
index 7ebfdb7..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +0,0 @@
-01-inject-patches.patch
diff --git a/debian/patches/series.netbeans-profiler b/debian/patches/series.netbeans-profiler
index 2121704..130bda8 100644
--- a/debian/patches/series.netbeans-profiler
+++ b/debian/patches/series.netbeans-profiler
@@ -1,3 +1,2 @@
-01-inject-patches.patch
 02-relocate-native-libraries.patch
 03-launcher.patch
diff --git a/debian/rules b/debian/rules
index ea37565..73da13b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,37 +5,79 @@ export JAVA_HOME = $(firstword $(wildcard /usr/lib/jvm/java-7-openjdk-$(DEB_HOST
 
 export DEB_BUILD_HARDENING=1
 
+ifneq (,$(filter $(DEB_HOST_ARCH), s390))
+  ARCHFLAG="-m31"
+else ifneq (,$(filter $(DEB_HOST_ARCH), sparc powerpc i386))
+  ARCHFLAG="-m32"
+else
+  ARCHFLAG="-m64"
+endif
+
+NB_PLATFORM_VERSION=18
+NB_BUILD_PROPERTIES=-Dpermit.jdk8.builds=true
+ABS_TOP_DIR=`pwd -P`
+NB_DEST_DIR=$(ABS_TOP_DIR)/netbeans/nbbuild/netbeans_visualvm
+
 %:
 	dh $@
 
 override_dh_auto_configure:
-	./autogen.sh
-	dh_autoreconf
-	dh_auto_configure -- --prefix=/usr \
-	        --sysconfdir=/etc/visualvm \
-	        --libdir=/usr/share/ \
-	        --with-jdk-home=$(JAVA_HOME) \
-	        --with-visualvm-version=1.3.7
 
-override_dh_auto_install:
-	dh_auto_install -- DESTDIR=debian/visualvm
+override_dh_auto_build:
+	# Extract the tarballs
+	mkdir netbeans
+	tar -xf netbeans-profiler-visualvm_release*.tar.gz -C netbeans
+	tar -xf visualvm_*-src.tar.gz
+
+	# Prepare the source tree
+	rm -f netbeans/nbbuild/external/binaries-list
+	mkdir -p netbeans/nbbuild/netbeans_visualvm/
+	ln -s /usr/share/netbeans/platform$(NB_PLATFORM_VERSION) netbeans/nbbuild/netbeans_visualvm/platform
+	ln -s /usr/share/netbeans/harness/ netbeans/nbbuild/netbeans_visualvm
+
+	# Build the native libraries
+	mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk15/linux-amd64
+	mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk16/linux-amd64
+	cd netbeans/lib.profiler/native/build && \
+	sed -i -e 's#gcc32#gcc#' \
+	       -e 's#-m64#$(ARCHFLAG)#' \
+	       -e 's#Wall#Wall -g#' \
+	       -e 's#libprofilerinterface.so#libprofilerinterface-$$JDK_ID.so#' \
+	       buildnative-linux64.sh && \
+	JAVA_HOME_15=$(JAVA_HOME) JAVA_HOME_16=$(JAVA_HOME) ./buildnative-linux64.sh
+
+	# Build the Netbeans profiler
+	ant -f netbeans/nbbuild/build.xml bootstrap $(NB_BUILD_PROPERTIES)
+	for module in lib.profiler \
+	              lib.profiler.charts \
+	              lib.profiler.ui \
+	              lib.profiler.common \
+	              profiler \
+	              profiler.oql \
+	              profiler.snaptracer \
+	              profiler.heapwalker; do \
+	  ant -f netbeans/$$module/build.xml $(NB_BUILD_PROPERTIES) -Dnetbeans.dest.dir=$(NB_DEST_DIR) ; \
+	done
+
+	# Build VisualVM
+	ln -s $(NB_DEST_DIR) visualvm/netbeans
+	cd visualvm && ant build
+
+override_dh_install:
+	dh_install
+
+	# Create and install /etc/visualvm/visualvm.clusters
+	echo visualvm >> debian/visualvm/etc/visualvm/visualvm.clusters
+	echo profiler >> debian/visualvm/etc/visualvm/visualvm.clusters
 
 	# Install the icons
 	install -m 644 -D debian/visualvm-32x32.xpm debian/visualvm/usr/share/icons/hicolor/32x32/apps/visualvm.xpm
 	install -m 644 -D debian/visualvm-48x48.xpm debian/visualvm/usr/share/icons/hicolor/48x48/apps/visualvm.xpm
 
-	# Move the native libraries into libvisualvm-jni
-	rm -Rf debian/visualvm/usr/share/visualvm/profiler/lib/deployed/jdk15/linux-amd64
-	rm -Rf debian/visualvm/usr/share/visualvm/profiler/lib/deployed/jdk16/linux-amd64
-	mkdir --parents debian/libvisualvm-jni/usr/lib/jni
-	mv debian/visualvm/usr/share/visualvm/profiler/lib/deployed/jdk15/linux/libprofilerinterface.so debian/libvisualvm-jni/usr/lib/jni/libprofilerinterface-jdk15.so
-	mv debian/visualvm/usr/share/visualvm/profiler/lib/deployed/jdk16/linux/libprofilerinterface.so debian/libvisualvm-jni/usr/lib/jni/libprofilerinterface-jdk16.so
+	# Remove the native libraries from the visualvm package
 	rm -Rf debian/visualvm/usr/share/visualvm/profiler/lib/deployed
 
-	rm debian/visualvm/usr/bin/jvisualvm
-
 override_dh_auto_clean:
-	[ ! -f Makefile ] || $(MAKE) clean-local
-	rm -Rf Makefile Makefile.in aclocal.m4 compile config.* configure install-sh missing visualvm.desktop stamps
+	rm -Rf visualvm netbeans
 	dh_autoreconf_clean
 	dh_clean
diff --git a/debian/visualvm.install b/debian/visualvm.install
index d8baa8e..aa66fee 100644
--- a/debian/visualvm.install
+++ b/debian/visualvm.install
@@ -1,2 +1,5 @@
-debian/visualvm.desktop    usr/share/applications/
-visualvm/launcher/visualvm usr/bin/
+visualvm/launcher/visualvm.conf etc/visualvm
+debian/visualvm.desktop         usr/share/applications/
+visualvm/launcher/visualvm      usr/bin/
+visualvm/build/cluster/*        usr/share/visualvm/visualvm
+netbeans/nbbuild/netbeans_visualvm/profiler usr/share/visualvm

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/visualvm.git



More information about the pkg-java-commits mailing list