[1.8] RFC: Allow NetX to be disabled
Dr Andrew John Hughes
ahughes at redhat.com
Mon Nov 15 08:31:19 PST 2010
On 00:17 Fri 12 Nov , Dr Andrew John Hughes wrote:
> Same again for 1.8:
>
> 2010-11-11 Andrew John Hughes <ahughes at redhat.com>
>
> * Makefile.am:
> (ICEDTEA_PATCHES): Only apply netx.patch and
> netx-umask.patch if NetX is enabled.
> (distclean-local): Add clean-about.
> (.PHONY): Likewise.
> (icedtea): Depend on about.stamp. Add
> ENABLE_NETX conditional.
> (icedtea-debug): Likewise.
> (netx): Add ENABLE_NETX conditional.
> (netx-dist): Likewise.
> (extra-class-files): Likewise.
> (about): New target (from extra-lib/about.jar).
> Add ENABLE_NETX conditional.
> (clean-about): New target to remove about.jar.
> * acinclude.m4:
> (IT_CHECK_PLUGIN): Require IT_CHECK_NETX.
> Disable if NetX is turned off.
> (IT_CHECK_NETX): Add --disable-webstart option.
>
> --
> Andrew :)
>
> Free Java Software Engineer
> Red Hat, Inc. (http://www.redhat.com)
>
> Support Free Java!
> Contribute to GNU Classpath and the OpenJDK
> http://www.gnu.org/software/classpath
> http://openjdk.java.net
> PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
> Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
> diff -r 78de2d8168d8 Makefile.am
> --- a/Makefile.am Mon Oct 18 12:47:36 2010 -0400
> +++ b/Makefile.am Fri Nov 12 00:01:20 2010 +0000
> @@ -341,9 +341,6 @@
> patches/icedtea-sh4-support.patch \
> patches/icedtea-policy-evaluation.patch \
> patches/libpng.patch \
> - patches/extensions/netx.patch \
> - patches/extensions/netx-dist.patch \
> - patches/extensions/netx-umask.patch \
> patches/icedtea-jtreg-httpTest.patch \
> patches/ant-1.8.0.patch \
> patches/icedtea-nss-6763530.patch \
> @@ -377,6 +374,13 @@
> patches/icedtea-rhino.patch
> endif
>
> +if ENABLE_NETX
> +ICEDTEA_PATCHES += \
> + patches/extensions/netx.patch \
> + patches/extensions/netx-dist.patch \
> + patches/extensions/netx-umask.patch
> +endif
> +
> if ENABLE_PLUGIN
> ICEDTEA_PATCHES += \
> patches/extensions/liveconnect.patch \
> @@ -614,7 +618,7 @@
>
> #FIXME (clean): Should become clean-local.
> distclean-local: clean-copy clean-jtreg clean-jtreg-reports $(PULSE_JAVA_CLEAN_TARGET) \
> - clean-netx clean-plugin clean-liveconnect
> + clean-netx clean-plugin clean-liveconnect clean-about
> rm -rf stamps
> rm -f rt-source-files.txt \
> extra-source-files.txt
> @@ -646,7 +650,8 @@
> clean-icedtea icedtea-against-icedtea clean-icedtea-ecj \
> clean-tools-jar clean-visualvm clean-nbplatform \
> clean-copy clean-rt $(ICEDTEAPLUGIN_CLEAN) hotspot \
> - hotspot-helper clean-extra clean-jtreg clean-jtreg-reports
> + hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \
> + clean-about
>
> env:
> @echo 'unset JAVA_HOME'
> @@ -1303,7 +1308,7 @@
> # you change it in the icedtea-debug target as well.
> stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \
> stamps/netx-dist.stamp $(OPENJDK_TREE) stamps/plugin.stamp \
> - extra-lib/about.jar stamps/cacao.stamp \
> + stamps/about.stamp stamps/cacao.stamp \
> stamps/visualvm.stamp $(PULSE_JAVA_TARGET) stamps/rewrite-rhino.stamp
> $(ARCH_PREFIX) $(MAKE) \
> $(ICEDTEA_ENV) \
> @@ -1349,6 +1354,7 @@
> cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
> $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
> endif
> +if ENABLE_NETX
> cp $(NETX_RESOURCE_DIR)/about.jnlp extra-lib/about.jar \
> $(BUILD_OUTPUT_DIR)/j2re-image/lib ; \
> cp $(NETX_RESOURCE_DIR)/about.jnlp extra-lib/about.jar \
> @@ -1361,6 +1367,7 @@
> cp $(NETX_SRCDIR)/javaws.1 \
> $(BUILD_OUTPUT_DIR)/j2re-image/man/man1 ; \
> fi
> +endif
> if ZERO_BUILD
> printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
> endif
> @@ -1401,7 +1408,7 @@
>
> stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \
> stamps/netx-dist.stamp $(OPENJDK_TREE) stamps/plugin.stamp \
> - extra-lib/about.jar stamps/cacao.stamp \
> + stamps/about.stamp stamps/cacao.stamp \
> stamps/visualvm.stamp $(PULSE_JAVA_TARGET) stamps/rewrite-rhino.stamp
> $(ARCH_PREFIX) $(MAKE) \
> $(ICEDTEA_ENV) \
> @@ -1447,6 +1454,7 @@
> cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
> $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
> endif
> +if ENABLE_NETX
> cp $(NETX_RESOURCE_DIR)/default.jnlp extra-lib/about.jar \
> $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib ; \
> cp $(NETX_RESOURCE_DIR)/default.jnlp extra-lib/about.jar \
> @@ -1459,6 +1467,7 @@
> cp $(NETX_SRCDIR)/javaws.1 \
> $(DEBUG_BUILD_OUTPUT_DIR)/j2re-image/man/man1 ; \
> fi
> +endif
> if ZERO_BUILD
> printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
> endif
> @@ -1663,6 +1672,7 @@
> find $(NETX_SRCDIR) -name '*.java' | sort > $@
>
> stamps/netx.stamp: netx-source-files.txt stamps/rt-class-files.stamp
> +if ENABLE_NETX
> mkdir -p $(abs_top_builddir)/netx.build
> $(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
> -d $(abs_top_builddir)/netx.build \
> @@ -1671,10 +1681,12 @@
> -bootclasspath \'\' \
> @netx-source-files.txt
> cp -r $(NETX_RESOURCE_DIR) $(abs_top_builddir)/netx.build/net/sourceforge/jnlp
> +endif
> mkdir -p stamps
> touch $@
>
> stamps/netx-dist.stamp: stamps/netx.stamp
> +if ENABLE_NETX
> (cd $(abs_top_builddir)/netx.build ; \
> mkdir -p lib ; \
> $(ICEDTEA_BOOT_DIR)/bin/jar cf lib/classes.jar javax/jnlp net ; \
> @@ -1684,6 +1696,7 @@
> $(ICEDTEA_BOOT_DIR)/bin/jar uf $(abs_top_builddir)/netx.build/lib/classes.jar \
> `find . -type f -not -name '*.java'` ; \
> $(ZIP) -qr $(abs_top_builddir)/netx.build/lib/src.zip javax net )
> +endif
> mkdir -p stamps
> touch $@
>
> @@ -1699,12 +1712,14 @@
>
> stamps/extra-class-files.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP) \
> extra-source-files.txt stamps/netx.stamp
> +if ENABLE_NETX
> mkdir -p extra-lib
> $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g -d extra-lib \
> -source 1.5 \
> -sourcepath extra -cp netx.build:$(ICEDTEA_RT) \
> -bootclasspath \'\' @extra-source-files.txt
> cp -r $(NETX_EXTRA_DIR) extra-lib/net/sourceforge/jnlp/about
> +endif
> mkdir -p stamps
> touch $@
>
> @@ -1713,13 +1728,21 @@
> rm -f stamps/extra-class-files.stamp
> rm -f extra-source-files.txt
>
> -extra-lib/about.jar: stamps/extra-class-files.stamp
> +stamps/about.stamp: stamps/extra-class-files.stamp
> +if ENABLE_NETX
> if ! test -d $(ICEDTEA_BOOT_DIR) ; \
> then \
> $(JAR) cf $@ -C extra-lib net ; \
> else \
> $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C extra-lib net ; \
> fi
> +endif
> + mkdir -p stamps
> + touch $@
> +
> +clean-about:
> + rm -f extra-lib/about.jar
> + rm -f stamps/about.stamp
>
> # PulseAudio based mixer
> # (pulse-java)
> diff -r 78de2d8168d8 acinclude.m4
> --- a/acinclude.m4 Mon Oct 18 12:47:36 2010 -0400
> +++ b/acinclude.m4 Fri Nov 12 00:01:20 2010 +0000
> @@ -1440,12 +1440,17 @@
>
> AC_DEFUN_ONCE([IT_CHECK_PLUGIN],
> [
> +AC_REQUIRE([IT_CHECK_NETX])
> AC_MSG_CHECKING([whether to build the browser plugin])
> AC_ARG_ENABLE([plugin],
> [AS_HELP_STRING([--disable-plugin],
> [Disable compilation of browser plugin])],
> [enable_plugin="${enableval}"], [enable_plugin="yes"])
> AC_MSG_RESULT(${enable_plugin})
> +if test "x${enable_netx}" = "xno" ; then
> + AC_MSG_WARN([Plugin can not be built without NetX; disabling plugin])
> + enable_plugin=no;
> +fi
> ])
>
> AC_DEFUN_ONCE([IT_CHECK_PLUGIN_DEPENDENCIES],
> @@ -1536,3 +1541,14 @@
> AC_SUBST(NSS_LIBDIR)
> AC_CONFIG_FILES([nss.cfg])
> ])
> +
> +AC_DEFUN_ONCE([IT_CHECK_NETX],
> +[
> +AC_MSG_CHECKING([whether to build NetX])
> +AC_ARG_ENABLE([webstart],
> + [AS_HELP_STRING([--disable-webstart],
> + [Disable compilation of Web Start support])],
> + [enable_netx="${enableval}"], [enable_netx="yes"])
> +AC_MSG_RESULT(${enable_netx})
> +AM_CONDITIONAL(ENABLE_NETX, test "x${enable_netx}" = "xyes")
> +])
Revised version thanks to an issue caught by Omair; the extra.stamp target
was still using $@ instead of extra-lib/about.jar.
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
-------------- next part --------------
diff -r 78de2d8168d8 ChangeLog
--- a/ChangeLog Mon Oct 18 12:47:36 2010 -0400
+++ b/ChangeLog Mon Nov 15 16:30:34 2010 +0000
@@ -1,3 +1,24 @@
+2010-11-11 Andrew John Hughes <ahughes at redhat.com>
+
+ * Makefile.am:
+ (ICEDTEA_PATCHES): Only apply netx.patch and
+ netx-umask.patch if NetX is enabled.
+ (distclean-local): Add clean-about.
+ (.PHONY): Likewise.
+ (icedtea): Depend on about.stamp. Add
+ ENABLE_NETX conditional.
+ (icedtea-debug): Likewise.
+ (netx): Add ENABLE_NETX conditional.
+ (netx-dist): Likewise.
+ (extra-class-files): Likewise.
+ (about): New target (from extra-lib/about.jar).
+ Add ENABLE_NETX conditional.
+ (clean-about): New target to remove about.jar.
+ * acinclude.m4:
+ (IT_CHECK_PLUGIN): Require IT_CHECK_NETX.
+ Disable if NetX is turned off.
+ (IT_CHECK_NETX): Add --disable-webstart option.
+
2010-10-18 Omair Majid <omajid at redhat.com>
* netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java:
diff -r 78de2d8168d8 Makefile.am
--- a/Makefile.am Mon Oct 18 12:47:36 2010 -0400
+++ b/Makefile.am Mon Nov 15 16:30:34 2010 +0000
@@ -341,9 +341,6 @@
patches/icedtea-sh4-support.patch \
patches/icedtea-policy-evaluation.patch \
patches/libpng.patch \
- patches/extensions/netx.patch \
- patches/extensions/netx-dist.patch \
- patches/extensions/netx-umask.patch \
patches/icedtea-jtreg-httpTest.patch \
patches/ant-1.8.0.patch \
patches/icedtea-nss-6763530.patch \
@@ -377,6 +374,13 @@
patches/icedtea-rhino.patch
endif
+if ENABLE_NETX
+ICEDTEA_PATCHES += \
+ patches/extensions/netx.patch \
+ patches/extensions/netx-dist.patch \
+ patches/extensions/netx-umask.patch
+endif
+
if ENABLE_PLUGIN
ICEDTEA_PATCHES += \
patches/extensions/liveconnect.patch \
@@ -614,7 +618,7 @@
#FIXME (clean): Should become clean-local.
distclean-local: clean-copy clean-jtreg clean-jtreg-reports $(PULSE_JAVA_CLEAN_TARGET) \
- clean-netx clean-plugin clean-liveconnect
+ clean-netx clean-plugin clean-liveconnect clean-about
rm -rf stamps
rm -f rt-source-files.txt \
extra-source-files.txt
@@ -646,7 +650,8 @@
clean-icedtea icedtea-against-icedtea clean-icedtea-ecj \
clean-tools-jar clean-visualvm clean-nbplatform \
clean-copy clean-rt $(ICEDTEAPLUGIN_CLEAN) hotspot \
- hotspot-helper clean-extra clean-jtreg clean-jtreg-reports
+ hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \
+ clean-about
env:
@echo 'unset JAVA_HOME'
@@ -1303,7 +1308,7 @@
# you change it in the icedtea-debug target as well.
stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \
stamps/netx-dist.stamp $(OPENJDK_TREE) stamps/plugin.stamp \
- extra-lib/about.jar stamps/cacao.stamp \
+ stamps/about.stamp stamps/cacao.stamp \
stamps/visualvm.stamp $(PULSE_JAVA_TARGET) stamps/rewrite-rhino.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1349,6 +1354,7 @@
cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
$(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
endif
+if ENABLE_NETX
cp $(NETX_RESOURCE_DIR)/about.jnlp extra-lib/about.jar \
$(BUILD_OUTPUT_DIR)/j2re-image/lib ; \
cp $(NETX_RESOURCE_DIR)/about.jnlp extra-lib/about.jar \
@@ -1361,6 +1367,7 @@
cp $(NETX_SRCDIR)/javaws.1 \
$(BUILD_OUTPUT_DIR)/j2re-image/man/man1 ; \
fi
+endif
if ZERO_BUILD
printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
endif
@@ -1401,7 +1408,7 @@
stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \
stamps/netx-dist.stamp $(OPENJDK_TREE) stamps/plugin.stamp \
- extra-lib/about.jar stamps/cacao.stamp \
+ stamps/about.stamp stamps/cacao.stamp \
stamps/visualvm.stamp $(PULSE_JAVA_TARGET) stamps/rewrite-rhino.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1447,6 +1454,7 @@
cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
$(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
endif
+if ENABLE_NETX
cp $(NETX_RESOURCE_DIR)/default.jnlp extra-lib/about.jar \
$(BUILD_OUTPUT_DIR)-debug/j2re-image/lib ; \
cp $(NETX_RESOURCE_DIR)/default.jnlp extra-lib/about.jar \
@@ -1459,6 +1467,7 @@
cp $(NETX_SRCDIR)/javaws.1 \
$(DEBUG_BUILD_OUTPUT_DIR)/j2re-image/man/man1 ; \
fi
+endif
if ZERO_BUILD
printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
endif
@@ -1663,6 +1672,7 @@
find $(NETX_SRCDIR) -name '*.java' | sort > $@
stamps/netx.stamp: netx-source-files.txt stamps/rt-class-files.stamp
+if ENABLE_NETX
mkdir -p $(abs_top_builddir)/netx.build
$(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
-d $(abs_top_builddir)/netx.build \
@@ -1671,10 +1681,12 @@
-bootclasspath \'\' \
@netx-source-files.txt
cp -r $(NETX_RESOURCE_DIR) $(abs_top_builddir)/netx.build/net/sourceforge/jnlp
+endif
mkdir -p stamps
touch $@
stamps/netx-dist.stamp: stamps/netx.stamp
+if ENABLE_NETX
(cd $(abs_top_builddir)/netx.build ; \
mkdir -p lib ; \
$(ICEDTEA_BOOT_DIR)/bin/jar cf lib/classes.jar javax/jnlp net ; \
@@ -1684,6 +1696,7 @@
$(ICEDTEA_BOOT_DIR)/bin/jar uf $(abs_top_builddir)/netx.build/lib/classes.jar \
`find . -type f -not -name '*.java'` ; \
$(ZIP) -qr $(abs_top_builddir)/netx.build/lib/src.zip javax net )
+endif
mkdir -p stamps
touch $@
@@ -1699,12 +1712,14 @@
stamps/extra-class-files.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP) \
extra-source-files.txt stamps/netx.stamp
+if ENABLE_NETX
mkdir -p extra-lib
$(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g -d extra-lib \
-source 1.5 \
-sourcepath extra -cp netx.build:$(ICEDTEA_RT) \
-bootclasspath \'\' @extra-source-files.txt
cp -r $(NETX_EXTRA_DIR) extra-lib/net/sourceforge/jnlp/about
+endif
mkdir -p stamps
touch $@
@@ -1713,13 +1728,21 @@
rm -f stamps/extra-class-files.stamp
rm -f extra-source-files.txt
-extra-lib/about.jar: stamps/extra-class-files.stamp
+stamps/about.stamp: stamps/extra-class-files.stamp
+if ENABLE_NETX
if ! test -d $(ICEDTEA_BOOT_DIR) ; \
then \
- $(JAR) cf $@ -C extra-lib net ; \
+ $(JAR) cf extra-lib/about.jar -C extra-lib net ; \
else \
- $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C extra-lib net ; \
+ $(ICEDTEA_BOOT_DIR)/bin/jar cf extra-lib/about.jar -C extra-lib net ; \
fi
+endif
+ mkdir -p stamps
+ touch $@
+
+clean-about:
+ rm -f extra-lib/about.jar
+ rm -f stamps/about.stamp
# PulseAudio based mixer
# (pulse-java)
diff -r 78de2d8168d8 acinclude.m4
--- a/acinclude.m4 Mon Oct 18 12:47:36 2010 -0400
+++ b/acinclude.m4 Mon Nov 15 16:30:34 2010 +0000
@@ -1440,12 +1440,17 @@
AC_DEFUN_ONCE([IT_CHECK_PLUGIN],
[
+AC_REQUIRE([IT_CHECK_NETX])
AC_MSG_CHECKING([whether to build the browser plugin])
AC_ARG_ENABLE([plugin],
[AS_HELP_STRING([--disable-plugin],
[Disable compilation of browser plugin])],
[enable_plugin="${enableval}"], [enable_plugin="yes"])
AC_MSG_RESULT(${enable_plugin})
+if test "x${enable_netx}" = "xno" ; then
+ AC_MSG_WARN([Plugin can not be built without NetX; disabling plugin])
+ enable_plugin=no;
+fi
])
AC_DEFUN_ONCE([IT_CHECK_PLUGIN_DEPENDENCIES],
@@ -1536,3 +1541,14 @@
AC_SUBST(NSS_LIBDIR)
AC_CONFIG_FILES([nss.cfg])
])
+
+AC_DEFUN_ONCE([IT_CHECK_NETX],
+[
+AC_MSG_CHECKING([whether to build NetX])
+AC_ARG_ENABLE([webstart],
+ [AS_HELP_STRING([--disable-webstart],
+ [Disable compilation of Web Start support])],
+ [enable_netx="${enableval}"], [enable_netx="yes"])
+AC_MSG_RESULT(${enable_netx})
+AM_CONDITIONAL(ENABLE_NETX, test "x${enable_netx}" = "xyes")
+])
More information about the distro-pkg-dev
mailing list