/hg/icedtea6: Standardise plugin versioning and the name of Iced...

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Mon Jan 25 11:42:57 PST 2010


changeset 7f40cc095348 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7f40cc095348
author: Andrew John Hughes <ahughes at redhat.com>
date: Mon Jan 25 19:42:12 2010 +0000

	Standardise plugin versioning and the name of IcedTea (IcedTea6 in
	this case).

	2010-01-25 Andrew John Hughes <ahughes at redhat.com>

	 * IcedTeaPlugin.cc: Standardise plugin versioning.
		* Makefile.am: Set ICEDTEA_NAME and use in place of literal
	"IcedTea6". Use HAS_PKGVERSION to set ICEDTEA_PKG and
	output DISTRO_PACKAGE_VERSION rather than running test. Set
	PLUGIN_VERSION and use for both plugins.
		* acinclude.m4: (IT_GET_PKGVERSION): Moved from configure.ac
	and changed to a macro with output.
	(IT_GET_LSB_DATA): Depend on IT_GET_PKGVERSION.
		* configure.ac: Invoke new IT_GET_PKGVERSION macro.
		* plugin/icedteanp/IcedTeaNPPlugin.cc: Standardise plugin
	versioning.


diffstat:

6 files changed, 64 insertions(+), 39 deletions(-)
ChangeLog                           |   19 +++++++++++++++++++
IcedTeaPlugin.cc                    |    4 ++--
Makefile.am                         |   33 ++++++++++++++++-----------------
acinclude.m4                        |   29 +++++++++++++++++++++++------
configure.ac                        |   12 +-----------
plugin/icedteanp/IcedTeaNPPlugin.cc |    6 +++---

diffs (224 lines):

diff -r fcd85ef6c2ae -r 7f40cc095348 ChangeLog
--- a/ChangeLog	Mon Jan 25 15:35:21 2010 +0000
+++ b/ChangeLog	Mon Jan 25 19:42:12 2010 +0000
@@ -1,3 +1,22 @@ 2010-01-25 Andrew John Hughes  <ahughes@
+2010-01-25 Andrew John Hughes  <ahughes at redhat.com>
+
+	* IcedTeaPlugin.cc:
+	Standardise plugin versioning.
+	* Makefile.am:
+	Set ICEDTEA_NAME and use in place of literal
+	"IcedTea6".  Use HAS_PKGVERSION to set ICEDTEA_PKG
+	and output DISTRO_PACKAGE_VERSION rather than
+	running test.  Set PLUGIN_VERSION and use for
+	both plugins.
+	* acinclude.m4:
+	(IT_GET_PKGVERSION): Moved from configure.ac and
+	changed to a macro with output.
+	(IT_GET_LSB_DATA): Depend on IT_GET_PKGVERSION.
+	* configure.ac:
+	Invoke new IT_GET_PKGVERSION macro.
+	* plugin/icedteanp/IcedTeaNPPlugin.cc:
+	Standardise plugin versioning.
+
 2010-01-25 Andrew John Hughes  <ahughes at redhat.com>
 
 	* patches/icedtea-libraries.patch:
diff -r fcd85ef6c2ae -r 7f40cc095348 IcedTeaPlugin.cc
--- a/IcedTeaPlugin.cc	Mon Jan 25 15:35:21 2010 +0000
+++ b/IcedTeaPlugin.cc	Mon Jan 25 19:42:12 2010 +0000
@@ -275,8 +275,8 @@ inline long get_time_in_s()
 #define PLUGIN_CHECK(message, result)
 #endif
 
-#define PLUGIN_NAME "IcedTea Java Web Browser Plugin"
-#define PLUGIN_DESCRIPTION "The " PLUGIN_NAME PLUGIN_VERSION " executes Java applets."
+#define PLUGIN_NAME "IcedTea Java Web Browser Plugin (using " PLUGIN_VERSION ")"
+#define PLUGIN_DESCRIPTION "The " PLUGIN_NAME " executes Java applets."
 #define PLUGIN_MIME_DESC                                               \
   "application/x-java-vm:class,jar:IcedTea;"                           \
   "application/x-java-applet:class,jar:IcedTea;"                       \
diff -r fcd85ef6c2ae -r 7f40cc095348 Makefile.am
--- a/Makefile.am	Mon Jan 25 15:35:21 2010 +0000
+++ b/Makefile.am	Mon Jan 25 19:42:12 2010 +0000
@@ -384,9 +384,15 @@ JDK_UPDATE_VERSION = $(shell echo $(OPEN
 JDK_UPDATE_VERSION = $(shell echo $(OPENJDK_VERSION) | sed -e "s/^b//")
 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION)
 
+ICEDTEA_NAME="IcedTea6"
 if HAS_ICEDTEA_REVISION
 ICEDTEA_REV="+${ICEDTEA_REVISION}"
 endif
+if HAS_PKGVERSION
+ICEDTEA_PKG="(${PKGVERSION})"
+endif
+
+PLUGIN_VERSION=$(ICEDTEA_NAME) $(PACKAGE_VERSION)$(ICEDTEA_REV) $(ICEDTEA_PKG)
 
 ICEDTEA_ENV = \
 	IMPORT_BINARY_PLUGS=true \
@@ -429,7 +435,7 @@ ICEDTEA_ENV = \
 	JDK_HOME="" \
 	RHINO_JAR="$(RHINO_JAR)" \
 	DISTRIBUTION_ID="$(DIST_ID)" \
-	DERIVATIVE_ID="IcedTea6 $(PACKAGE_VERSION)$(ICEDTEA_REV)" \
+	DERIVATIVE_ID="$(ICEDTEA_NAME) $(PACKAGE_VERSION)$(ICEDTEA_REV)" \
 	DEBUG_CLASSFILES="true" \
 	DEBUG_BINARIES="true"
 
@@ -515,7 +521,7 @@ ICEDTEA_ENV_ECJ = \
 	JAR_KNOWS_J_OPTIONS="$(JAR_KNOWS_J_OPTIONS)" \
 	JAR_ACCEPTS_STDIN_LIST="$(JAR_ACCEPTS_STDIN_LIST)" \
 	DISTRIBUTION_ID="$(DIST_ID)" \
-	DERIVATIVE_ID="IcedTea6 $(PACKAGE_VERSION)$(ICEDTEA_REV)" \
+	DERIVATIVE_ID="$(ICEDTEA_NAME) $(PACKAGE_VERSION)$(ICEDTEA_REV)" \
 	DEBUG_CLASSFILES="true" \
 	DEBUG_BINARIES="true"
 
@@ -961,10 +967,10 @@ stamps/patch.stamp: stamps/patch-fsg.sta
 	if ! test "x$(WITH_CACAO)" = "xno"; then \
 	  echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \
 	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
-	  echo "PRODUCT_NAME=IcedTea6" \
+	  echo "PRODUCT_NAME=$(ICEDTEA_NAME)" \
 	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
 	else \
-	  echo "JDK_DERIVATIVE_NAME=IcedTea6 $${icedtea_version}" \
+	  echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \
 	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
 	fi ; 
 
@@ -972,11 +978,11 @@ if HAS_JDK_REVISION
 	echo "JDK_REVID=$(JDK_REVISION)" >>openjdk/jdk/make/common/shared/Defs.gmk ;
 endif
 
-	echo "DISTRO_NAME=$(DIST_NAME)" >>openjdk/jdk/make/common/shared/Defs.gmk ; \
-	if [ -n "$(PKGVERSION)" ]; then \
+	echo "DISTRO_NAME=$(DIST_NAME)" >>openjdk/jdk/make/common/shared/Defs.gmk ;
+if HAS_PKGVERSION
 	  echo "DISTRO_PACKAGE_VERSION=$(PKGVERSION)" \
-	    >>openjdk/jdk/make/common/shared/Defs.gmk ; \
-	fi
+	    >>openjdk/jdk/make/common/shared/Defs.gmk ;
+endif
 
 #FIXME (plugin): Don't do this copying
 if ENABLE_NPPLUGIN
@@ -1489,8 +1495,7 @@ NPPLUGIN_OBJECTS=IcedTeaNPPlugin.o IcedT
 $(addprefix $(NPPLUGIN_DIR)/,$(NPPLUGIN_OBJECTS)): $(addprefix $(NPPLUGIN_DIR)/,$(NPPLUGIN_SRC))
 	cd $(NPPLUGIN_DIR) && \
 	$(CXX) $(CXXFLAGS) \
-	  -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
-	  -DPLUGIN_VERSION="\"$(PACKAGE_VERSION)$(ICEDTEA_REV)\"" \
+	  -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \
 	  -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
 	  $(GLIB_CFLAGS) \
 	  $(GTK_CFLAGS) \
@@ -1521,14 +1526,8 @@ if ENABLE_PLUGIN
 # is listed before -l options.  See:
 # http://developer.mozilla.org/en/docs/XPCOM_Glue
 IcedTeaPlugin.o: IcedTeaPlugin.cc
-	if [ -e $(abs_top_srcdir)/.hg ] && which $(HG) >/dev/null; then \
-	  revision="-r`(cd $(abs_top_srcdir); $(HG) tip --template '{rev}')`" ; \
-	fi ; \
-	if [ -n "$(PKGVERSION)" ]; then plugin_version=" ($(PKGVERSION))"; fi; \
-	plugin_version=" $(PACKAGE_VERSION)$$revision$$plugin_version"; \
 	$(CXX) $(CXXFLAGS) \
-	  -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
-	  -DPLUGIN_VERSION="\"$$plugin_version\"" \
+	  -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \
 	  -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
 	  $(GTK_CFLAGS) \
 	  $(XULRUNNER_CFLAGS) \
diff -r fcd85ef6c2ae -r 7f40cc095348 acinclude.m4
--- a/acinclude.m4	Mon Jan 25 15:35:21 2010 +0000
+++ b/acinclude.m4	Mon Jan 25 19:42:12 2010 +0000
@@ -1146,15 +1146,33 @@ AC_SUBST(PARALLEL_JOBS)
 AC_SUBST(PARALLEL_JOBS)
 ])
 
-AC_DEFUN([IT_GET_LSB_DATA],
-[
+AC_DEFUN_ONCE([IT_GET_PKGVERSION],
+[
+AC_MSG_CHECKING([for distribution package version])
+AC_ARG_WITH([pkgversion],
+        [AS_HELP_STRING([--with-pkgversion=PKG],
+                        [Use PKG in the version string in addition to "IcedTea"])],
+        [case "$withval" in
+          yes) AC_MSG_ERROR([package version not specified]) ;;
+          no)  PKGVERSION=none ;;
+          *)   PKGVERSION="$withval" ;;
+         esac],
+        [PKGVERSION=none])
+AC_MSG_RESULT([${PKGVERSION}])
+AM_CONDITIONAL(HAS_PKGVERSION, test "x${PKGVERSION}" != "xnone") 
+AC_SUBST(PKGVERSION)
+])
+
+AC_DEFUN_ONCE([IT_GET_LSB_DATA],
+[
+AC_REQUIRE([IT_GET_PKGVERSION])
 AC_MSG_CHECKING([build identification])
 if test -n "$LSB_RELEASE"; then
   lsb_info="$($LSB_RELEASE -ds | sed 's/^"//;s/"$//')"
-  if test -n "$PKGVERSION"; then
+  if test "x$PKGVERSION" = "xnone"; then
+    DIST_ID="Built on $lsb_info ($(date))"
+  else
     DIST_ID="$lsb_info, package $PKGVERSION"
-  else
-    DIST_ID="Built on $lsb_info ($(date))"
   fi
   DIST_NAME="$($LSB_RELEASE -is | sed 's/^"//;s/"$//')"
 else
@@ -1204,4 +1222,3 @@ AC_DEFUN_ONCE([IT_OBTAIN_HG_REVISIONS],
   AM_CONDITIONAL([HAS_JDK_REVISION], test "x${JDK_REVISION}" != xnone)
   AM_CONDITIONAL([HAS_HOTSPOT_REVISION], test "x${HOTSPOT_REVISION}" != xnone)
 ])
-
diff -r fcd85ef6c2ae -r 7f40cc095348 configure.ac
--- a/configure.ac	Mon Jan 25 15:35:21 2010 +0000
+++ b/configure.ac	Mon Jan 25 19:42:12 2010 +0000
@@ -166,17 +166,7 @@ AM_CONDITIONAL([ENABLE_NSS], [test x$ENA
 AM_CONDITIONAL([ENABLE_NSS], [test x$ENABLE_NSS = xyes])
 AC_MSG_RESULT(${ENABLE_NSS})
 
-AC_ARG_WITH([pkgversion],
-        [AS_HELP_STRING([--with-pkgversion=PKG],
-                        [Use PKG in the version string in addition to "IcedTea"])],
-        [case "$withval" in
-          yes) AC_MSG_ERROR([package version not specified]) ;;
-          no)  PKGVERSION= ;;
-          *)   PKGVERSION="$withval" ;;
-         esac],
-        [PKGVERSION=])
-AC_SUBST(PKGVERSION)
-
+IT_GET_PKGVERSION
 IT_GET_LSB_DATA
 
 SET_ARCH_DIRS
diff -r fcd85ef6c2ae -r 7f40cc095348 plugin/icedteanp/IcedTeaNPPlugin.cc
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc	Mon Jan 25 15:35:21 2010 +0000
+++ b/plugin/icedteanp/IcedTeaNPPlugin.cc	Mon Jan 25 19:42:12 2010 +0000
@@ -87,8 +87,8 @@ exception statement from your version. *
               __LINE__, g_thread_self (), first, second, third)
 
 // Plugin information passed to about:plugins.
-#define PLUGIN_NAME "IcedTea NPR Web Browser Plugin (using IcedTea)"
-#define PLUGIN_DESC "The " PLUGIN_NAME PLUGIN_VERSION " executes Java applets."
+#define PLUGIN_NAME "IcedTea NPR Web Browser Plugin (using " PLUGIN_VERSION ")"
+#define PLUGIN_DESC "The " PLUGIN_NAME " executes Java applets."
 
 #define PLUGIN_MIME_DESC                                               \
   "application/x-java-vm:class,jar:IcedTea;"                           \
@@ -2079,7 +2079,7 @@ NP_GetValue (void* future, NPPVariable v
     {
     case NPPVpluginNameString:
       PLUGIN_DEBUG_0ARG ("NP_GetValue: returning plugin name.\n");
-      *char_value = g_strdup (PLUGIN_NAME " " PACKAGE_VERSION);
+      *char_value = g_strdup (PLUGIN_NAME);
       break;
 
     case NPPVpluginDescriptionString:



More information about the distro-pkg-dev mailing list